Skip to content

Comments

test: adjust assertion for my_fn_calls based on optax version in test/test_optimizers.py#2140

Merged
Qazalbash merged 4 commits intopyro-ppl:masterfrom
Qazalbash:flexible-optax-test
Feb 15, 2026
Merged

test: adjust assertion for my_fn_calls based on optax version in test/test_optimizers.py#2140
Qazalbash merged 4 commits intopyro-ppl:masterfrom
Qazalbash:flexible-optax-test

Conversation

@Qazalbash
Copy link
Collaborator

We fixed the issue related to optax==0.2.7 in #2137. Now flax has pinned the optax version (google/flax#5225), and it is effective in the latest flax==0.12.4. This PR changes the test case modified in #2137 for optax==0.2.7 and optax<0.2.7 (ref: #2134 (comment))

@Qazalbash Qazalbash requested a review from fehiepsi February 15, 2026 07:50
@Qazalbash Qazalbash added the test label Feb 15, 2026
@fehiepsi
Copy link
Member

Maybe be flexible for optax check and removing version checking? That way the test keeps working if optax behavior changes.

@Qazalbash
Copy link
Collaborator Author

Maybe be flexible for optax check and removing version checking? That way the test keeps working if the optax behavior changes.

Do you want a logical statement instead of optax version, like,

assert (my_fn_calls == 1) or (my_fn_calls == 2)

@fehiepsi
Copy link
Member

Yes, that would be flexible, maybe calls in [1,2]

@Qazalbash Qazalbash merged commit 357bb6a into pyro-ppl:master Feb 15, 2026
9 checks passed
@Qazalbash Qazalbash deleted the flexible-optax-test branch February 15, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants