Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skorch emulator #89

Merged
merged 25 commits into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3c5b30d
Create new emulator branch to work off of
marcosfelt Feb 12, 2021
6a897d1
First work on skorch
marcosfelt Feb 12, 2021
4510720
Get basic emulator functionality working
marcosfelt Feb 16, 2021
c725313
Add in cross validation
marcosfelt Feb 16, 2021
e2622a7
Get parity plot working
marcosfelt Feb 16, 2021
6eeca6c
Minor changes to parity_plot
marcosfelt Feb 16, 2021
ca51f76
Update scikit learn and create progress bar for grid search
marcosfelt Feb 17, 2021
7886785
Move MIT benchmarks into their own directory
marcosfelt Feb 17, 2021
a957448
Finish save/load functionality
marcosfelt Feb 17, 2021
ad1da1b
Remove old files
marcosfelt Feb 17, 2021
222e123
Update experimental emulators to not ensemble due to scikit-learn/sci…
marcosfelt Feb 17, 2021
9a7f338
Small improvements to parity_plot
marcosfelt Feb 17, 2021
aa84ef5
Small improvements to parity_plot
marcosfelt Feb 17, 2021
e691b48
Serialization working
marcosfelt Feb 18, 2021
6aa18b5
Now in a place that works
marcosfelt Feb 18, 2021
d36794d
Start working on tests
marcosfelt Feb 18, 2021
95d9f8b
Get first Experimental Emulator tests working
marcosfelt Feb 18, 2021
1d85144
Add in newly trained Reizman Suzuki models
marcosfelt Feb 18, 2021
55d48c5
Override TransformedTargetRegressor due to strange bug removing
marcosfelt Feb 18, 2021
1a78e64
Train reizman and baumgartner emulators
marcosfelt Feb 18, 2021
87af1ed
Fix bug with emulator serialization and retrain
marcosfelt Feb 18, 2021
3261f42
Refactor to remove unused code
marcosfelt Feb 18, 2021
12387c6
Remove regression in DRO tensorflow import
marcosfelt Feb 18, 2021
f36c0a2
Update benchmark docs
marcosfelt Feb 18, 2021
ff003e9
Fix final issue with DRO
marcosfelt Feb 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Start working on tests
  • Loading branch information
marcosfelt committed Feb 18, 2021
commit d36794de205d10310b72bcbe5f6ac850a831e70c
16 changes: 10 additions & 6 deletions scripts/train_emulators.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ def test_train():
domain = ReizmanSuzukiEmulator.setup_domain()
ds = DataSet.read_csv(DATA_PATH / f"{model_name}.csv")
exp = ExperimentalEmulator(model_name, domain, dataset=ds, regressor=ANNRegressor)
exp.train(max_epochs=1, cv_folds=5, random_state=100, test_size=0.2, verbose=1)
res = exp.train(
max_epochs=10, cv_folds=5, random_state=100, test_size=0.2, verbose=0
)
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(res)
# print(exp.predictors[0].regressor.named_steps.preprocessor.named_transformers_)
# params = {
# "regressor__net__max_epochs": [200, 500, 1000]
Expand All @@ -39,10 +43,10 @@ def test_train():
# output_variables="yield", clip={"yield": (0, 100)}, include_test=True
# )
# plt.show()
pp = pprint.PrettyPrinter(indent=4)
d = exp.to_dict()

exp.save("test_ee")
# pp.pprint(d)
exp_2 = ExperimentalEmulator.from_dict(d)
exp_2 = ExperimentalEmulator.load(model_name, "test_ee")


def train_reizman():
Expand Down Expand Up @@ -102,5 +106,5 @@ def reproduce_bug():


if __name__ == "__main__":
reproduce_bug()
# test_train()
# reproduce_bug()
test_train()
Loading