Skip to content

Commit

Permalink
Type cast batch size to int (#96)
Browse files Browse the repository at this point in the history
* Type cast bath size to int
Slightly increase mouse sensitivity

* update connection for new polars version

---------

Co-authored-by: egillax <[email protected]>
  • Loading branch information
lhjohn and egillax authored Oct 18, 2023
1 parent 357b14e commit 74c346f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inst/python/Dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self,
if pathlib.Path(data).suffix == '.sqlite':
data = urllib.parse.quote(data)
data = pl.read_database("SELECT * from covariates",
connection_uri=f"sqlite://{data}").lazy()
connection=f"sqlite://{data}").lazy()
else:
data = pl.scan_ipc(pathlib.Path(data).joinpath('covariates/*.arrow'))
observations = data.select(pl.col('rowId').max()).collect()[0, 0]
Expand Down
2 changes: 1 addition & 1 deletion inst/python/LrFinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self,
self.scheduler = ExponentialSchedulerPerBatch(self.optimizer, self.max_lr, self.num_lr)

self.criterion = estimator_settings["criterion"]()
self.batch_size = estimator_settings['batch_size']
self.batch_size = int(estimator_settings['batch_size'])
self.losses = None
self.loss_index = None

Expand Down

0 comments on commit 74c346f

Please sign in to comment.