CrayLabs / SmartSim

SmartSim Infrastructure Library.
BSD 2-Clause "Simplified" License
235 stars 37 forks source link

MLI helper methods #709

Closed AlyssaCote closed 2 months ago

AlyssaCote commented 2 months ago

In this PR I added helper methods in the form of @propertys to classes like InferenceRequest and InferenceReply. I had also written helper methods for RequestBatch, but mypy would complain about not knowing the type for the attributes when trying to use them after using my helper methods. I do think I may have gone overboard, so if anyone has any push back on these please let me know. Also if there are helper methods anyone remembers that they wanted and I didn't include them, please let me know.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 46 lines in your changes missing coverage. Please review.

Please upload report for BASE (mli-feature@0ebd5ab). Learn more about missing BASE report.

Files with missing lines Patch % Lines
smartsim/_core/mli/infrastructure/worker/worker.py 0.00% 27 Missing :warning:
..._core/mli/infrastructure/control/worker_manager.py 0.00% 10 Missing :warning:
...e/mli/infrastructure/control/request_dispatcher.py 0.00% 9 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/CrayLabs/SmartSim/pull/709/graphs/tree.svg?width=650&height=150&src=pr&token=96HFI2F45E&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CrayLabs)](https://app.codecov.io/gh/CrayLabs/SmartSim/pull/709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CrayLabs) ```diff @@ Coverage Diff @@ ## mli-feature #709 +/- ## ============================================== Coverage ? 69.08% ============================================== Files ? 103 Lines ? 8839 Branches ? 0 ============================================== Hits ? 6106 Misses ? 2733 Partials ? 0 ``` | [Files with missing lines](https://app.codecov.io/gh/CrayLabs/SmartSim/pull/709?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CrayLabs) | Coverage Δ | | |---|---|---| | [...e/mli/infrastructure/control/request\_dispatcher.py](https://app.codecov.io/gh/CrayLabs/SmartSim/pull/709?src=pr&el=tree&filepath=smartsim%2F_core%2Fmli%2Finfrastructure%2Fcontrol%2Frequest_dispatcher.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CrayLabs#diff-c21hcnRzaW0vX2NvcmUvbWxpL2luZnJhc3RydWN0dXJlL2NvbnRyb2wvcmVxdWVzdF9kaXNwYXRjaGVyLnB5) | `0.00% <0.00%> (ø)` | | | [...\_core/mli/infrastructure/control/worker\_manager.py](https://app.codecov.io/gh/CrayLabs/SmartSim/pull/709?src=pr&el=tree&filepath=smartsim%2F_core%2Fmli%2Finfrastructure%2Fcontrol%2Fworker_manager.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CrayLabs#diff-c21hcnRzaW0vX2NvcmUvbWxpL2luZnJhc3RydWN0dXJlL2NvbnRyb2wvd29ya2VyX21hbmFnZXIucHk=) | `0.00% <0.00%> (ø)` | | | [smartsim/\_core/mli/infrastructure/worker/worker.py](https://app.codecov.io/gh/CrayLabs/SmartSim/pull/709?src=pr&el=tree&filepath=smartsim%2F_core%2Fmli%2Finfrastructure%2Fworker%2Fworker.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CrayLabs#diff-c21hcnRzaW0vX2NvcmUvbWxpL2luZnJhc3RydWN0dXJlL3dvcmtlci93b3JrZXIucHk=) | `0.00% <0.00%> (ø)` | |
al-rigazzi commented 2 months ago

We're going to rewrite part of RequestBatch anyhow, we'll add the helpers then.