|
6 | 6 |
|
7 | 7 | An open source AI model and interface for Earth. |
8 | 8 |
|
9 | | -# Getting started |
10 | | - |
11 | 9 | ## Quickstart |
12 | 10 |
|
13 | 11 | Launch into a [JupyterLab](https://jupyterlab.readthedocs.io) environment on |
14 | 12 |
|
15 | | -| [Binder](https://mybinder.readthedocs.io/en/latest) | [Planetary Computer](https://planetarycomputer.microsoft.com) | [SageMaker Studio Lab](https://studiolab.sagemaker.aws) | |
16 | | -|:--:|:--:|:--:| |
17 | | -| [](https://mybinder.org/v2/gh/Clay-foundation/model/main) | [](https://pccompute.westeurope.cloudapp.azure.com/compute/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FClay-foundation%2Fmodel&urlpath=lab%2Ftree%2Fmodel%2Fplaceholder.ipynb&branch=main) | [](https://studiolab.sagemaker.aws/import/github/Clay-foundation/model/blob/main/placeholder.ipynb) | |
| 13 | +| [Binder](https://mybinder.readthedocs.io/en/latest) | [SageMaker Studio Lab](https://studiolab.sagemaker.aws) | |
| 14 | +|:--:|:--:| |
| 15 | +| [](https://mybinder.org/v2/gh/Clay-foundation/model/main) | [](https://studiolab.sagemaker.aws/import/github/Clay-foundation/model/blob/main/docs/tutorials/clay-v1-wall-to-wall.ipynb) | |
18 | 16 |
|
19 | 17 | ## Installation |
20 | 18 |
|
@@ -63,23 +61,37 @@ To check out the different options available, and look at the hyperparameter |
63 | 61 | configurations, run: |
64 | 62 |
|
65 | 63 | python trainer.py --help |
66 | | - python trainer.py test --print_config |
67 | 64 |
|
68 | 65 | To quickly test the model on one batch in the validation set: |
69 | 66 |
|
70 | | - python trainer.py validate --trainer.fast_dev_run=True |
71 | | - |
72 | | -To train the model for a hundred epochs: |
73 | | - |
74 | | - python trainer.py fit --trainer.max_epochs=100 |
| 67 | + python trainer.py fit --model ClayMAEModule --data ClayDataModule --config configs/config.yaml --trainer.fast_dev_run=True |
75 | 68 |
|
76 | | -To generate embeddings from the pretrained model's encoder on 1024 images |
77 | | -(stored as a GeoParquet file with spatiotemporal metadata): |
| 69 | +To train the model: |
78 | 70 |
|
79 | | - python trainer.py predict --ckpt_path=checkpoints/last.ckpt \ |
80 | | - --data.batch_size=1024 \ |
81 | | - --data.data_dir=s3://clay-tiles-02 \ |
82 | | - --trainer.limit_predict_batches=1 |
| 71 | + python trainer.py fit --model ClayMAEModule --data ClayDataModule --config configs/config.yaml |
83 | 72 |
|
84 | 73 | More options can be found using `python trainer.py fit --help`, or at the |
85 | 74 | [LightningCLI docs](https://lightning.ai/docs/pytorch/2.1.0/cli/lightning_cli.html). |
| 75 | + |
| 76 | +## Contributing |
| 77 | + |
| 78 | +### Writing documentation |
| 79 | + |
| 80 | +Our Documentation uses [Jupyter Book](https://jupyterbook.org/intro.html). |
| 81 | + |
| 82 | +Install it with: |
| 83 | +```bash |
| 84 | +pip install -U jupyter-book |
| 85 | +``` |
| 86 | + |
| 87 | +Then build it with: |
| 88 | +```bash |
| 89 | +jupyter-book build docs/ |
| 90 | +``` |
| 91 | + |
| 92 | +You can preview the site locally with: |
| 93 | +```bash |
| 94 | +python -m http.server --directory _build/html |
| 95 | +``` |
| 96 | + |
| 97 | +There is a GitHub Action on `./github/workflows/deploy-docs.yml` that builds the site and pushes it to GitHub Pages. |
0 commit comments