Skip to content

Commit

Permalink
use restorable attribute for saving parameters on server
Browse files Browse the repository at this point in the history
  • Loading branch information
bleykauf committed May 24, 2023
1 parent 4711859 commit 00f224d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions linien-server/linien_server/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,10 @@ def save_parameters(self):

print("save parameters")
parameters = {}
for name, _ in self.parameters.get_all_restorable_parameters():
for name, value in self.parameters:
param = getattr(self.parameters, name)
parameters[name] = param.value
if param.restorable:
parameters[name] = value

try:
with open(PARAMETER_STORE_FN, "wb") as f:
Expand Down

0 comments on commit 00f224d

Please sign in to comment.