Skip to content

Commit

Permalink
add n_epocs to gui
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurDeclercq committed Oct 3, 2023
1 parent fad0a73 commit 32712cb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ms2rescore/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,20 @@ def __init__(self, *args, **kwargs):
self.transfer_learning = widgets.LabeledSwitch(self, label="Use transfer learning")
self.transfer_learning.grid(row=2, column=0, pady=(0, 10), sticky="nsew")

self.num_epochs = widgets.LabeledFloatSpinbox(
self,
label="Number of epochs",
step_size=5,
initial_value=20,
)
self.num_epochs.grid(row=3, column=0, pady=(0, 10), sticky="nsew")

self.calibration_set_size = widgets.LabeledEntry(
self,
label="Set calibration set size (fraction or number of PSMs)",
placeholder_text="0.15",
)
self.calibration_set_size.grid(row=3, column=0, pady=(0, 10), sticky="nsew")
self.calibration_set_size.grid(row=4, column=0, pady=(0, 10), sticky="nsew")

def get(self) -> Dict:
"""Return the configuration as a dictionary."""
Expand All @@ -486,6 +494,7 @@ def get(self) -> Dict:
enabled = self.enabled.get()
config = {
"deeplc_retrain": self.transfer_learning.get(),
"n_epochs": int(self.num_epochs.get()),
"calibration_set_size": calibration_set_size,
}
return enabled, config
Expand Down

0 comments on commit 32712cb

Please sign in to comment.