-
Notifications
You must be signed in to change notification settings - Fork 18
Add new plots and methods to ExplorationDiagnostics
#165
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
Conversation
ExplorationDiagnosticsExplorationDiagnostics
delaossa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! Thank you very much for this PR.
delaossa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! Thank you very much for this PR.
| """Create a dict with the path to the sim dir of each evaluation.""" | ||
| self._sim_dir_paths = {} | ||
| ensemble_dir_path = os.path.join( | ||
| self._exploration.exploration_dir_path, "evaluations" | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment:
This creates a separate dictionary with the simulation directory paths with the trial indexes as keys.
An alternative solution could be to add the simulation paths as a new column to the history DataFrame (adding None when not present).
| if sim_dir.startswith("sim"): | ||
| try: | ||
| trial_index = int(sim_dir[3:]) | ||
| self._sim_dir_paths[trial_index] = os.path.join( | ||
| ensemble_dir_path, sim_dir | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor:
This removes the "sim" part of the simulation directory name and converts the rest to an integer which matches the trial_index by construction.
Maybe is clearer is we do: trial_index = int(sim_dir.lstrip("sim"))
| if objectives is None: | ||
| if len(self.objectives) == 2: | ||
| objectives = self.objectives |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no objectives are given, it will work only when two objectives are found in the exploration folder.
It could work as well when there are more than two objectives by selecting the first two of them by default:
if len(self.objectives) >= 2:
objectives = self.objectives[:2]
Adds new methods to the
ExplorationDiagnosticsto: