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 all 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
7 changes: 7 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ To be released at some future point in time

Description

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

Detailed Notes

- Change `format` argument to `style` in `Experiment.summary()`, this is
an API break (PR391_)
- Added support for first_device parameter for scripts, functions,
and models. This causes them to be loaded to the first num_devices
beginning with first_device (PR394_)
Expand All @@ -39,12 +42,16 @@ Detailed Notes
bug has been fixed. This applies to all operating systems. (PR383_)
- Add support for creation of multiple databases with unique identifiers. (PR342_)


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


0.5.1
-----

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