Skip to content

Commit

Permalink
Add transition_to attr to json decoder file (#1934)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1934

In diff 8/n landed transition to argument addition but didn't add it to the decoder

Reviewed By: lena-kashtelyan

Differential Revision: D50626332

fbshipit-source-id: 0d0d50cc6547704ef44e2e0f0026b68ae64d6157
  • Loading branch information
mgarrard authored and facebook-github-bot committed Oct 31, 2023
1 parent b62cbe7 commit dc40a80
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ax/storage/json_store/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ def transition_criteria_from_json(
MinimumTrialsInStatus(
statuses=object_from_json(criterion_json.pop("statuses")),
threshold=criterion_json.pop("threshold"),
transition_to=criterion_json.pop("transition_to")
if "transition_to" in criterion_json.keys()
else None,
)
)
elif criterion_type == "MaxTrials":
Expand All @@ -374,13 +377,19 @@ def transition_criteria_from_json(
)
if "not_in_statuses" in criterion_json.keys()
else None,
transition_to=criterion_json.pop("transition_to")
if "transition_to" in criterion_json.keys()
else None,
)
)
else:
criterion_list.append(
MinimumPreferenceOccurances(
metric_name=criterion_json.pop("metric_name"),
threshold=criterion_json.pop("threshold"),
transition_to=criterion_json.pop("transition_to")
if "transition_to" in criterion_json.keys()
else None,
),
)
return criterion_list
Expand Down

0 comments on commit dc40a80

Please sign in to comment.