Skip to content

Commit

Permalink
Merge pull request #149 from czbiohub-sf/bump-yogo-ver-to-1
Browse files Browse the repository at this point in the history
Bump yogo ver to 1
  • Loading branch information
paul-lebel authored May 31, 2024
2 parents 86a0f69 + 53c0abc commit edfcbce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "yogo"
version = "0.2.0"
version = "1.0.0"
description = "you only glance once?"
authors = ["Axel Jacobsen"]
readme = "README.md"
Expand Down
3 changes: 1 addition & 2 deletions yogo/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,8 @@ def predict(

# gross! device-type is checked even if enabled=False, which means we
# have to just tell autocast that device type is always cuda.
with torch.autocast(
with torch.cuda.amp.autocast(
enabled=half and device.type == "cuda",
device_type="cuda",
dtype=torch.bfloat16,
):
res = model_jit(img_batch.to(device))
Expand Down

0 comments on commit edfcbce

Please sign in to comment.