Skip to content

Commit

Permalink
馃毟 Avoid issues with removed directory during run (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
klieret committed Jul 7, 2023
1 parent f75185e commit ee32f98
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,13 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.1.1 (07.07.2023)

### Fixed

- Avoid errors when communication directory is removed while wandb-osh is
running.

## 1.1.0 (04.07.2023)

### Added
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = wandb_osh
version = 1.1.0
version = 1.1.1
description = Trigger wandb offline syncs from a compute node without internet
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
2 changes: 2 additions & 0 deletions src/wandb_osh/hooks.py
Expand Up @@ -42,6 +42,8 @@ def __call__(self, logdir: str | PathLike | None = None):
logdir = Path(wandb.run.dir).parent.resolve()
trial_dir = Path(logdir).resolve()
cmd_fname = hash_id(str(trial_dir)) + ".command"
# In case the communication dir was deleted since we initialized this class
self.communication_dir.mkdir(parents=True, exist_ok=True)
command_file = self.communication_dir / cmd_fname
if command_file.is_file():
logger.warning(
Expand Down

0 comments on commit ee32f98

Please sign in to comment.