MCPcopy Create free account

hub / github.com/alipay/Ant-Multi-Modal-Framework / functions

Functions4,004 in github.com/alipay/Ant-Multi-Modal-Framework

↓ 307 callersFunctionprint
(*args, **kwargs)
antmmf/utils/distributed.py:251
↓ 301 callersMethodcat
Concatenates a list of Boxes into a single Boxes Args: boxes_list (list[Boxes]) Returns: Boxes: the
antmmf/structures/boxes.py:253
↓ 261 callersMethodto
Send all values to device by calling `v.to(device)` (PyTorch only). Args: device (`str` or `torch.device`): The device t
prj/M2_Encoder/vlmo/tokenizer/tokenization_glm.py:16
↓ 212 callersMethodpop
Remove the node of the key, and return its value, its function is similar to the `get` of dict.
antmmf/common/configuration.py:556
↓ 158 callersMethodget
(cls, module_type: str)
antmmf/modules/module_registry.py:71
↓ 139 callersMethodget
r"""Get an item from registry with key 'name' Args: name (string): Key whose value needs to be retreived. default: If
antmmf/common/registry.py:665
↓ 130 callersMethodload
(self, **opts)
antmmf/tasks/base_task.py:57
↓ 123 callersMethodwrite
(self, x, level="info", donot_print=False, log_all=False)
antmmf/utils/logger.py:93
↓ 118 callersMethodupdate
Insert a value into the history series according to the key of `update_dict`, and we will convert the :external:py:class:`torch.Tenso
antmmf/common/meter.py:106
↓ 108 callersMethodkeys
(self, func_names: Optional[List[str]] = None)
antmmf/utils/inspector.py:113
↓ 106 callersMethoditems
Returns: A list of (key, value) pair, and the function is similar to `dict`
antmmf/common/configuration.py:539
↓ 101 callersMethodclone
Copy tensor and all other fields in the way of deepcopy. Returns: an instance of SizedDataStructure.
antmmf/structures/base.py:38
↓ 95 callersMethodto
Similar to ``.to`` function on a `torch.Tensor`. Moves all of the tensors present inside the ``SampleList`` to a particular device. If an
antmmf/structures/sample.py:303
↓ 86 callersMethodflatten
(self, sample_list, to_be_flattened=None, to_be_flattened_dim=None)
antmmf/models/visual_bert.py:402
↓ 75 callersMethodopen
( path: str, mode: str = "r", buffering: int = -1, encoding: Optional[str] = N
antmmf/utils/file_io.py:27
↓ 68 callersMethodexists
(path: str)
antmmf/utils/file_io.py:68
↓ 64 callersMethodappend_message
(self, role, message)
prj/Pink/pink/conversation.py:91
↓ 63 callersMethoditems
(self)
prj/snps3_vtp/auxiliary_files/generate_ss_word_json/1st_ss_word_mining.py:28
↓ 61 callersMethodget
(self, annotation_item)
prj/dmae_vtp/roi_univl/roi/dataset.py:89
↓ 61 callersMethodregister
r"""Register an item to registry with key 'name' Args: name: Key with which the item will be registered. Usage::
antmmf/common/registry.py:582
↓ 57 callersMethodadd_field
Add an attribute ``field`` with value ``data`` to the SampleList Args: field (str): Key under which the data will be added.
antmmf/structures/sample.py:273
↓ 56 callersMethodget
(self, item)
antmmf/datasets/database/image_database.py:129
↓ 55 callersMethodeval
(self, alpha=1.0)
antmmf/utils/text_utils.py:751
↓ 55 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
prj/M2_omni/models/configuration_llama_3d.py:226
↓ 47 callersFunctioncheck_required_keys
(check_dict: Dict[str, Any], required_keys=[])
antmmf/utils/general.py:546
↓ 43 callersMethodconvert
(self)
antmmf/scripts/hm_convert.py:68
↓ 41 callersMethodisfile
(path: str)
antmmf/utils/file_io.py:79
↓ 39 callersMethod_get_absolute_path
(self, paths)
antmmf/datasets/base_dataset.py:219
↓ 37 callersFunctiongather_tensor
( tensor: torch.Tensor, method: str = "stack", back_gradient: bool = False, pad_tensors: bool
antmmf/utils/distributed_utils.py:117
↓ 35 callersMethodget
(self, item)
prj/cnvid_vtp/roi_univl/univl/pretrain_video_text/dataset.py:197
↓ 34 callersMethodget_prompt
(self)
prj/Pink/pink/conversation.py:29
↓ 33 callersMethodcumsum
(sequence)
prj/Pink/pink/datasets/ProbMergeDataset.py:137
↓ 33 callersMethodget
(self, item)
prj/dmae_vtp/roi_univl/univl/video_text/cls_dataset.py:48
↓ 33 callersMethodstate_dict
r"""Returns the state of the optimizer as a :class:`dict`. It contains two entries: * state - a dict holding current optimization st
antmmf/optimizer/combine_optimizers.py:88
↓ 32 callersMethodindex
(self, item)
antmmf/utils/vocab.py:147
↓ 32 callersMethodread
(self, image_feat_path)
antmmf/datasets/features/feature_readers.py:101
↓ 29 callersMethodbatch_decode
This method forwards all its arguments to LlamaTokenizerFast's [`~PreTrainedTokenizer.batch_decode`]. Please refer to the docstring o
prj/M2_omni/models/processing_m2omni.py:375
↓ 29 callersMethodget
(self, annotation_item)
prj/cnvid_vtp/roi_univl/roi/dataset.py:89
↓ 29 callersMethodregister
Register a module which must be a class. Example1:: @ModuleRegistry.register class MLP(torch.nn.Module):
antmmf/modules/module_registry.py:34
↓ 28 callersFunctionbuild_transformer_head
(config, *args, **kwargs)
antmmf/modules/build.py:19
↓ 27 callersMethod_expand2square_offset
(self, orig_width, orig_height)
prj/Pink/pink/datasets/BaseDataset.py:104
↓ 27 callersMethodfreeze
Freeze the configuration, and all nodes in any depth can not be editable.
antmmf/common/configuration.py:463
↓ 27 callersFunctionget_antmmf_root
()
antmmf/utils/general.py:103
↓ 26 callersMethodget
(self, annotation_item)
prj/snps3_vtp/roi_univl/roi/dataset.py:89
↓ 26 callersMethodget
(self, item)
prj/snps3_vtp/roi_univl/univl/video_text/cls_dataset.py:48
↓ 26 callersMethodget
(self, annotation_item)
prj/base_vtp/roi_univl/roi/dataset.py:89
↓ 25 callersFunctionget_absolute_path
(paths)
antmmf/utils/general.py:266
↓ 25 callersMethodtransform
(self)
antmmf/datasets/database/image_database.py:104
↓ 24 callersMethodclose
(self)
antmmf/utils/logger.py:89
↓ 22 callersMethod__init__
(self, config)
antmmf/models/vilbert.py:1204
↓ 22 callersFunction_get_config_path
(config, sec, index)
antmmf/datasets/base_dataset.py:21
↓ 22 callersMethodget
(self, item)
prj/base_vtp/roi_univl/univl/video_text/cls_dataset.py:48
↓ 22 callersMethodwrite
(self, info)
antmmf/models/spkResNet.py:228
↓ 21 callersMethodclip
Clip (in place) the boxes by limiting x coordinates to the range [0, width] and y coordinates to the range [0, height]. Args
antmmf/structures/boxes.py:180
↓ 21 callersFunctionget_world_size
()
antmmf/utils/distributed_utils.py:51
↓ 20 callersFunctionis_main_process
()
antmmf/utils/distributed_utils.py:47
↓ 20 callersMethodset_system
(self, system)
prj/Pink/pink/conversation.py:88
↓ 20 callersMethodtie_weights
(self)
prj/M2_omni/models/modeling_m2omni.py:298
↓ 19 callersMethodconvert_tokens_to_ids
(self, tokens)
antmmf/modules/vision/backbone/clip/cn_tokenizer.py:198
↓ 19 callersMethodget
(self, item)
prj/snps3_vtp/roi_univl/univl/pretrain_video_text/dataset.py:197
↓ 19 callersMethodget
(self, item)
prj/dmae_vtp/roi_univl/univl/pretrain_video_text/dataset.py:197
↓ 19 callersMethodget
(self, item)
prj/base_vtp/roi_univl/univl/pretrain_video_text/dataset.py:197
↓ 19 callersMethodinfo
Print information about the VQA annotation file. :return:
prj/Pink/pink/eval/vqa_tools/vqa.py:71
↓ 18 callersMethod_read_image
r""" Returns: use_item (bool): whether successfully get image image (Tensor): image tensor ```
prj/Pink/pink/datasets/BaseDataset.py:112
↓ 18 callersMethodconvert_box_mode
Convert mode of the boxes, for example, convert the mode of boxes from xyxy to xywh, vice versa. Args: box_mode (int): o
antmmf/structures/boxes.py:123
↓ 18 callersMethodcopy
(self)
prj/Pink/pink/conversation.py:173
↓ 18 callersMethodcopy
(src_path: str, dst_path: str, overwrite: bool = False)
antmmf/utils/file_io.py:54
↓ 18 callersMethoddecompose
Decompose NestedTensor to a tuple of tensors Returns: tensors, mask (torch.Tensor):
antmmf/structures/nested_tensor.py:42
↓ 18 callersMethodfrom_tensor_list
Create NestedTensor from image tensors. Args: tensor_list (torch.Tensor): a list of images :external:py:class:`Tensor <t
antmmf/structures/nested_tensor.py:52
↓ 18 callersFunctionget_rank
()
antmmf/utils/distributed_utils.py:37
↓ 16 callersMethod__init__
(self, config)
antmmf/modules/vision/backbone/clip/modeling_bert.py:254
↓ 15 callersFunction_recall
(topk)
antmmf/modules/metrics/global_retrieval_recall.py:94
↓ 15 callersMethodfrom_pretrained
(cls, model_name, config, *args, **kwargs)
antmmf/models/base_model.py:263
↓ 15 callersMethodload
Main load function use by antmmf. This will internally call ``_load`` function. Calls ``init_processors`` and ``try_fast_read`` on the
antmmf/datasets/base_dataset_builder.py:55
↓ 15 callersMethodprofile
(self, text)
antmmf/trainers/base_trainer.py:929
↓ 14 callersMethoddevice
return the device of the tensor.
antmmf/structures/base.py:79
↓ 14 callersMethodsave
(self, iteration, update_best=False)
antmmf/common/checkpoint.py:320
↓ 14 callersMethodtokenizer
(self)
antmmf/datasets/processors/text_processors.py:1078
↓ 13 callersMethodfrom_dict
(cls, env)
antmmf/common/configuration.py:209
↓ 13 callersFunctionget_transformer_model_vocab_path
transformer pretrained weights and vocabs dir, weights can be downloaded from https://huggingface.co/models **Note**: for online serving, pr
antmmf/utils/general.py:413
↓ 13 callersMethodkeys
Returns: All keys of this configuration with depth of 1.
antmmf/common/configuration.py:532
↓ 13 callersMethodupdate
(self, predictions)
antmmf/modules/metrics/evaluators/coco_eval.py:41
↓ 13 callersMethodupdate
(self, new_content)
antmmf/datasets/database/video_database.py:54
↓ 12 callersFunctionall_gather
Run all_gather on arbitrary picklable data (not necessarily tensors) Args: data: any picklable object Returns: list[data]
antmmf/utils/distributed_utils.py:226
↓ 12 callersMethodcreate_from
(cls, config: Union[Dict, PretrainedConfig] = None, **kwargs)
antmmf/common/configuration.py:218
↓ 12 callersMethodencode
Encode a list of BlockArgs to a list of strings. Args: blocks_args (list[namedtuples]): A list of BlockArgs namedtuples of block
antmmf/modules/vision/backbone/efficientnet.py:570
↓ 12 callersMethodload_state_dict
(self, state_dict, *args, **kwargs)
antmmf/models/base_model.py:186
↓ 12 callersFunctionnormal_
(data)
prj/M2_Encoder/vlmo/torchscale/architecture/utils.py:11
↓ 12 callersMethodupdate
(self)
antmmf/models/nlp_adversarial.py:142
↓ 11 callersMethodconvert_ids_to_tokens
(self, ids)
antmmf/modules/vision/backbone/clip/cn_tokenizer.py:201
↓ 10 callersFunctionMultiwayWrapper
(args, module, dim=1)
prj/M2_Encoder/vlmo/torchscale/component/multiway_network.py:10
↓ 10 callersMethod__init__
(self, config, *args, **kwargs)
antmmf/datasets/processors/text_processors.py:1107
↓ 10 callersMethodisdir
(path: str)
antmmf/utils/file_io.py:85
↓ 10 callersMethodpropagate
r"""The initial call to start propagating messages. Args: adj (Tensor): A :obj:`torch.LongTensor` that defines the underlying
antmmf/modules/message_passing/message_passing.py:159
↓ 10 callersMethodto_dict
(self)
antmmf/common/configuration.py:214
↓ 9 callersMethod__init__
(self, config)
prj/M2_omni/models/modeling_llama_3d.py:242
↓ 9 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
antmmf/modules/vision/backbone/cctt.py:105
↓ 9 callersMethodcross_entropy
(logits, targets, dim=-1)
antmmf/models/concat_bert.py:202
↓ 9 callersMethoddefrost
Defrost the configuration, make it can be editable.
antmmf/common/configuration.py:478
↓ 9 callersMethodget
(self, record, indices)
antmmf/datasets/database/video_database.py:263
next →1–100 of 4,004, ranked by callers