Skip to content

Commit 4141ae1

Browse files
committed
Update website for mlcli-toolkit package name - Changed all pip install mlcli to pip install mlcli-toolkit - Changed all pipx install mlcli to pipx install mlcli-toolkit - Updated author name from Harsora to Lalani - Updated contact email to devarshilalani.devflow@gmail.com - Updated installation examples in fallback release notes
1 parent 9947256 commit 4141ae1

15 files changed

Lines changed: 730 additions & 29 deletions

File tree

configs/hotel_dnn_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dataset": {
3-
"path": "data/hotel_bookings_processed.csv",
3+
"path": "mlcli/data/hotel_bookings_processed.csv",
44
"type": "csv",
55
"target_column": "is_canceled",
66
"features": null

configs/hotel_logistic_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dataset": {
3-
"path": "data/hotel_bookings_processed.csv",
3+
"path": "mlcli/data/hotel_bookings_processed.csv",
44
"type": "csv",
55
"target_column": "is_canceled",
66
"features": null

configs/hotel_rf_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dataset": {
3-
"path": "data/hotel_bookings_processed.csv",
3+
"path": "mlcli/data/hotel_bookings_processed.csv",
44
"type": "csv",
55
"target_column": "is_canceled",
66
"features": null

configs/hotel_svm_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dataset": {
3-
"path": "data/hotel_bookings_processed.csv",
3+
"path": "mlcli/data/hotel_bookings_processed.csv",
44
"type": "csv",
55
"target_column": "is_canceled",
66
"features": null

configs/hotel_xgb_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dataset": {
3-
"path": "data/hotel_bookings_processed.csv",
3+
"path": "mlcli/data/hotel_bookings_processed.csv",
44
"type": "csv",
55
"target_column": "is_canceled",
66
"features": null

configs/tune_rf_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"params": {}
55
},
66
"dataset": {
7-
"path": "data/hotel_bookings_processed.csv",
7+
"path": "mlcli/data/hotel_bookings_processed.csv",
88
"type": "csv",
99
"target_column": "is_canceled"
1010
},

mlcli/trainers/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __getattr__(name: str):
7979
def register_all_models():
8080
"""Register all models in the registry without importing heavy modules."""
8181
from mlcli import registry
82-
82+
8383
for model_name, meta in _MODEL_METADATA.items():
8484
if not registry.is_registered(model_name):
8585
# Register with lazy loader
@@ -97,7 +97,7 @@ def get_trainer_class(model_type: str):
9797
"""Get trainer class by model type, importing only when needed."""
9898
if model_type not in _MODEL_METADATA:
9999
raise ValueError(f"Unknown model type: {model_type}")
100-
100+
101101
import importlib
102102
meta = _MODEL_METADATA[model_type]
103103
module = importlib.import_module(meta["module"])

mlcli/utils/registry.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,20 @@ def _resolve_lazy(self, name: str) -> Optional[Type]:
8787
"""Resolve a lazy-registered model by importing it."""
8888
if name not in self._lazy_registry:
8989
return None
90-
90+
9191
import importlib
9292
lazy_info = self._lazy_registry[name]
9393
module = importlib.import_module(lazy_info["module_path"])
9494
trainer_class = getattr(module, lazy_info["class_name"])
95-
95+
9696
# Move from lazy to regular registry
9797
self._registry[name] = trainer_class
9898
del self._lazy_registry[name]
99-
99+
100100
# Update metadata
101101
if name in self._metadata:
102102
self._metadata[name]["lazy"] = False
103-
103+
104104
return trainer_class
105105

106106
def get(self, name: str) -> Optional[Type]:
@@ -116,11 +116,11 @@ def get(self, name: str) -> Optional[Type]:
116116
# Check regular registry first
117117
if name in self._registry:
118118
return self._registry.get(name)
119-
119+
120120
# Try lazy loading
121121
if name in self._lazy_registry:
122122
return self._resolve_lazy(name)
123-
123+
124124
return None
125125

126126
def get_trainer(self, name: str, **kwargs) -> Any:
@@ -222,8 +222,8 @@ def __len__(self)->int:
222222
return len(self._registry)
223223

224224
def __contains__(self,name:str)->bool:
225-
"""Check if models is registered using 'in' operator. """
226-
return name in self._registry
225+
"""Check if models is registered using 'in' operator (includes lazy). """
226+
return name in self._registry or name in self._lazy_registry
227227

228228
def __repr__(self)->str:
229229
"""String representation of registry. """

0 commit comments

Comments
 (0)