fix(notebook): auto-detect Kaggle dataset mount path#17
Conversation
Kaggle mounts datasets at /kaggle/input/datasets/{owner}/{slug}/
not /kaggle/input/{slug}/. Try both paths. Also add kernel-metadata.json
for CLI-based notebook push.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR fixes a Kaggle dataset mount path regression by replacing the single hardcoded Key changes:
Confidence Score: 5/5Safe to merge — changes are well-scoped, both failure modes are explicitly guarded, and no regressions are introduced. All changes are targeted and correct: the auto-detection logic covers both known Kaggle mount conventions, errors are surfaced immediately with clear messages, and the metadata file is consistent with the notebook's dataset reference. No prior concerns remain unaddressed. No files require special attention.
|
| Filename | Overview |
|---|---|
| notebooks/train-hippofloop.ipynb | Replaces hardcoded DATA_DIR with a two-candidate auto-detection block; raises FileNotFoundError (with clear message listing both checked paths) when neither exists, and again when no JSONL files are found — both previous silent-failure paths are now explicitly guarded. |
| notebooks/kernel-metadata.json | New Kaggle kernel metadata file; id, code_file, dataset_sources, and GPU/internet flags all look correct for CLI push via kaggle kernels push from the notebooks/ directory. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Cell 5: Auto-detect DATA_DIR] --> B{Check /kaggle/input/datasets/nvandessel/floop-decisions}
B -- exists --> D[DATA_DIR = candidate 1]
B -- not found --> C{Check /kaggle/input/floop-decisions}
C -- exists --> E[DATA_DIR = candidate 2]
C -- not found --> F[raise FileNotFoundError\nlist both checked paths]
D --> G[glob *.jsonl]
E --> G
G -- files found --> H[Continue pipeline]
G -- empty --> I[raise FileNotFoundError\nno .jsonl files in DATA_DIR]
Reviews (2): Last reviewed commit: "fix(notebook): fail fast when dataset pa..." | Re-trigger Greptile
Raise FileNotFoundError with actionable message instead of silently falling back to a non-existent path. Addresses Greptile review. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Addressed Greptile's P1 (silent fallback) in e02a5c8: now raises |
Summary
/kaggle/input/datasets/{owner}/{slug}/and/kaggle/input/{slug}/)kernel-metadata.jsonfor CLI-based notebook push viakaggle kernels pushFirst run failed because Kaggle changed their mount convention.
Test plan
🤖 Generated with Claude Code