Skip to main content

GSK Onboarding Guide (W&B Models)

One stop shop for getting started with Weights & Biases
Created on May 8|Last edited on May 21
Access Weights & Biases here: https://gsk.wandb.io
To obtain access to a specific team, please contact Roopa Mahishi (roopa.m.mahishi@gsk.com)

Please post any questions or feedback on this document to the shared Teams channel (link). Contact al@wandb.com if you need access.
💡



Weights and Biases (W&B) 💫

W&B Models is an MLOps platform built to facilitate collaboration and reproducibility across the machine learning development lifecycle. Machine learning projects can quickly become a mess without some best practices in place to aid developers and scientists as they iterate on models and move them to production.
W&B Models is lightweight enough to work with whatever framework or platform teams are currently using, but enables teams to quickly start logging their important results to a central system of record. On top of this system of record, W&B has built visualization, automation, and documentation capabilities for better debugging, model tuning, and project management.

W&B Authentication

SDK Installation and Login

To start using W&B, you first need to install the Python package (if it's not already there)
pip install wandb wandb-workspaces
Once it's installed, authenticate your user account by logging in through the CLI or SDK. You should have receive an email to sign up to the platform, after which you can obtain your API token (The API token is in your "Settings" section under your profile)
wandb login --host <YOUR W&B HOST URL> <YOUR API TOKEN>
OR through Python:
import os

# Set the environment variables
os.environ["WANDB_BASE_URL"] = "https://gsk.wandb.io"
os.environ["WANDB_HOST"] = "https://gsk.wandb.io"
os.environ["WANDB_API_KEY"] = "your_api_key_here" #find this at https://gsk.wandb.io/authorize

# Optionally, you can print them out to verify
print("WANDB_BASE_URL:", os.environ["WANDB_BASE_URL"])
print("WANDB_HOST:", os.environ["WANDB_HOST"])
print("WANDB_API_KEY:", os.environ["WANDB_API_KEY"])
Once you are logged in, you are ready to track your workflows!

Certificate Authority Trust Setup Guide

What is a "CA"?

A Certificate Authority (CA) is a trusted organization that issues and signs digital certificates. When you connect over HTTPS, your client verifies that the server's certificate chains back to one of the CAs in its trust store.

Why you see SSL errors

Your corporate proxy (zsproxy.gsk.com) intercepts HTTPS traffic and re-signs certificates with its own internal CA. Because that CA isn't in Python's default bundle, SSL verification fails.

How to fix it

By appending or installing your proxy's CA certificate into the bundle or OS trust store, you're telling your client to also trust certificates signed by that internal CA. When the proxy presents its re-signed cert, your application will successfully verify the chain and establish a secure connection.


Technical walkthrough

1. Local machines (developer laptops)

  1. Locate the default bundle

    python -c "import certifi; print(certifi.where())"
    

    Example output:

    /Users/you/.../certifi/cacert.pem
    C:\Users\you\...\certifi\cacert.pem
    
  2. Create a combined bundle

    • macOS / Linux

      cp /path/to/cacert.pem full_bundle.pem
      cat zsproxy.gsk.com.crt >> full_bundle.pem
      
    • Windows PowerShell

      Get-Content C:\path\to\cacert.pem, C:\path\to\zsproxy.gsk.com.crt |
        Set-Content C:\path\to\full_bundle.pem
      
  3. Set the environment variable

    • macOS / Linux (Bash)

      export REQUESTS_CA_BUNDLE="/full/path/to/full_bundle.pem"
      
    • Windows (PowerShell)

      $Env:REQUESTS_CA_BUNDLE = "C:\full\path\to\full_bundle.pem"
      
  4. Verify in code

    import os
    import requests
    
    # os.environ[...] must already be set—either via shell or in-code before importing requests
    response = requests.get("https://gsk.wandb.io")
    print(response.status_code)  # should be 200
    

2. Cloud functions & containers

Note: You cannot modify the host OS store. You must bundle your CA file and set the environment variable in your deployment configuration.

  1. Include the combined bundle

    • In your project, create a certs/ folder
    • Locally generate certs/cacert.pem by concatenating:
      cp "$(python -c 'import certifi; print(certifi.where())')" certs/cacert.pem
      cat zsproxy.gsk.com.crt >> certs/cacert.pem
      
  2. Set the environment variable

    • Azure Functions (Portal)

      1. Go to Configuration → Application settings
      2. Click New application setting
      3. Name: REQUESTS_CA_BUNDLE Value: /home/site/wwwroot/certs/cacert.pem
      4. Save and restart your Function App
    • Docker containers

      # After copying certs/ into the image
      ENV REQUESTS_CA_BUNDLE=/app/certs/cacert.pem
      
      docker run \
        -e REQUESTS_CA_BUNDLE=/app/certs/cacert.pem \
        my-image
      
    • Kubernetes Pod

      apiVersion: v1
      kind: Pod
      metadata:
        name: my-app
      spec:
        containers:
        - name: app
          image: my-image
          env:
          - name: REQUESTS_CA_BUNDLE
            value: "/app/certs/cacert.pem"
          volumeMounts:
          - name: certs
            mountPath: /app/certs
        volumes:
        - name: certs
          configMap:
            name: my-cert-configmap
      
  3. Optional in-code override

    import os
    os.environ["REQUESTS_CA_BUNDLE"] = os.path.join(
        os.path.dirname(__file__), "certs", "cacert.pem"
    )
    import requests
    

3. Full Azure VMs (Windows & Linux)

Note: You can install the CA into the OS trust store so all applications automatically trust it.

Windows VM 1. Run certlm.msc (Local Machine → Trusted Root Certification Authorities) 2. Right-click Certificates → All Tasks → Import… → select zsproxy.gsk.com.crt → Finish 3. (Python)

  • To use the Windows store directly with requests, install:
    pip install certifi-win32
    
  • Or continue to use REQUESTS_CA_BUNDLE pointing at a PEM as in the "Local machines" section

Linux VM 1. Copy your certificate:

sudo cp zsproxy.gsk.com.crt /usr/local/share/ca-certificates/
  1. Update the store:

    sudo update-ca-certificates        # Debian/Ubuntu
    sudo update-ca-trust extract       # RHEL/CentOS
    
  2. (Python)

    • Many Linux Python builds will then use the system OpenSSL bundle automatically
    • If not, set REQUESTS_CA_BUNDLE as above

Outcome

Whether on your laptop, in serverless code, inside a container, or running on a VM, trusting your proxy's CA ensures Python's requests and other TLS-based clients will validate the man-in-the-middle certificates and maintain a secure connection to your Weights & Biases instance.



YouTube overview

Overall W&B documentation: https://docs.wandb.ai/
W&B Integrations Guide with popular frameworks: https://docs.wandb.ai/guides/integrations
W&B Artifacts (Tracking and versioning any serialized data): https://docs.wandb.ai/guides/artifacts (Code)
W&B Tables (Visualizing and querying dataframes): https://docs.wandb.ai/guides/data-vis/tables-quickstart (Code)
W&B Sweeps (Automating Hyperparameter search) : https://docs.wandb.ai/guides/sweeps (Code)
W&B Reports (Rich live and interactive documentation to describe your findings): https://docs.wandb.ai/guides/reports

An example colab

Education

Experiment Tracking (Track and visualize your ML Experiments)

W&B Tables (Visualize and query with interactive dataframes)

Artifact Tracking and Versioning

Model Registry (Register and manage your ML Models)

Automations (Trigger workflows with model registry changes)

W&B Sweeps (Automate Hyperparameter search)

W&B Reports (Rich live and interactive documentation)

Other Useful Resources

FAQ