Skip to content

Conversation

@nadae1010
Copy link

Summary

This PR fixes type errors in the optimization module as part of the mypy-compliance effort (#1719). Addresses #1729.

Changes

  • Widened OptimizerConfig.build signature to accept *args, **kwargs.
  • Allowed Optional[int] for num_warmup_steps in LRSchedulerConfig.
  • Verified with mypy: optimization module now passes cleanly.

Before vs After (local)

  • Before: 5 errors (see /tmp/mypy-before.txt)
  • After: 0 errors (see /tmp/mypy-after.txt)

@AdilZouitine
Copy link
Collaborator

Hey could you uncomment the mypy hook in .pre-commit-config.yaml and uncomment the module in pyproject.toml apart that it's LGTM 😄

@imstevenpmwork imstevenpmwork added enhancement Suggestions for new features or improvements python Pull requests that update python code labels Oct 5, 2025
@imstevenpmwork imstevenpmwork self-requested a review October 5, 2025 10:35
@imstevenpmwork
Copy link
Collaborator

imstevenpmwork commented Oct 17, 2025

Hello @nadae1010,

Can you tag me whenever this is ready for a review ? Feel free to pin me in discord too
Sorry for the back and forth, thanks !

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

Labels

enhancement Suggestions for new features or improvements python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants