- Install Poetry
- Set up the environment:
make setup
make activate
If your IDE is unable to find this virtualenv in its 'select interpreter' command. Type the following in your shell:
poetry config virtualenvs.in-project true
To install new PyPI packages, run:
poetry add <package-name>
The data is stored in a gdrive folder.
To retrieve the data, simply type
dvc pull
to pull the data from the remote storage. That’s it!
To run the Python scripts to process data, train model, and run a notebook, type the following:
make pipeline
To create an API, type the following:
make api
We can now interact with the API by going to http://127.0.0.1:8000/docs and clicking the “Try it out” button:
You have to provide the image path. The image should live in this project. For example insert the following value:
{
"img_path": "data/raw/fruits-360/Test/Apple Braeburn/3_100.jpg"
}
... to the Request body, which should give you "apple" as a response. This means the model correctly predicts that the image 3_100.jpg is an apple.
A flow is the basis of all Prefect workflows.
To view your flow runs from a UI, sign in to your Prefect Cloud account or spin up a Prefect Orion server on your local machine:
prefect orion start
Open the URL http://127.0.0.1:4200/, and you should see the Prefect UI.
After creating a deployment, you can run a flow from the UI with default parameters.
To auto-generate API document for your project, run:
make docs_save
When creating a PR, the tests in your tests
folder will automatically run.