Skip to content

Commit

Permalink
FIX: keep gt_entity_id as int64 when no match candidates are added
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaak authored and sbrugman committed Sep 15, 2024
1 parent 90b9885 commit 9147749
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions emm/indexing/pandas_candidate_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def transform(self, X: pd.DataFrame) -> pd.DataFrame:
if self.with_no_matches:
# change gt_uid column to nullable integer
candidates["gt_uid"] = candidates["gt_uid"].replace({NO_MATCH_ID: np.nan}).astype("Int64")
candidates["gt_entity_id"] = candidates["gt_entity_id"].replace({NO_MATCH_ID: np.nan}).astype("Int64")

timer.log_param("n", len(X))

Expand Down

0 comments on commit 9147749

Please sign in to comment.