Spaces:
Sleeping

jefffffff9 Claude Sonnet 4.6 commited on
Commit
3d43385
·
1 Parent(s): a5737ac

Fix Kaggle trigger: use kaggle CLI push instead of fake /run endpoint

Browse files

The Kaggle REST API has no /run endpoint. The correct way to trigger
a new kernel run is kaggle kernels push, which creates a new kernel
version (which immediately starts executing on Kaggle's servers).

New approach:
- Reads notebook + kernel-metadata.json from the Space filesystem
- Writes temporary kaggle.json from KAGGLE_USERNAME/KAGGLE_KEY secrets
- Runs: python -m kaggle kernels push -p notebooks/
- Returns the CLI output so errors are visible in the UI

Also logs auto-trigger result to Space logs instead of silently failing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 file changed +53 -19
app.py+53-19