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

Bug fixes for TTO #28

Merged
merged 17 commits into from
Mar 20, 2024
Merged

Bug fixes for TTO #28

merged 17 commits into from
Mar 20, 2024

Conversation

wenatuhs
Copy link
Collaborator

Bug fixes

  • Fix the cannot-delete-last-run issue
  • Support constraints/states in routine editor
  • Auto-select the updated routine in the routine list once the changes are saved

Remaining issues

  • Critical constraints being triggered incorrectly (Xopt-related)
  • Possible faulty behavior when add constraints in routine

@wenatuhs wenatuhs requested a review from roussel-ryan March 15, 2024 08:33
Copy link
Collaborator

@roussel-ryan roussel-ryan left a comment

Choose a reason for hiding this comment

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

Mostly looks good, some minor comments to address

@@ -547,19 +547,19 @@ def _compose_vocs(self) -> (VOCS, List[str]):
if critical:
critical_constraints.append(con_name)

states = {}
states = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we rename states variables in Badger to observables such that it is consistent with Xopt? or do they mean something different?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure thing! They mean the same, the concern was that the observables here get confused with the observables in Badger env, but maybe I'm overthinking

@@ -151,7 +151,10 @@ def __init__(self):

@property
def vocs(self) -> VOCS:
return self.routine.vocs
if self.routine is None:
return None
Copy link
Collaborator

Choose a reason for hiding this comment

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

are we sure we want to return None here? I suggest that we raise an error saying that not routine has been specified instead. Might be easier for the user to debug

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a valid status that the run monitor doesn't hold a routine -- say when the user just gets started and creates a few routines without running them, in this case, if the user doesn’t select any routine in the list the run monitor should be in this empty status

@@ -477,18 +483,14 @@ def init_plots(self, routine: Routine = None, run_filename: str = None):
self.plot_sta
except:
self.plot_sta = plot_sta = add_axes(
self.monitor, "Constants", 'Evaluation History (S)',
self.inspector_state, row=1, col=0
self.monitor, "states", 'Evaluation History (S)',
Copy link
Collaborator

Choose a reason for hiding this comment

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

relevant to the states question above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will change to plot_obs!

@wenatuhs wenatuhs merged commit 2dd412b into master Mar 20, 2024
4 checks passed
@wenatuhs wenatuhs deleted the tto branch March 20, 2024 15:03
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.

3 participants