Skip to content

Fix updating dynamic optimizer flows#1481

Merged
vloncar merged 5 commits into
fastmachinelearning:mainfrom
niteshg97:fix-dynamic-flow-update
Jun 7, 2026
Merged

Fix updating dynamic optimizer flows#1481
vloncar merged 5 commits into
fastmachinelearning:mainfrom
niteshg97:fix-dynamic-flow-update

Conversation

@niteshg97
Copy link
Copy Markdown
Contributor

Description

Fixes dynamic flow updates by using the correct set.add()API when recording added or removed optimizers.

Previously, calling update_flow() on a callable-backed flow raised an AttributeError because dynamic flow attempted to call set.put(). Callable backed flows are used for dynamic optimizer/template flow registration, so this broke flow customization for those flows.

Also adds a focused regression test covering add/remove behavior for a dynamic flow.

Type of change

Bug fix

Tests

i added a regression test in test/pytest/test_flows.py for updating a dynamic flow.

Test command;

pytest test/pytest/test_flows.py -q

@niteshg97
Copy link
Copy Markdown
Contributor Author

pre-commit.ci autofix

@jmitrevs jmitrevs added the please test Trigger testing by creating local PR branch label Jun 5, 2026
Copy link
Copy Markdown
Contributor

@vloncar vloncar left a comment

Choose a reason for hiding this comment

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

Indeed a bug. I can't remember what was the idea behind using put() here. Seemed unused for many years

@vloncar vloncar merged commit 10dbeae into fastmachinelearning:main Jun 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

please test Trigger testing by creating local PR branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants