-
Notifications
You must be signed in to change notification settings - Fork 7
/
entrypoint.sh
27 lines (22 loc) · 1.1 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
# If mode is 1, run training + inference mode, otherwise just run the inference
if (( $MODE==1 ))
then
echo "Training Mode"
# Data collection
python3 /01_data_collection.py
# Feature Engineering
jupyter nbconvert --to notebook --execute /02_feature_engineering.ipynb --TemplateExporter.exclude_input=True \
--ExecutePreprocessor.kernel_name='python3' --output 02_notebook_executed
# Model Training
jupyter nbconvert --to notebook --execute /03_model_training.ipynb --TemplateExporter.exclude_input=True \
--ExecutePreprocessor.kernel_name='python3' --output 03_notebook_executed
# Model Inference
jupyter nbconvert --to notebook --execute /04_model_inference.ipynb --TemplateExporter.exclude_input=True \
--ExecutePreprocessor.kernel_name='python3' --output 04_model_inference_executed
else
echo "Inference Mode"
# Since the mode wasn't specified just run the model inference on new pull request
jupyter nbconvert --to notebook --execute /04_model_inference.ipynb --TemplateExporter.exclude_input=True \
--ExecutePreprocessor.kernel_name='python3' --output 04_model_inference_executed
fi