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

Rename Experiment.summary() argument #391

Merged
merged 4 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
12 changes: 9 additions & 3 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ To be released at some future point in time

Description

- Change signature of `Experiment.summary()`
- Add support for multiple databases
- Added support for MINBATCHTIMEOUT in model execution
- Remove support for RedisAI 1.2.5, use RedisAI 1.2.7 commit

Detailed Notes

- Change `format` argument to `style` in `Experiment.summary()`, this is
an API break (PR391_)
- Add support for creation of multiple databases with unique identifiers. (PR342_)
- Added support for MINBATCHTIMEOUT in model execution, which caps the delay
waiting for a minimium number of model execution operations to accumulate
before executing them as a batch (PR387_)
Expand All @@ -33,18 +38,21 @@ Detailed Notes
use commit 634916c_ from RedisAI's GitHub repository, where such
bug has been fixed. This applies to all operating systems. (PR383_)


.. _PR391: https://github.com/CrayLabs/SmartSim/pull/391
.. _PR342: https://github.com/CrayLabs/SmartSim/pull/342
.. _PR387: https://github.com/CrayLabs/SmartSim/pull/387
.. _PR383: https://github.com/CrayLabs/SmartSim/pull/383
.. _634916c: https://github.com/RedisAI/RedisAI/commit/634916c722e718cc6ea3fad46e63f7d798f9adc2


0.5.1
-----

Released on 14 September, 2023

Description

- Add support for multiple databases
- Add typehints throughout the SmartSim codebase
- Provide support for Slurm heterogeneous jobs
- Provide better support for `PalsMpiexecSettings`
Expand All @@ -62,7 +70,6 @@ Description

Detailed Notes

- Add support for creation of multiple databases with unique identifiers. (PR342_)
- Add methods to allow users to inspect files attached to models and ensembles. (PR352_)
- Add a `smart info` target to provide rudimentary information about the SmartSim installation. (PR350_)
- Remove unnecessary generation producing unexpected directories in the test suite. (PR349_)
Expand All @@ -86,7 +93,6 @@ Detailed Notes
- Update pylint dependency, update .pylintrc, mitigate non-breaking issues, suppress api breaks. (PR311_)
- Refactor the `smart` CLI to use subparsers for better documentation and extension. (PR308_)

.. _PR342: https://github.com/CrayLabs/SmartSim/pull/342
.. _PR352: https://github.com/CrayLabs/SmartSim/pull/352
.. _PR351: https://github.com/CrayLabs/SmartSim/pull/351
.. _PR350: https://github.com/CrayLabs/SmartSim/pull/350
Expand Down
9 changes: 4 additions & 5 deletions smartsim/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,18 +791,17 @@ def reconnect_orchestrator(self, checkpoint: str) -> Orchestrator:
logger.error(e)
raise

# pylint: disable-next=redefined-builtin
def summary(self, format: str = "github") -> str:
def summary(self, style: str = "github") -> str:
"""Return a summary of the ``Experiment``

The summary will show each instance that has been
launched and completed in this ``Experiment``

:param format: the style in which the summary table is formatted,
:param style: the style in which the summary table is formatted,
for a full list of styles see:
https://github.com/astanin/python-tabulate#table-format,
defaults to "github"
:type format: str, optional
:type style: str, optional
:return: tabulate string of ``Experiment`` history
:rtype: str
"""
Expand Down Expand Up @@ -833,7 +832,7 @@ def summary(self, format: str = "github") -> str:
values,
headers,
showindex=True,
tablefmt=format,
tablefmt=style,
missingval="None",
disable_numparse=True,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/on_wlm/test_simple_entity_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_summary(fileutils, wlmutils):
assert exp.get_status(bad)[0] == status.STATUS_FAILED
assert exp.get_status(sleep)[0] == status.STATUS_COMPLETED

summary_str = exp.summary(format="plain")
summary_str = exp.summary(style="plain")
print(summary_str)

rows = [s.split() for s in summary_str.split("\n")]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_summary(fileutils):
"model", path=test_dir, run_settings=RunSettings("echo", "Hello")
)
exp.start(m)
summary_str = exp.summary(format="plain")
summary_str = exp.summary(style="plain")
print(summary_str)

summary_lines = summary_str.split("\n")
Expand Down