Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alipay/Ant-Multi-Modal-Framework
/ functions
Functions
4,004 in github.com/alipay/Ant-Multi-Modal-Framework
⨍
Functions
4,004
◇
Types & classes
941
↳
Endpoints
1
↓ 307 callers
Function
print
(*args, **kwargs)
antmmf/utils/distributed.py:251
↓ 301 callers
Method
cat
Concatenates a list of Boxes into a single Boxes Args: boxes_list (list[Boxes]) Returns: Boxes: the
antmmf/structures/boxes.py:253
↓ 261 callers
Method
to
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 callers
Method
pop
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 callers
Method
get
(cls, module_type: str)
antmmf/modules/module_registry.py:71
↓ 139 callers
Method
get
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 callers
Method
load
(self, **opts)
antmmf/tasks/base_task.py:57
↓ 123 callers
Method
write
(self, x, level="info", donot_print=False, log_all=False)
antmmf/utils/logger.py:93
↓ 118 callers
Method
update
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 callers
Method
keys
(self, func_names: Optional[List[str]] = None)
antmmf/utils/inspector.py:113
↓ 106 callers
Method
items
Returns: A list of (key, value) pair, and the function is similar to `dict`
antmmf/common/configuration.py:539
↓ 101 callers
Method
clone
Copy tensor and all other fields in the way of deepcopy. Returns: an instance of SizedDataStructure.
antmmf/structures/base.py:38
↓ 95 callers
Method
to
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 callers
Method
flatten
(self, sample_list, to_be_flattened=None, to_be_flattened_dim=None)
antmmf/models/visual_bert.py:402
↓ 75 callers
Method
open
( path: str, mode: str = "r", buffering: int = -1, encoding: Optional[str] = N
antmmf/utils/file_io.py:27
↓ 68 callers
Method
exists
(path: str)
antmmf/utils/file_io.py:68
↓ 64 callers
Method
append_message
(self, role, message)
prj/Pink/pink/conversation.py:91
↓ 63 callers
Method
items
(self)
prj/snps3_vtp/auxiliary_files/generate_ss_word_json/1st_ss_word_mining.py:28
↓ 61 callers
Method
get
(self, annotation_item)
prj/dmae_vtp/roi_univl/roi/dataset.py:89
↓ 61 callers
Method
register
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 callers
Method
add_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 callers
Method
get
(self, item)
antmmf/datasets/database/image_database.py:129
↓ 55 callers
Method
eval
(self, alpha=1.0)
antmmf/utils/text_utils.py:751
↓ 55 callers
Method
from_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
prj/M2_omni/models/configuration_llama_3d.py:226
↓ 47 callers
Function
check_required_keys
(check_dict: Dict[str, Any], required_keys=[])
antmmf/utils/general.py:546
↓ 43 callers
Method
convert
(self)
antmmf/scripts/hm_convert.py:68
↓ 41 callers
Method
isfile
(path: str)
antmmf/utils/file_io.py:79
↓ 39 callers
Method
_get_absolute_path
(self, paths)
antmmf/datasets/base_dataset.py:219
↓ 37 callers
Function
gather_tensor
( tensor: torch.Tensor, method: str = "stack", back_gradient: bool = False, pad_tensors: bool
antmmf/utils/distributed_utils.py:117
↓ 35 callers
Method
get
(self, item)
prj/cnvid_vtp/roi_univl/univl/pretrain_video_text/dataset.py:197
↓ 34 callers
Method
get_prompt
(self)
prj/Pink/pink/conversation.py:29
↓ 33 callers
Method
cumsum
(sequence)
prj/Pink/pink/datasets/ProbMergeDataset.py:137
↓ 33 callers
Method
get
(self, item)
prj/dmae_vtp/roi_univl/univl/video_text/cls_dataset.py:48
↓ 33 callers
Method
state_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 callers
Method
index
(self, item)
antmmf/utils/vocab.py:147
↓ 32 callers
Method
read
(self, image_feat_path)
antmmf/datasets/features/feature_readers.py:101
↓ 29 callers
Method
batch_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 callers
Method
get
(self, annotation_item)
prj/cnvid_vtp/roi_univl/roi/dataset.py:89
↓ 29 callers
Method
register
Register a module which must be a class. Example1:: @ModuleRegistry.register class MLP(torch.nn.Module):
antmmf/modules/module_registry.py:34
↓ 28 callers
Function
build_transformer_head
(config, *args, **kwargs)
antmmf/modules/build.py:19
↓ 27 callers
Method
_expand2square_offset
(self, orig_width, orig_height)
prj/Pink/pink/datasets/BaseDataset.py:104
↓ 27 callers
Method
freeze
Freeze the configuration, and all nodes in any depth can not be editable.
antmmf/common/configuration.py:463
↓ 27 callers
Function
get_antmmf_root
()
antmmf/utils/general.py:103
↓ 26 callers
Method
get
(self, annotation_item)
prj/snps3_vtp/roi_univl/roi/dataset.py:89
↓ 26 callers
Method
get
(self, item)
prj/snps3_vtp/roi_univl/univl/video_text/cls_dataset.py:48
↓ 26 callers
Method
get
(self, annotation_item)
prj/base_vtp/roi_univl/roi/dataset.py:89
↓ 25 callers
Function
get_absolute_path
(paths)
antmmf/utils/general.py:266
↓ 25 callers
Method
transform
(self)
antmmf/datasets/database/image_database.py:104
↓ 24 callers
Method
close
(self)
antmmf/utils/logger.py:89
↓ 22 callers
Method
__init__
(self, config)
antmmf/models/vilbert.py:1204
↓ 22 callers
Function
_get_config_path
(config, sec, index)
antmmf/datasets/base_dataset.py:21
↓ 22 callers
Method
get
(self, item)
prj/base_vtp/roi_univl/univl/video_text/cls_dataset.py:48
↓ 22 callers
Method
write
(self, info)
antmmf/models/spkResNet.py:228
↓ 21 callers
Method
clip
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 callers
Function
get_world_size
()
antmmf/utils/distributed_utils.py:51
↓ 20 callers
Function
is_main_process
()
antmmf/utils/distributed_utils.py:47
↓ 20 callers
Method
set_system
(self, system)
prj/Pink/pink/conversation.py:88
↓ 20 callers
Method
tie_weights
(self)
prj/M2_omni/models/modeling_m2omni.py:298
↓ 19 callers
Method
convert_tokens_to_ids
(self, tokens)
antmmf/modules/vision/backbone/clip/cn_tokenizer.py:198
↓ 19 callers
Method
get
(self, item)
prj/snps3_vtp/roi_univl/univl/pretrain_video_text/dataset.py:197
↓ 19 callers
Method
get
(self, item)
prj/dmae_vtp/roi_univl/univl/pretrain_video_text/dataset.py:197
↓ 19 callers
Method
get
(self, item)
prj/base_vtp/roi_univl/univl/pretrain_video_text/dataset.py:197
↓ 19 callers
Method
info
Print information about the VQA annotation file. :return:
prj/Pink/pink/eval/vqa_tools/vqa.py:71
↓ 18 callers
Method
_read_image
r""" Returns: use_item (bool): whether successfully get image image (Tensor): image tensor ```
prj/Pink/pink/datasets/BaseDataset.py:112
↓ 18 callers
Method
convert_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 callers
Method
copy
(self)
prj/Pink/pink/conversation.py:173
↓ 18 callers
Method
copy
(src_path: str, dst_path: str, overwrite: bool = False)
antmmf/utils/file_io.py:54
↓ 18 callers
Method
decompose
Decompose NestedTensor to a tuple of tensors Returns: tensors, mask (torch.Tensor):
antmmf/structures/nested_tensor.py:42
↓ 18 callers
Method
from_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 callers
Function
get_rank
()
antmmf/utils/distributed_utils.py:37
↓ 16 callers
Method
__init__
(self, config)
antmmf/modules/vision/backbone/clip/modeling_bert.py:254
↓ 15 callers
Function
_recall
(topk)
antmmf/modules/metrics/global_retrieval_recall.py:94
↓ 15 callers
Method
from_pretrained
(cls, model_name, config, *args, **kwargs)
antmmf/models/base_model.py:263
↓ 15 callers
Method
load
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 callers
Method
profile
(self, text)
antmmf/trainers/base_trainer.py:929
↓ 14 callers
Method
device
return the device of the tensor.
antmmf/structures/base.py:79
↓ 14 callers
Method
save
(self, iteration, update_best=False)
antmmf/common/checkpoint.py:320
↓ 14 callers
Method
tokenizer
(self)
antmmf/datasets/processors/text_processors.py:1078
↓ 13 callers
Method
from_dict
(cls, env)
antmmf/common/configuration.py:209
↓ 13 callers
Function
get_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 callers
Method
keys
Returns: All keys of this configuration with depth of 1.
antmmf/common/configuration.py:532
↓ 13 callers
Method
update
(self, predictions)
antmmf/modules/metrics/evaluators/coco_eval.py:41
↓ 13 callers
Method
update
(self, new_content)
antmmf/datasets/database/video_database.py:54
↓ 12 callers
Function
all_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 callers
Method
create_from
(cls, config: Union[Dict, PretrainedConfig] = None, **kwargs)
antmmf/common/configuration.py:218
↓ 12 callers
Method
encode
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 callers
Method
load_state_dict
(self, state_dict, *args, **kwargs)
antmmf/models/base_model.py:186
↓ 12 callers
Function
normal_
(data)
prj/M2_Encoder/vlmo/torchscale/architecture/utils.py:11
↓ 12 callers
Method
update
(self)
antmmf/models/nlp_adversarial.py:142
↓ 11 callers
Method
convert_ids_to_tokens
(self, ids)
antmmf/modules/vision/backbone/clip/cn_tokenizer.py:201
↓ 10 callers
Function
MultiwayWrapper
(args, module, dim=1)
prj/M2_Encoder/vlmo/torchscale/component/multiway_network.py:10
↓ 10 callers
Method
__init__
(self, config, *args, **kwargs)
antmmf/datasets/processors/text_processors.py:1107
↓ 10 callers
Method
isdir
(path: str)
antmmf/utils/file_io.py:85
↓ 10 callers
Method
propagate
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 callers
Method
to_dict
(self)
antmmf/common/configuration.py:214
↓ 9 callers
Method
__init__
(self, config)
prj/M2_omni/models/modeling_llama_3d.py:242
↓ 9 callers
Method
__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
antmmf/modules/vision/backbone/cctt.py:105
↓ 9 callers
Method
cross_entropy
(logits, targets, dim=-1)
antmmf/models/concat_bert.py:202
↓ 9 callers
Method
defrost
Defrost the configuration, make it can be editable.
antmmf/common/configuration.py:478
↓ 9 callers
Method
get
(self, record, indices)
antmmf/datasets/database/video_database.py:263
next →
1–100 of 4,004, ranked by callers