Skip to content

Commit

Permalink
Fix user setting
Browse files Browse the repository at this point in the history
  • Loading branch information
harimkang committed Aug 30, 2024
1 parent 0b9ed4a commit 7fc1f59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/otx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@

from otx.core.types import * # noqa: F403

# Pretrained weight is saved into ~/.cache/torch/hub/checkpoints
os.environ["XDG_CACHE_HOME"] = str(Path.home() / ".cache" / "torch" / "hub" / "checkpoints")
# Set the value of XDG_CACHE_HOME to set the cache folder that stores the pretrained weights for timm and huggingface.
# Default, Pretrained weight is saved into ~/.cache/torch/hub/checkpoints
os.environ["XDG_CACHE_HOME"] = os.getenv(
"XDG_CACHE_HOME",
str(Path.home() / ".cache" / "torch" / "hub" / "checkpoints"),
)

OTX_LOGO: str = """
Expand Down

0 comments on commit 7fc1f59

Please sign in to comment.