Skip to content
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

Can we add parameters/secrets while pushing the kernels ? #582

Open
bleakprestiger opened this issue May 19, 2024 · 5 comments
Open

Can we add parameters/secrets while pushing the kernels ? #582

bleakprestiger opened this issue May 19, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@bleakprestiger
Copy link

No description provided.

@stevemessick
Copy link
Contributor

Could you give us a little more detail? An example of what you want to do would be great.

@YuenSzeHong
Copy link

Could you give us a little more detail? An example of what you want to do would be great.

I guess he ment user secrets (like api keys that we dont want to expose)

@stevemessick
Copy link
Contributor

No, I do not think we want to do that. I think it would introduce security issues. @rosbo Could you confirm?

The way to manage your API key is with the kaggle_secrets package. See:
https://www.kaggle.com/code/harupy/how-to-use-kaggle-api-as-a-python-library

This package is only available in Kaggle notebooks and is a secure way to set up user name and key.

@rosbo
Copy link
Contributor

rosbo commented May 21, 2024

@stevemessick To clarify, kaggle_secrets is used to access secrets in a notebook (i.e. get the secret value).

from kaggle_secrets import UserSecretsClient

secret_value = UserSecretsClient().get_secret("YOUR_SECRET_NAME")

kaggle_secrets doesn't allow setting the value, it only reads the value. Currently, the value must be set from Notebook Editor > Add-ons > Secrets. Another thing to note is that secrets are set at your account level. Then, you can decide which secrets you want to attach to a specific notebook. If you update the value of a secret, the new value will be used by all notebooks using that secret.

@bleakprestiger Are you asking for an option to "attach" a given list of secrets automatically when calling kaggle kernels push?

Or are you asking for new methods in the CLI to set user secrets. Something along the lines of:

kaggle secrets set MY_API_KEY abcdefghijk123

Thank you

@rosbo rosbo added the enhancement New feature or request label May 21, 2024
@bleakprestiger
Copy link
Author

yes @rosbo, can we attach a given list of secrets when pushing the kernels ? Also can we pass some input variables while pushing the kernels ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants