MCPcopy Create free account

hub / github.com/Cheney-36/lerobot / functions

Functions577 in github.com/Cheney-36/lerobot

↓ 56 callersMethoditems
(self)
lerobot/common/datasets/push_dataset_to_hub/_diffusion_policy_replay_buffer.py:456
↓ 19 callersMethodextend
(self, data)
lerobot/common/datasets/push_dataset_to_hub/_diffusion_policy_replay_buffer.py:573
↓ 17 callersMethodwrite
(self)
lerobot/common/robot_devices/motors/utils.py:10
↓ 13 callersMethodupdate
An update method that is to be called after a training optimization step. Implements an additional updates the model parameters may need (for
lerobot/common/policies/policy_protocol.py:70
↓ 12 callersMethodkeys
(self)
lerobot/common/datasets/push_dataset_to_hub/_diffusion_policy_replay_buffer.py:450
↓ 11 callersMethodread
(self, temporary_color: str | None = None)
lerobot/common/robot_devices/cameras/utils.py:56
↓ 11 callersMethodreplace
(self, batch_samples, batch_mask)
lerobot/common/policies/vqbet/vqbet_utils.py:1358
↓ 11 callersMethodvalues
(self)
lerobot/common/datasets/push_dataset_to_hub/_diffusion_policy_replay_buffer.py:453
↓ 10 callersFunctionformat_big_number
(num, precision=0)
lerobot/common/utils/utils.py:130
↓ 9 callersMethod__init__
( self, in_channels: int, hidden_channels: List[int], )
lerobot/common/policies/vqbet/modeling_vqbet.py:945
↓ 8 callersFunction_no_stats_error_str
(name: str)
lerobot/common/policies/normalize.py:90
↓ 8 callersFunctioncalculate_episode_data_index
Calculate episode data index for the provided HuggingFace Dataset. Relies on episode_index column of hf_dataset. Parameters: - hf_datase
lerobot/common/datasets/utils.py:307
↓ 8 callersFunctionsay
(text, blocking=False)
lerobot/scripts/control_robot.py:145
↓ 7 callersMethod__init__
(self, config: DiffusionConfig)
lerobot/common/policies/diffusion/modeling_diffusion.py:174
↓ 7 callersMethodstep
(self)
lerobot/common/policies/vqbet/modeling_vqbet.py:695
↓ 6 callersMethod__init__
(self, config: ACTConfig)
lerobot/common/policies/act/modeling_act.py:290
↓ 6 callersFunctionbusy_wait
(seconds)
lerobot/scripts/control_robot.py:186
↓ 6 callersFunctionconcatenate_episodes
(ep_dicts)
lerobot/common/datasets/push_dataset_to_hub/utils.py:27
↓ 6 callersMethodconnect
(self)
lerobot/common/robot_devices/robots/ur.py:135
↓ 6 callersFunctionconvert_degrees_to_steps
This function convert the degree range to the step range for indicating motors rotation. It assums a motor achieves a full rotation by going from
lerobot/common/robot_devices/motors/dynamixel.py:136
↓ 6 callersFunctionencode_video_frames
More info on ffmpeg arguments tuning on `benchmark/video/README.md`
lerobot/common/datasets/video_utils.py:165
↓ 6 callersFunctionget_device_from_parameters
Get a module's device by checking one of its parameters. Note: assumes that all parameters have the same device
lerobot/common/policies/utils.py:36
↓ 6 callersFunctionget_image_transforms
( brightness_weight: float = 1.0, brightness_min_max: tuple[float, float] | None = None, contrast_
lerobot/common/datasets/transforms.py:140
↓ 6 callersMethodget_last_checkpoint_dir
Given the log directory, get the sub-directory in which the last checkpoint will be saved.
lerobot/common/logger.py:141
↓ 6 callersFunctioninit_hydra_config
Initialize a Hydra config given only the path to the relevant config file. For config resolution, it is assumed that the config file's parent is
lerobot/common/utils/utils.py:155
↓ 6 callersMethodset_bus_baudrate
(self, baudrate)
lerobot/common/robot_devices/motors/dynamixel.py:476
↓ 6 callersMethodupdate_with_decay
(self, buffer_name, new_value, decay)
lerobot/common/policies/vqbet/vqbet_utils.py:1274
↓ 5 callersMethodQs
Predict state-action value for all of the learned Q functions. Args: z: (*, latent_dim) tensor for the current state's latent rep
lerobot/common/policies/tdmpc/modeling_tdmpc.py:682
↓ 5 callersMethod__init__
GPT model gets hyperparameters from a config object. Please refer configuration_vqbet.py for more details.
lerobot/common/policies/vqbet/vqbet_utils.py:174
↓ 5 callersFunctioncheck_value
(name, weight, min_max)
lerobot/common/datasets/transforms.py:154
↓ 5 callersFunctionget_default_encoding
Returns the default ffmpeg encoding parameters used by `encode_video_frames`.
lerobot/common/datasets/push_dataset_to_hub/utils.py:59
↓ 5 callersFunctionget_group_sync_key
(data_name, motor_names)
lerobot/common/robot_devices/motors/dynamixel.py:177
↓ 5 callersFunctionget_hf_dataset_safe_version
(repo_id: str, version: str)
lerobot/common/datasets/utils.py:94
↓ 5 callersFunctionget_safe_torch_device
Given a string, return a torch.device with checks on whether the device is available.
lerobot/common/utils/utils.py:37
↓ 5 callersFunctionlog_dt
(shortname, dt_val_s)
lerobot/scripts/control_robot.py:208
↓ 5 callersFunctionmake_policy
Make an instance of a policy class. Args: hydra_cfg: A parsed Hydra configuration (see scripts). If `pretrained_policy_name_or_path` is
lerobot/common/policies/factory.py:73
↓ 5 callersFunctionset_global_seed
Set seed for reproducibility.
lerobot/common/utils/utils.py:83
↓ 4 callersMethod_read_with_motor_ids
(self, motor_models, motor_ids, data_name)
lerobot/common/robot_devices/motors/dynamixel.py:566
↓ 4 callersFunctionassert_same_address
(model_ctrl_table, motor_models, data_name)
lerobot/common/robot_devices/motors/dynamixel.py:200
↓ 4 callersMethodasync_read
(self)
lerobot/common/robot_devices/cameras/utils.py:57
↓ 4 callersMethodencode
Encodes an observation into its latent representation.
lerobot/common/policies/tdmpc/modeling_tdmpc.py:624
↓ 4 callersFunctionget_log_name
(var_name, fn_name, data_name, motor_names)
lerobot/common/robot_devices/motors/dynamixel.py:194
↓ 4 callersFunctioninit_logging
()
lerobot/common/utils/utils.py:111
↓ 4 callersFunctionis_package_available
Copied from https://github.com/huggingface/transformers/blob/main/src/transformers/utils/import_utils.py Check if the package spec exists and grab
lerobot/common/utils/import_utils.py:20
↓ 4 callersMethodpi
Samples an action from the learned policy. The policy can also have added (truncated) Gaussian noise injected for encouraging exploration whe
lerobot/common/policies/tdmpc/modeling_tdmpc.py:654
↓ 4 callersMethodreset
To be called whenever the environment is reset. Does things like clearing caches.
lerobot/common/policies/policy_protocol.py:47
↓ 4 callersMethodresolve_compressor
(compressor="default")
lerobot/common/datasets/push_dataset_to_hub/_diffusion_policy_replay_buffer.py:340
↓ 4 callersFunctionsave_images_concurrently
(imgs_array: numpy.array, out_dir: Path, max_workers: int = 4)
lerobot/common/datasets/push_dataset_to_hub/utils.py:46
↓ 4 callersMethodselect_action
Return one action to run in the environment (potentially in batch mode). When the model uses a history of observations, or outputs a sequence
lerobot/common/policies/policy_protocol.py:60
↓ 4 callersFunctionunpack_one
(t, ps, pattern)
lerobot/common/policies/vqbet/vqbet_utils.py:968
↓ 3 callersMethodV
Predict state value (V). Args: z: (*, latent_dim) tensor for the current state's latent representation. Returns:
lerobot/common/policies/tdmpc/modeling_tdmpc.py:672
↓ 3 callersFunction_compute_nearest_rounded_position
(position, models)
lerobot/common/robot_devices/robots/gello_ur5.py:106
↓ 3 callersFunction_compute_nearest_rounded_position
(position, models)
lerobot/common/robot_devices/robots/koch.py:102
↓ 3 callersMethod_resolve_array_chunks
(cls, chunks: dict | tuple, key, array)
lerobot/common/datasets/push_dataset_to_hub/_diffusion_policy_replay_buffer.py:364
↓ 3 callersMethod_resolve_array_compressor
(cls, compressors: dict | str | numcodecs.abc.Codec, key, array)
lerobot/common/datasets/push_dataset_to_hub/_diffusion_policy_replay_buffer.py:348
↓ 3 callersMethod_write_with_motor_ids
(self, motor_models, motor_ids, data_name, values)
lerobot/common/robot_devices/motors/dynamixel.py:675
↓ 3 callersMethodcapture_observation
(self)
lerobot/common/robot_devices/robots/utils.py:8
↓ 3 callersFunctioncapture_timestamp_utc
()
lerobot/common/utils/utils.py:184
↓ 3 callersFunctioncheck_chunks_compatible
(chunks: tuple, shape: tuple)
lerobot/common/datasets/push_dataset_to_hub/_diffusion_policy_replay_buffer.py:33
↓ 3 callersFunctioncheck_repo_id
(repo_id: str)
lerobot/common/datasets/push_dataset_to_hub/utils.py:69
↓ 3 callersFunctiondecode_video_frames_torchvision
Loads frames associated to the requested timestamps of a video The backend can be either "pyav" (default) or "video_reader". "video_reader" r
lerobot/common/datasets/video_utils.py:67
↓ 3 callersMethoddisconnect
Disconnect from the robot.
lerobot/common/robot_devices/robots/ur.py:138
↓ 3 callersFunctioneval
(robot: Robot, policy: torch.nn.Module | None = None, hydra_cfg: DictConfig | None = None,)
lerobot/scripts/control_robot.py:728
↓ 3 callersFunctioneval_policy
Args: env: The batch of environments. policy: The policy. n_episodes: The number of episodes to evaluate. max_epi
lerobot/scripts/eval.py:209
↓ 3 callersMethodforward
(self, batch: dict[str, Tensor])
lerobot/common/policies/normalize.py:134
↓ 3 callersFunctionget_global_random_state
Get the random state for `random`, `numpy`, and `torch`.
lerobot/common/utils/utils.py:58
↓ 3 callersMethodget_joint_state
Get the current state of the leader robot. Returns: T: The current state of the leader robot.
lerobot/common/robot_devices/robots/ur.py:57
↓ 3 callersFunctionget_pretrained_policy_path
(pretrained_policy_name_or_path, revision=None)
lerobot/scripts/eval.py:512
↓ 3 callersFunctionlog
(t, eps=1e-20)
lerobot/common/policies/vqbet/vqbet_utils.py:951
↓ 3 callersFunctionlog_control_info
(robot, dt_s, episode_index=None, frame_index=None, fps=None)
lerobot/scripts/control_robot.py:201
↓ 3 callersFunctionmake_env
Makes a gym vector environment according to the evaluation config. n_envs can be used to override eval.batch_size in the configuration. Must be a
lerobot/common/envs/factory.py:22
↓ 3 callersMethodmaybe_add_pos_embed
(self, tensor: Tensor, pos_embed: Tensor | None)
lerobot/common/policies/act/modeling_act.py:624
↓ 3 callersFunctionpopulate_queues
(queues, batch)
lerobot/common/policies/utils.py:20
↓ 3 callersFunctionrechunk_recompress_array
(group, name, chunks=None, chunk_length=None, compressor=None, tmp_key="_temp")
lerobot/common/datasets/push_dataset_to_hub/_diffusion_policy_replay_buffer.py:40
↓ 3 callersFunctionreset_torque_mode
(arm: MotorsBus)
lerobot/common/robot_devices/robots/koch.py:47
↓ 3 callersFunctionresolve_delta_timestamps
Resolves delta_timestamps config key (in-place) by using `eval`. Doesn't do anything if delta_timestamps is not specified or has already been res
lerobot/common/datasets/factory.py:25
↓ 3 callersMethodresult
(self)
lerobot/common/utils/benchmark.py:87
↓ 3 callersFunctionsave_meta_data
( info: dict[str, Any], stats: dict, episode_data_index: dict[str, list], meta_data_dir: Path )
lerobot/scripts/push_dataset_to_hub.py:83
↓ 3 callersMethodsend_action
(self, action)
lerobot/common/robot_devices/robots/utils.py:9
↓ 3 callersMethodset_calibration
(self)
lerobot/common/robot_devices/motors/utils.py:6
↓ 3 callersMethodteleop_step
(self, record_data=False)
lerobot/common/robot_devices/robots/utils.py:7
↓ 2 callersMethod__init__
(self, config: TDMPCConfig)
lerobot/common/policies/tdmpc/modeling_tdmpc.py:541
↓ 2 callersMethod_item_to_tensors
(self, item: dict)
lerobot/common/datasets/online_buffer.py:236
↓ 2 callersMethod_prepare_global_conditioning
Encode image features and concatenate them all together along with the state vector.
lerobot/common/policies/diffusion/modeling_diffusion.py:238
↓ 2 callersFunctioncfg_to_group
Return a group name for logging. Optionally returns group name as list.
lerobot/common/logger.py:42
↓ 2 callersFunctioncompute_sampler_weights
Compute the sampling weights for the online training dataloader in train.py. Args: offline_dataset: The LeRobotDataset used for offline p
lerobot/common/datasets/online_buffer.py:299
↓ 2 callersFunctioncompute_stats
Compute mean/std and min/max statistics of all data keys in a LeRobotDataset.
lerobot/common/datasets/compute_stats.py:67
↓ 2 callersFunctionconvert_to_bytes
(value, bytes)
lerobot/common/robot_devices/motors/dynamixel.py:150
↓ 2 callersFunctioncreate_seeded_dataloader
(dataset, batch_size, seed)
lerobot/common/datasets/compute_stats.py:83
↓ 2 callersFunctioncreate_stats_buffers
Create buffers per modality (e.g. "observation.image", "action") containing their mean, std, min, max statistics. Args: (see Normalize a
lerobot/common/policies/normalize.py:20
↓ 2 callersFunctioncycle
The equivalent of itertools.cycle, but safe for Pytorch dataloaders. See https://github.com/pytorch/pytorch/issues/23900 for information on why i
lerobot/common/datasets/utils.py:385
↓ 2 callersMethoddisconnect
(self)
lerobot/common/robot_devices/motors/dynamixel.py:759
↓ 2 callersFunctiondownload_raw
(raw_dir: Path, repo_id: str)
lerobot/common/datasets/push_dataset_to_hub/_download_raw.py:76
↓ 2 callersFunctionema_inplace
(old, new, decay)
lerobot/common/policies/vqbet/vqbet_utils.py:955
↓ 2 callersFunctionevaluate_and_checkpoint_if_needed
(step, is_online)
lerobot/scripts/train.py:358
↓ 2 callersFunctionfind_available_ports
()
lerobot/common/robot_devices/motors/dynamixel.py:219
↓ 2 callersFunctionfind_camera_indices
(raise_when_empty=False, max_index_search_range=MAX_OPENCV_INDEX)
lerobot/common/robot_devices/cameras/opencv.py:36
↓ 2 callersMethodfind_motor_indices
(self, possible_ids=None)
lerobot/common/robot_devices/motors/dynamixel.py:456
↓ 2 callersFunctionflatten_forward_unflatten
Helper to temporarily flatten extra dims at the start of the image tensor. Args: fn: Callable that the image tensor will be passed to. It
lerobot/common/policies/tdmpc/modeling_tdmpc.py:827
↓ 2 callersMethodfrom_preloaded
Create a LeRobot Dataset from existing data and attributes instead of loading from the filesystem. It is especially useful when converting ra
lerobot/common/datasets/lerobot_dataset.py:179
next →1–100 of 577, ranked by callers