Skip to content

Commit

Permalink
- add /model to path
Browse files Browse the repository at this point in the history
  • Loading branch information
gabewillen committed Feb 6, 2025
1 parent 218fabb commit 789e14a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# how many items can be in the queue
os.environ["INFINITY_QUEUE_SIZE"] = "48000"

MODEL_CACHE_PATH_TEMPLATE = "/runpod/cache/{path}"
MODEL_CACHE_PATH_TEMPLATE = "/runpod/cache/model/{path}"

CONFIG_MESSAGE_TEMPLATE = "{message} [see https://github.com/runpod-workers/worker-infinity-embedding for more information]"

Expand All @@ -29,7 +29,9 @@ def topath(raw: str) -> str:
f"invalid model: expected one in the form user/model[:path], but got {model}"
)
user, model = model.rsplit("/", maxsplit=1)
return "/".join(c.strip("/") for c in (user, model, branch))
return MODEL_CACHE_PATH_TEMPLATE.format(
path="/".join(c.strip("/") for c in (user, model, branch))
)


def modelpaths(path: str = "") -> list[str]:
Expand Down

0 comments on commit 789e14a

Please sign in to comment.