feat(wandb): store Flyte execution ID in wandb run config for reverse lookups#48
Open
feat(wandb): store Flyte execution ID in wandb run config for reverse lookups#48
Conversation
… lookups Adds flyte_execution_id, flyte_execution_project, and flyte_execution_domain to wandb run config during remote execution. This enables looking up the corresponding Flyte execution from a WandB run, making the WandB<->Flyte mapping a single lookup in either direction. Co-Authored-By: ben@exa.ai <ben@exa.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or 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
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?
Currently there is no way to look up the corresponding Flyte execution from a W&B run. The reverse direction (Flyte → W&B) is also not straightforward. By storing the Flyte execution ID in the W&B run config, we enable a single-lookup mapping in either direction — given a W&B run, you can directly find the Flyte execution.
What changes were proposed in this pull request?
After
wandb.init()in remote execution, stores three keys in the wandb run config:flyte_execution_id— the execution nameflyte_execution_project— the Flyte projectflyte_execution_domain— the Flyte domainThese are only set during remote (non-local) execution.
allow_val_change=Trueis passed to avoid conflicts if wandb config was already initialized with defaults.How was this patch tested?
Updated the existing
test_non_local_executiontest to mockexecution_id.projectandexecution_id.domain, and added an assertion thatrun.config.updateis called with the expected Flyte metadata.Human Review Checklist
allow_val_change=Trueis the right approach (vs. setting config keys beforewandb.init)flyte_execution_id,flyte_execution_project,flyte_execution_domain) match what downstream consumers (e.g. Overseer dashboard) will queryCheck all the applicable boxes
Link to Devin Session: https://app.devin.ai/sessions/71ca8c0e52c647fcaf3aeeac880073f9
Requested by: @ben-chen