diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 305b2183..6dede0b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.13.3 + rev: v0.15.9 hooks: - id: ruff # Run the linter args: [ --fix ] diff --git a/claymodel/callbacks_wandb.py b/claymodel/callbacks_wandb.py index 3684d37d..9cb92cba 100644 --- a/claymodel/callbacks_wandb.py +++ b/claymodel/callbacks_wandb.py @@ -265,7 +265,7 @@ def on_validation_end( batch["pixels"][j + n_cols][0], cmap="viridis", ) - axs[2, j].set_title(f"Actual {j+n_cols}") + axs[2, j].set_title(f"Actual {j + n_cols}") axs[2, j].axis("off") # Plot predicted images in rows 1 and 3 @@ -274,7 +274,7 @@ def on_validation_end( axs[1, j].axis("off") axs[3, j].imshow(pixels[j + n_cols][0], cmap="viridis") - axs[3, j].set_title(f"Pred {j+n_cols}") + axs[3, j].set_title(f"Pred {j + n_cols}") axs[3, j].axis("off") self.logger.experiment.log({f"{platform}": wandb.Image(fig)}) diff --git a/claymodel/utils.py b/claymodel/utils.py index b0f2bcce..6fae4458 100644 --- a/claymodel/utils.py +++ b/claymodel/utils.py @@ -35,9 +35,9 @@ def posemb_sincos_2d_with_gsd( def posemb_sincos_1d(waves, dim, temperature: int = 10000, dtype=torch.float32): - assert ( - dim % 2 == 0 - ), "Feature dimension must be a multiple of 2 for sincos embedding" + assert dim % 2 == 0, ( + "Feature dimension must be a multiple of 2 for sincos embedding" + ) waves = torch.arange(waves) if isinstance(waves, int) else waves omega = torch.arange(dim // 2, device=waves.device) / (dim // 2 - 1) diff --git a/docs/clay-v0/clay-v0-location-embeddings.ipynb b/docs/clay-v0/clay-v0-location-embeddings.ipynb index b903b0ab..92f497c6 100644 --- a/docs/clay-v0/clay-v0-location-embeddings.ipynb +++ b/docs/clay-v0/clay-v0-location-embeddings.ipynb @@ -331,7 +331,7 @@ "plt.scatter(latlon[:, 0], latlon[:, 1], c=latlon[:, 2], label=\"Actual\", alpha=0.3)\n", "\n", "for i in range(100):\n", - " txt = f\"{latlon[:,0][i]:.2f},{latlon[:, 1][i]:.2f}\"\n", + " txt = f\"{latlon[:, 0][i]:.2f},{latlon[:, 1][i]:.2f}\"\n", " plt.annotate(txt, (latlon[:, 0][i] + 1e-5, latlon[:, 1][i] + 1e-5))" ] }, diff --git a/docs/references.bib b/docs/references.bib index 2b5c34cd..e9cee75d 100644 --- a/docs/references.bib +++ b/docs/references.bib @@ -1,2 +1,2 @@ % This file contains bibliography references for the Clay Foundation Model documentation -% Currently empty but required by the Jupyter Book configuration \ No newline at end of file +% Currently empty but required by the Jupyter Book configuration diff --git a/docs/tutorials/inference.ipynb b/docs/tutorials/inference.ipynb index 4739a275..bcb13142 100644 --- a/docs/tutorials/inference.ipynb +++ b/docs/tutorials/inference.ipynb @@ -136,7 +136,7 @@ "items = catalog.search(\n", " collections=[PLATFORM_NAME],\n", " bbox=[-122.6, 37.6, -122.35, 37.85],\n", - " datetime=f\"{YEAR}-01-01T00:00:00Z/{YEAR+1}-01-01T00:00:00Z\",\n", + " datetime=f\"{YEAR}-01-01T00:00:00Z/{YEAR + 1}-01-01T00:00:00Z\",\n", " max_items=100,\n", ")\n", "\n",