Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
run linters
Browse files Browse the repository at this point in the history
  • Loading branch information
adrnswanberg committed Jul 24, 2020
1 parent a148b86 commit 303ffd6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions wandb/lib/apikey.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
LOGIN_CHOICE_DRYRUN,
]


def _fixup_anon_mode(default):
# Convert weird anonymode values from legacy settings files
# into one of our expected values.
Expand Down
7 changes: 4 additions & 3 deletions wandb/sdk/wandb_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ def login(api=None, relogin=None, key=None, anonymous=None):
return
settings.update({"anonymous": anonymous})

# Note: This won't actually do anything if called from a codepath where wandb.setup was previously called.
# If wandb.setup is called further up, you must make sure the anonymous setting (and any other settings)
# are already properly set up there.
# Note: This won't actually do anything if called from a codepath where
# wandb.setup was previously called. If wandb.setup is called further up,
# you must make sure the anonymous setting (and any other settings) are
# already properly set up there.
wl = wandb.setup(settings=settings)
settings = wl.settings()

Expand Down
8 changes: 6 additions & 2 deletions wandb/sdk_py27/wandb_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _validate_anonymous_setting(anon_str):
return anon_str in ["must", "allow", "never"]


def login(settings=None, api=None, relogin=None, key=None, anonymous=None):
def login(api=None, relogin=None, key=None, anonymous=None):
"""Log in to W&B.
Args:
Expand All @@ -37,7 +37,7 @@ def login(settings=None, api=None, relogin=None, key=None, anonymous=None):
wandb.termwarn("Calling wandb.login() after wandb.init() is a no-op.")
return

settings = settings or {}
settings = {}
api = api or InternalApi()

if anonymous is not None:
Expand All @@ -50,6 +50,10 @@ def login(settings=None, api=None, relogin=None, key=None, anonymous=None):
return
settings.update({"anonymous": anonymous})

# Note: This won't actually do anything if called from a codepath where
# wandb.setup was previously called. If wandb.setup is called further up,
# you must make sure the anonymous setting (and any other settings) are
# already properly set up there.
wl = wandb.setup(settings=settings)
settings = wl.settings()

Expand Down

0 comments on commit 303ffd6

Please sign in to comment.