-
Notifications
You must be signed in to change notification settings - Fork 559
Closed
Labels
backendIssues that require changes on the backendIssues that require changes on the backendbugSomething isn't workingSomething isn't workinginternalTo filter out internal PRs and issuesTo filter out internal PRs and issuessnackx-squadIssues that are being handled by the x-squadIssues that are being handled by the x-squad
Description
Description
With wandb 0.23.0 and weave 0.52.17+, ZenML pipeline runs fail with PERMISSION_ERROR even when Weave is explicitly disabled (enable_weave=False). This affects users who:
- Are not logged into Weights & Biases
- Don't have project creation permissions
- Have explicitly set
enable_weave=Falseexpecting no Weave interaction
Root Cause
The WandbExperimentTracker._initialize_wandb() method imports weave in both branches:
if settings.enable_weave:
import weave
weave.init(project_name=...)
else:
import weave # ← Problem: still imports weave
weave.init(..., settings={"disabled": True})With weave >= 0.52.17:
import weavealone loads ~548 modules includingweave.trace.autopatch- This triggers
wandb_init_hookwhich attempts remote project creation - The authentication/permission check fails before
settings={"disabled": True}takes effect
Steps to Reproduce
- Install wandb 0.23.0 and weave 0.52.17+
- Do NOT log into W&B (
wandb login) - Create a ZenML stack with wandb experiment tracker (
enable_weave=Falseis the default) - Run a pipeline
- Observe
PERMISSION_ERRORfrom weave/wandb
Expected Behavior
When enable_weave=False, ZenML should not import or interact with weave at all. The run should succeed without requiring W&B authentication for Weave-related operations.
Environment
- wandb: 0.23.0+
- weave: 0.52.17+
- ZenML: latest
Fix
PR #4265 removes the unnecessary else branch. When enable_weave=False, we now skip all weave-related code entirely, preventing any import side-effects.
Metadata
Metadata
Assignees
Labels
backendIssues that require changes on the backendIssues that require changes on the backendbugSomething isn't workingSomething isn't workinginternalTo filter out internal PRs and issuesTo filter out internal PRs and issuessnackx-squadIssues that are being handled by the x-squadIssues that are being handled by the x-squad
Type
Projects
Status
Released