Skip to content

Commit

Permalink
strip the read file contents
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanklut committed Mar 26, 2024
1 parent 25ef761 commit c57a8f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_git_hash() -> str:

if version_path.is_file():
with version_path.open(mode="r") as file:
git_hash = file.read()
git_hash = file.read().strip()
else:
git_hash = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=Path(__file__).resolve().parent).strip().decode()
return git_hash
Expand Down
1 change: 1 addition & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def cpu_call(self, data: AugInput) -> tuple[dict, int, int]:

height, width, channels = data.image.shape
assert channels == 3, f"Must be a RBG image, found {channels} channels"
# In place augmentation
transform = self.aug(data)
image = torch.as_tensor(data.image, dtype=torch.float32, device=self.cfg.MODEL.DEVICE).permute(2, 0, 1)

Expand Down

0 comments on commit c57a8f0

Please sign in to comment.