Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move clip models #945

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions server/clip_server/model/pretrained_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@
response = requests.head(hf_download_url, timeout=10)
if response.status_code in [200, 302]:
return (hf_download_url, model_pretrained[1])
except Exception:
raise ValueError('Invalid model url.')

Check warning on line 158 in server/clip_server/model/pretrained_models.py

View check run for this annotation

Codecov / codecov/patch

server/clip_server/model/pretrained_models.py#L157-L158

Added lines #L157 - L158 were not covered by tests


def download_model(
Expand All @@ -168,6 +168,8 @@
os.makedirs(target_folder, exist_ok=True)
filename = os.path.basename(url)
filename = filename.split('?')[0]
if filename.split('.')[-1] == 'onnx':
filename = filename.split('-')[-1]

download_target = os.path.join(target_folder, filename)

Expand Down
2 changes: 1 addition & 1 deletion server/clip_server/torch-flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ executors:
jtype: CLIPEncoder
metas:
py_modules:
- clip_server.executors.clip_torch
- clip_server.executors.clip_onnx
selmiss marked this conversation as resolved.
Show resolved Hide resolved
timeout_ready: 3000000
replicas: 1
Loading