Skip to content

Commit

Permalink
version 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Aug 28, 2020
1 parent 8160167 commit da013d6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions examples/scripts/binary_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

automl = AutoML(
#results_path="AutoML_30",
#algorithms=["Neural Network"],
total_time_limit=200,
algorithms=["Random Forest"],
total_time_limit=20,
explain_level=0,
# validation={"validation_type": "split"},
mode="Compete",
mode="Explain",
# validation={"validation_type": "split"}
validation={
"validation_type": "kfold",
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/multi_class_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

automl = AutoML(
# results_path="AutoML_41",
algorithms=["Xgboost"],
algorithms=["Random Forest"],
# algorithms=["Neural Network"],
# "Linear",
# "Xgboost",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='mljar-supervised',
version='0.6.0',
version='0.6.1',
description='Automates Machine Learning Pipeline with Feature Engineering and Hyper-Parameters Tuning',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion supervised/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.6.0"
__version__ = "0.6.1"

from supervised.automl import AutoML
4 changes: 3 additions & 1 deletion supervised/automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,9 @@ def fit(self, X_train, y_train, X_validation=None, y_validation=None):
self._algorithms,
)

self._time_ctrl.log_time("prepare_data", "prep_0", "prepare_data", time.time()-self._start_time)
self._time_ctrl.log_time(
"prepare_data", "prepare_data", "prepare_data", time.time() - self._start_time
)

for step in steps:
self._fit_level = step
Expand Down
16 changes: 8 additions & 8 deletions supervised/tuner/time_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ def enough_time_for_step(self, fit_level):

time_should_use = self.time_should_use(fit_level)

#print("not_so_random should use", time_should_use)
#print(total_time_spend)
#print(
# print("not_so_random should use", time_should_use)
# print(total_time_spend)
# print(
# self.step_spend("simple_algorithms")
# + self.step_spend("default_algorithms")
#)
# )

if total_time_spend > time_should_use + self.step_spend(
"simple_algorithms"
Expand Down Expand Up @@ -164,7 +164,7 @@ def enough_time(self, model_type, step):
time_left = self._total_time_limit - total_time_spend
# no time left, do not train any more models, sorry ...
if time_left < 0:
#print("No time left", time_left)
# print("No time left", time_left)
return False

# there is still time and model_type was not tested yet
Expand All @@ -175,7 +175,7 @@ def enough_time(self, model_type, step):
# check the fit level type
# we dont want to spend too much time on one step
if not self.enough_time_for_step(step):
#print("Not enough time for step", step)
# print("Not enough time for step", step)
return False

# check if there is enough time for model to train
Expand Down Expand Up @@ -233,8 +233,8 @@ def log_time(self, model_name, model_type, fit_level, train_time):
"train_time": train_time,
}
]
#print(pd.DataFrame(self._spend))
#print("Already spend", self.already_spend())
# print(pd.DataFrame(self._spend))
# print("Already spend", self.already_spend())

def step_spend(self, step):
return np.sum([s["train_time"] for s in self._spend if s["fit_level"] == step])
Expand Down

0 comments on commit da013d6

Please sign in to comment.