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

Refactor multistep search #402

Open
wants to merge 8 commits into
base: outline_for_multistep_search
Choose a base branch
from

Conversation

mschwoer
Copy link
Collaborator

  • move logging of logo etc out of Plan
  • move logging out of cli
  • introduce a string constants class
  • some minor refactorings

optimization_stats[MS1_ERROR] = optimization_manager.ms1_error
optimization_stats["rt_error"] = optimization_manager.rt_error
optimization_stats["mobility_error"] = optimization_manager.mobility_error
optimization_stats[OutputKeys.MS2_ERROR] = optimization_manager.ms2_error
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@GeorgWa I'd suggest using this idiom for all string constants short- to mid-term

Copy link
Collaborator

@GeorgWa GeorgWa left a comment

Choose a reason for hiding this comment

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

Looks good to me

alphadia/constants/keys.py Outdated Show resolved Hide resolved
@@ -494,12 +494,16 @@ def __init__(
"fwhm_mobility": config["optimization_manager"]["fwhm_mobility"],
"score_cutoff": config["optimization_manager"]["score_cutoff"],
}
self.__dict__.update(initial_parameters)
self.__dict__.update(
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of using the magic method? ok

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

any preferences? store this as a dict or individual instance variables?

def fit(self, update_dict):
def fit(
self, update_dict
): # TODO siblings' implementations have different signatures
Copy link
Collaborator

Choose a reason for hiding this comment

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

yes.. this is unfortunately necessary :/ Should we name the functions differently in this case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this would be a solution, yes .. otherwise using inheritance does not make too much sense (but maybe it does not in the first place?)

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