Skip to content

Commit

Permalink
more fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vertefra committed Aug 29, 2024
1 parent 1763180 commit 0cd90b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ examples = [
"pillow",
]
wandb = [
"wandb=>0.17.7",
"wandb>=0.17.7",
]

[tool.setuptools_scm]
Expand Down
8 changes: 5 additions & 3 deletions qcog_python_client/monitor/_wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os

import wandb
import wandb.sdk as wandbsdk

from .interface import Monitor

Expand Down Expand Up @@ -44,12 +45,13 @@ def init( # noqa: D417 # Complains about parameters description not being pre
raise ValueError(
"Wandb API key is required. Please provide a key, ether as an argument or as an environment variable -> WANDB_API_KEY" # noqa
)
wandb.login(

wandbsdk.login(
anonymous="never",
key=key,
)

wandb.init(
wandbsdk.init(
project=project,
config=parameters,
tags=labels,
Expand All @@ -68,4 +70,4 @@ def log(self, data: dict) -> None: # noqa: D417 # Complains about parameters

def close(self) -> None:
"""Close the Wandb monitor."""
wandb.finish()
wandbsdk.finish()

0 comments on commit 0cd90b6

Please sign in to comment.