MCPcopy Create free account

hub / github.com/Physical-Intelligence/openpi / functions

Functions694 in github.com/Physical-Intelligence/openpi

↓ 16 callersMethodinit
Convenience method for initializing all parameters, necessary due to the quirks of linen.
src/openpi/models/gemma.py:413
↓ 15 callersMethodupdate
Update the running statistics with a batch of vectors. Args: vectors (np.ndarray): An array where all dimensions except
src/openpi/shared/normalize.py:30
↓ 13 callersFunctiontransform
(k: str, v: T)
src/openpi/transforms.py:410
↓ 12 callersMethod__init__
(self, config)
src/openpi/models_pytorch/transformers_replace/models/siglip/modeling_siglip.py:421
↓ 12 callersMethodencode
(self, x)
src/openpi/models/gemma.py:148
↓ 9 callersMethodcreate
( self, lr: optax.ScalarOrSchedule, weight_decay_mask: at.PyTree | None = None, )
src/openpi/training/optimizer.py:96
↓ 8 callersMethod__init__
(self, config)
src/openpi/models_pytorch/transformers_replace/models/gemma/modeling_gemma.py:114
↓ 8 callersMethod_apply_checkpoint
Helper method to apply gradient checkpointing if enabled.
src/openpi/models_pytorch/pi0_pytorch.py:149
↓ 8 callersFunction_name
(name, i)
src/openpi/models/gemma.py:443
↓ 8 callersMethoddecode
(self, x)
src/openpi/models/gemma.py:153
↓ 8 callersMethodload
Create a model with the given parameters.
src/openpi/models/model.py:233
↓ 8 callersMethodsave
(self, directory: epath.Path, args: CallbackSave)
src/openpi/training/checkpoints.py:124
↓ 7 callersMethodfake_obs
(self, batch_size: int = 1)
src/openpi/models/model.py:253
↓ 7 callersFunctionlog_memory_usage
Log detailed memory usage information.
scripts/train_pytorch.py:284
↓ 5 callersMethodcreate_base_config
(self, assets_dirs: pathlib.Path, model_config: _model.BaseModelConfig)
src/openpi/training/config.py:179
↓ 5 callersMethoddigitize
(self, tokens: jnp.ndarray)
src/openpi/models/utils/fsq_tokenizer.py:120
↓ 5 callersMethodfake_act
(self, batch_size: int = 1)
src/openpi/models/model.py:257
↓ 5 callersFunctionflatten_dict
Flatten a nested dictionary. Uses '/' as the separator.
src/openpi/transforms.py:340
↓ 5 callersMethodstep
(self, action)
examples/aloha_real/real_env.py:150
↓ 4 callersFunction_get_frozen_state
(config: _pi0_config.Pi0Config)
src/openpi/models/pi0_test.py:7
↓ 4 callersMethodclose
(self)
examples/droid/convert_droid_data_to_lerobot.py:400
↓ 4 callersFunctionget_arm_gripper_positions
(bot)
examples/aloha_real/robot_utils.py:176
↓ 4 callersMethodget_statistics
Compute and return the statistics of the vectors processed so far. Returns: dict: A dictionary containing the computed s
src/openpi/shared/normalize.py:73
↓ 4 callersMethodimage_cb
(self, cam_name, data)
examples/aloha_real/robot_utils.py:48
↓ 4 callersMethodinfer
(self, obs: Dict)
packages/openpi-client/src/openpi_client/websocket_client_policy.py:47
↓ 4 callersMethodload
Loads the model weights. Args: params: Parameters of the model. This is a nested structure of array-like objects that
src/openpi/training/weight_loaders.py:18
↓ 4 callersFunctionpad_to_dim
Pad an array to the target dimension with zeros along the specified axis.
src/openpi/transforms.py:423
↓ 4 callersMethodpush
Append transforms to the group and return a new group. Args: inputs: Appended to the *end* of the current input transforms.
src/openpi/transforms.py:49
↓ 3 callersMethod_dot
(self, x: at.Array, w: at.Array, lora_weights: tuple[at.Array, at.Array] | None)
src/openpi/models/lora.py:144
↓ 3 callersFunction_get_mtime
Get the mtime of a given date at midnight UTC.
src/openpi/shared/download.py:189
↓ 3 callersFunction_joint_flip_mask
Used to convert between aloha and pi joint angles.
src/openpi/policies/aloha_policy.py:104
↓ 3 callersMethod_prepare_attention_masks_4d
Helper method to prepare 4D attention masks for transformer.
src/openpi/models_pytorch/pi0_pytorch.py:157
↓ 3 callersMethod_process_frame
(self, frame)
examples/droid/convert_droid_data_to_lerobot.py:235
↓ 3 callersFunction_set_folder_permission
Set folder permission to be read, write and searchable.
src/openpi/shared/download.py:151
↓ 3 callersFunction_set_permission
chmod requires executable permission to be set, so we skip if the permission is already match with the target.
src/openpi/shared/download.py:142
↓ 3 callersMethoddata_config
Get the data config for this data loader.
src/openpi/training/data_loader.py:45
↓ 3 callersMethodforward
Do a full training forward pass and compute the loss (batch_size x num_steps x num_motors)
src/openpi/models_pytorch/pi0_pytorch.py:317
↓ 3 callersFunctionget_arm_joint_positions
(bot)
examples/aloha_real/robot_utils.py:172
↓ 3 callersMethodget_freeze_filter
Returns the freeze filter based on the model config.
src/openpi/models/pi0_config.py:88
↓ 3 callersMethodget_input_embeddings
(self)
src/openpi/models_pytorch/transformers_replace/models/paligemma/modeling_paligemma.py:151
↓ 3 callersMethodget_observation
(self)
examples/aloha_real/real_env.py:128
↓ 3 callersMethodget_server_metadata
(self)
packages/openpi-client/src/openpi_client/websocket_client_policy.py:29
↓ 3 callersMethodinfer
(self, obs: dict, *, noise: np.ndarray | None = None)
src/openpi/policies/policy.py:68
↓ 3 callersFunctionmake_att_2d_masks
Copied from big_vision. Tokens can attend to valid inputs tokens which have a cumulative mask_ar smaller or equal to theirs. This way `mask_a
src/openpi/models_pytorch/pi0_pytorch.py:52
↓ 3 callersFunctionmake_attn_mask
Adapted from big_vision. Tokens can attend to valid inputs tokens which have a cumulative mask_ar smaller or equal to theirs. This way `mask_
src/openpi/models/pi0.py:19
↓ 3 callersMethodrecord
Record a timing measurement for the given key.
examples/simple_client/main.py:50
↓ 3 callersMethodreset
Reset the agent to its initial state.
packages/openpi-client/src/openpi_client/runtime/agent.py:16
↓ 3 callersFunctionresize_image
(image, size)
examples/droid/convert_droid_data_to_lerobot.py:32
↓ 3 callersMethodrestore
(self, *args, **kwargs)
src/openpi/training/checkpoints.py:131
↓ 3 callersMethodrun
(self)
src/openpi/serving/websocket_policy_server.py:37
↓ 3 callersFunctiontorque_on
(bot)
examples/aloha_real/robot_utils.py:242
↓ 3 callersMethodvocab_size
(self)
src/openpi/models/utils/fsq_tokenizer.py:124
↓ 2 callersMethod__init__
(self, config: PaliGemmaConfig)
src/openpi/models_pytorch/transformers_replace/models/paligemma/modeling_paligemma.py:138
↓ 2 callersMethod_act_tokens_to_paligemma_tokens
(self, tokens: np.ndarray | list[int])
src/openpi/models/tokenizer.py:136
↓ 2 callersFunction_apply_rope
Applies RoPE positions [B, L] to x [B, L, H, D].
src/openpi/models/gemma.py:424
↓ 2 callersFunction_apply_rope
Applies RoPE positions [B, L] to x [B, L, H, D].
src/openpi/models/gemma_fast.py:425
↓ 2 callersFunction_assert_quantile_stats
(norm_stats: at.PyTree[NormStats])
src/openpi/transforms.py:455
↓ 2 callersMethod_convert_observation
(self, gym_obs: dict)
examples/aloha_sim/env.py:47
↓ 2 callersFunction_download_fsspec
Download a file from a remote filesystem to the local cache, and return the local path.
src/openpi/shared/download.py:123
↓ 2 callersFunction_ensure_permissions
Since we are sharing cache directory with containerized runtime as well as training script, we need to ensure that the cache directory has the cor
src/openpi/shared/download.py:156
↓ 2 callersFunction_gated_residual
Applies gated residual connection with optional gate parameter. Args: x: Input tensor (residual) y: Output tensor to be
src/openpi/models_pytorch/transformers_replace/models/gemma/modeling_gemma.py:209
↓ 2 callersFunction_gated_residual
(x, y, gate)
src/openpi/models/gemma.py:453
↓ 2 callersMethod_get_bins_fsq
Get bins per dimension based on codebook size, from the original FSQ paper.
src/openpi/models/utils/fsq_tokenizer.py:44
↓ 2 callersFunction_merge_params
Merges the loaded parameters with the reference parameters. Args: loaded_params: The parameters to merge. params: The reference p
src/openpi/training/weight_loaders.py:76
↓ 2 callersFunction_normalize
(x, min_val, max_val)
src/openpi/policies/aloha_policy.py:109
↓ 2 callersFunction_parse_image
(image)
src/openpi/policies/droid_policy.py:21
↓ 2 callersFunction_parse_image
(image)
src/openpi/policies/libero_policy.py:20
↓ 2 callersMethod_preprocess_observation
Helper method to preprocess observation.
src/openpi/models_pytorch/pi0_pytorch.py:162
↓ 2 callersFunction_split_params
(state: training_utils.TrainState)
src/openpi/training/checkpoints.py:145
↓ 2 callersFunction_unnormalize
(x, min_val, max_val)
src/openpi/policies/aloha_policy.py:113
↓ 2 callersMethod_update_causal_mask
( self, attention_mask, token_type_ids=None, past_key_values=None, cac
src/openpi/models_pytorch/transformers_replace/models/paligemma/modeling_paligemma.py:164
↓ 2 callersFunctionapply_tree
( tree: at.PyTree[T], selector: at.PyTree[S], fn: Callable[[T, S], T], *, strict: bool = False )
src/openpi/transforms.py:404
↓ 2 callersMethodcompute_loss
( self, rng: at.KeyArrayLike, observation: _model.Observation, actions: _model.Actions, *, train: bool
src/openpi/models/pi0.py:189
↓ 2 callersMethodcreate
(self, rng: at.KeyArrayLike)
src/openpi/models/pi0_fast.py:97
↓ 2 callersMethodcreate
(self, rng: at.KeyArrayLike)
src/openpi/models/pi0_config.py:58
↓ 2 callersMethoddecode
(self, x)
src/openpi/models/gemma_fast.py:120
↓ 2 callersMethoddecode
(self, tokens: jnp.ndarray, z_grad: jax.Array | None = None)
src/openpi/models/utils/fsq_tokenizer.py:105
↓ 2 callersMethodembed_inputs
( self, obs: _model.Observation )
src/openpi/models/pi0_fast.py:160
↓ 2 callersMethodembed_prefix
Embed images with SigLIP and language tokens with embedding layer to prepare for PaliGemma transformer processing.
src/openpi/models_pytorch/pi0_pytorch.py:187
↓ 2 callersMethodembed_prefix
( self, obs: _model.Observation )
src/openpi/models/pi0.py:106
↓ 2 callersMethodembed_suffix
Embed state, noisy_actions, timestep to prepare for Expert Gemma processing.
src/openpi/models_pytorch/pi0_pytorch.py:238
↓ 2 callersMethodembed_suffix
( self, obs: _model.Observation, noisy_actions: _model.Actions, timestep: at.Float[at.Array, " b"]
src/openpi/models/pi0.py:140
↓ 2 callersMethodencode
(self, inputs: jnp.ndarray)
src/openpi/models/utils/fsq_tokenizer.py:93
↓ 2 callersMethodfrom_dict
This method defines the mapping between unstructured data (i.e., nested dict) to the structured Observation format.
src/openpi/models/model.py:110
↓ 2 callersFunctionget_cache_dir
()
src/openpi/shared/download.py:25
↓ 2 callersMethodget_image_features
Obtains image last hidden states from the vision tower and apply multimodal projection. Args: pixel_values (`torch.Float
src/openpi/models_pytorch/transformers_replace/models/paligemma/modeling_paligemma.py:232
↓ 2 callersMethodget_reward
(self)
examples/aloha_real/real_env.py:136
↓ 2 callersMethodinputs_spec
Returns the input specification for the model. Values are jax.ShapeDtypeStruct.
src/openpi/models/model.py:250
↓ 2 callersFunctionmake_attn_mask
Adapted from big_vision. Tokens can attend to valid inputs tokens which have a cumulative mask_ar smaller or equal to theirs. This way `mask_
src/openpi/models/pi0_fast.py:23
↓ 2 callersMethodmetadata
(self)
src/openpi/policies/policy.py:109
↓ 2 callersFunctionnorm_cdf
(x)
src/openpi/models_pytorch/transformers_replace/models/siglip/modeling_siglip.py:44
↓ 2 callersMethodread_camera
(self, ignore_data=False, correct_timestamp=None)
examples/droid/convert_droid_data_to_lerobot.py:241
↓ 2 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
src/openpi/models_pytorch/transformers_replace/models/gemma/modeling_gemma.py:197
↓ 2 callersMethodreset
(self, *, fake=False)
examples/aloha_real/real_env.py:139
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
src/openpi/models_pytorch/transformers_replace/models/gemma/modeling_gemma.py:163
↓ 2 callersMethodrun
Runs the runtime loop continuously until stop() is called or the environment is done.
packages/openpi-client/src/openpi_client/runtime/runtime.py:32
↓ 2 callersMethodsample_noise
(self, shape, device)
src/openpi/models_pytorch/pi0_pytorch.py:173
↓ 2 callersMethodserve_forever
(self)
src/openpi/serving/websocket_policy_server.py:34
↓ 2 callersMethodto_bfloat16_for_selected_params
(self, precision: Literal["bfloat16", "float32"] = "bfloat16")
src/openpi/models_pytorch/gemma_pytorch.py:62
↓ 2 callersMethodto_dict
Convert the Observation to a nested dict.
src/openpi/models/model.py:131
next →1–100 of 694, ranked by callers