From 74c346f45850b29a212b6f9a2b1e48e2a3544e41 Mon Sep 17 00:00:00 2001 From: Henrik Date: Wed, 18 Oct 2023 08:42:43 +0200 Subject: [PATCH] Type cast batch size to int (#96) * Type cast bath size to int Slightly increase mouse sensitivity * update connection for new polars version --------- Co-authored-by: egillax --- inst/python/Dataset.py | 2 +- inst/python/LrFinder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/python/Dataset.py b/inst/python/Dataset.py index 15d749b..671aca9 100644 --- a/inst/python/Dataset.py +++ b/inst/python/Dataset.py @@ -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] diff --git a/inst/python/LrFinder.py b/inst/python/LrFinder.py index d80120d..9d5bd0c 100644 --- a/inst/python/LrFinder.py +++ b/inst/python/LrFinder.py @@ -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