Digestly

Jan 14, 2025

Linking artifact to W&B registry using org-level service accounts

Weights & Biases - Linking artifact to W&B registry using org-level service accounts

The video provides a step-by-step guide on creating a service account in Weights & Biases and using it to link artifacts to a registry. First, navigate to the service accounts section under your account and create a new service account. Only organization admins can access the service account's API key. Next, create a custom registry, choosing between organization-wide or restricted visibility. Add the service account to the registry if restricted. To link an artifact, use the service account's API key as an environment variable. Import necessary libraries, set the API key, and create an artifact in your script. Log the artifact and link it to the registry using the specified command. Verify the artifact is linked by checking the registry and ensuring the author is the service account.

Key Points:

  • Create a service account in Weights & Biases under your account settings.
  • Only org admins can access the service account's API key.
  • Choose registry visibility: organization-wide or restricted.
  • Use the service account's API key as an environment variable to link artifacts.
  • Verify artifact linkage by checking the registry and author details.

Details:

1. Creating a Service Account in Weights & Biases 🎛️

  • Navigate to the service accounts section under your account settings.
  • Click 'Create Service Account' to start the setup process.
  • Assign a descriptive name to your service account, for example, 'Service Account for Automated Reports'.
  • Select the default entity, which determines the primary team to which the service account will have access, such as 'R Team Demo'. This choice affects where data written by the service account will be stored and managed.

2. Configuring Registry Access for Service Accounts 🔐

  • Only organization admins can access the service account, specifically to copy the API key.
  • To configure access, a new custom registry can be created, for example, named 'service account test'.
  • Visibility options for the registry include 'organization wide', which allows all members access, and 'restricted', which allows selective access including specific service accounts.
  • For demonstration, setting visibility to 'restricted' allows control over which users and service accounts can access the registry.
  • Members, including specific service accounts, can be added to the registry settings after creation.

3. Linking Artifacts to the Custom Registry 🔗

  • To link artifacts to the custom registry, configure service accounts with access permissions to streamline this process effectively.
  • Ensure registry visibility settings are appropriately configured: set to 'organization' for automatic user addition, or restrict access as needed for security.
  • Create a registry file (e.g., registry.py) to facilitate artifact linkage, providing a structured and repeatable process.
  • Understand the importance of linking artifacts: it centralizes resource management, enhances collaboration, and ensures consistency across development environments.

4. Logging Artifacts with API Keys 📝

4.1. Setting Up API Keys for Artifact Logging

4.2. Artifact Management and Registry Linking

5. Verification and Completion of Artifact Linking ✅

5.1. Artifact Linking Process

5.2. Verification Process

View Full Content
Upgrade to Plus to unlock complete episodes, key insights, and in-depth analysis
Starting at $5/month. Cancel anytime.