From 5cb2fbd5f49e81e94b1faed65f91eedb1a8164e5 Mon Sep 17 00:00:00 2001 From: Al Rigazzi Date: Wed, 11 Oct 2023 16:24:39 +0200 Subject: [PATCH 1/2] Switch to `style` --- smartsim/experiment.py | 9 ++++----- tests/on_wlm/test_simple_entity_launch.py | 2 +- tests/test_experiment.py | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/smartsim/experiment.py b/smartsim/experiment.py index 27ac4ee96..324d7cbd0 100644 --- a/smartsim/experiment.py +++ b/smartsim/experiment.py @@ -781,18 +781,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 """ @@ -823,7 +822,7 @@ def summary(self, format: str = "github") -> str: values, headers, showindex=True, - tablefmt=format, + tablefmt=style, missingval="None", disable_numparse=True, ) diff --git a/tests/on_wlm/test_simple_entity_launch.py b/tests/on_wlm/test_simple_entity_launch.py index 14fd2e4ae..16cfa8f38 100644 --- a/tests/on_wlm/test_simple_entity_launch.py +++ b/tests/on_wlm/test_simple_entity_launch.py @@ -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")] diff --git a/tests/test_experiment.py b/tests/test_experiment.py index dbaa51bdc..67aa7ed44 100644 --- a/tests/test_experiment.py +++ b/tests/test_experiment.py @@ -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") From bb12c1db8731d23f85990e66616fbd6da8e416dc Mon Sep 17 00:00:00 2001 From: Al Rigazzi Date: Thu, 12 Oct 2023 11:51:01 +0200 Subject: [PATCH 2/2] Update and fix changelog --- doc/changelog.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index 8b9a9b00f..efd4ecd04 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -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_) @@ -33,10 +38,14 @@ 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 ----- @@ -44,7 +53,6 @@ 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` @@ -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_) @@ -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