Skip to content

Conversation

@daniellepintz
Copy link
Contributor

Description

In this PR we use the secrets API to extract the WandB API key and add it to the environment.

Test Plan

./.meta/mast/launch.sh .meta/mast/qwen3_1_7b_mast.yaml

From logs:

[wandb] Attempting to retrieve API key from keychain secret_name='TORCHFORGE_WANDB_API_KEY'
[wandb] Successfully retrieved API key from keychain.
wandb: 🚀 View run at https://meta.wandb.io/torchforge/grpo-training/runs/1ql4ar91

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 8, 2025
"VLLM_USE_TRITON_FLASH_ATTN": "0",
"WANDB_MODE": "offline",
"WANDB_MODE": "online",
"WANDB_BASE_URL": "https://meta.wandb.io",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if you think moving these MAST controller stuff to a separate src/forge/controller/fb/ make sense.

Copy link
Contributor Author

@daniellepintz daniellepintz Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I think we can move MastLauncher to a separate file, I can do that after this Pr

@JenniferWang
Copy link
Contributor

What's the steps to set up the team keychain for wandb?

Comment on lines +89 to +92
if wandb_api_key is not None:
os.environ["WANDB_API_KEY"] = wandb_api_key
os.environ["WANDB_BASE_URL"] = WANDB_HOST

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should terminate the launcher if wandb_api_key is None.
Otherwise, it just delays the crash in MAST

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

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants