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

[FEATURE] Ml Experiment Interface #146

Open
6 tasks
tikhomirovd opened this issue Feb 18, 2025 · 0 comments
Open
6 tasks

[FEATURE] Ml Experiment Interface #146

tikhomirovd opened this issue Feb 18, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@tikhomirovd
Copy link
Collaborator

🚀 Feature Proposal

Design an Interface for ML Experiments

Motivation

Currently, HypEx lacks a structured interface for ML experiments. Given that ML-based experiments require specialized handling, defining a clear architectural interface will ensure consistency, modularity, and ease of integration with existing ML workflows. This will also enable users to seamlessly extend and customize ML experiments while maintaining compatibility with HypEx’s core framework.

Feature Description

  • Design a base MLExperiment class that defines the core interface for ML-based experiments.
  • Define key abstract methods such as:
    • fit(self, data, target): Train the model.
    • predict(self, data): Generate predictions.
    • evaluate(self, predictions, ground_truth): Assess model performance.
    • save(self, path): Save the trained model.
    • load(cls, path): Load a pre-trained model.
  • Implement a flexible inheritance structure so that different ML methods (e.g., supervised learning, reinforcement learning) can extend the base class.
  • Ensure seamless integration with existing HypEx experiment structures.
  • Provide a reference implementation of at least one ML experiment type using the new interface.

Potential Impacts

  • Improved modularity and maintainability of ML-based experiments.
  • Easier extension and customization of ML workflows.
  • Better consistency across different ML experiment implementations.

Alternatives

  • Keep ML experiment implementations ad-hoc without a unified interface (less structured, harder to maintain).
  • Use existing general-purpose ML frameworks, though they may not be tailored for HypEx needs.

Additional Context

  • Ensure compatibility with libraries like scikit-learn, PyTorch, LightGBM, and XGBoost.
  • Follow best practices in object-oriented design to create an extendable and reusable interface.
  • Provide comprehensive documentation and examples of usage.

Checklist

  • Design MLExperiment base class with core interface methods.
  • Implement a sample ML experiment using the interface.
  • Ensure integration with existing HypEx experiment structures.
  • Add unit tests covering interface functionality.
  • Update documentation with usage guidelines and examples.
  • Review and refine design before merging.
@tikhomirovd tikhomirovd added the enhancement New feature or request label Feb 18, 2025
@tikhomirovd tikhomirovd added this to the 1.0.3 milestone Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants