Skip to content

Commit

Permalink
actually user should handle null values in their own datagit status
Browse files Browse the repository at this point in the history
  • Loading branch information
cthorrez committed Nov 1, 2024
1 parent 6c8bd53 commit fcc85de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion riix/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def grid_search(
metric='log_loss',
minimize_metric=True,
num_processes=None,
seed=0,
return_all_metrics=False,
):
"""Perform grid search and return the best hyperparameters."""
Expand Down
8 changes: 4 additions & 4 deletions riix/utils/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def __init__(
# Create a single competitors reference dataframe
competitors_df = pl.DataFrame(
{'competitor': pl.concat([
df[competitor_cols[0]].cast(pl.Utf8).fill_null(''),
df[competitor_cols[1]].cast(pl.Utf8).fill_null('')
df[competitor_cols[0]].cast(pl.Utf8),
df[competitor_cols[1]].cast(pl.Utf8)
]).unique().sort()
}).lazy().select(
pl.all(),
Expand All @@ -59,8 +59,8 @@ def __init__(
self.competitor_to_idx = dict(zip(self.competitors, range(self.num_competitors)))
matchups_df = (df.lazy()
.select([
pl.col(competitor_cols[0]).cast(pl.Utf8).fill_null('').alias('comp1'),
pl.col(competitor_cols[1]).cast(pl.Utf8).fill_null('').alias('comp2')
pl.col(competitor_cols[0]).cast(pl.Utf8).alias('comp1'),
pl.col(competitor_cols[1]).cast(pl.Utf8).alias('comp2')
])
.join(
competitors_df,
Expand Down

0 comments on commit fcc85de

Please sign in to comment.