Skip to content

Automl/new features#6

Merged
codeMaestro78 merged 4 commits into
masterfrom
automl/new_features
Jan 13, 2026
Merged

Automl/new features#6
codeMaestro78 merged 4 commits into
masterfrom
automl/new_features

Conversation

@codeMaestro78

Copy link
Copy Markdown
Owner

Defines the interface and shared utilities for AutoML implementations.
Tracks best model, best score, best params, and maintains a leaderboard.

Copilot AI review requested due to automatic review settings January 13, 2026 20:16
@vercel

vercel Bot commented Jan 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
mlcli Ready Ready Preview, Comment Jan 13, 2026 8:19pm

@codeMaestro78
codeMaestro78 merged commit 4558287 into master Jan 13, 2026
7 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new base abstract class for AutoML implementations that provides a standardized interface and shared utilities for tracking model performance, managing leaderboards, and handling time budgets.

Changes:

  • Added BaseAutoML abstract class with core AutoML functionality
  • Implemented LeaderboardEntry dataclass for tracking model performance
  • Provided utility methods for time management, experiment tracking, and model comparison

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +69 to +78

# Time state
self._start_time: Optional[datetime] = None
self._end_time: Optional[datetime] = None

# Best model state
self.best_model_: Optional[Any] = None
self.best_model_name_: Optional[str] = None
self.best_score_: Optional[float] = None
self.best_params_: Dict[str, Any] = {}

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

Missing spaces around colons and equals signs in variable assignments. Should follow PEP 8 style guidelines with proper spacing: "self.best_model_: Optional[Any] = None", "self.best_model_name_: Optional[str] = None", "self.best_score_: Optional[float] = None", "self.best_params_: Dict[str, Any] = {}", "self.leaderboard_: List[LeaderboardEntry] = []", "self.is_fitted_: bool = False".

Copilot uses AI. Check for mistakes.
return None
end = self._end_time or datetime.now()
return (end - self._start_time).total_seconds()

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

Missing space around equals sign. Should be "self.tracker = tracker" according to PEP 8 style guidelines.

Copilot uses AI. Check for mistakes.
framework: str,
score: float,
params: Dict[str, Any],
duration_seconds: float,

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

Missing space around equals sign. Should be "extra = extra or {}" according to PEP 8 style guidelines.

Copilot uses AI. Check for mistakes.
Comment thread mlcli/automl/base_automl.py
**kwargs: Additional arguments

Returns:
self

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

Missing spaces around colons in function parameter type annotations. Should be "def predict(self, X: np.ndarray) -> np.ndarray:" according to PEP 8 style guidelines.

Copilot uses AI. Check for mistakes.
def _time_budget_seconds(self) -> Optional[float]:
# Get time budget in seconds
if self.time_budget_minutes is None:
return None

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

Missing spaces around colons in function signature. Should be "def _elapsed_seconds(self) -> float:" according to PEP 8 style guidelines.

Copilot uses AI. Check for mistakes.
def _elapsed_seconds(self) -> float:
# Get elapsed time since start.
if self._start_time is None:
return 0.0

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

Missing spaces around colons in function signature. Should be "def _remaining_seconds(self) -> Optional[float]:" according to PEP 8 style guidelines.

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +26
# One row in the AutoML leaderboard.
model_name: str
framework: str
score: float
params: Dict[str, Any]
duration_seconds: float

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

Missing spaces around colons in dataclass field annotations. Should be "model_name: str", "framework: str", etc., according to PEP 8 style guidelines for type annotations.

Copilot uses AI. Check for mistakes.
# Get remaining time budget in seconds.
budget = self._time_budget_seconds()
if budget is None:
return None

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

Missing spaces around colons in function signature. Should be "def _time_budget_exceeded(self) -> bool:" according to PEP 8 style guidelines.

Copilot uses AI. Check for mistakes.
Comment on lines +224 to +225
if self.tracker is None:
return

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

Missing spaces around colons in variable annotation and inconsistent spacing in for loop. Should be "clean: Dict[str, float] = {}" and "for k, v in metrics.items():" according to PEP 8 style guidelines.

Copilot uses AI. Check for mistakes.
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