Skip to content

Fix updating dynamic optimizer flows#1481

Open
niteshg97 wants to merge 3 commits into
fastmachinelearning:mainfrom
niteshg97:fix-dynamic-flow-update
Open

Fix updating dynamic optimizer flows#1481
niteshg97 wants to merge 3 commits into
fastmachinelearning:mainfrom
niteshg97:fix-dynamic-flow-update

Conversation

@niteshg97
Copy link
Copy Markdown

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
Author

pre-commit.ci autofix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant