Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Documentation for v0.1 #118

Merged
merged 67 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
1009697
Make the clay model work on lightning cli
Dec 15, 2023
bcb1a06
Update Mean & std for larger chunk of data
Dec 18, 2023
1a40f56
Update model & trainer to work on multi gpu setup
Dec 18, 2023
ced883f
Fix logging images to wandb
Dec 18, 2023
071a178
Add specification docs
Jan 4, 2024
8498119
Add trainer details
Jan 4, 2024
6d431fc
Add streamlit UI to test the embeddings (#108)
srmsoumya Jan 4, 2024
454cc1c
Use rasterio.plot to show images & filter by year, tile & idx
Jan 4, 2024
d96a638
Merge main with ddp
Jan 4, 2024
785e7d4
Merge with ddp
Jan 5, 2024
e926b46
Fix half:0 error by not explicitly setting float16 to cube[pixels]
Jan 5, 2024
3ddd4ad
Add documentation to create the pixel reconstruction from the model
Jan 5, 2024
4b5712d
Add documention explaining location embeddings
Jan 5, 2024
a597347
Add shuffle as an argument to CLAY
Jan 11, 2024
f286205
Add documentation to showcase interpolation between images in embeddi…
Jan 11, 2024
b2c6806
Adapt data pipeline to accept custom date range and local path for st…
yellowcap Jan 12, 2024
13c9ece
Add example script to run clay over custom AOI.
yellowcap Jan 12, 2024
82437f8
add sections to TOC
brunosan Jan 14, 2024
6c77a87
basic use from root README
brunosan Jan 14, 2024
986c71d
Install from root REAMDE
brunosan Jan 14, 2024
9185261
how to build/preview docs
brunosan Jan 14, 2024
ce31806
more narrative on release notes
brunosan Jan 14, 2024
b14d1ab
more narrative on intro
brunosan Jan 14, 2024
00f04ea
Merge remote-tracking branch 'origin/clay-over-aoi' into doc-prep
brunosan Jan 14, 2024
3253f7b
rename intro to index, better SEO
brunosan Jan 14, 2024
c4fa077
reorder for clarity
brunosan Jan 14, 2024
eb84195
fixed links
brunosan Jan 14, 2024
48c6b99
fixed links
brunosan Jan 14, 2024
7b3714e
renamed file for clarity
brunosan Jan 14, 2024
edbf375
added links and consistent title
brunosan Jan 14, 2024
4cf6746
typo
brunosan Jan 14, 2024
e79eaba
Closes #64, as much as I can imagine.
brunosan Jan 14, 2024
6f4bfff
results explanation
brunosan Jan 14, 2024
607661d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 14, 2024
9387a16
shorter line
brunosan Jan 14, 2024
71744e6
Making ruff happy
brunosan Jan 14, 2024
2e2da96
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 14, 2024
f1b74a5
Making ruff happy
brunosan Jan 14, 2024
76fadc7
Merge branch 'doc-prep' of github.com:Clay-foundation/model into doc-…
brunosan Jan 14, 2024
6a62c18
Moved shuffle to an optional keyword. CHECK
brunosan Jan 14, 2024
251fe34
Recovered from 0145e55bcf6bd3e9b19f5c07819a1398b6a22c35
brunosan Jan 14, 2024
dcfb8e2
Clearing outputs for notebooks. Should not merge into main been PR is…
brunosan Jan 14, 2024
6c0b86d
tested to run
brunosan Jan 14, 2024
a59a3eb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 14, 2024
fffe56d
tested to run
brunosan Jan 14, 2024
2a7a6e2
resolved autofixes
brunosan Jan 14, 2024
c28a5f0
Update docs/_toc.yml
brunosan Jan 15, 2024
fa16cc9
assume root folder
brunosan Jan 15, 2024
4dc2924
Update src/model_clay.py
brunosan Jan 15, 2024
3bbd47d
Update src/model_clay.py
brunosan Jan 15, 2024
370324b
Update src/model_clay.py
brunosan Jan 15, 2024
198f477
Update docs/README
brunosan Jan 15, 2024
285d3b0
Update docs/installation.md
brunosan Jan 15, 2024
7043618
Merge branch 'main' into doc-prep
weiji14 Jan 15, 2024
d44ab43
Let pre-commit enforce 512KB file size limit in entire repo
weiji14 Jan 15, 2024
4135737
Remove extra args.update lines
weiji14 Jan 15, 2024
f09ac23
Set execute_notebooks to cache
weiji14 Jan 15, 2024
4b35db4
Remove PNG files in docs/assets, replace with web version
weiji14 Jan 15, 2024
c322f2b
Only build files in toc and rename docs/README to docs/README.md
weiji14 Jan 15, 2024
3afd8d0
Use huggingface ckpt, fix header, and rm sample.gif in interpolation nb
weiji14 Jan 16, 2024
b1c72a8
Fix some link typos and edit wording on main index page
weiji14 Jan 16, 2024
0a6113d
Remove run_region notebook
weiji14 Jan 16, 2024
d454fd1
Fix typos in model specification
weiji14 Jan 16, 2024
69b6e1b
Merge branch 'main' into doc-prep
yellowcap Jan 16, 2024
9926919
Rename tutorial notebooks
yellowcap Jan 16, 2024
ee96cc2
Exclude tutorial notebooks from execution during build.
yellowcap Jan 16, 2024
3a09621
Make tutorial title consistent
yellowcap Jan 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ logs/
# Data files and folders
data/**
!data/**/
**/*/.gif
**/*/.png

# Distribution / packaging
.Python
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ repos:
rev: v4.5.0
hooks:
- id: check-added-large-files
args: [ '--maxkb=512', '--enforce-all' ]
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
Expand Down
20 changes: 20 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Clay Model Documentation

This Documentation uses [Jupyter Book](https://jupyterbook.org/intro.html).

Install it with:
```bash
pip install -U jupyter-book
```

Then build it with:
```bash
jupyter-book build docs/
```

You can preview the site locally with:
```bash
python -m http.server --directory _build/html
```

There is a GitHub Action on `./github/workflows/deploy-docs.yml` that builds the site and pushes it to GitHub Pages.
7 changes: 5 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
title: Clay Foundation Model
author: Clay Foundation
logo: logo.png
only_build_toc_files: true

# Force re-execution of notebooks on each build.
# Only execution notebooks with no output cells on each build.
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: force
execute_notebooks: cache
exclude_patterns:
- clay-v0-*.ipynb

# Define the name of the latex output file for PDF builds
latex:
Expand Down
22 changes: 18 additions & 4 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@
# Learn more at https://jupyterbook.org/customize/toc.html

format: jb-book
root: intro
root: index
parts:
- caption: Release notes
chapters:
- title: Software release notes
file: changelog
- title: Model release notes
file: specification
- caption: Getting Started
chapters:
- title: Installation
file: installation
- title: Basic Use
file: basic_use
- caption: Data Preparation
chapters:
- title: Creating datacubes
Expand All @@ -22,13 +30,19 @@ parts:
file: model_embeddings
- title: Finetuning
file: model_finetuning
- caption: Reference Documentation
- caption: Tutorials
chapters:
- title: Changelog
file: changelog
- title: Generative AI for pixel reconstruction
file: clay-v0-reconstruction
- title: Create location embeddings
file: clay-v0-location-embeddings
- title: Interpolating images in embedding space
file: clay-v0-interpolation
- caption: About Clay
chapters:
- title: GitHub
url: https://github.com/Clay-foundation
- title: LinkedIn
url: https://www.linkedin.com/company/made-with-clay
- title: Website
url: https://madewithclay.org
42 changes: 42 additions & 0 deletions docs/basic_use.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Basic Use

### Running jupyter lab

mamba activate claymodel
python -m ipykernel install --user --name claymodel # to install virtual env properly
jupyter kernelspec list --json # see if kernel is installed
jupyter lab &


### Running the model

The neural network model can be ran via
[LightningCLI v2](https://pytorch-lightning.medium.com/introducing-lightningcli-v2supercharge-your-training-c070d43c7dd6).
To check out the different options available, and look at the hyperparameter
configurations, run:

python trainer.py --help
python trainer.py test --print_config

To quickly test the model on one batch in the validation set:

python trainer.py validate --trainer.fast_dev_run=True

To train the model for a hundred epochs:

python trainer.py fit --trainer.max_epochs=100

To generate embeddings from the pretrained model's encoder on 1024 images
(stored as a GeoParquet file with spatiotemporal metadata):

python trainer.py predict --ckpt_path=checkpoints/last.ckpt \
--data.batch_size=1024 \
--data.data_dir=s3://clay-tiles-02 \
--trainer.limit_predict_batches=1

More options can be found using `python trainer.py fit --help`, or at the
[LightningCLI docs](https://lightning.ai/docs/pytorch/2.1.0/cli/lightning_cli.html).

## Advanced

See [Readme](https://github.com/Clay-foundation/model/blob/v0.0.1/README.md) on model root for more details.
9 changes: 7 additions & 2 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
(software_release)=
# Code Model release v0.0.1

This changelog is a summary of the changes to the source code of the Clay model.
Released on 2024/01/12.

> For release notes for the trained model, see [](model_release)
## Release v0.0.1 (2024/01/12)

### 💫 Highlights

Expand Down
Loading