Skip to content

id_no cannot be used as an identifier for the kernel #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
viocha opened this issue Apr 24, 2025 · 2 comments
Open

id_no cannot be used as an identifier for the kernel #745

viocha opened this issue Apr 24, 2025 · 2 comments

Comments

@viocha
Copy link

viocha commented Apr 24, 2025

First, I created a kernel using an id_no = 145717001

> kaggle kernels push
Kernel version 1 successfully pushed.  Please check progress at https://www.kaggle.com/code/vioochai/tmp001
{
  "id_no": 145717001,
  "title": "tmp001",
  "code_file": "notebook.ipynb",
  "language": "python",
  "kernel_type": "notebook",
  "is_private": true,
  "enable_internet": true
}

When I removed the title field and tried to modify the kernel using the same id_no, it prompted that I was creating a new kernel.

> kaggle kernels push
Kernel push error: New kernels must have a title specified
{
  "id_no": 145717001,
  "code_file": "notebook.ipynb",
  "language": "python",
  "kernel_type": "notebook",
  "is_private": true,
  "enable_internet": true
}

When I added the title field back, it indicated a kernel conflict.

> kaggle kernels push
409 Client Error: Conflict for url: https://www.kaggle.com/api/v1/kernels/push
{
  "id_no": 145717001,
  "title": "tmp001",
  "code_file": "notebook.ipynb",
  "language": "python",
  "kernel_type": "notebook",
  "is_private": true,
  "enable_internet": true
}

I speculate that it works like this: it uses the provided title and your username to create an id = username/title to identify the kernel, completely ignoring the role of id_no. This contradicts the API documentation which states that id_no has higher priority.

@stevemessick
Copy link
Contributor

stevemessick commented Apr 24, 2025

This contradicts the API documentation which states that id_no has higher priority.

Unfortunately, the wiki documentation for kernel metadata has been out-of-date since 4/13/2021. That was when a specific check was added to the server to ensure id (<username>/<title>) was used.

We're in the process of cleaning up the documentation, so this problem will be resolved soon-ish.

@stevemessick
Copy link
Contributor

Oops, I mis-read the code. It isn't that simple. I'll try to figure out the root problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants