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

Support backwards compatibility with mlrose-hiive #7

Closed
knakamura13 opened this issue Aug 22, 2024 · 8 comments
Closed

Support backwards compatibility with mlrose-hiive #7

knakamura13 opened this issue Aug 22, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@knakamura13
Copy link
Owner

knakamura13 commented Aug 22, 2024

Issue Summary
Refactored code needs to be further revised to ensure backward compatibility with mlrose-hiive.

@knakamura13 knakamura13 self-assigned this Aug 22, 2024
@knakamura13 knakamura13 added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Aug 22, 2024
knakamura13 added a commit that referenced this issue Aug 22, 2024
- Introduced a new GeomDecay class that inherits from GeometricDecay.
- Added a deprecation warning in the GeomDecay class to inform users
  that it will be removed in a future release.
- Updated the GeometricDecay class to include detailed docstrings and
  type annotations.
- Ensured backward compatibility by allowing the use of the old
  GeomDecay class name with a warning.
@knakamura13
Copy link
Owner Author

knakamura13 commented Aug 22, 2024

Progress towards supporting backward compatibility

  • Class names
    • .algorithms
      • .decay
        • GeomDecay -> GeometricDecay
        • ArithDecay -> ArithmeticDecay
        • ExpDecay -> ExponentialDecay
        • CustomSchedule -> CustomDecay
      • .mutators
        • ChangeOneMutator -> SingleGeneMutator
        • DiscreteMutator -> DiscreteGeneMutator
        • ShiftOneMutator -> SingleShiftMutator
        • SwapMutator -> GeneSwapMutator
    • .fitness
      • TravellingSales -> TravellingSalesperson
    • .opt_probs
      • _OptProb -> OptProb
    • .samples
      • SyntheticData -> SyntheticDataGenerator
  • Method names
    • A quick git-diff revealed zero differences in method names, which isn't accurate. Manual comparisons between new code and the original mlrose-hiive code is needed.
  • Method property and attribute names
    • .algorithms
      • .crossovers
      • .decay
      • .mutators
    • .decorators
    • .fitness
    • .generators
    • .gridsearch
    • .neural
    • .opt_probs
    • .runners
    • .samples
  • Method returned object/dictionary attributes
    • Requires investigation

@knakamura13
Copy link
Owner Author

Update

I've decided that the classes, methods, properties, and attributes should be renamed back to their original names for the time being. This revision will inherently support backwards compatibility with mlrose-hiive.

At this time, only the renamed classes have been documented in the comment above, so we'll start with reverting the class names.

The other renamed entities will be more difficult to track down, but they might be just as important as the class names.

@knakamura13
Copy link
Owner Author

@gitongah want me to leave the last two class names for you to rename, or you want me to do it?

@knakamura13
Copy link
Owner Author

knakamura13 commented Sep 10, 2024

EXAMPLE COMMENT
Finished method names check for .algorithms.decay.

@gitongah
Copy link
Collaborator

Finished method name check for .decorators.short_name_decorator.py we have different names
from the mlrose-hiive

@gitongah
Copy link
Collaborator

Finished method name check for .gridsearch.grid_search_mixin.py we have different name from the mlrose-hiive

@gitongah
Copy link
Collaborator

Finished method name check for .runners._nn_runner_base.py and we have a method that is not on the mlrose-hiive. "dynamic_runner_name" method.
We also have some method name that are different from mlrose-hiive in .runners._runner_base.py

@knakamura13
Copy link
Owner Author

I'm reasonably satisfied with the level of backwards compatibility at this time, so I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants