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

Add notebooks to show internal working on CLAY models #129

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions clayground.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<<<<<<< HEAD
import streamlit as st
import numpy as np
import lancedb
import matplotlib.pyplot as plt
import rasterio as rio
=======
import lancedb
import matplotlib.pyplot as plt
import rasterio as rio
import streamlit as st
>>>>>>> main
from rasterio.plot import show

st.set_page_config(layout="wide")
Expand All @@ -22,6 +30,15 @@ def get_unique_chips(tbl):
{"tile": "55LBC", "idx": "0075", "year": 2022},
]

<<<<<<< HEAD
filter = " OR ".join(
[
f"(tile == '{chip['tile']}' AND idx == '{chip['idx']}') AND year == {chip['year']}"
for chip in chips
]
)
result = tbl.search().where(filter, prefilter=True).to_pandas()
=======
tile_filter = " OR ".join(
[
f"(tile == '{chip['tile']}' "
Expand All @@ -31,6 +48,7 @@ def get_unique_chips(tbl):
]
)
result = tbl.search().where(tile_filter, prefilter=True).to_pandas()
>>>>>>> main
return result


Expand Down
4 changes: 2 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ only_build_toc_files: true
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: cache
exclude_patterns:
- clay-v0-*.ipynb
# exclude_patterns:
# - clay-v0-*.ipynb

# Define the name of the latex output file for PDF builds
latex:
Expand Down
4 changes: 4 additions & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ parts:
file: clay-v0-location-embeddings
- title: Interpolating images in embedding space
file: clay-v0-interpolation
- title: Visualize images in embedding space
file: clay-v0-visualization
- title: How to pass partial inputs like RGB, SAR or DEM bands to the model
file: clay-v0-partial-inputs
- caption: About Clay
chapters:
- title: GitHub
Expand Down
Binary file added docs/animate/sample.gif
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@weiji14 , JupyterBook is executing the notebook every time we make a change, which results in a new version of the sample.gif file being saved.
This is increasing the repository size unnecessarily. How can we execute the notebooks only when necessary to avoid this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't we gitignoring *.git files here?

**/*/.gif

There's a way to prevent execution of certain notebooks following https://jupyterbook.org/en/stable/content/execute.html#exclude-files-from-execution. We could provide a list of notebooks that we know would take a lot of time or resources to run.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/bands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/loss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/lr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/reconstruction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/tiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
919 changes: 919 additions & 0 deletions docs/clay-v0-partial-inputs.ipynb

Large diffs are not rendered by default.

Loading
Loading