Skip to content

Commit

Permalink
Passing current_node_name when gs is node based (#2505)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2505

As titled.

Reviewed By: mgarrard

Differential Revision: D58260119

fbshipit-source-id: f338e2d86167467d9f66f3100f3b64a0073c40f7
  • Loading branch information
ItsMrLin authored and facebook-github-bot committed Jun 7, 2024
1 parent 2e8900f commit 6b4905d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ax/storage/sqa_store/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,15 @@ def _update_generation_strategy(
"should be saved before generation strategy."
)

curr_index = (
generation_strategy.current_node_name
if generation_strategy.is_node_based
else generation_strategy.current_step_index
)
with session_scope() as session:
session.query(gs_sqa_class).filter_by(id=gs_id).update(
{
"curr_index": generation_strategy.current_step_index,
"curr_index": curr_index,
"experiment_id": experiment_id,
}
)
Expand Down

0 comments on commit 6b4905d

Please sign in to comment.