Skip to content

chore(typing): add ty type checking for 10 utility files#45703

Merged
tarekziade merged 1 commit intohuggingface:mainfrom
moonbogi:typing/add-misc-utils
Apr 30, 2026
Merged

chore(typing): add ty type checking for 10 utility files#45703
tarekziade merged 1 commit intohuggingface:mainfrom
moonbogi:typing/add-misc-utils

Conversation

@moonbogi
Copy link
Copy Markdown
Contributor

@moonbogi moonbogi commented Apr 29, 2026

Adds ty type checking coverage for:

  • src/transformers/dependency_versions_table.py
  • src/transformers/dependency_versions_check.py
  • src/transformers/conversion_mapping.py
  • src/transformers/time_series_utils.py
  • src/transformers/debug_utils.py
  • src/transformers/hyperparameter_search.py
  • src/transformers/pytorch_utils.py
  • src/transformers/file_utils.py
  • src/transformers/trainer_jit_checkpoint.py
  • src/transformers/trainer_optimizer.py

All files pass ty check with no errors. Registered in utils/check_types.py under CHECKER_CONFIG.

What does this PR do?

Adds ty type checking coverage for three pipeline files as part of the
incremental typing effort. These files had no existing type errors and
required no code changes with only registration in utils/check_types.py
under CHECKER_CONFIG.

Please see the screenshot for the output after making these changes.

Screenshot 2026-04-29 at 10 28 37 AM

Fixes #45458

Code Agent Policy

The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by
code agents. We are currently bottlenecked by our ability to review and respond to them. As a result,
we ask that new users do not submit pure code agent PRs at this time.
You may use code agents in drafting or to help you diagnose issues. We'd also ask autonomous "OpenClaw"-like agents
not to open any PRs or issues for the moment.

PRs that appear to be fully agent-written will probably be closed without review, and we may block users who do this
repeatedly or maliciously.

This is a rapidly-evolving situation that's causing significant shockwaves in the open-source community. As a result,
this policy is likely to be updated regularly in the near future. For more information, please read CONTRIBUTING.md.

  • I confirm that this is not a pure code agent PR.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Adds ty type checking coverage for:
- src/transformers/dependency_versions_table.py
- src/transformers/dependency_versions_check.py
- src/transformers/conversion_mapping.py
- src/transformers/time_series_utils.py
- src/transformers/debug_utils.py
- src/transformers/hyperparameter_search.py
- src/transformers/pytorch_utils.py
- src/transformers/file_utils.py
- src/transformers/trainer_jit_checkpoint.py
- src/transformers/trainer_optimizer.py

Issues of huggingface#45458
Copy link
Copy Markdown
Collaborator

@tarekziade tarekziade left a comment

Choose a reason for hiding this comment

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

That's great, thanks!

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@tarekziade tarekziade added this pull request to the merge queue Apr 30, 2026
Merged via the queue into huggingface:main with commit 53b92b9 Apr 30, 2026
19 checks passed
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.

Add typing support incrementally (meta issue)

3 participants