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

Static Documentation for v0.1 #118

merged 67 commits into from
Jan 16, 2024

Conversation

brunosan
Copy link
Member

This PR expands the current documentation based on #64 and tries to clarify structure.

It does not include executable documentation (Experiments, renamed tutorials) since I don't know yet how we can show the outputs of these without adding execution outputs to the repo history, nor having the CI download and execute the code. I'll PR a solution forking from here.

It also bring over the notebook from branch clay-over-ai.

We should have this merged before Wednesday presentation in Davos.

SRM and others added 30 commits December 15, 2023 23:57
UI supports vector search & arithmetic for embeddings generated from CLAY.

---------

Co-authored-by: SRM <[email protected]>
@brunosan
Copy link
Member Author

brunosan commented Jan 14, 2024

240105-clay-v0-interpolation.ipynb
240105-clay-v0-reconstruction.ipynb
240105-location-embeddings.ipynb

Currently fail to run. I suspect @srmsoumya made this with a different version of the ClayModule, but I can't track the differences.

Error is:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
...
(
  unmasked_patches,
   unmasked_indices,
   masked_indices,
   masked_matrix,
--->  = model.model.encoder(batch)
...
File [~/code/Clay/model/docs/../src/model_clay.py:304  in Encoder.forward(self, datacube)
 cube, time, latlon = (
 datacube["pixels"],
 datacube["timestep"],
datacube["latlon"],
 )  # [B C H W]
 B, C, H, W = cube.shape
-->  patches = self.to_patch_embed(
       cube
     )  # [B G L D] - patchify & create embeddings per patch
 ...
RuntimeError: Input type (c10::Half) and bias type (float) should be the same

Copy link
Contributor

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Just some suggested changes for now. Will do a proper review after #116 is merged (hopefully today), so that the diff is smaller and easier to review (22 files right now is a lot). I see also that there is duplication of documentation between the installation/basic_usage pages and the main README.md, and we should just have those instructions in one place.

@brunosan, would you like us (DevSeed) to push any changes directly to this PR branch, or would you like to handle the documentation personally for Davos? Cc @srmsoumya, as this brings in your notebooks from the docs/model branch.

src/model_clay.py Outdated Show resolved Hide resolved
src/model_clay.py Outdated Show resolved Hide resolved
src/model_clay.py Outdated Show resolved Hide resolved
@@ -581,19 +595,22 @@ def __init__( # noqa: PLR0913
"sar": (10, 11),
"dem": (12,),
},
shuffle=True,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srmsoumya, did we discuss to make shuffle to be off by default (so that people running inference can avoid surprising results), and only turn this on during training?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving as is for now, but created ticket #123

src/model_clay.py Outdated Show resolved Hide resolved
docs/README Outdated Show resolved Hide resolved
docs/README Outdated Show resolved Hide resolved
docs/_toc.yml Outdated Show resolved Hide resolved
docs/_toc.yml Outdated Show resolved Hide resolved
docs/assets/tiles.png Outdated Show resolved Hide resolved
@brunosan
Copy link
Member Author

brunosan commented Jan 15, 2024 via email

brunosan and others added 17 commits January 15, 2024 08:57
Co-authored-by: Wei Ji <[email protected]>
Co-authored-by: Wei Ji <[email protected]>
Don't force running all notebooks on the docs build, only run those that don't have output cells already.
Hosting the PNG images directly via GitHub's UI, instead of in the git repo.
Don't build files that aren't in the Table of Contents (https://jupyterbook.org/en/stable/structure/configure.html#disable-building-files-that-arent-in-the-table-of-contents). Can then rename README to README.md without raising a warning like `WARNING: document isn't included in any toctree`.
Some minor changes to the clay-v0-interpolation.ipynb file, and remove the large sample.gif file. Also gitignoring .gif and .png files.
Will be handled in #122
Should be 10 bands of Sentinel-2, not 13.
docs/_toc.yml Outdated
Comment on lines 33 to 38
- title: Generative AI for pixel reconstruction
file: 240105-clay-v0-reconstruction
- title: Create location embeddings
file: 240105-location-embeddings
- title: Interpolating images in embedding space
file: 240105-clay-v0-interpolation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should change these filenames, otherwise the URL comes up as https://clay-foundation.github.io/model/240105-clay-v0-reconstruction.html which doesn't look nice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 9926919

@weiji14 weiji14 dismissed their stale review January 16, 2024 00:48

Most major issues with documentation quality have been resolved

Copy link
Member

@yellowcap yellowcap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aight, lets do this!

@yellowcap yellowcap merged commit 959dfbd into main Jan 16, 2024
4 checks passed
@yellowcap yellowcap deleted the doc-prep branch January 16, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants