This is a template for creating a model repository for the work on cloud forecasting with Open Climate Fix.
It uses cloudcasting
to validate models against EUMETSAT data.
-
Install copier with pipx:
python -m pipx install copier
-
Create a git repository for your model repository in the directory you want to store it in:
mkdir my-model-repo && cd my-model-repo git init
-
Run the following command to create a new model repository:
copier copy gh:alan-turing-institute/ocf-model-template .
-
Answer the questions asked by copier:
- What is the name of your model repository?
- What should the name of your model class be? These will be used to create the directory structure for your model repository.
-
You may want to upload to GitHub at this stage, provided you've created a blank repo at {{ repo_name }}:
git branch -M main
git remote add origin https://github.com/alan-turing-institute/{{ repo_name }}.git
git add --all
git commit -m "Initial commit"
git push -u origin main
- Edit the files in your model repository:
- Edit
model.py
to define your model class.- If your model code is complicated, you can store the code in
src/
and import it withinmodel.py
.
- If your model code is complicated, you can store the code in
- You'll need to add any project dependencies to
pyproject.toml
, e.g.[project] dependencies = [ "cloudcasting @ git+https://github.com/alan-turing-institute/[email protected]", # this should be the latest version of cloudcasting, already added to pyproject.toml "numpy", # add any other dependencies here "pandas", "xarray", ]
- Edit
- Edit
validate-config.yml
to configure the validation process. You'll need to specify the path to your validation data, and the name of your wandb project and run, as well as any other parameters you need to initialize your model. - It would be good to edit
README.md
to describe your model.