Kaggle / kaggle-api

Official Kaggle API
Apache License 2.0
6.15k stars 1.08k forks source link

:grey_question: API endpoint to trigger a notebook execution :nerd_face: #483

Open adriens opened 1 year ago

adriens commented 1 year ago

Hi, I wonder is, from a API call we could trigger a Notebook execution :grey_question: :crossed_fingers:

Philmod commented 1 year ago

Hey @adriens, this endpoint doesn't exist for the moment unfortunately.

adriens commented 1 year ago

Any chance to get it :crossed_fingers: :pray:

jplotts commented 8 months ago

Hi @adriens - can you clarify the request? The kaggle kernels push command automatically executes the notebook after it's uploaded. Is this not what you're looking for?

adriens commented 8 months ago

Hi, nope. In fact, I would like to be able to remotely trigger GPU based notebooks runs from remote places (like GH Actions), as part of "complex workflows".

jplotts commented 8 months ago

@adriens - inside the kernel-metadata.json is a flag called enable_gpu, so GPU shouldn't be a problem. I think what you're asking is there an endpoint that will trigger an existing kaggle notebook to run? If so, there's no API for that directly, but you can use kaggle kernels push to run a GPU notebook, as long as you have access to the source and a kernel-metadata.json.

Is your request to make this process easier by not requiring the source/metadata? Or is there some missing functionality?

adriens commented 8 months ago

I think what you're asking is there an endpoint that will trigger an existing kaggle notebook to run?

Yup, that's exactly what I would like to play with : it would respond a 202 Accepted, form a pure API perspective :thought_balloon:

Is your request to make this process easier by not requiring the source/metadata? Or is there some missing functionality?

My concern would to be able to trigger GPU based notebooks from:

but you can use kaggle kernels push to run a GPU notebook, as long as you have access to the source and a kernel-metadata.json.

Is your request to make this process easier by not requiring the source/metadata? Or is there some missing functionality?

Yup, I was aware of that, it works on my machine but I wanted to be able to run it anytwhere in a more convenient way, which is for me:

Hope this helps better understanding my usecase :crossed_fingers: