Skip to content

Commit

Permalink
BUG: xinference cache dir doesn't exist (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
UranusSeven authored Aug 23, 2023
1 parent 1f8c73d commit d199011
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xinference/model/llm/llm_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ def copy(
raise ValueError(
f"Model URI cannot be a relative path: {llm_spec.model_uri}"
)
if not os.path.exists(XINFERENCE_CACHE_DIR):
os.makedirs(XINFERENCE_CACHE_DIR, exist_ok=True)
os.symlink(src_root, cache_dir, target_is_directory=True)
return cache_dir
elif src_scheme in SUPPORTED_SCHEMES:
Expand Down

0 comments on commit d199011

Please sign in to comment.