Skip to content

Commit

Permalink
fix dictionary key check in estimator
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Dec 8, 2023
1 parent 8fa3711 commit b85799a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inst/python/Estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, model, model_parameters, estimator_settings):
self.device = estimator_settings["device"]

torch.manual_seed(seed=self.seed)
if estimator_settings["finetune"]:
if "finetune" in estimator_settings.keys() and estimator_settings["finetune"]:
path = estimator_settings["finetune_model_path"]
fitted_estimator = torch.load(path, map_location="cpu")
fitted_parameters = fitted_estimator["model_parameters"]
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-MLP.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ test_that("MLP nn-module works ", {
activation = torch$nn$ReLU,
normalization = torch$nn$BatchNorm1d,
dropout = 0.3,
d_out = 1L
dim_out = 1L
)
output <- model(input)
# model works without numeric variables
Expand Down

0 comments on commit b85799a

Please sign in to comment.