Kaggle / kaggle-api

Official Kaggle API
Apache License 2.0
6.01k stars 1.06k forks source link

Kernel runs indefinetely in Active Events popup while "Successfully ran" in the kernel page #473

Open mu-arkhipov opened 1 year ago

mu-arkhipov commented 1 year ago

After kaggle kernels push, kernel appears in the Active Events. After a few minutes "Successfully ran" appears in the run page. The code output is also OK. However, the status of the run in the bottom left popup does not change, it is still running. Moreover, the result is invisible from the competition "Submit Prediction" page. Furthermore, I've tried to submit the outputs from the run page output section. This results in the error "Could not find provided notebook". If I make a new version of the code (without changing anything in the code or data) the notebook becomes visible from the "Submit Prediction" page. The command "Stop Session" in the popup results in no effect.

aleixgg commented 3 weeks ago

I have the same issue, which I've described here. For completeness, I copy the original bug report:

Bug report

  1. Summary of problem When I use the Kaggle API to submit kernels from my local computer, they continue to run after they complete successfully.

  2. Steps to reproduce In a temporary folder, I have the file kernel-metadata.json with contents: { "id": "aleixgim/bug-test-v1", "title": "bug-test-v1", "code_file": "main.ipynb", "language": "python", "kernel_type": "notebook", "is_private": false, "enable_gpu": false, "enable_tpu": false, "enable_internet": false, "dataset_sources": [], "competition_sources": [], "kernel_sources": [], "model_sources": [] } And a notebook main.ipynb with contents: { "metadata": { "kernelspec": { "language": "python", "display_name": "Python 3", "name": "python3" }, "language_info": { "pygments_lexer": "ipython3", "nbconvert_exporter": "python", "version": "3.6.4", "file_extension": ".py", "codemirror_mode": { "name": "ipython", "version": 3 }, "name": "python", "mimetype": "text/x-python" }, "kaggle": { "accelerator": "none", "dataSources": [], "isInternetEnabled": true, "language": "python", "sourceType": "notebook", "isGpuEnabled": false } }, "nbformat_minor": 4, "nbformat": 4, "cells": [ { "cell_type": "code", "source": "print('Hello World')", "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false }, "trusted": true }, "execution_count": null, "outputs": [] } ] } To choose the format of the notebook, I'm downloading a kernel that runs successfully from the website using kaggle kernels pull -m kernel_name, and I remove the fields cells.metadata._uuid and cells.metadata._cell_guid. I have also tried to submit python scripts instead of notebooks, but I run into the same problem.

  3. Expected behavior I expect that a new notebook is created that simply prints Hello World. Although the notebook runs successfully, it continues to run in the active events.

In a more realistic example, I can see the results in the output folder, but I cannot submit the kernel to a competition because Kaggle cannot find it (presumably because it is still running).

  1. Screenshots The notebook after completing Screenshot 2024-06-02 at 13 30 01

Same notebook from the logs tab

Screenshot 2024-06-02 at 13 30 24

Unfortunately, it continues to run in the active events

Screenshot 2024-06-02 at 13 30 48