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: remove clip_hg #786

Merged
merged 8 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
python -m pip install wheel
pip install --no-cache-dir "client/[test]"
pip install --no-cache-dir "server/[onnx]"
pip install --no-cache-dir "server/[huggingface]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mclip would also need this dep

pip install --no-cache-dir "server/[mclip]"
ZiniuYu marked this conversation as resolved.
Show resolved Hide resolved
- name: Test
id: test
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
python -m pip install wheel pytest pytest-cov
pip install --no-cache-dir "client/[test]"
pip install --no-cache-dir "server/[onnx]"
pip install --no-cache-dir "server/[huggingface]"
pip install --no-cache-dir "server/[mclip]"
ZiniuYu marked this conversation as resolved.
Show resolved Hide resolved
- name: Test
id: test
run: |
Expand Down
241 changes: 0 additions & 241 deletions server/clip_server/executors/clip_hg.py

This file was deleted.

12 changes: 0 additions & 12 deletions server/clip_server/hg-flow.yml

This file was deleted.

2 changes: 1 addition & 1 deletion server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
]
+ (['onnxruntime-gpu>=1.8.0'] if sys.platform != 'darwin' else []),
'tensorrt': ['nvidia-tensorrt'],
'huggingface': ['transformers>=4.16.2'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the dependency key to "mclip"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why put mclip in extra requirements, since it is now part of basic models to support

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed my mind, let's use transformers as the key. mclip actually depends on transformers.

'mclip': ['transformers>=4.16.2'],
ZiniuYu marked this conversation as resolved.
Show resolved Hide resolved
},
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand Down
28 changes: 2 additions & 26 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ def random_port():
return random_port


@pytest.fixture(scope='session', params=['onnx', 'torch', 'hg', 'onnx_custom'])
@pytest.fixture(scope='session', params=['onnx', 'torch', 'onnx_custom'])
def make_flow(port_generator, request):
if request.param != 'onnx_custom':
if request.param == 'onnx':
from clip_server.executors.clip_onnx import CLIPEncoder
elif request.param == 'torch':
from clip_server.executors.clip_torch import CLIPEncoder
else:
from clip_server.executors.clip_hg import CLIPEncoder
from clip_server.executors.clip_torch import CLIPEncoder

f = Flow(port=port_generator()).add(name=request.param, uses=CLIPEncoder)
else:
Expand Down Expand Up @@ -56,25 +54,3 @@ def make_trt_flow(port_generator, request):
f = Flow(port=port_generator()).add(name=request.param, uses=CLIPEncoder)
with f:
yield f


@pytest.fixture(scope='session', params=['hg'])
def make_hg_flow(port_generator, request):
from clip_server.executors.clip_hg import CLIPEncoder

f = Flow(port=port_generator()).add(name=request.param, uses=CLIPEncoder)
with f:
yield f


@pytest.fixture(scope='session', params=['hg'])
def make_hg_flow_no_default(port_generator, request):
from clip_server.executors.clip_hg import CLIPEncoder

f = Flow(port=port_generator()).add(
name=request.param,
uses=CLIPEncoder,
uses_with={'preprocessing': False},
)
with f:
yield f
25 changes: 0 additions & 25 deletions tests/test_hg.py

This file was deleted.