Skip to content

[NA] [DOCS] feat: replace manage_data notebooks with uv scripts and add S3/GCS remote artifact example - #289

Merged
fschlz merged 6 commits into
masterfrom
fschlz/manage-data-py-examples
Oct 22, 2026
Merged

fschlz merged 6 commits into
masterfrom
fschlz/manage-data-py-examples

Conversation

@fschlz

@fschlz fschlz commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

What changed

guides/manage_data/ is now a uv project with three plain Python scripts and a README, replacing the two notebooks:

  • artifacts_intro.py (was Introduction_to_Artifacts.ipynb): upload a dataset Artifact, fetch it by alias, download, train, log the model as an Artifact, log a new dataset version. Fixes the scaled-data step, which wrote the unscaled frames to the *-scaled.csv files.
  • remote_artifact_links.py (was A_Guide_to_Remote_Artifacts.ipynb): generic remote assets (https links with per-asset metadata), capped at 200 images, then reads the links back and fetches one file.
  • remote_artifact_cloud_storage.py (new): s3:// / gs:// synced remote assets and download(), with a non-zero exit when the SDK falls back to a plain link because the client library or cloud credentials are missing.
  • README.md: what each script shows, what the SDK can do with generic links, S3 and GCS, prerequisites, docs links.
  • .github/workflows/test-examples.yml: the two notebook entries are replaced by the two scripts that run with COMET_API_KEY only. The cloud script is not in CI (no AWS/GCP secrets).
  • guides/get-started/Comet_Quickstart.ipynb: the one link to the deleted intro notebook now points at artifacts_intro.py.

Why

The docs page Register remote artifacts is about S3/GCS sync and download, but the notebook it linked only logged https links, so the example never showed what the page describes. The intro notebook carried the scaled-data bug and inline screenshots. New examples in this repo use .py + uv per AGENTS.md.

A follow-up PR in comet-ml/documentation swaps the Colab badges on the two artifact guide pages for links to these scripts and fixes gcs:// to gs://.

How it was verified

  • uv run python artifacts_intro.py twice in the same workspace (second run exercises overwrite_strategy="PRESERVE"); scaled CSV has zero-mean features and no index column.
  • uv run python remote_artifact_links.py: 200 remote assets logged, 24 of them with empty annotation lists, one image fetched back.
  • remote_artifact_cloud_storage.py: gcs:// rejected with exit 2; s3:// and gs:// without credentials exit 1 with a NOT synced message and no experiment; s3://noaa-ghcn-pds/csv.gz/by_year/176 (public bucket, 7 objects) with AWS credentials synced, logged and downloaded all 7 files. The GCS success path was not run (no GCP credentials); it follows the same SDK code path (Artifact._add_gs_assets, LoggedArtifact.download).
  • requirements.txt is uv export --no-hashes; pip install -r requirements.txt on Python 3.10 + python remote_artifact_links.py passed locally. artifacts_intro.py on 3.10 is covered by the CI matrix job here (the scipy 1.15 macOS wheel does not load on the local machine).

…cts.ipynb

24 of the first 200 DOTA images carry no annotations, so the
annotation_map.get(id, []) path is exercised on every run.
…cloud_storage.py

An empty prefix left artifact.assets empty and the script crashed with
IndexError before printing its own message. A single-object URI synced
correctly but was reported as NOT synced because its link equals the
input URI. The synced-vs-fallback decision now rests only on the SDK's
synced metadata flag.
@fschlz fschlz self-assigned this Oct 22, 2026
@fschlz
fschlz merged commit 8e52c5e into master Oct 22, 2026
33 of 51 checks passed
@fschlz
fschlz deleted the fschlz/manage-data-py-examples branch October 22, 2026 19:38
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.

1 participant