MCPcopy Create free account

hub / github.com/PKU-Alignment/align-anything / functions

Functions3,036 in github.com/PKU-Alignment/align-anything

↓ 6 callersMethodget_object_position
(self, object_id)
projects/eval-anything/eval_anything/third_party/SPOC/environment/stretch_controller.py:792
↓ 6 callersMethodinit_accelerate_engines
Initialize Accelerate engines.
align_anything/trainers/base/supervised_trainer.py:273
↓ 6 callersFunctionmap_task_spec
(task_spec: 'TaskSpec')
projects/eval-anything/eval_anything/third_party/SPOC/utils/task_type_mapping_utils.py:22
↓ 6 callersFunctionparse_unknown_args
()
align_anything/utils/tools.py:479
↓ 6 callersFunctionposition_dist
Distance between two points of the form {"x": x, "y": y, "z": z}.
projects/eval-anything/eval_anything/third_party/SPOC/utils/distance_calculation_utils.py:10
↓ 6 callersFunctionprepare_accelerate_train_cfgs
Prepare the DeepSpeed config for training.
align_anything/utils/tools.py:291
↓ 6 callersFunctionprepare_ds_eval_cfgs
Prepare the DeepSpeed config for training.
align_anything/utils/tools.py:315
↓ 6 callersFunctionremove_pad_tokens
(response: list[int], pad_token_id: int)
align_anything/utils/tools.py:501
↓ 6 callersFunctionsample_value_in_range
(list_of_range)
projects/eval-anything/eval_anything/third_party/SPOC/utils/transformation_util.py:63
↓ 6 callersFunctionsample_value_in_range
(list_of_range)
align_anything/utils/spoc_utils/transformation_util.py:76
↓ 6 callersMethodsave
Save model and tokenizer in Hugging Face format.
align_anything/trainers/text_to_text/ppo.py:549
↓ 6 callersMethodto_dict
(self)
projects/eval-anything/eval_anything/utils/data_type.py:136
↓ 5 callersMethod__init__
(self, pattern: str, match_index: int = None)
projects/eval-anything/eval_anything/evaluate_tools/t2t_tools.py:35
↓ 5 callersMethod__init__
( self, vision_config=None, audio_config=None, text_config=None, ignor
align_anything/models/llama_vision_audio_model.py:58
↓ 5 callersMethodbuild_prompt
(self, **kwargs)
projects/eval-anything/eval_anything/evaluate_tools/base_tools.py:62
↓ 5 callersFunctionconvert_string_to_byte
(str_to_encode, max_len)
projects/eval-anything/eval_anything/third_party/SPOC/utils/string_utils.py:16
↓ 5 callersMethodcritic_loss_fn
Compute critic loss.
align_anything/trainers/text_to_text/ppo.py:510
↓ 5 callersFunctiondict_to_namedtuple
(dic)
projects/eval-anything/eval_anything/utils/utils.py:94
↓ 5 callersMethodend
(self)
projects/eval-anything/eval_anything/benchmarks/text_to_text/Flames/modeling_internlm.py:1275
↓ 5 callersMethodget_mm_data_manager
(cls, name: str)
projects/eval-anything/eval_anything/utils/register.py:110
↓ 5 callersMethodget_observations
(self, **kwargs)
projects/eval-anything/eval_anything/third_party/SPOC/tasks/abstract_task.py:361
↓ 5 callersMethodget_reachable_positions
(self, grid_size: Optional[float] = None)
projects/eval-anything/eval_anything/third_party/SPOC/environment/stretch_controller.py:818
↓ 5 callersMethodload_dataset
(self, task_list: list[str])
projects/eval-anything/eval_anything/dataloader/mm_dataloader.py:47
↓ 5 callersFunctionmap_task_type
(task_type: str)
projects/eval-anything/eval_anything/third_party/SPOC/utils/task_type_mapping_utils.py:12
↓ 5 callersFunctionmap_task_type
(task_type: str)
align_anything/utils/spoc_utils/task_type_mapping_utils.py:9
↓ 5 callersMethodread
(self, *args, **kwargs)
projects/eval-anything/eval_anything/utils/utils.py:301
↓ 5 callersMethodreward_model_step
(self, actor_batch: PromptOnlyBatch)
align_anything/trainers/text_to_text/ppo.py:224
↓ 5 callersMethodto
(self, device: torch.device)
align_anything/models/spoc_models/allenact_preprocessors/siglip_preprocessors.py:111
↓ 5 callersMethodtrain
Train the model.
align_anything/trainers/text_to_text/ppo.py:410
↓ 5 callersMethodtrain
Train the model.
align_anything/trainers/text_image_to_text/saferlhf.py:699
↓ 4 callersMethod__init__
(self, uuid: str, height: int, width: int)
projects/eval-anything/eval_anything/third_party/SPOC/environment/vision_sensors.py:19
↓ 4 callersMethod__init__
Initialize the RMSNorm normalization layer. Args: dim (int): The dimension of the input tensor. eps (float,
align_anything/models/spoc_models/models/llama/model.py:44
↓ 4 callersMethod__init__
Initialize the RMSNorm normalization layer. Args: dim (int): The dimension of the input tensor. eps (float,
align_anything/models/spoc_models/models/transformer_models/llama_model.py:45
↓ 4 callersMethodapply
(self, **kwargs)
projects/eval-anything/eval_anything/evaluate_tools/base_tools.py:34
↓ 4 callersMethodbatch_inference
Model inference. Support multi-round inference. Args: input_data (list[InferenceInput]): input data Returns:
projects/eval-anything/eval_anything/pipeline/base_benchmark.py:182
↓ 4 callersFunctionbatch_retokenize
Re-tokenize a batch of input ids from one tokenizer to another.
align_anything/utils/tools.py:416
↓ 4 callersMethodbuild_prompt
(self, question: str, candidate_answers: list[str])
projects/eval-anything/eval_anything/benchmarks/text_to_text/TruthfulQA/dataloader.py:165
↓ 4 callersMethodcalculate_metrics
Calculate metrics Args: benchmark_name (str): benchmark name inference_outputs (list[InferenceOutput]): inference outp
projects/eval-anything/eval_anything/pipeline/base_benchmark.py:246
↓ 4 callersMethodcalculate_overall_metrics
Calculate overall metrics Args: metric_list (list[namedtuple]): metric list result (dict[str, dict[str, dict[str, floa
projects/eval-anything/eval_anything/pipeline/base_benchmark.py:232
↓ 4 callersFunctionceil_by_factor
Returns the smallest integer greater than or equal to 'number' that is divisible by 'factor'.
align_anything/utils/process_qwen2vl.py:61
↓ 4 callersFunctionclean_answer
清理回答文本,移除特殊标记 Args: o (str): 原始回答文本 Returns: str: 清理后的回答文本
projects/eval-anything/eval_anything/benchmarks/text_to_text/MaliciousInstruct/utils.py:62
↓ 4 callersMethodclose
(self)
projects/eval-anything/eval_anything/third_party/SPOC/tasks/abstract_task.py:171
↓ 4 callersFunctionconvert_to_rgb
Converts an image to RGB format. Only converts if the image is of type PIL.Image.Image, otherwise returns the image as is. Args:
align_anything/utils/tools.py:46
↓ 4 callersMethodencode_audio_to_base64
Encode NumPy audio data to base64 format. Args: audio_array: NumPy audio data array sample_rate: Audio sampl
projects/eval-anything/eval_anything/utils/mm_data_manager.py:244
↓ 4 callersMethodencode_json
(json_serializable: Any)
projects/eval-anything/eval_anything/third_party/SPOC/environment/navigation_sensors.py:336
↓ 4 callersMethodeval
Evaluate the model on the evaluation dataset.
align_anything/trainers/base/supervised_trainer.py:400
↓ 4 callersMethodeval
Evaluate the model on the evaluation dataset.
align_anything/trainers/base/rl_trainer.py:289
↓ 4 callersFunctionextract_content
(tag, text)
projects/eval-anything/eval_anything/benchmarks/text_to_text/air_bench_2024/utils.py:27
↓ 4 callersMethodforward
( self, input_ids: torch.LongTensor | None = None, attention_mask: torch.Tensor | None
align_anything/models/minicpmo.py:90
↓ 4 callersFunctionget_current_device
r""" Gets the current available device.
align_anything/utils/device_utils.py:30
↓ 4 callersMethodget_input_embeddings
(self)
align_anything/models/minicpmv.py:58
↓ 4 callersFunctionget_objaverse_annotations
()
projects/eval-anything/eval_anything/third_party/SPOC/utils/objaverse_annotation.py:17
↓ 4 callersFunctionget_project_root
()
projects/eval-anything/eval_anything/utils/utils.py:177
↓ 4 callersFunctionget_room_id_from_location
(room_polymap, position, verbose=True)
projects/eval-anything/eval_anything/third_party/SPOC/utils/data_generation_utils/navigation_utils.py:70
↓ 4 callersMethodinit_dataloader
(self, eval_cfgs: namedtuple, benchmark_cfgs: namedtuple)
projects/eval-anything/eval_anything/pipeline/t2t_benchmark.py:44
↓ 4 callersFunctionis_a_visual_sensor
(sensor)
projects/eval-anything/eval_anything/third_party/SPOC/utils/sensor_constant_utils.py:29
↓ 4 callersFunctionis_helpful_response
Check if the response provides helpful technical information
projects/eval-anything/eval_anything/benchmarks/text_to_text/MIC/utils.py:60
↓ 4 callersFunctionleft_padding
(sequences: list[torch.Tensor], padding_value: Number)
align_anything/utils/tools.py:71
↓ 4 callersFunctionload_image
(image_path: str)
projects/text_image_to_text_image/pre_tokenize_parallel_example.py:40
↓ 4 callersFunctionload_image
(image_path: str)
projects/text_image_to_text_image/pre_tokenize_example.py:37
↓ 4 callersMethodload_model
(self, model_cfgs: namedtuple, infer_cfgs: namedtuple)
projects/eval-anything/eval_anything/pipeline/base_task.py:94
↓ 4 callersFunctionload_pretrained_model_with_value_head
( model_name_or_path: str | os.PathLike, model_max_length: int = 512, padding_side: Literal['left'
align_anything/models/pretrained_model_with_value.py:27
↓ 4 callersMethodmarge_QA
(self, question: str, candidate_answers: list[str], ground_truth: str = '')
projects/eval-anything/eval_anything/utils/prompt_builders.py:172
↓ 4 callersMethodobject_is_visible_in_camera
(self, object_id, which_camera='nav', maximum_distance=2)
projects/eval-anything/eval_anything/third_party/SPOC/environment/stretch_controller.py:594
↓ 4 callersFunctionparse_alignment_response
Parse alignment evaluation response and extract Yes/No judgment. Args: response: GPT evaluation response Returns:
projects/eval-anything/eval_anything/benchmarks/text_to_text/DeceptionBench/utils.py:423
↓ 4 callersMethodprompt_to_conversation
Convert input prompt string to the specified conversation format Args: user_prompt (str): Input user_prompt with image p
projects/eval-anything/eval_anything/utils/mm_data_manager.py:128
↓ 4 callersFunctionread_prompt
(file_path)
projects/eval-anything/eval_anything/benchmarks/text_to_text/MoralBench/main.py:29
↓ 4 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
align_anything/models/modeling_emu3/mllm/modeling_emu3.py:285
↓ 4 callersFunctionrotate_half
Rotates half the hidden dims of the input.
projects/eval-anything/eval_anything/benchmarks/text_to_text/Flames/modeling_internlm.py:263
↓ 4 callersFunctionround_by_factor
Returns the closest integer to 'number' that is divisible by 'factor'.
align_anything/utils/process_qwen2vl.py:56
↓ 4 callersFunctionsample_a_specific_transform
(transformation_list, size=(224, 384))
align_anything/utils/spoc_utils/transformation_util.py:72
↓ 4 callersMethodsave
Save model and tokenizer in Hugging Face format.
align_anything/trainers/text_image_to_text/saferlhf.py:795
↓ 4 callersMethodsave_benchmark_details
Save evaluation result and config file of single benchmark. Args: save_path (str): save path inputs (dict[str, List[In
projects/eval-anything/eval_anything/pipeline/t2t_benchmark.py:52
↓ 4 callersFunctionsave_frames_to_mp4
( frames: Sequence[np.ndarray], file_path: str, fps: float, extra_kwargs: Optional[Dict[str, A
align_anything/utils/spoc_utils/data_generation_utils/mp4_utils.py:26
↓ 4 callersFunctionset_device
r""" Sets the device.
align_anything/utils/device_utils.py:48
↓ 4 callersFunctionsmart_resize
Rescales the image so that the following conditions are met: 1. Both dimensions (height and width) are divisible by 'factor'. 2. The to
align_anything/utils/process_qwen2vl.py:71
↓ 4 callersMethodsuccessful_if_done
(self, strict_success=False)
projects/eval-anything/eval_anything/third_party/SPOC/tasks/fetch_task.py:91
↓ 4 callersFunctionsum_dist_path
(path)
projects/eval-anything/eval_anything/third_party/SPOC/utils/distance_calculation_utils.py:33
↓ 4 callersFunctiontensor_image_preprocessor
( size=(224, 384), data_augmentation=False, specific=False, augmentation_version='v2', mea
align_anything/models/spoc_models/models/transformer_models/preprocessors.py:40
↓ 4 callersFunctiontext_conversation
(text: str, role: str = 'user')
align_anything/serve/text_modal_cli.py:31
↓ 4 callersFunctiontext_conversation
(text: str, role: str = 'user')
align_anything/serve/omni_modal_cli.py:82
↓ 4 callersFunctiontext_conversation
(text: str, role: str = 'user')
align_anything/serve/multi_modal_cli.py:99
↓ 4 callersMethodtokenize
Tokenize a text string into a tensor representation.
align_anything/datasets/text_to_text/supervised.py:106
↓ 3 callersFunctionLLM_over_refusal_checker
Check if the response shows signs of over-refusal to legitimate technical questions
projects/eval-anything/eval_anything/benchmarks/text_to_text/TDCRedTeaming/utils.py:13
↓ 3 callersFunctionLLM_over_refusal_checker
Check if the response shows signs of over-refusal to legitimate technical questions
projects/eval-anything/eval_anything/benchmarks/text_to_text/XSTest/utils.py:101
↓ 3 callersMethod__init__
(self, bench_cfgs: namedtuple, task: namedtuple, enable_cot: bool, num_shot: int)
projects/eval-anything/eval_anything/dataloader/format_mm_dataset.py:55
↓ 3 callersMethod__init__
(self, task: AbstractSafeTask)
projects/eval-anything/eval_anything/third_party/SPOC/utils/reward_shaper.py:21
↓ 3 callersMethod__init__
(self, task: AbstractSPOCTask)
align_anything/utils/spoc_utils/reward/reward_shaper.py:35
↓ 3 callersMethod__init__
(self, uuid: str = 'expert_pickupable', action_idx: int = 8, *args, **kwargs)
align_anything/utils/spoc_utils/loss/customized_loss.py:35
↓ 3 callersMethod__init__
(self, inp_dim, h_dim=384, preserve_spatial=True)
align_anything/models/spoc_models/allenact_preprocessors/siglip_preprocessors.py:123
↓ 3 callersMethod__init__
(self, model: nn.Module)
align_anything/models/spoc_models/allenact_preprocessors/dino_preprocessors.py:36
↓ 3 callersMethod__init__
(self, d_model: int, max_len: int = 1000)
align_anything/models/spoc_models/models/transformer_models/text_cond_visual_encoder.py:327
↓ 3 callersMethod__init__
(self, input_size: int)
align_anything/models/spoc_models/models/allenact_transformer_models/allenact_dino_transformer.py:692
↓ 3 callersMethod_get_cache_path
Get cache file path from key
projects/eval-anything/eval_anything/utils/cache_manager.py:46
↓ 3 callersMethod_key_set
(self)
projects/eval-anything/eval_anything/third_party/SPOC/environment/spoc_objects.py:80
↓ 3 callersFunction_strip_string
(string)
projects/eval-anything/eval_anything/utils/utils.py:512
↓ 3 callersMethodactor_loss_fn
( self, log_probs: torch.Tensor, # size = (B, L - S) old_log_probs: torch.Tensor, #
align_anything/trainers/text_to_text/ppo.py:291
↓ 3 callersMethodadapt_output
(x, use_agent, nstep, nsampler, nagent)
align_anything/models/spoc_models/models/allenact_transformer_models/allenact_dino_transformer.py:632
↓ 3 callersMethodallocate_a_new_stretch_controller
(self, use_original_ai2thor_controller)
projects/eval-anything/eval_anything/third_party/SPOC/tasks/abstract_task_sampler.py:218
↓ 3 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
align_anything/models/modeling_emu3/mllm/modeling_emu3.py:219
← previousnext →101–200 of 3,036, ranked by callers