Skip to content

Commit 69cef07

Browse files
author
nidhal baccouri
committed
fixed pre commit hooks
1 parent 4350cbe commit 69cef07

File tree

5 files changed

+21
-89
lines changed

5 files changed

+21
-89
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
2+
13
dataset:
24
type: csv
3-
random_numbers:
4-
generate_reproducible: true
5-
seed: 101
5+
66
# model definition
77
model:
88
type: classification
99
algorithm: NeuralNetwork
1010

11-
# target you want to predict
11+
# target(s) you want to predict
1212
target:
1313
- sick
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11

22

3-
# dataset operations
43
dataset:
54
type: csv
65
random_numbers:
76
generate_reproducible: true
87
seed: 42
9-
split: # split options
10-
test_size: 0.2 # 0.2 means 20% for the test data, so 80% are automatically for training
11-
shuffle: True # whether to shuffle the data before/while splitting
8+
split:
9+
test_size: 0.2
10+
shuffle: True
1211

13-
preprocess: # preprocessing options
14-
missing_values: mean # other possible values: [drop, median, most_frequent, constant] check the docs for more
12+
preprocess:
13+
missing_values: mean
1514
encoding:
16-
type: oneHotEncoding # other possible values: [labelEncoding]
17-
scale: # scaling options
18-
method: standard # standardization will scale values to have a 0 mean and 1 standard deviation | you can also try minmax
19-
target: inputs # scale inputs. | other possible values: [outputs, all] # if you choose all then all values in the dataset will be scaled
15+
type: oneHotEncoding
16+
scale:
17+
method: standard
18+
target: inputs
2019

21-
22-
# model definition
2320
model:
2421
type: classification
2522
algorithm: RandomForest
2623
arguments:
2724
n_estimators: 100
2825
max_depth: 30
26+
hyperparameter_search:
27+
method: random_search
28+
parameter_grid:
29+
max_depth: [6, 10]
30+
n_estimators: [100, 300]
31+
max_features: [auto, sqrt]
2932

30-
31-
# target you want to predict
3233
target:
3334
- sick

igel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
try:
1111
__version__ = version(__name__)
1212
except PackageNotFoundError:
13-
__version__ = "0.5.0"
13+
__version__ = "0.7.0"
1414

1515

1616
__author__ = "Nidhal Baccouri"

igel/__main__.py

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import igel
99
import pandas as pd
1010
from igel import Igel, metrics_dict
11-
from igel.auto import IgelCNN
1211
from igel.constants import Constants
1312
from igel.servers import fastapi_server
1413
from igel.utils import print_models_overview, show_model_info, tableize
@@ -73,29 +72,6 @@ def fit(data_path: str, yaml_path: str) -> None:
7372
Igel(cmd="fit", data_path=data_path, yaml_path=yaml_path)
7473

7574

76-
@cli.command(context_settings=CONTEXT_SETTINGS)
77-
@click.option(
78-
"--data_path", "-dp", required=True, help="Path to your training dataset"
79-
)
80-
@click.option(
81-
"--task",
82-
"-t",
83-
required=False,
84-
help="task you want to run. This refers to the goal you want to achieve (e.g ImageClassification)",
85-
)
86-
@click.option(
87-
"--yaml_path",
88-
"-yml",
89-
required=False,
90-
help="Path to your igel configuration file (yaml or json file)",
91-
)
92-
def auto_train(data_path: str, task: str, yaml_path: str) -> None:
93-
"""
94-
Automatically search for and train a suitable deep neural network for a task
95-
"""
96-
IgelCNN(cmd="train", data_path=data_path, task=task, yaml_path=yaml_path)
97-
98-
9975
@cli.command(context_settings=CONTEXT_SETTINGS)
10076
@click.option(
10177
"--data_path", "-dp", required=True, help="Path to your evaluation dataset"
@@ -107,17 +83,6 @@ def evaluate(data_path: str) -> None:
10783
Igel(cmd="evaluate", data_path=data_path)
10884

10985

110-
@cli.command(context_settings=CONTEXT_SETTINGS)
111-
@click.option(
112-
"--data_path", "-dp", required=True, help="Path to your evaluation dataset"
113-
)
114-
def auto_evaluate(data_path: str) -> None:
115-
"""
116-
Evaluate the performance of an existing machine learning model
117-
"""
118-
IgelCNN(cmd="evaluate", data_path=data_path)
119-
120-
12186
@cli.command(context_settings=CONTEXT_SETTINGS)
12287
@click.option("--data_path", "-dp", required=True, help="Path to your dataset")
12388
def predict(data_path: str) -> None:
@@ -127,15 +92,6 @@ def predict(data_path: str) -> None:
12792
Igel(cmd="predict", data_path=data_path)
12893

12994

130-
@cli.command(context_settings=CONTEXT_SETTINGS)
131-
@click.option("--data_path", "-dp", required=True, help="Path to your dataset")
132-
def auto_predict(data_path: str) -> None:
133-
"""
134-
Use an existing machine learning model to generate predictions
135-
"""
136-
IgelCNN(cmd="predict", data_path=data_path)
137-
138-
13995
@cli.command(context_settings=CONTEXT_SETTINGS)
14096
@click.option(
14197
"--data_paths",
@@ -161,31 +117,6 @@ def experiment(data_paths: str, yaml_path: str) -> None:
161117
Igel(cmd="predict", data_path=pred_data_path)
162118

163119

164-
@cli.command(context_settings=CONTEXT_SETTINGS)
165-
@click.option(
166-
"--data_paths",
167-
"-DP",
168-
required=True,
169-
help="Path to your datasets as string separated by space",
170-
)
171-
@click.option(
172-
"--yaml_path",
173-
"-yml",
174-
required=True,
175-
help="Path to your igel configuration file (yaml or json file)",
176-
)
177-
def auto_experiment(data_paths: str, yaml_path: str) -> None:
178-
"""
179-
train, evaluate and use pre-trained model for predictions in one command
180-
"""
181-
train_data_path, eval_data_path, pred_data_path = data_paths.strip().split(
182-
" "
183-
)
184-
IgelCNN(cmd="train", data_path=train_data_path, yaml_path=yaml_path)
185-
IgelCNN(cmd="evaluate", data_path=eval_data_path)
186-
IgelCNN(cmd="predict", data_path=pred_data_path)
187-
188-
189120
@cli.command(context_settings=CONTEXT_SETTINGS)
190121
@click.option(
191122
"--model_results_dir",

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.1.1
2+
current_version = 0.7.0
33

44
[darglint]
55
strictness = long

0 commit comments

Comments
 (0)