Skip to content

Commit 6cd081d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 201dde7 commit 6cd081d

File tree

10 files changed

+135
-146
lines changed

10 files changed

+135
-146
lines changed

Untitled.ipynb

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,8 @@
2020
"metadata": {},
2121
"outputs": [],
2222
"source": [
23-
"import math\n",
24-
"import geopandas as gpd\n",
25-
"import numpy as np\n",
26-
"import pandas as pd\n",
27-
"import pystac_client\n",
28-
"import stackstac\n",
29-
"import torch\n",
30-
"import yaml\n",
31-
"from box import Box\n",
32-
"import matplotlib.pyplot as plt\n",
33-
"from rasterio.enums import Resampling\n",
34-
"from shapely import Point\n",
35-
"from sklearn import decomposition, svm\n",
36-
"#from torchvision.transformers import v2\n",
37-
"#from claymodule.module import ClayMAEModule"
23+
"# from torchvision.transformers import v2\n",
24+
"# from claymodule.module import ClayMAEModule"
3825
]
3926
},
4027
{
@@ -54,7 +41,7 @@
5441
"source": [
5542
"from torchvision import transforms\n",
5643
"\n",
57-
"print(hasattr(transforms, \"v2\"))\n"
44+
"print(hasattr(transforms, \"v2\"))"
5845
]
5946
},
6047
{
@@ -75,9 +62,7 @@
7562
]
7663
}
7764
],
78-
"source": [
79-
"from torchvision.transformers import v2"
80-
]
65+
"source": []
8166
},
8267
{
8368
"cell_type": "code",

claymodel/callbacks_wandb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def on_validation_end(
265265
batch["pixels"][j + n_cols][0],
266266
cmap="viridis",
267267
)
268-
axs[2, j].set_title(f"Actual {j+n_cols}")
268+
axs[2, j].set_title(f"Actual {j + n_cols}")
269269
axs[2, j].axis("off")
270270

271271
# Plot predicted images in rows 1 and 3
@@ -274,7 +274,7 @@ def on_validation_end(
274274
axs[1, j].axis("off")
275275

276276
axs[3, j].imshow(pixels[j + n_cols][0], cmap="viridis")
277-
axs[3, j].set_title(f"Pred {j+n_cols}")
277+
axs[3, j].set_title(f"Pred {j + n_cols}")
278278
axs[3, j].axis("off")
279279

280280
self.logger.experiment.log({f"{platform}": wandb.Image(fig)})

claymodel/datamodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def setup(self, stage: Literal["fit", "predict"] | None = None) -> None:
258258
print(f"Total number of chips: {len(chips_path)}")
259259

260260
if stage == "fit":
261-
# Check how many unique platforms we have
261+
# Check how many unique platforms we have
262262
unique_platforms = set(chips_platform)
263263

264264
if len(unique_platforms) > 1:

claymodel/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ def posemb_sincos_2d_with_gsd(
3535

3636

3737
def posemb_sincos_1d(waves, dim, temperature: int = 10000, dtype=torch.float32):
38-
assert (
39-
dim % 2 == 0
40-
), "Feature dimension must be a multiple of 2 for sincos embedding"
38+
assert dim % 2 == 0, (
39+
"Feature dimension must be a multiple of 2 for sincos embedding"
40+
)
4141
waves = torch.arange(waves) if isinstance(waves, int) else waves
4242

4343
omega = torch.arange(dim // 2, device=waves.device) / (dim // 2 - 1)

docs/clay-v0/clay-v0-location-embeddings.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@
331331
"plt.scatter(latlon[:, 0], latlon[:, 1], c=latlon[:, 2], label=\"Actual\", alpha=0.3)\n",
332332
"\n",
333333
"for i in range(100):\n",
334-
" txt = f\"{latlon[:,0][i]:.2f},{latlon[:, 1][i]:.2f}\"\n",
334+
" txt = f\"{latlon[:, 0][i]:.2f},{latlon[:, 1][i]:.2f}\"\n",
335335
" plt.annotate(txt, (latlon[:, 0][i] + 1e-5, latlon[:, 1][i] + 1e-5))"
336336
]
337337
},

docs/references.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
% This file contains bibliography references for the Clay Foundation Model documentation
2-
% Currently empty but required by the Jupyter Book configuration
2+
% Currently empty but required by the Jupyter Book configuration

docs/tutorials/inference.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"items = catalog.search(\n",
137137
" collections=[PLATFORM_NAME],\n",
138138
" bbox=[-122.6, 37.6, -122.35, 37.85],\n",
139-
" datetime=f\"{YEAR}-01-01T00:00:00Z/{YEAR+1}-01-01T00:00:00Z\",\n",
139+
" datetime=f\"{YEAR}-01-01T00:00:00Z/{YEAR + 1}-01-01T00:00:00Z\",\n",
140140
" max_items=100,\n",
141141
")\n",
142142
"\n",

0 commit comments

Comments
 (0)