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

[Refactor] Remove direct import of many methods from utils, etc #292

Merged
merged 24 commits into from
Nov 24, 2024

Conversation

kozistr
Copy link
Owner

@kozistr kozistr commented Nov 23, 2024

Problem (Why?)

N/A

Solution (What/How?)

  • Big refactoring, removing direct import from pytorch_optimizer.*.
    • I removed some methods not to directly import from it from pytorch_optimzier.* because they're probably not used frequently and actually not an optimizer rather utils only used for specific optimizers.
    • pytorch_optimizer.[Shampoo stuff] -> pytorch_optimizer.optimizers.shampoo_utils.[Shampoo stuff].
      • shampoo_utils like Graft, BlockPartitioner, PreConditioner, etc. You can check the details here.
    • pytorch_optimizer.GaLoreProjector -> pytorch_optimizer.optimizers.galore.GaLoreProjector.
    • pytorch_optimizer.gradfilter_ema -> pytorch_optimizer.optimizers.grokfast.gradfilter_ema.
    • pytorch_optimizer.gradfilter_ma -> pytorch_optimizer.optimizers.grokfast.gradfilter_ma.
    • pytorch_optimizer.l2_projection -> pytorch_optimizer.optimizers.alig.l2_projection.
    • pytorch_optimizer.flatten_grad -> pytorch_optimizer.optimizers.pcgrad.flatten_grad.
    • pytorch_optimizer.un_flatten_grad -> pytorch_optimizer.optimizers.pcgrad.un_flatten_grad.
    • pytorch_optimizer.reduce_max_except_dim -> pytorch_optimizer.optimizers.sm3.reduce_max_except_dim.
    • pytorch_optimizer.neuron_norm -> pytorch_optimizer.optimizers.nero.neuron_norm.
    • pytorch_optimizer.neuron_mean -> pytorch_optimizer.optimizers.nero.neuron_mean.

Other changes (bug fixes, small refactors)

N/A

Notes

N/A

@kozistr kozistr added documentation Improvements or additions to documentation refactoring Refactoring cleanup Cleanup codes labels Nov 23, 2024
@kozistr kozistr self-assigned this Nov 23, 2024
Copy link

codecov bot commented Nov 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (7868588) to head (ceb592a).
Report is 25 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #292   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           96        98    +2     
  Lines         7394      7400    +6     
=========================================
+ Hits          7394      7400    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@kozistr kozistr added the dependencies Dependencies label Nov 23, 2024
@kozistr kozistr marked this pull request as ready for review November 24, 2024 05:13
@kozistr kozistr merged commit 131314b into main Nov 24, 2024
4 checks passed
@kozistr kozistr deleted the refactor/utils branch November 24, 2024 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Cleanup codes dependencies Dependencies documentation Improvements or additions to documentation refactoring Refactoring size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant