-
Notifications
You must be signed in to change notification settings - Fork 296
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
Adds callable option to get secrets for the W&B plugin #2449
Merged
eapolinario
merged 4 commits into
flyteorg:master
from
thomasjpfan:thomasjpfan/wandb_follow-up
Jun 18, 2024
Merged
Adds callable option to get secrets for the W&B plugin #2449
eapolinario
merged 4 commits into
flyteorg:master
from
thomasjpfan:thomasjpfan/wandb_follow-up
Jun 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Thomas J. Fan <[email protected]>
Signed-off-by: Thomas J. Fan <[email protected]>
thomasjpfan
requested review from
wild-endeavor,
kumare3,
eapolinario,
pingsutw,
cosmicBboy and
samhita-alla
as code owners
May 29, 2024 13:14
kumare3
previously approved these changes
May 29, 2024
# Get API key with callable | ||
wandb_api_key = self.secret() | ||
|
||
os.environ["WANDB_API_KEY"] = wandb_api_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no way to not set env vars?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use wandb.login
. I added it in 8480849
Signed-off-by: Thomas J. Fan <[email protected]>
…_follow-up Signed-off-by: Thomas J. Fan <[email protected]>
eapolinario
approved these changes
Jun 18, 2024
bgedik
pushed a commit
to bgedik/flytekit
that referenced
this pull request
Jul 3, 2024
* Adds callable option to get secrets Signed-off-by: Thomas J. Fan <[email protected]> * DOC Improve docstring Signed-off-by: Thomas J. Fan <[email protected]> * Use wandb.login instead of environment variable Signed-off-by: Thomas J. Fan <[email protected]> --------- Signed-off-by: Thomas J. Fan <[email protected]> Signed-off-by: bugra.gedik <[email protected]>
fiedlerNr9
pushed a commit
that referenced
this pull request
Jul 25, 2024
* Adds callable option to get secrets Signed-off-by: Thomas J. Fan <[email protected]> * DOC Improve docstring Signed-off-by: Thomas J. Fan <[email protected]> * Use wandb.login instead of environment variable Signed-off-by: Thomas J. Fan <[email protected]> --------- Signed-off-by: Thomas J. Fan <[email protected]> Signed-off-by: Jan Fiedler <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are the changes needed?
Uses can manage their own secrets with
.netrc
or directly pulling from an AWS secret manager withboto3
. With this PR, useres can define a callable to pull their W&B API Key from any of these sources.What changes were proposed in this pull request?
This PR extends
wandb_init.secrets
to accept a callable that takes in no arguments and returns a string (The API Key).How was this patch tested?
I added unit tests to check the new behavior.