Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hasattr check for Wandb 0.17.6 #3531

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,10 @@ jobs:
pytest-command: ${{ matrix.pytest_command }}
pytest-markers: ${{ matrix.markers }}
composer_package_name: ${{ matrix.composer_package_name }}
pytest-wandb-entity: "mosaicml-public-integration-tests"
pytest-wandb-project: "integration-tests-${{ github.sha }}"
safe_directory: composer
secrets:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
wandb-api-key: ${{ secrets.WANDB_API_KEY }}
code-eval-device: ${{ secrets.CODE_EVAL_DEVICE }}
code-eval-url: ${{ secrets.CODE_EVAL_URL }}
code-eval-apikey: ${{ secrets.CODE_EVAL_APIKEY }}
Expand Down
6 changes: 5 additions & 1 deletion composer/loggers/wandb_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ def init(self, state: State, logger: Logger) -> None:
if self._enabled:
wandb.init(**self._init_kwargs)
assert wandb.run is not None, 'The wandb run is set after init'
entity_and_project = [str(wandb.run.entity), str(wandb.run.project)]
if hasattr(wandb.run, 'entity') and hasattr(wandb.run, 'project'):
entity_and_project = [str(wandb.run.entity), str(wandb.run.project)]
else:
# Run does not have attribtues if wandb is in disabled mode
entity_and_project = [None, None]
self.run_dir = wandb.run.dir
self.run_url = wandb.run.get_url()
atexit.register(self._set_is_in_atexit)
Expand Down
Loading