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

Restore Class Names in decay and mutators Folders for Backward Compatibility #9

Merged
merged 7 commits into from
Sep 2, 2024
Merged

Conversation

gitongah
Copy link
Collaborator

This pull request addresses the renaming of classes in the decay and mutators folders to their original names, ensuring backward compatibility with existing codebases that rely on these class names.

Copy link
Owner

@knakamura13 knakamura13 left a comment

Choose a reason for hiding this comment

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

Added comments indicating changes that need to be made.

Also, before creating a pull request, try to make sure your branch is up to date with the main branch in my repo.
There are probably better ways to do this, but you can just follow these steps before you submit a pull request to sync my repo with yours:

  1. git fetch upstream (or git fetch --all for simplicity)
  2. git checkout main
  3. git merge --ff-only upstream/main
  4. git checkout <your PR branch>
  5. git merge main (or git rebase main if you want)
  6. git push

@@ -6,4 +6,4 @@
from .arithmetic_decay import ArithmeticDecay
Copy link
Owner

Choose a reason for hiding this comment

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

All imported classes should be renamed to the reverted names such as ArithDecay, ExpDecay, etc.

Copy link
Owner

Choose a reason for hiding this comment

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

Still need to rename the imported GeometricDecay in src/mlrose_ky/algorithms/sa.py

src/mlrose_ky/algorithms/decay/__init__.py Outdated Show resolved Hide resolved
@knakamura13
Copy link
Owner

I think the CI tests failed because the class names like GeometricDecay need to be removed from the __init__.py files and the new names need to be added to those files.

Copy link

github-actions bot commented Sep 2, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/mlrose_ky
  __init__.py
  src/mlrose_ky/algorithms
  __init__.py
  sa.py
  src/mlrose_ky/algorithms/decay
  __init__.py
  arithmetic_decay.py 67
  custom_decay.py 37, 43
  exponential_decay.py 69
  geometric_decay.py 67
  src/mlrose_ky/algorithms/mutators
  __init__.py
  _mutator_base.py
  discrete_mutator.py
  gene_swap_mutator.py
  single_gene_mutator.py
  single_shift_mutator.py
  src/mlrose_ky/generators
  tsp_generator.py
  src/mlrose_ky/neural
  __init__.py
  nn_core.py
  src/mlrose_ky/neural/activation
  identity.py
  leaky_relu.py
  sigmoid.py
  src/mlrose_ky/opt_probs
  discrete_opt.py
  max_k_color_opt.py
  src/mlrose_ky/runners
  _nn_runner_base.py
  _runner_base.py
  tests
  test_decay.py
Project Total  

The report is truncated to 25 files out of 52. To see the full report, please visit the workflow summary page.

This report was generated by python-coverage-comment-action

@knakamura13
Copy link
Owner

Fixed the problems with miss-named class instances and all tests are passing now.
I'll merge this PR, but want to note that there are other classes that still need to be renamed in #7.

Thanks for the help on this!

@knakamura13 knakamura13 merged commit e111e09 into knakamura13:main Sep 2, 2024
1 check 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.

2 participants