Training Pipeline
Check out this Medium article for more details about this module.
Create Environment File
~/energy-forecasting $ cp .env.default .env
The command cp .env.default .env is used to create a copy of the
.env.default file and name it .env. In many projects, the .env file is
used to store environment variables that the application needs to run. The
.env.default file is usually a template that includes all the environment
variables that the application expects, but with default values. By copying it
to .env, you can customize these values for your own environment.
Set Up the ML_PIPELINE_ROOT_DIR Variable
~/energy-forecasting $ export ML_PIPELINE_ROOT_DIR=$(pwd)
The command export ML_PIPELINE_ROOT_DIR=$(pwd) is setting the value of the
ML_PIPELINE_ROOT_DIR environment variable to the current directory. In this
context, $(pwd) is a command substitution that gets replaced with the output
of the pwd command, which prints the path of the current directory. The
export command then makes this variable available to child processes of the
current shell.
In essence, ML_PIPELINE_ROOT_DIR is an environment variable that is set to the
path of the current directory. This can be useful for scripts or programs that
need to reference the root directory of the ML pipeline, as they can simply
refer to ML_PIPELINE_ROOT_DIR instead of needing to know the exact path.
Install for Development
~/energy-forecasting $ cd training-pipeline && rm poetry.lock
~/energy-forecasting/training-pipeline $ bash ../scripts/devops/virtual_environment/poetry_install.sh
~/energy-forecasting/training-pipeline $ source .venv/bin/activate
Check the Set Up Additional Tools and Usage sections to see how to set up the additional tools and credentials you need to run this project.
Usage for Development
Run the scripts in the following order:
-
Start the hyperparameter tuning script:
~/energy-forecasting/training-pipeline $ python -m training_pipeline.hyperparameter_tuning
-
Upload the best config based on the previous hyperparameter tuning step:
~/energy-forecasting/training-pipeline $ python -m training_pipeline.best_config
-
Start the training script using the best configuration uploaded one step before:
~/energy-forecasting/training-pipeline $ python -m training_pipeline.train
NOTE: Be careful to set the ML_PIPELINE_ROOT_DIR variable as explain in
this
section.
Release files for g-training-pipeline 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| g_training_pipeline-0.3.0.tar.gz | 12.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| g_training_pipeline-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.6 kB
Release files / g_training_pipeline-0.3.0.tar.gz
| Download URL | g_training_pipeline-0.3.0.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7407e205f7928d4ff8f48129420b011ff703647c2b1151c97a571e17d4f7be76
|
|
BLAKE2b-256 checksum How to use checksums |
aee50cbdf477c128f292566e8877ec0b50cd6bafee7148d7a811b068b58dc5b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.9 Darwin/22.3.0
|
Release files / g_training_pipeline-0.3.0-py3-none-any.whl
| Download URL | g_training_pipeline-0.3.0-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6caaf1dc102ad388a14cd210a41eb463a9b79b6017e07d14202bb91ead14dc4
|
|
BLAKE2b-256 checksum How to use checksums |
f7183c02b67934acfbf6af0046d37e17b642adc8cabdf267b91c860e2fdf1a76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.9 Darwin/22.3.0
|