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

New ML online training tutorial #176

Merged
merged 5 commits into from
Mar 30, 2022

Conversation

al-rigazzi
Copy link
Collaborator

This PR substitutes the old ML training tutorials with a new one.

The major features of this tutorial:

  • is set to run with local launcher, thus it will be run in the docs page too
  • trains a real surrogate model
  • does not require Horovod or MPI4PY to run
  • runs in 3 minutes on a standard CPU

The whole training is performed in Keras, the PyTorch version will be ready soon.

@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2022

Codecov Report

Merging #176 (b78c03e) into develop (d59cd2e) will increase coverage by 0.23%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #176      +/-   ##
===========================================
+ Coverage    81.20%   81.43%   +0.23%     
===========================================
  Files           57       57              
  Lines         2910     2968      +58     
===========================================
+ Hits          2363     2417      +54     
- Misses         547      551       +4     
Impacted Files Coverage Δ
smartsim/ml/tf/__init__.py 100.00% <100.00%> (ø)
smartsim/ml/tf/utils.py 95.83% <100.00%> (+2.50%) ⬆️
smartsim/_core/generation/modelwriter.py 84.93% <0.00%> (-4.78%) ⬇️
smartsim/settings/base.py 94.11% <0.00%> (+2.81%) ⬆️

Copy link
Contributor

@Spartee Spartee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny comment, but I'm approving this. I think we could open 1 more ticket about getting this into the smartsim-tutorials container, but I feel like thats outside the scope of this ticket.

input_names = [x.name.split(":")[0] for x in frozen_func.inputs]
output_names = [x.name.split(":")[0] for x in frozen_func.outputs]

model_serialized = frozen_func.graph.as_graph_def().SerializeToString(deterministic=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be an option? I'm guessing no but want to be sure.

@al-rigazzi
Copy link
Collaborator Author

Added a test for the new function, coverage is stable (small increase).

@al-rigazzi al-rigazzi merged commit 958877b into CrayLabs:develop Mar 30, 2022
@al-rigazzi al-rigazzi deleted the new-ml-tutorial branch March 30, 2022 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants