Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move utils/seed.py to training/seed.py #1441

Closed
RdoubleA opened this issue Aug 28, 2024 · 0 comments
Closed

Move utils/seed.py to training/seed.py #1441

RdoubleA opened this issue Aug 28, 2024 · 0 comments
Labels
better engineering Tasks which help improve eng productivity e.g. building tools, cleaning up code, writing docs community help wanted We would love the community's help completing this issue

Comments

@RdoubleA
Copy link
Contributor

We are splitting up the massive utils directory into a separate training directory for helpers used in recipes and utils for all other miscellaneous utilities. The motivation for this is extensively discussed in #1421. We can do this move piece-wise to make it easier to do and review. I have done a few of them that you can use as a template to mimic: #1435, #1434

This task is to simply move the utils/seed.py file to its new location, training/seed.py and updating all callsites, docs, and configs that reference this.

Here's how I would make the changes:

  1. Move the actual file from utils to training
  2. Move the relevant APIs from utils/__init__.py to training/__init__.py
  3. Move the corresponding tests from tests/torchtune/utils/ to tests/torchtune/training/
  4. Move the relevant APIs from docs/source/api_ref_utilities.rst to docs/source/api_ref_training.rst
  5. Now you can cmd+F find all the locations for each API and make sure the imports are updated to be from training instead of utils. Most of these callsites are in the recipes as utils.function, so you can get a lot of them by doing replace utils.function -> training.function. But there's usually a few more across the codebase
@RdoubleA RdoubleA added community help wanted We would love the community's help completing this issue better engineering Tasks which help improve eng productivity e.g. building tools, cleaning up code, writing docs labels Aug 28, 2024
@RdoubleA RdoubleA closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better engineering Tasks which help improve eng productivity e.g. building tools, cleaning up code, writing docs community help wanted We would love the community's help completing this issue
Projects
None yet
Development

No branches or pull requests

1 participant