SYMBOL INDEX (222 symbols across 34 files) FILE: client/clip_client/client.py class Client (line 25) | class Client: method __init__ (line 26) | def __init__(self, server: str, credential: dict = {}, **kwargs): method profile (line 68) | def profile(self, content: Optional[str] = '') -> Dict[str, float]: method _update_pbar (line 122) | def _update_pbar(self, response, func: Optional['CallbackFnType'] = No... method _prepare_streaming (line 138) | def _prepare_streaming(self, disable, total): method _gather_result (line 161) | def _gather_result( method _iter_doc (line 168) | def _iter_doc( method _get_post_payload (line 199) | def _get_post_payload( method _unboxed_result (line 215) | def _unboxed_result(results: Optional['DocumentArray'] = None, unbox: ... method encode (line 226) | def encode( method encode (line 261) | def encode( method encode (line 290) | def encode(self, content, **kwargs): method aencode (line 333) | async def aencode( method aencode (line 348) | async def aencode( method aencode (line 362) | async def aencode(self, content, **kwargs): method _iter_rank_docs (line 405) | def _iter_rank_docs( method _get_rank_payload (line 419) | def _get_rank_payload( method _prepare_single_doc (line 436) | def _prepare_single_doc(d: 'Document'): method _prepare_rank_doc (line 448) | def _prepare_rank_doc(d: 'Document', _source: str = 'matches'): method rank (line 456) | def rank( method arank (line 503) | async def arank( method index (line 542) | def index( method index (line 578) | def index( method index (line 608) | def index(self, content, **kwargs): method aindex (line 647) | async def aindex( method aindex (line 662) | async def aindex( method aindex (line 676) | async def aindex(self, content, **kwargs): method search (line 716) | def search( method search (line 751) | def search( method search (line 785) | def search(self, content, limit: int = 10, **kwargs) -> 'DocumentArray': method asearch (line 823) | async def asearch( method asearch (line 839) | async def asearch( method asearch (line 854) | async def asearch(self, content, limit: int = 10, **kwargs): FILE: client/clip_client/helper.py function _version_check (line 12) | def _version_check(package: str = None, github_repo: str = None): function is_latest_version (line 47) | def is_latest_version(package: str = None, github_repo: str = None) -> N... FILE: docs/conf.py function add_server_address (line 188) | def add_server_address(app): function setup (line 195) | def setup(app): FILE: scripts/benchmark.py function warn (line 10) | def warn(*args, **kwargs): class BenchmarkClient (line 22) | class BenchmarkClient(threading.Thread): method __init__ (line 23) | def __init__( method run (line 47) | def run(self): function main (line 107) | def main(server, batch_sizes, num_iter, concurrent_clients, image_sample): FILE: scripts/onnx_helper.py function convert_float_to_float16 (line 1) | def convert_float_to_float16(model_path: str, output_model_path: str): function quantize (line 29) | def quantize(model_path: str, output_model_path: str): FILE: server/clip_server/executors/clip_onnx.py class CLIPEncoder (line 21) | class CLIPEncoder(Executor): method __init__ (line 22) | def __init__( method _preproc_images (line 113) | def _preproc_images(self, docs: 'DocumentArray', drop_image_content: b... method _preproc_texts (line 127) | def _preproc_texts(self, docs: 'DocumentArray'): method rank (line 136) | async def rank(self, docs: 'DocumentArray', parameters: Dict, **kwargs): method encode (line 143) | async def encode( FILE: server/clip_server/executors/clip_tensorrt.py class CLIPEncoder (line 20) | class CLIPEncoder(Executor): method __init__ (line 21) | def __init__( method _preproc_images (line 76) | def _preproc_images(self, docs: 'DocumentArray', drop_image_content: b... method _preproc_texts (line 90) | def _preproc_texts(self, docs: 'DocumentArray'): method rank (line 104) | async def rank(self, docs: 'DocumentArray', parameters: Dict, **kwargs): method encode (line 111) | async def encode( FILE: server/clip_server/executors/clip_torch.py class CLIPEncoder (line 23) | class CLIPEncoder(Executor): method __init__ (line 24) | def __init__( method _preproc_images (line 100) | def _preproc_images(self, docs: 'DocumentArray', drop_image_content: b... method _preproc_texts (line 115) | def _preproc_texts(self, docs: 'DocumentArray'): method rank (line 129) | async def rank(self, docs: 'DocumentArray', parameters: Dict, **kwargs): method encode (line 136) | async def encode( FILE: server/clip_server/executors/helper.py function numpy_softmax (line 12) | def numpy_softmax(x: 'np.ndarray', axis: int = -1) -> 'np.ndarray': function preproc_image (line 20) | def preproc_image( function preproc_text (line 59) | def preproc_text( function split_img_txt_da (line 82) | def split_img_txt_da(doc: 'Document', img_da: 'DocumentArray', txt_da: '... function set_rank (line 89) | def set_rank(docs, _logit_scale=np.exp(4.60517)): function get_image_size (line 127) | def get_image_size(name: str): FILE: server/clip_server/helper.py function _version_check (line 26) | def _version_check(package: str = None, github_repo: str = None): function is_latest_version (line 61) | def is_latest_version(package: str = None, github_repo: str = None) -> N... FILE: server/clip_server/model/clip.py function _convert_image_to_rgb (line 17) | def _convert_image_to_rgb(image): function _blob2image (line 21) | def _blob2image(blob): function _transform_blob (line 25) | def _transform_blob(n_px): function _transform_ndarray (line 41) | def _transform_ndarray(n_px): FILE: server/clip_server/model/clip_model.py class BaseCLIPModel (line 9) | class BaseCLIPModel: method __init__ (line 10) | def __init__(self, name: str, **kwargs): method get_model_name (line 15) | def get_model_name(name: str): method model_name (line 19) | def model_name(self): method image_size (line 23) | def image_size(self): class CLIPModel (line 27) | class CLIPModel(BaseCLIPModel): method __new__ (line 28) | def __new__(cls, name: str, **kwargs): FILE: server/clip_server/model/clip_onnx.py class CLIPOnnxModel (line 203) | class CLIPOnnxModel(BaseCLIPModel): method __init__ (line 204) | def __init__( method get_model_name (line 252) | def get_model_name(name: str): method start_sessions (line 264) | def start_sessions( method encode_image (line 301) | def encode_image(self, image_input: Dict): method encode_text (line 305) | def encode_text(self, text_input: Dict): FILE: server/clip_server/model/clip_trt.py class CLIPTensorRTModel (line 50) | class CLIPTensorRTModel(BaseCLIPModel): method __init__ (line 51) | def __init__( method get_model_name (line 124) | def get_model_name(name: str): method start_engines (line 136) | def start_engines(self): method encode_image (line 142) | def encode_image(self, image_input: Dict): method encode_text (line 146) | def encode_text(self, text_input: Dict): FILE: server/clip_server/model/cnclip_model.py class CNClipModel (line 18) | class CNClipModel(CLIPModel): method __init__ (line 19) | def __init__( method get_model_name (line 36) | def get_model_name(name: str): method encode_text (line 39) | def encode_text(self, input_ids: 'torch.Tensor', **kwargs): method encode_image (line 42) | def encode_image(self, pixel_values: 'torch.Tensor', **kwargs): method model_name (line 46) | def model_name(self): method image_size (line 50) | def image_size(self): FILE: server/clip_server/model/flash_attention.py class MultiheadAttention (line 10) | class MultiheadAttention(nn.MultiheadAttention): method __init__ (line 11) | def __init__( method attention (line 39) | def attention( method forward (line 85) | def forward( FILE: server/clip_server/model/mclip_model.py class MCLIPConfig (line 17) | class MCLIPConfig(transformers.PretrainedConfig): method __init__ (line 20) | def __init__( class MultilingualCLIP (line 33) | class MultilingualCLIP(transformers.PreTrainedModel): method __init__ (line 36) | def __init__(self, config, *args, **kwargs): method forward (line 43) | def forward(self, input_ids: torch.Tensor, attention_mask: torch.Tenso... class MultilingualCLIPModel (line 53) | class MultilingualCLIPModel(CLIPModel): method __init__ (line 54) | def __init__(self, name: str, device: str = 'cpu', jit: bool = False, ... method get_model_name (line 62) | def get_model_name(name: str): method encode_text (line 65) | def encode_text( method encode_image (line 72) | def encode_image(self, pixel_values: torch.Tensor): FILE: server/clip_server/model/model.py class ModifiedResNet (line 40) | class ModifiedResNet(_ModifiedResNet): method forward (line 41) | def forward(self, x): class ResidualAttentionBlock (line 47) | class ResidualAttentionBlock(_ResidualAttentionBlock): method __init__ (line 48) | def __init__( class Transformer (line 65) | class Transformer(_Transformer): method __init__ (line 66) | def __init__(self, layers: int, dtype: torch.dtype = torch.float32, **... class VisionTransformer (line 73) | class VisionTransformer(_VisionTransformer): method __init__ (line 74) | def __init__( method forward (line 92) | def forward(self, x: torch.Tensor): class TextTransformer (line 98) | class TextTransformer(_TextTransformer): method __init__ (line 99) | def __init__( class CLIPVisionCfg (line 113) | class CLIPVisionCfg: class CLIPTextCfg (line 138) | class CLIPTextCfg: function _build_vision_tower (line 152) | def _build_vision_tower( function _build_text_tower (line 211) | def _build_text_tower( class CustomTextCLIP (line 249) | class CustomTextCLIP(_CustomTextCLIP): method __init__ (line 250) | def __init__( class CLIP (line 270) | class CLIP(_CLIP): method __init__ (line 271) | def __init__( function convert_weights_to_lp (line 300) | def convert_weights_to_lp(model: nn.Module, dtype=torch.float16): function load_state_dict (line 332) | def load_state_dict(checkpoint_path: str, map_location='cpu'): function build_model_from_openai_state_dict (line 343) | def build_model_from_openai_state_dict( function load_openai_model (line 430) | def load_openai_model( function load_openclip_model (line 562) | def load_openclip_model( FILE: server/clip_server/model/openclip_model.py class OpenCLIPModel (line 15) | class OpenCLIPModel(CLIPModel): method __init__ (line 16) | def __init__( method get_model_name (line 51) | def get_model_name(name: str): method encode_text (line 60) | def encode_text(self, input_ids: 'torch.Tensor', **kwargs): method encode_image (line 63) | def encode_image(self, pixel_values: 'torch.Tensor', **kwargs): FILE: server/clip_server/model/pretrained_models.py function md5file (line 132) | def md5file(filename: str): function get_model_url_md5 (line 141) | def get_model_url_md5(name: str): function download_model (line 149) | def download_model( FILE: server/clip_server/model/simple_tokenizer.py function default_bpe (line 15) | def default_bpe(): function bytes_to_unicode (line 20) | def bytes_to_unicode(): function get_pairs (line 46) | def get_pairs(word): function basic_clean (line 58) | def basic_clean(text): function whitespace_clean (line 64) | def whitespace_clean(text): class SimpleTokenizer (line 70) | class SimpleTokenizer(object): method __init__ (line 71) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 94) | def bpe(self, token): method encode (line 135) | def encode(self, text): method decode (line 145) | def decode(self, tokens): FILE: server/clip_server/model/tokenization.py class Tokenizer (line 9) | class Tokenizer: method __init__ (line 10) | def __init__(self, name: str, **kwargs): method __call__ (line 25) | def __call__( method _tokenize (line 47) | def _tokenize( FILE: server/clip_server/model/trt_utils.py function fix_fp16_network (line 28) | def fix_fp16_network(network_definition: INetworkDefinition) -> INetwork... function build_engine (line 57) | def build_engine( function get_output_tensors (line 131) | def get_output_tensors( function infer_tensorrt (line 159) | def infer_tensorrt( function load_engine (line 196) | def load_engine( function save_engine (line 229) | def save_engine(engine: ICudaEngine, engine_file_path: str) -> None: function get_binding_idxs (line 239) | def get_binding_idxs(engine: trt.ICudaEngine, profile_index: int): FILE: tests/conftest.py function port_generator (line 6) | def port_generator(): function make_flow (line 20) | def make_flow(port_generator, request): function make_torch_flow (line 44) | def make_torch_flow(port_generator, request): function make_trt_flow (line 53) | def make_trt_flow(port_generator, request): function make_search_flow (line 62) | def make_search_flow(tmpdir, port_generator, request): FILE: tests/test_asyncio.py function another_heavylifting_job (line 9) | async def another_heavylifting_job(): function test_async_encode (line 14) | async def test_async_encode(make_flow): function test_async_docarray_preserve_original_inputs (line 40) | async def test_async_docarray_preserve_original_inputs(make_flow, inputs): function test_async_docarray_preserve_original_order (line 61) | async def test_async_docarray_preserve_original_order(make_flow, inputs): FILE: tests/test_client.py class Exec1 (line 10) | class Exec1(Executor): method aencode (line 12) | async def aencode(self, docs, **kwargs): class Exec2 (line 17) | class Exec2(Executor): method __init__ (line 18) | def __init__(self, server_host: str = '', **kwargs): method process (line 25) | async def process(self, docs, **kwargs): class ErrorExec (line 30) | class ErrorExec(Executor): method foo (line 32) | def foo(self, docs, **kwargs): function test_client_concurrent_requests (line 36) | def test_client_concurrent_requests(port_generator): function test_client_large_input (line 66) | def test_client_large_input(make_torch_flow): function test_empty_input (line 85) | def test_empty_input(make_torch_flow, inputs, endpoint): function test_async_empty_input (line 110) | async def test_async_empty_input(make_torch_flow, inputs, endpoint): function test_wrong_input_type (line 127) | def test_wrong_input_type(make_torch_flow, endpoint): function test_wrong_input_type (line 138) | async def test_wrong_input_type(make_torch_flow, endpoint): function test_custom_on_done (line 149) | def test_custom_on_done(make_torch_flow, mocker, endpoint): function test_async_custom_on_done (line 175) | async def test_async_custom_on_done(make_torch_flow, mocker, endpoint): function test_custom_on_error (line 200) | def test_custom_on_error(port_generator, mocker, endpoint): function test_async_custom_on_error (line 229) | async def test_async_custom_on_error(port_generator, mocker, endpoint): FILE: tests/test_helper.py function test_numpy_softmax (line 11) | def test_numpy_softmax(shape, axis): function test_split_img_txt_da (line 74) | def test_split_img_txt_da(inputs): function test_preproc_image (line 95) | def test_preproc_image(inputs): FILE: tests/test_model.py function test_torch_model (line 19) | def test_torch_model(name, model_cls): function test_onnx_model (line 32) | def test_onnx_model(name): function test_large_onnx_model_fp16 (line 41) | def test_large_onnx_model_fp16(name): FILE: tests/test_ranker.py function test_torch_executor_rank_img2texts (line 14) | async def test_torch_executor_rank_img2texts(encoder_class): function test_torch_executor_rank_text2imgs (line 41) | async def test_torch_executor_rank_text2imgs(encoder_class): function test_docarray_inputs (line 130) | def test_docarray_inputs(make_flow, inputs): function test_async_arank (line 195) | async def test_async_arank(make_flow, inputs): function test_docarray_preserve_original_order (line 233) | def test_docarray_preserve_original_order(make_flow, inputs): function test_async_docarray_preserve_original_order (line 264) | async def test_async_docarray_preserve_original_order(make_flow, inputs): FILE: tests/test_search.py function test_index_search (line 34) | def test_index_search(make_search_flow, inputs, limit): function test_async_index_search (line 72) | async def test_async_index_search(make_search_flow, inputs, limit): FILE: tests/test_server.py function test_server_download (line 11) | def test_server_download(tmpdir): function test_server_download_md5 (line 40) | def test_server_download_md5(tmpdir, md5): function test_server_download_not_regular_file (line 58) | def test_server_download_not_regular_file(tmpdir): function test_make_onnx_flow_wrong_name_path (line 74) | def test_make_onnx_flow_wrong_name_path(): function test_server_preprocess_ndarray_image (line 94) | def test_server_preprocess_ndarray_image(image_uri, size): function test_transform_arbitrary_tensor (line 113) | def test_transform_arbitrary_tensor(tensor): FILE: tests/test_simple.py function test_protocols (line 12) | def test_protocols(port_generator, protocol, jit, pytestconfig): function test_plain_inputs (line 44) | def test_plain_inputs(make_flow, inputs): function test_docarray_inputs (line 76) | def test_docarray_inputs(make_flow, inputs): function test_docarray_preserve_original_inputs (line 103) | def test_docarray_preserve_original_inputs(make_flow, inputs): function test_docarray_traversal (line 130) | def test_docarray_traversal(make_flow, inputs): function test_docarray_preserve_original_order (line 161) | def test_docarray_preserve_original_order(make_flow, inputs): FILE: tests/test_tensorrt.py function test_docarray_inputs (line 35) | def test_docarray_inputs(make_trt_flow, inputs): function test_async_arank (line 64) | async def test_async_arank(make_trt_flow, d): FILE: tests/test_tokenization.py function test_tokenizer_name (line 8) | def test_tokenizer_name(name):