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

Command Generation #615

Merged
merged 19 commits into from
Jul 24, 2024
Merged

Command Generation #615

merged 19 commits into from
Jul 24, 2024

Conversation

juliaputko
Copy link
Contributor

No description provided.

Copy link
Contributor

@amandarichardsonn amandarichardsonn left a comment

Choose a reason for hiding this comment

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

Nice work!! Some initial comments!

smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
tests/test_command_generation.py Outdated Show resolved Hide resolved
tests/test_command_generation.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
Copy link
Contributor

@amandarichardsonn amandarichardsonn left a comment

Choose a reason for hiding this comment

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

Looks good just some small changes!

smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
smartsim/_core/generation/commandgenerator.py Outdated Show resolved Hide resolved
tests/test_command_generation.py Outdated Show resolved Hide resolved
tests/test_command_generation.py Outdated Show resolved Hide resolved
tests/test_command_generation.py Outdated Show resolved Hide resolved
tests/test_command_generation.py Outdated Show resolved Hide resolved
tests/test_command_generation.py Outdated Show resolved Hide resolved
@MattToast MattToast force-pushed the smartsim-refactor branch 2 times, most recently from d15e951 to e9d8eca Compare June 26, 2024 22:57
@juliaputko juliaputko requested a review from MattToast July 11, 2024 21:49
Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (smartsim-refactor@c2164ca). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##             smartsim-refactor     #615   +/-   ##
====================================================
  Coverage                     ?   32.93%           
====================================================
  Files                        ?      107           
  Lines                        ?     6401           
  Branches                     ?        0           
====================================================
  Hits                         ?     2108           
  Misses                       ?     4293           
  Partials                     ?        0           

Copy link
Contributor

@amandarichardsonn amandarichardsonn left a comment

Choose a reason for hiding this comment

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

Nice work this is all so awesome!! Very well written, I have a couple suggestions below to just consider mayhaps!

tests/test_file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
tests/test_file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
tests/test_file_operations.py Outdated Show resolved Hide resolved
tests/test_file_operations.py Outdated Show resolved Hide resolved
tests/test_file_operations.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mellis13 mellis13 left a comment

Choose a reason for hiding this comment

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

Just some initial comments.

smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mellis13 mellis13 left a comment

Choose a reason for hiding this comment

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

Just a couple more questions/comments

smartsim/_core/entrypoints/file_operations.py Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Show resolved Hide resolved
Copy link
Member

@MattToast MattToast left a comment

Choose a reason for hiding this comment

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

Looks great! The CLI seems to be working wonderfully, I just have a few complaints about the original SmartSim V0.7 "to configure" operation that I think we should address as part of the this ticket.

Otherwise, LGTM!! Feel free to let me know what you think!

smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
tests/test_file_operations.py Outdated Show resolved Hide resolved
Comment on lines +433 to +435
"5": 10,
"FIRST": "SECOND",
"17": 20,
Copy link
Member

Choose a reason for hiding this comment

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

Not strictly wrong, but thought I should call it out: in theory you should only need to handle a param mapping of type dict[str, str]. If you can handle more types that's great but don't feel the need to explicitly test for it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is carry over from previous tests. I can remove it if you think its irrelevant

Copy link
Member

Choose a reason for hiding this comment

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

I'd say either assume a dict[str, str] or introduce a type alias so that we know exactly what you are expecting before we serialize and send a command over the wire

tests/test_file_operations.py Show resolved Hide resolved
tests/test_file_operations.py Outdated Show resolved Hide resolved
tests/test_configs/tagged_tests/marked/MOM_input Outdated Show resolved Hide resolved
Copy link
Member

@MattToast MattToast left a comment

Choose a reason for hiding this comment

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

Still need to re-look through the tests, but here is some quick comments regarding the configure operation refactor!

smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
smartsim/_core/entrypoints/file_operations.py Outdated Show resolved Hide resolved
Copy link
Member

@MattToast MattToast left a comment

Choose a reason for hiding this comment

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

One last super small thing!

def test_configure_invalid_tags(fileutils):
"""Test configure operation with an invalid tag"""
tagged_file = fileutils.get_test_conf_path(
osp.join("generator_files", "easy", "marked", "invalidtag.txt")
Copy link
Member

Choose a reason for hiding this comment

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

I'm slightly hurt that you thought my test was easy, hahahaha

Copy link
Member

@MattToast MattToast left a comment

Choose a reason for hiding this comment

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

LGTM pending tests!!

@juliaputko juliaputko merged commit 9b511f1 into CrayLabs:smartsim-refactor Jul 24, 2024
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants