MCPcopy Create free account

hub / github.com/EGalahad/vla-scratch / functions

Functions336 in github.com/EGalahad/vla-scratch

↓ 1 callersFunction_find_subtext_mask
( input_ids: torch.Tensor, attention_mask: torch.Tensor, valid
examples/bbox_cotrain/visualize_attention.py:310
↓ 1 callersFunction_flatten_leaves
( d: Dict[str, Any], prefix: List[str] | None = None )
vla_scratch/utils/serving/zmq_policy_server.py:208
↓ 1 callersFunction_flatten_leaves
( d: Dict[str, Any], prefix: List[str] | None = None )
vla_scratch/utils/serving/zmq_policy_client.py:78
↓ 1 callersFunction_frame_from_obs
(obs: Dict[str, Any], *, rotate_images: bool)
examples/libero/simulation.py:92
↓ 1 callersFunction_gradient_image
Make a simple RGB gradient tensor in [0, 255] matching build_demo_image.
scripts/generation/dummy_dataset.py:13
↓ 1 callersFunction_initialize_policy_dims
( data_cfg: DataConfig, policy_cfg: PolicyConfig )
scripts/serve_policy.py:70
↓ 1 callersFunction_is_done
(terminated: Any, truncated: Any)
examples/bbox_cotrain/simulation.py:146
↓ 1 callersFunction_load_jsonl
(path)
vla_scratch/datasets/dont_blind/lerobot_dataset.py:106
↓ 1 callersFunction_maybe_tensor_action
( action: np.ndarray, env: gym.Env )
examples/bbox_cotrain/simulation.py:133
↓ 1 callersFunction_normalize_cfg_for_hash
(value: Any)
vla_scratch/helpers/training.py:168
↓ 1 callersFunction_parse_episode_str
Accept explicit episode lists or simple range strings (e.g. "0-128").
vla_scratch/datasets/dont_blind/lerobot_dataset.py:71
↓ 1 callersFunction_parse_episode_str
Accept explicit episode lists or simple range strings (e.g. "0-128").
vla_scratch/datasets/bbox_cotrain/dataset.py:71
↓ 1 callersFunction_parse_hf_path
(path: str)
vla_scratch/transforms/normalization.py:28
↓ 1 callersMethod_parse_range
(range_key: str)
vla_scratch/transforms/normalization.py:232
↓ 1 callersMethod_prepare_noise_cfg
( noise_cfg: Optional[Mapping[str, Mapping[str, Dict[str, float]]]], )
vla_scratch/transforms/normalization.py:247
↓ 1 callersFunction_qwen3vl_fast_pos_embed_interpolate
Optimized bilinear pos embedding interpolation on CUDA (no host sync).
vla_scratch/policies/modules/vlm_bridge/qwen/utils.py:65
↓ 1 callersFunction_qwen3vl_rot_pos_emb
GPU-friendly rotary position builder without .item()/.tolist() syncs.
vla_scratch/policies/modules/vlm_bridge/qwen/utils.py:21
↓ 1 callersMethod_read_bbox_record
(self, ep_idx: int, frame_idx: int)
vla_scratch/datasets/bbox_cotrain/dataset.py:311
↓ 1 callersFunction_resolve_episodes
( meta: LeRobotDatasetMetadata, episodes: List[int] | None )
vla_scratch/datasets/bbox_cotrain/dataset.py:149
↓ 1 callersFunction_resolve_hf_checkpoint_path
Resolve an hf: checkpoint path to a local Hugging Face cache path. Format: hf:org/repo[/optional/subpath] or hf:org/repo@revision[/subpath]
vla_scratch/utils/checkpoint.py:18
↓ 1 callersFunction_resolve_local_dir
(path_str: str)
vla_scratch/transforms/normalization.py:47
↓ 1 callersFunction_resolve_norm_stats_dir
(path_str: str)
vla_scratch/transforms/normalization.py:54
↓ 1 callersFunction_select_episodes
Build an episode list by matching split names against provided regex patterns.
vla_scratch/datasets/dont_blind/lerobot_dataset.py:40
↓ 1 callersFunction_select_episodes
Build an episode list by matching split names against provided regex patterns.
vla_scratch/datasets/bbox_cotrain/dataset.py:40
↓ 1 callersFunction_sqrt_positive_part
Returns torch.sqrt(torch.max(0, x)) but with a zero sub-gradient where x is 0. Reference: https://github.com/facebookresearch/pytorch3d/b
vla_scratch/utils/math.py:281
↓ 1 callersFunction_subset_dataset
( dataset: torch.utils.data.Dataset, fraction: float, *, seed: int, )
vla_scratch/helpers/training.py:149
↓ 1 callersFunction_to_action_list
(resp: Dict[str, Any])
examples/libero/simulation.py:134
↓ 1 callersFunctionaggregate_tensordict
(td: "TensorDict", world_size: int)
vla_scratch/helpers/training.py:403
↓ 1 callersMethodapply_fsdp
Optional shard hook for policies that support FSDP.
vla_scratch/policies/base.py:52
↓ 1 callersMethodassistant_content_mask
( encoded: dict, assistant_header_ids: list[int], end_of_utterance_id: int, )
vla_scratch/policies/modules/vlm_bridge/smolvlm/processor.py:152
↓ 1 callersMethodassistant_content_mask
Returns a boolean mask (B, T) that is True on assistant *content* tokens and False elsewhere. This parses ChatML boundaries directly
vla_scratch/policies/modules/vlm_bridge/qwen/processor.py:164
↓ 1 callersFunctionbuild_beta_time_dist
Construct a Beta distribution on the training device.
vla_scratch/policies/utils/diffusion.py:12
↓ 1 callersFunctionbuild_demo_image
Create a deterministic RGB gradient so the script works without external assets.
scripts/generation/test_qwen3vl_generation.py:8
↓ 1 callersFunctionbuild_output_transforms
( data_cfg: "DataConfig", policy_cfg: "PolicyConfig", )
vla_scratch/helpers/data.py:78
↓ 1 callersFunctionbuild_param_lr_groups
Create optimizer parameter groups from a learning-rate mapping.
vla_scratch/helpers/training.py:272
↓ 1 callersFunctionbuild_payload
( obs: Dict[str, Any], instruction: str, *, state_history: int, )
examples/bbox_cotrain/simulation.py:68
↓ 1 callersMethodcompute
(self, sample: Any)
vla_scratch/transforms/base.py:12
↓ 1 callersFunctioncompute_and_save_norm_stats
( data_config: DataConfig, policy_config: PolicyConfig, num_samples: int, batch_size: int,
scripts/compute_norm_stats.py:74
↓ 1 callersFunctioncompute_attention_weights
Compute attention weights manually to get the attention scores. Args: q: Query tensor [batch, num_heads, seq_len, head_dim]
examples/bbox_cotrain/visualize_attention.py:64
↓ 1 callersFunctioncompute_indices_weights
(h: int, w: int)
vla_scratch/policies/modules/vlm_bridge/qwen/utils.py:77
↓ 1 callersFunctionconvert_tensor_to_pil
Convert image tensor from LeRobotDataset to PIL Image. Args: img_tensor: Image tensor, shape (C, H, W) or (H, W, C), dtype float32 [
examples/bbox_cotrain/visualize_bbox.py:231
↓ 1 callersFunctioncopysign
Create a new floating-point tensor with the magnitude of input and the sign of other, element-wise. Note: The implementation follows from
vla_scratch/utils/math.py:67
↓ 1 callersFunctioncreate_dataloaders
( train_cfg: "TrainConfig", world_size: int, global_rank: int, *, add_noise: bool = False,
vla_scratch/helpers/training.py:200
↓ 1 callersFunctioncreate_sinusoidal_pos_embedding
( time: at.Float[torch.Tensor, " b"], # noqa: F722 dimension: int, min_period: float, max_per
vla_scratch/policies/utils/transformers.py:30
↓ 1 callersFunctiondecode
Manual autoregressive decoding loop with explicit KV cache updates.
examples/bbox_cotrain/visualize_bbox.py:338
↓ 1 callersMethodencode
( self, observation: "Observation", *, extra_embs: Optional[torch.Tensor] = No
vla_scratch/policies/modules/vlm_bridge/paligemma/bridge.py:81
↓ 1 callersMethodencode_prefix
Encode the observation prefix and return KV cache artifacts.
vla_scratch/policies/base.py:21
↓ 1 callersFunctioneval_generation
( model: "BasePolicy", dataloader: DataLoader, device: torch.device, local_rank: int, )
vla_scratch/helpers/training.py:373
↓ 1 callersFunctionextract_attention_from_bridge
Extract attention weights from the VLM bridge. Returns: attention_weights: [batch, num_heads, seq_len, seq_len] image_mask:
examples/bbox_cotrain/visualize_attention.py:99
↓ 1 callersFunctionextract_object_name
Extract object name from instruction text. Supports formats like: - "put {object} on {location}" -> returns "{object}" - "put {objec
examples/bbox_cotrain/visualize_attention.py:705
↓ 1 callersMethodfinalize
(self)
vla_scratch/helpers/training.py:660
↓ 1 callersFunctiongated_activation
( x: torch.Tensor, y: torch.Tensor, act: Callable[[torch.Tensor], torch.Tensor], )
vla_scratch/policies/modules/action_expert/cross_attention_dit.py:75
↓ 1 callersFunctiongenerate_bbox
Generate bbox prediction using prefill and decode.
examples/bbox_cotrain/visualize_bbox.py:387
↓ 1 callersFunctionget_libero_dummy_action
No-op action used to let the environment settle.
examples/libero/simulation.py:65
↓ 1 callersMethodget_text_dims
(self)
vla_scratch/policies/modules/vlm_bridge/base.py:29
↓ 1 callersMethodinfer
(self, obs: Dict[str, Any])
vla_scratch/utils/serving/zmq_policy_client.py:41
↓ 1 callersMethodinitialize_parameters
(self, input)
vla_scratch/policies/modules/action_expert/cross_attention_dit.py:42
↓ 1 callersMethodinitialize_weights
(self)
vla_scratch/policies/base.py:17
↓ 1 callersFunctioninstantiate_transform
Instantiate a transform object from a spec. Accepts either an existing object with a `.compute()` method, or a dict with a `_target_` key and
vla_scratch/helpers/data.py:21
↓ 1 callersFunctionload_checkpoint
Distributed-aware checkpoint load for directory checkpoints. `checkpoint` is a directory with `model.pt` and `optimizer.pt`. Returns (missing
vla_scratch/utils/checkpoint.py:159
↓ 1 callersFunctionlog_model_state_sizes
Print local-shard sizes (MB) for params, buffers, grads, and optimizer state.
vla_scratch/helpers/training.py:494
↓ 1 callersFunctionmain
(cfg: DictConfig)
scripts/train_policy.py:138
↓ 1 callersFunctionmain
(cfg: DictConfig)
scripts/eval_policy.py:71
↓ 1 callersFunctionmain
(cfg: DictConfig)
scripts/compute_norm_stats.py:141
↓ 1 callersFunctionmain
(cfg: DictConfig)
scripts/serve_policy.py:171
↓ 1 callersFunctionmain
()
scripts/generation/test_qwen3vl_generation-compare.py:50
↓ 1 callersFunctionmain
()
scripts/generation/test_smolvlm_generation_compare.py:101
↓ 1 callersFunctionmain
()
scripts/generation/test_qwen3vl_generation.py:116
↓ 1 callersFunctionmain
(cfg: DictConfig)
examples/libero/simulation.py:224
↓ 1 callersFunctionmain
(cfg: DictConfig)
examples/bbox_cotrain/visualize_bbox.py:54
↓ 1 callersFunctionmain
(cfg: DictConfig)
examples/bbox_cotrain/simulation.py:168
↓ 1 callersFunctionmain
(cfg: DictConfig)
examples/bbox_cotrain/visualize_attention.py:850
↓ 1 callersFunctionmake_configs
()
scripts/generation/test_qwen3vl_generation-compare.py:23
↓ 1 callersFunctionmake_configs
()
scripts/generation/test_smolvlm_generation_compare.py:13
↓ 1 callersFunctionmap_attention_to_image
Map attention weights from token space to image space. Args: attention_weights: [batch, num_heads, seq_len, seq_len] - attention wei
examples/bbox_cotrain/visualize_attention.py:370
↓ 1 callersFunctionparse_bbox_json
Parse bbox JSON from model output. The output format is typically: [{"bbox_2d": [...], "label": "..."}, ...]<|im_end|> Args: bbo
examples/bbox_cotrain/visualize_bbox.py:419
↓ 1 callersFunctionprefill
Prefill pass that returns cache, cache_position, attention_mask, and next token.
examples/bbox_cotrain/visualize_bbox.py:282
↓ 1 callersFunctionquat_apply
Apply a quaternion rotation to a vector. Args: quat: The quaternion in (w, x, y, z). Shape is (..., 4). vec: The vector in (x, y,
vla_scratch/utils/math.py:643
↓ 1 callersFunctionquat_from_matrix
Convert rotations given as rotation matrices to quaternions. Args: matrix: The rotation matrices. Shape is (..., 3, 3). Returns:
vla_scratch/utils/math.py:294
↓ 1 callersFunctionquat_unique
Convert a unit quaternion to a standard form where the real part is non-negative. Quaternion representations have a singularity since ``q`` and `
vla_scratch/utils/math.py:85
↓ 1 callersFunctionreplace_paligemma_forward
()
vla_scratch/policies/modules/vlm_bridge/paligemma/utils.py:149
↓ 1 callersFunctionreplace_smolvlm_forward
()
vla_scratch/policies/modules/vlm_bridge/smolvlm/utils.py:200
↓ 1 callersFunctionrestore_smolvlm_forward
()
vla_scratch/policies/modules/vlm_bridge/smolvlm/utils.py:210
↓ 1 callersFunctionrollout_task
( client: ZmqPolicyClient, env, task_description: str, cfg: LiberoEvalConfig, episode_idx:
examples/libero/simulation.py:139
↓ 1 callersFunctionrotation_6d_to_matrix
Convert 6D rotation representation back to a proper rotation matrix. Uses Gram-Schmidt orthogonalization on the two 3D row vectors as in http
vla_scratch/utils/math.py:149
↓ 1 callersFunctionsample_clamped_time
Sample diffusion timesteps with a small clamp to avoid numerical issues.
vla_scratch/policies/utils/diffusion.py:23
↓ 1 callersFunctionsave_cfg_yaml
Save a structured config to cfg.yaml in run_dir.
vla_scratch/utils/checkpoint.py:288
↓ 1 callersFunctionsave_checkpoint
Save checkpoint as a directory with model.pt and optimizer.pt. `filename` should be the checkpoint directory name, e.g., `checkpoint_5`. If a
vla_scratch/utils/checkpoint.py:239
↓ 1 callersFunctionsave_norm_stats
( output_dir: Path, data_config: "DataConfig", policy_config: "PolicyConfig", stats: NormStats
vla_scratch/transforms/normalization.py:150
↓ 1 callersFunctionscale_transform
Normalizes a given input tensor to a range of [-1, 1]. .. note:: It uses pytorch broadcasting functionality to deal with batched input.
vla_scratch/utils/math.py:7
↓ 1 callersFunctionset_forward_backward_prefetch
( layers: List["FSDPModule"], num_to_forward_prefetch: int, num_to_backward_prefetch: int, )
vla_scratch/policies/utils/training.py:13
↓ 1 callersFunctionsetup_dist
Initialize dist process group using env:// init and optionally build a device mesh.
vla_scratch/helpers/training.py:50
↓ 1 callersFunctionvisualize_attention
Visualize attention map overlaid on the original image. Args: img_chw: Original image [3, H, W] in uint8 attention_map: Atte
examples/bbox_cotrain/visualize_attention.py:574
↓ 1 callersFunctionvisualize_bbox
Visualize bounding boxes on image and save. Args: image: PIL Image bboxes: List of dicts with keys "bbox_2d" and "label"
examples/bbox_cotrain/visualize_bbox.py:470
↓ 1 callersMethodwait_for_request
Block until a request is available, or timeout. Returns a dict with the request data, or None if stopped/timeout.
vla_scratch/utils/serving/zmq_policy_server.py:56
Method__bool__
(self)
vla_scratch/datasets/config.py:61
Method__bool__
(self)
vla_scratch/datasets/config.py:84
Method__delitem__
(self, key: str)
vla_scratch/datasets/config.py:52
Method__delitem__
(self, key: str)
vla_scratch/datasets/config.py:75
Method__enter__
(self)
vla_scratch/utils/serving/zmq_policy_client.py:35
← previousnext →101–200 of 336, ranked by callers