Skip to content

Latest commit

 

History

History

FermiHamML

README.md

FermiHamML

Star on GitHub GitHub forks Python 3.6 downloads PyPI version License

Tests Workflow Dist Workflow Doc Workflow Code style: black Imports: isort

Description

Installation

Development Dependencies

With uv installed, run the following commands to install the dependencies:

uv venv .venv
uv sync --dev

With python and pip installed, run the following commands to install the dependencies:

python -m venv .venv
source .venv/bin/activate
pip install uv
python -m uv sync --dev

With poetry installed, run the following commands to install the dependencies:

python -m venv .venv
source .venv/bin/activate
poetry install

Scripting Usage

To run a single training, you can run the following command:

python -m <package_name> <your_parameters>

and to know the parameters you can use the help command:

python -m <package_name> --help

Deployment

You will need to install Docker to run the trainings in a container. You can install Docker by following the instructions here.

To build the docker image of the project you can run the following command:

docker build -t <package_name>:latest .

The container can be run in two different modes:

  • release: This mode is responsible for running the main.py of the current package.
  • it: This is a development mode that is responsible for running the container in the interactive mode.

To run a mode <mode> you can run the following command:

docker run --name <package_name>-<phase> --detach --rm --volume=<data_path>:/<ROOT_DIR>/data -e "MODE=<mode>" <package_name>:latest <your_arguments>

where <data_path> is the absolute path in your local machine where you want to store the data generated by the phase. The <ROOT_DIR> is the root directory of the project.

There is another way you can do all of this. You can use the docker_files/build_image_and_run.py script. This script will build the image and run the mode you want. You can run the script with the following command:

python docker_files/build_image_and_run.py --mode=<mode>

References

License

Acknowledgements

Citation