Skip to content

Commit

Permalink
Hotfix for ml.learn
Browse files Browse the repository at this point in the history
Update to be compatible with new utils.load_infile

Co-authored-by: Ryan <[email protected]>
  • Loading branch information
ryanadtran and ryanadtran authored Sep 26, 2022
1 parent 00451ee commit ac92608
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to Merlin Spellbook will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.4]
### Fixed
- `learn.make_regressor` and `learn_alt.random_forest` properly calls `utils.load_infile`.

## [0.7.3]
### Fixed
- `make-barrier-qoi` can accept no constraints.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin-Spellbook, Version: 0.7.3.
# This file is part of Merlin-Spellbook, Version: 0.7.4.
#
# For details, see https://github.com/LLNL/merlin-spellbook.
#
Expand Down
2 changes: 1 addition & 1 deletion spellbook/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.7.3"
__version__ = "0.7.4"

VERSION = __version__
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-<PENDING>
# All rights reserved.
# This file is part of merlin-spellbook, Version: 0.7.3.
# This file is part of merlin-spellbook, Version: 0.7.4.
#
# For details, see https://github.com/LLNL/merlin-spellbook.
#
Expand Down
2 changes: 1 addition & 1 deletion spellbook/log_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin Spellbook, Version: 0.7.3.
# This file is part of Merlin Spellbook, Version: 0.7.4.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion spellbook/ml/learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def make_regressor(args):
reg_args = args.reg_args

regr = surrogates.sklearnRegressors.factory(args.regressor, **reg_args)
X, y = load_infile(args)
X, y = load_infile(args.infile, X_keys=args.X, y_keys=args.y)

n_samples_X = X.shape[0]
n_samples_y = y.shape[0]
Expand Down
3 changes: 2 additions & 1 deletion spellbook/ml/learn_alt.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def random_forest(args):
forest_args = FOREST_DEFAULTS

regr = RandomForestRegressor(**forest_args)
X, y = load_infile(args)

X, y = load_infile(args.infile, X_keys=args.X, y_keys=args.y)

n_samples_X = X.shape[0]
n_samples_y = y.shape[0]
Expand Down

0 comments on commit ac92608

Please sign in to comment.