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

Remove Pandas from experiment summary #116

Merged
merged 10 commits into from
Dec 9, 2021

Conversation

MattToast
Copy link
Member

  • Refactor Experiment.summary method by removing usage of a pandas dataframe and instead utilizing tabulate to format the summary table
  • Remove pandas as requirement for SmartSim
  • Add tabulate as as requirement for SmartSim

@MattToast MattToast changed the title Remove np from experiment summary Remove Pandas from experiment summary Dec 3, 2021
Copy link
Contributor

@Spartee Spartee left a comment

Choose a reason for hiding this comment

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

hey Matt! great stuff on the PR!

A couple comments

theres a test in on_wlm/test_simple_entity_launch.py that tests the summary function and will need to be changed. In addition, we should add another test in the test_experiment.py file to test another simple run.

Merge remote-tracking branch 'upstream/develop' into remove_np_from_experiment_summary
@MattToast
Copy link
Member Author

Changes:

  • Refactored on_wlm/test_simple_entity_launch.py to work with the summary str return type
  • Added a test to test_experiment.py to test summary method without WLM integrations

Copy link
Contributor

@Spartee Spartee left a comment

Choose a reason for hiding this comment

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

Small changes! Otherwise looking great!

@@ -467,35 +467,35 @@ def summary(self):
The summary will show each instance that has been
launched and completed in this ``Experiment``

:return: pandas Dataframe of ``Experiment`` history
:rtype: pd.DataFrame
:return: tabulate string of ``Experiment`` history
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets allow format as a parameter here and pass to the tabulate function. Also should add in https://github.com/astanin/python-tabulate#table-format to the docstring so that people know what options are available.

job.history.returns[run],
]
)
return tabulate(values, headers, showindex=True, tablefmt="plain")
Copy link
Contributor

Choose a reason for hiding this comment

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

lets set the default to github. so the added parameter will be a keyword arg like format=github and then that input parameter will be passed here.

@MattToast
Copy link
Member Author

Changes:

  • Added format as a parameter to Experiment.summary and passed value to call to tabulate
  • Updated docstring with link to formats

Copy link
Contributor

@Spartee Spartee left a comment

Choose a reason for hiding this comment

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

LGTM, lets chat before you merge!

@Spartee Spartee merged commit b091fc1 into CrayLabs:develop Dec 9, 2021
@MattToast MattToast deleted the remove_np_from_experiment_summary branch December 9, 2021 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants