SYMBOL INDEX (1655 symbols across 137 files) FILE: JaxPref/MR.py class MR (line 13) | class MR(object): method get_default_config (line 16) | def get_default_config(updates=None): method __init__ (line 25) | def __init__(self, config, rf): method evaluation (line 49) | def evaluation(self, batch): method get_reward (line 55) | def get_reward(self, batch): method _get_reward_step (line 59) | def _get_reward_step(self, train_states, batch): method _eval_pref_step (line 70) | def _eval_pref_step(self, train_states, rng, batch): method train (line 114) | def train(self, batch): method _train_pref_step (line 122) | def _train_pref_step(self, train_states, rng, batch): method train_semi (line 173) | def train_semi(self, labeled_batch, unlabeled_batch, lmd, tau): method _train_semi_pref_step (line 181) | def _train_semi_pref_step(self, train_states, labeled_batch, unlabeled... method train_regression (line 248) | def train_regression(self, batch): method _train_regression_step (line 256) | def _train_regression_step(self, train_states, rng, batch): method model_keys (line 294) | def model_keys(self): method train_states (line 298) | def train_states(self): method train_params (line 302) | def train_params(self): method total_steps (line 306) | def total_steps(self): FILE: JaxPref/NMR.py class NMR (line 13) | class NMR(object): method get_default_config (line 16) | def get_default_config(updates=None): method __init__ (line 45) | def __init__(self, config, lstm): method evaluation (line 80) | def evaluation(self, batch): method get_reward (line 86) | def get_reward(self, batch): method _get_reward_step (line 90) | def _get_reward_step(self, train_states, batch): method _eval_pref_step (line 101) | def _eval_pref_step(self, train_states, rng, batch): method train (line 151) | def train(self, batch): method _train_pref_step (line 159) | def _train_pref_step(self, train_states, rng, batch): method train_regression (line 214) | def train_regression(self, batch): method _train_regression_step (line 222) | def _train_regression_step(self, train_states, rng, batch): method model_keys (line 260) | def model_keys(self): method train_states (line 264) | def train_states(self): method train_params (line 268) | def train_params(self): method total_steps (line 272) | def total_steps(self): FILE: JaxPref/PrefTransformer.py class PrefTransformer (line 15) | class PrefTransformer(object): method get_default_config (line 18) | def get_default_config(updates=None): method __init__ (line 42) | def __init__(self, config, trans): method evaluation (line 101) | def evaluation(self, batch): method get_reward (line 107) | def get_reward(self, batch): method _get_reward_step (line 111) | def _get_reward_step(self, train_states, batch): method _eval_pref_step (line 123) | def _eval_pref_step(self, train_states, rng, batch): method train (line 182) | def train(self, batch): method _train_pref_step (line 190) | def _train_pref_step(self, train_states, rng, batch): method train_semi (line 255) | def train_semi(self, labeled_batch, unlabeled_batch, lmd, tau): method _train_semi_pref_step (line 263) | def _train_semi_pref_step(self, train_states, labeled_batch, unlabeled... method train_regression (line 348) | def train_regression(self, batch): method _train_regression_step (line 356) | def _train_regression_step(self, train_states, rng, batch): method model_keys (line 394) | def model_keys(self): method train_states (line 398) | def train_states(self): method train_params (line 402) | def train_params(self): method total_steps (line 406) | def total_steps(self): FILE: JaxPref/human_label_preprocess_adroit.py function set_seed (line 26) | def set_seed(env, seed): function qlearning_adroit_dataset (line 33) | def qlearning_adroit_dataset(env, dataset=None, terminate_on_end=False, ... class Dataset (line 128) | class Dataset(object): method __init__ (line 129) | def __init__( class D4RLDataset (line 152) | class D4RLDataset(Dataset): method __init__ (line 153) | def __init__(self, env: gym.Env, clip_to_eps: bool = True, eps: float ... function visualize_query (line 186) | def visualize_query( function main (line 248) | def main(_): FILE: JaxPref/human_label_preprocess_antmaze.py function set_seed (line 29) | def set_seed(env, seed): function qlearning_ant_dataset (line 36) | def qlearning_ant_dataset(env, dataset=None, terminate_on_end=False, **k... class Dataset (line 135) | class Dataset(object): method __init__ (line 136) | def __init__( class D4RLDataset (line 161) | class D4RLDataset(Dataset): method __init__ (line 162) | def __init__(self, env: gym.Env, clip_to_eps: bool = True, eps: float ... function visualize_query (line 196) | def visualize_query( function main (line 306) | def main(_): FILE: JaxPref/human_label_preprocess_mujoco.py function set_seed (line 27) | def set_seed(env, seed): function qlearning_mujoco_dataset (line 34) | def qlearning_mujoco_dataset(env, dataset=None, terminate_on_end=False, ... class Dataset (line 129) | class Dataset(object): method __init__ (line 130) | def __init__( class D4RLDataset (line 153) | class D4RLDataset(Dataset): method __init__ (line 154) | def __init__(self, env: gym.Env, clip_to_eps: bool = True, eps: float ... function visualize_query (line 187) | def visualize_query( function main (line 249) | def main(_): FILE: JaxPref/human_label_preprocess_robosuite.py function playback_trajectory_with_env (line 85) | def playback_trajectory_with_env( function playback_trajectory_with_obs (line 158) | def playback_trajectory_with_obs( function playback_dataset (line 223) | def playback_dataset(args): FILE: JaxPref/jax_utils.py class JaxRNG (line 6) | class JaxRNG(object): method __init__ (line 7) | def __init__(self, seed): method __call__ (line 10) | def __call__(self): function init_rng (line 15) | def init_rng(seed): function next_rng (line 20) | def next_rng(): function extend_and_repeat (line 25) | def extend_and_repeat(tensor, axis, repeat): function mse_loss (line 29) | def mse_loss(val, target): function cross_ent_loss (line 32) | def cross_ent_loss(logits, target): function kld_loss (line 44) | def kld_loss(p, q): function custom_softmax (line 47) | def custom_softmax(array, axis=-1, temperature=1.0): function pref_accuracy (line 52) | def pref_accuracy(logits, target): function value_and_multi_grad (line 57) | def value_and_multi_grad(fun, n_outputs, argnums=0, has_aux=False): function batch_to_jax (line 84) | def batch_to_jax(batch): FILE: JaxPref/model.py function multiple_action_q_function (line 14) | def multiple_action_q_function(forward): class FullyConnectedNetwork (line 30) | class FullyConnectedNetwork(nn.Module): method __call__ (line 38) | def __call__(self, input_tensor): class FullyConnectedQFunction (line 71) | class FullyConnectedQFunction(nn.Module): method __call__ (line 81) | def __call__(self, observations, actions): FILE: JaxPref/new_preference_reward_main.py function main (line 88) | def main(_): FILE: JaxPref/replay_buffer.py class ReplayBuffer (line 11) | class ReplayBuffer(object): method __init__ (line 12) | def __init__(self, max_size, data=None): method __len__ (line 24) | def __len__(self): method _init_storage (line 27) | def _init_storage(self, observation_dim, action_dim): method add_sample (line 39) | def add_sample(self, observation, action, reward, next_observation, do... method add_traj (line 54) | def add_traj(self, observations, actions, rewards, next_observations, ... method add_batch (line 58) | def add_batch(self, batch): method sample (line 64) | def sample(self, batch_size): method select (line 68) | def select(self, indices): method generator (line 77) | def generator(self, batch_size, n_batchs=None): method total_steps (line 84) | def total_steps(self): method data (line 88) | def data(self): function get_d4rl_dataset (line 98) | def get_d4rl_dataset(env): function index_batch (line 109) | def index_batch(batch, indices): function parition_batch_train_test (line 116) | def parition_batch_train_test(batch, train_ratio): function subsample_batch (line 123) | def subsample_batch(batch, size): function concatenate_batches (line 128) | def concatenate_batches(batches): function split_batch (line 135) | def split_batch(batch, batch_size): function split_data_by_traj (line 145) | def split_data_by_traj(data, max_traj_length): FILE: JaxPref/reward_transform.py function get_goal (line 10) | def get_goal(name): function new_get_trj_idx (line 20) | def new_get_trj_idx(env, terminate_on_end=False, **kwargs): function get_queries_from_multi (line 65) | def get_queries_from_multi(env, dataset, num_query, len_query, data_dir=... function find_time_idx (line 225) | def find_time_idx(trj_idx_list, idx): function load_queries_with_indices (line 231) | def load_queries_with_indices(env, dataset, num_query, len_query, label_... function qlearning_ant_dataset (line 349) | def qlearning_ant_dataset(env, dataset=None, terminate_on_end=False, **k... function qlearning_robosuite_dataset (line 437) | def qlearning_robosuite_dataset(dataset_path, terminate_on_end=False, **... FILE: JaxPref/sampler.py class StepSampler (line 4) | class StepSampler(object): method __init__ (line 6) | def __init__(self, env, max_traj_length=1000, reward_trans=None, act_f... method sample (line 15) | def sample(self, policy, n_steps, deterministic=False, replay_buffer=N... method env (line 60) | def env(self): class TrajSampler (line 64) | class TrajSampler(object): method __init__ (line 66) | def __init__(self, env, max_traj_length=1000, loco_flag=True): method sample (line 73) | def sample(self, policy, n_trajs, deterministic=False, replay_buffer=N... method env (line 126) | def env(self): FILE: JaxPref/utils.py class Timer (line 24) | class Timer(object): method __init__ (line 26) | def __init__(self): method __enter__ (line 29) | def __enter__(self): method __exit__ (line 33) | def __exit__(self, exc_type, exc_value, exc_tb): method __call__ (line 36) | def __call__(self): class WandBLogger (line 40) | class WandBLogger(object): method get_default_config (line 43) | def get_default_config(updates=None): method __init__ (line 59) | def __init__(self, config, variant): method log (line 98) | def log(self, *args, **kwargs): method save_pickle (line 101) | def save_pickle(self, obj, filename): method experiment_id (line 106) | def experiment_id(self): method variant (line 110) | def variant(self): method output_dir (line 114) | def output_dir(self): function define_flags_with_default (line 118) | def define_flags_with_default(**kwargs): function set_random_seed (line 136) | def set_random_seed(seed): function print_flags (line 142) | def print_flags(flags, flags_def): function get_user_flags (line 152) | def get_user_flags(flags, flags_def): function flatten_config_dict (line 164) | def flatten_config_dict(config, prefix=None): function save_pickle (line 178) | def save_pickle(obj, filename, output_dir): function prefix_metrics (line 182) | def prefix_metrics(metrics, prefix): FILE: actor.py function update (line 9) | def update(key: PRNGKey, actor: Model, critic: Model, value: Model, FILE: common.py function default_init (line 16) | def default_init(scale: Optional[float] = jnp.sqrt(2)): class MLP (line 28) | class MLP(nn.Module): method __call__ (line 35) | def __call__(self, x: jnp.ndarray, training: bool = False) -> jnp.ndar... class Model (line 47) | class Model: method create (line 56) | def create(cls, method __call__ (line 75) | def __call__(self, *args, **kwargs): method apply (line 78) | def apply(self, *args, **kwargs): method apply_gradient (line 81) | def apply_gradient(self, loss_fn) -> Tuple[Any, 'Model']: method save (line 93) | def save(self, save_path: str): method load (line 98) | def load(self, load_path: str) -> 'Model': FILE: configs/adroit_config.py function get_config (line 4) | def get_config(): FILE: configs/antmaze_config.py function get_config (line 4) | def get_config(): FILE: configs/antmaze_finetune_config.py function get_config (line 4) | def get_config(): FILE: configs/mujoco_config.py function get_config (line 4) | def get_config(): FILE: critic.py function loss (line 8) | def loss(diff, expectile=0.8): function update_v (line 13) | def update_v(critic: Model, value: Model, batch: Batch, function update_q (line 32) | def update_q(critic: Model, target_value: Model, batch: Batch, FILE: d4rl/d4rl/__init__.py function reverse_normalized_score (line 53) | def reverse_normalized_score(env_name, score): function get_normalized_score (line 58) | def get_normalized_score(env_name, score): function qlearning_dataset (line 63) | def qlearning_dataset(env, dataset=None, terminate_on_end=False, **kwargs): function sequence_dataset (line 141) | def sequence_dataset(env, dataset=None, **kwargs): FILE: d4rl/d4rl/carla/carla_env.py function is_within_distance (line 52) | def is_within_distance(target_location, current_location, orientation, m... function compute_distance (line 80) | def compute_distance(location_1, location_2): class CustomGlobalRoutePlanner (line 92) | class CustomGlobalRoutePlanner(GlobalRoutePlanner): method __init__ (line 93) | def __init__(self, dao): method compute_direction_velocities (line 96) | def compute_direction_velocities(self, origin, velocity, destination): method compute_distance (line 113) | def compute_distance(self, origin, destination): class CarlaSyncMode (line 130) | class CarlaSyncMode(object): method __init__ (line 139) | def __init__(self, world, *sensors, **kwargs): method start (line 149) | def start(self): method tick (line 165) | def tick(self, timeout): method __exit__ (line 171) | def __exit__(self, *args, **kwargs): method _retrieve_data (line 174) | def _retrieve_data(self, sensor_queue, timeout): class Sun (line 181) | class Sun(object): method __init__ (line 182) | def __init__(self, azimuth, altitude): method tick (line 187) | def tick(self, delta_seconds): method __str__ (line 195) | def __str__(self): class Storm (line 199) | class Storm(object): method __init__ (line 200) | def __init__(self, precipitation): method tick (line 210) | def tick(self, delta_seconds): method __str__ (line 226) | def __str__(self): class Weather (line 230) | class Weather(object): method __init__ (line 231) | def __init__(self, world, changing_weather_speed): method reset (line 239) | def reset(self): method tick (line 243) | def tick(self): method __str__ (line 256) | def __str__(self): function clamp (line 259) | def clamp(value, minimum=0.0, maximum=100.0): class CarlaEnv (line 263) | class CarlaEnv(object): method __init__ (line 267) | def __init__(self, render=False, carla_port=2000, record=False, record... method reset_init (line 406) | def reset_init(self): method reset (line 416) | def reset(self): method reset_vehicle (line 441) | def reset_vehicle(self): method reset_other_vehicles (line 462) | def reset_other_vehicles(self): method step (line 521) | def step(self, action=None, traffic_light_color=""): method _is_vehicle_hazard (line 533) | def _is_vehicle_hazard(self, vehicle, vehicle_list): method _is_object_hazard (line 563) | def _is_object_hazard(self, vehicle, object_list): method _is_light_red (line 593) | def _is_light_red(self, vehicle): method _get_trafficlight_trigger_location (line 629) | def _get_trafficlight_trigger_location(self, traffic_light): # pylint... method _get_collision_reward (line 652) | def _get_collision_reward(self, vehicle): method _get_traffic_light_reward (line 675) | def _get_traffic_light_reward(self, vehicle): method _get_object_collided_reward (line 679) | def _get_object_collided_reward(self, vehicle): method goal_reaching_reward (line 683) | def goal_reaching_reward(self, vehicle): method lane_follow_reward (line 718) | def lane_follow_reward(self, vehicle): method _simulator_step (line 821) | def _simulator_step(self, action, traffic_light_color): method finish (line 970) | def finish(self): class CarlaObsDictEnv (line 981) | class CarlaObsDictEnv(OfflineEnv): method __init__ (line 982) | def __init__(self, carla_args=None, carla_port=2000, reward_type='lane... method wrapped_env (line 998) | def wrapped_env(self): method reset (line 1001) | def reset(self, **kwargs): method step (line 1009) | def step(self, action): method render (line 1018) | def render(self, *args, **kwargs): method horizon (line 1022) | def horizon(self): method terminate (line 1025) | def terminate(self): method __getattr__ (line 1029) | def __getattr__(self, attr): method __getstate__ (line 1034) | def __getstate__(self): method __setstate__ (line 1044) | def __setstate__(self, state): method __str__ (line 1047) | def __str__(self): class CarlaObsEnv (line 1051) | class CarlaObsEnv(OfflineEnv): method __init__ (line 1052) | def __init__(self, carla_args=None, carla_port=2000, reward_type='lane... method wrapped_env (line 1064) | def wrapped_env(self): method reset (line 1067) | def reset(self, **kwargs): method step (line 1075) | def step(self, action): method render (line 1085) | def render(self, *args, **kwargs): method horizon (line 1089) | def horizon(self): method terminate (line 1092) | def terminate(self): method __getattr__ (line 1096) | def __getattr__(self, attr): method __getstate__ (line 1101) | def __getstate__(self): method __setstate__ (line 1111) | def __setstate__(self, state): method __str__ (line 1114) | def __str__(self): FILE: d4rl/d4rl/carla/data_collection_agent_lane.py function is_within_distance (line 56) | def is_within_distance(target_location, current_location, orientation, m... function compute_distance (line 85) | def compute_distance(location_1, location_2): class CarlaSyncMode (line 98) | class CarlaSyncMode(object): method __init__ (line 109) | def __init__(self, world, *sensors, **kwargs): method start (line 119) | def start(self): method tick (line 135) | def tick(self, timeout): method __exit__ (line 141) | def __exit__(self, *args, **kwargs): method _retrieve_data (line 144) | def _retrieve_data(self, sensor_queue, timeout): function draw_image (line 151) | def draw_image(surface, image, blend=False): function get_font (line 162) | def get_font(): function should_quit (line 170) | def should_quit(): function clamp (line 180) | def clamp(value, minimum=0.0, maximum=100.0): class Sun (line 184) | class Sun(object): method __init__ (line 185) | def __init__(self, azimuth, altitude): method tick (line 190) | def tick(self, delta_seconds): method __str__ (line 198) | def __str__(self): class Storm (line 202) | class Storm(object): method __init__ (line 203) | def __init__(self, precipitation): method tick (line 213) | def tick(self, delta_seconds): method __str__ (line 229) | def __str__(self): class Weather (line 233) | class Weather(object): method __init__ (line 234) | def __init__(self, world, changing_weather_speed): method reset (line 242) | def reset(self): method tick (line 246) | def tick(self): method __str__ (line 259) | def __str__(self): function parse_args (line 263) | def parse_args(): class LocalPlannerModified (line 277) | class LocalPlannerModified(LocalPlanner): method __del__ (line 279) | def __del__(self): method run_step (line 282) | def run_step(self): class RoamingAgent (line 286) | class RoamingAgent(Agent): method __init__ (line 296) | def __init__(self, env): method compute_action (line 309) | def compute_action(self): method run_step (line 320) | def run_step(self): method _is_light_red_europe_style (line 358) | def _is_light_red_europe_style(self, lights_list): method _is_light_red_us_style (line 391) | def _is_light_red_us_style(self, lights_list, debug=False): FILE: d4rl/d4rl/carla/data_collection_town.py function is_within_distance (line 56) | def is_within_distance(target_location, current_location, orientation, m... function compute_distance (line 84) | def compute_distance(location_1, location_2): class CustomGlobalRoutePlanner (line 96) | class CustomGlobalRoutePlanner(GlobalRoutePlanner): method __init__ (line 97) | def __init__(self, dao): method compute_direction_velocities (line 110) | def compute_direction_velocities(self, origin, velocity, destination): method compute_distance (line 128) | def compute_distance(self, origin, destination): class CarlaSyncMode (line 144) | class CarlaSyncMode(object): method __init__ (line 155) | def __init__(self, world, *sensors, **kwargs): method start (line 165) | def start(self): method tick (line 181) | def tick(self, timeout): method __exit__ (line 187) | def __exit__(self, *args, **kwargs): method _retrieve_data (line 190) | def _retrieve_data(self, sensor_queue, timeout): function draw_image (line 197) | def draw_image(surface, image, blend=False): function get_font (line 208) | def get_font(): function should_quit (line 216) | def should_quit(): function clamp (line 226) | def clamp(value, minimum=0.0, maximum=100.0): class Sun (line 230) | class Sun(object): method __init__ (line 231) | def __init__(self, azimuth, altitude): method tick (line 236) | def tick(self, delta_seconds): method __str__ (line 244) | def __str__(self): class Storm (line 248) | class Storm(object): method __init__ (line 249) | def __init__(self, precipitation): method tick (line 259) | def tick(self, delta_seconds): method __str__ (line 275) | def __str__(self): class Weather (line 279) | class Weather(object): method __init__ (line 280) | def __init__(self, world, changing_weather_speed): method reset (line 288) | def reset(self): method tick (line 292) | def tick(self): method __str__ (line 305) | def __str__(self): function parse_args (line 309) | def parse_args(): class CarlaEnv (line 323) | class CarlaEnv(object): method __init__ (line 325) | def __init__(self, args): method reset_init (line 471) | def reset_init(self): method reset (line 480) | def reset(self): method reset_vehicle (line 485) | def reset_vehicle(self): method reset_other_vehicles (line 507) | def reset_other_vehicles(self): method compute_action (line 563) | def compute_action(self): method step (line 566) | def step(self, action=None, traffic_light_color=""): method _is_vehicle_hazard (line 575) | def _is_vehicle_hazard(self, vehicle, vehicle_list): method _is_object_hazard (line 605) | def _is_object_hazard(self, vehicle, object_list): method _is_light_red (line 635) | def _is_light_red(self, vehicle): method _get_trafficlight_trigger_location (line 671) | def _get_trafficlight_trigger_location(self, traffic_light): # pylint... method _get_collision_reward (line 694) | def _get_collision_reward(self, vehicle): method _get_traffic_light_reward (line 698) | def _get_traffic_light_reward(self, vehicle): method _get_object_collided_reward (line 702) | def _get_object_collided_reward(self, vehicle): method goal_reaching_reward (line 706) | def goal_reaching_reward(self, vehicle): method _simulator_step (line 746) | def _simulator_step(self, action, traffic_light_color): method finish (line 900) | def finish(self): class LocalPlannerModified (line 911) | class LocalPlannerModified(LocalPlanner): method __del__ (line 913) | def __del__(self): method run_step (line 916) | def run_step(self): class RoamingAgent (line 920) | class RoamingAgent(Agent): method __init__ (line 928) | def __init__(self, vehicle, follow_traffic_lights=True): method run_step (line 939) | def run_step(self): method _is_light_red_europe_style (line 976) | def _is_light_red_europe_style(self, lights_list): method _is_light_red_us_style (line 1009) | def _is_light_red_us_style(self, lights_list, debug=False): FILE: d4rl/d4rl/carla/town_agent.py class RoamingAgent (line 6) | class RoamingAgent(Agent): method __init__ (line 16) | def __init__(self, env): method compute_action (line 29) | def compute_action(self): method run_step (line 40) | def run_step(self): class LocalPlannerModified (line 79) | class LocalPlannerModified(LocalPlanner): method __del__ (line 81) | def __del__(self): method run_step (line 84) | def run_step(self): class DummyTownAgent (line 88) | class DummyTownAgent(Agent): method __init__ (line 96) | def __init__(self, env): method compute_action (line 106) | def compute_action(self): FILE: d4rl/d4rl/flow/__init__.py function flow_register (line 30) | def flow_register(flow_params, render=None, **kwargs): function ring_env (line 71) | def ring_env(render='drgb'): FILE: d4rl/d4rl/flow/bottleneck.py function bottleneck (line 15) | def bottleneck(render='drgb'): FILE: d4rl/d4rl/flow/merge.py function gen_env (line 14) | def gen_env(render='drgb'): FILE: d4rl/d4rl/flow/traffic_light_grid.py function gen_env (line 9) | def gen_env(render='drgb'): FILE: d4rl/d4rl/gym_bullet/gym_envs.py class OfflineAntEnv (line 5) | class OfflineAntEnv(AntBulletEnv, offline_env.OfflineEnv): method __init__ (line 6) | def __init__(self, **kwargs): class OfflineHopperEnv (line 10) | class OfflineHopperEnv(HopperBulletEnv, offline_env.OfflineEnv): method __init__ (line 11) | def __init__(self, **kwargs): class OfflineHalfCheetahEnv (line 15) | class OfflineHalfCheetahEnv(HalfCheetahBulletEnv, offline_env.OfflineEnv): method __init__ (line 16) | def __init__(self, **kwargs): class OfflineWalker2dEnv (line 20) | class OfflineWalker2dEnv(Walker2DBulletEnv, offline_env.OfflineEnv): method __init__ (line 21) | def __init__(self, **kwargs): function get_ant_env (line 26) | def get_ant_env(**kwargs): function get_halfcheetah_env (line 29) | def get_halfcheetah_env(**kwargs): function get_hopper_env (line 32) | def get_hopper_env(**kwargs): function get_walker2d_env (line 35) | def get_walker2d_env(**kwargs): FILE: d4rl/d4rl/gym_minigrid/envs/empty.py class EmptyEnv (line 4) | class EmptyEnv(MiniGridEnv): method __init__ (line 9) | def __init__( method _gen_grid (line 25) | def _gen_grid(self, width, height): class EmptyEnv5x5 (line 44) | class EmptyEnv5x5(EmptyEnv): method __init__ (line 45) | def __init__(self): class EmptyRandomEnv5x5 (line 48) | class EmptyRandomEnv5x5(EmptyEnv): method __init__ (line 49) | def __init__(self): class EmptyEnv6x6 (line 52) | class EmptyEnv6x6(EmptyEnv): method __init__ (line 53) | def __init__(self): class EmptyRandomEnv6x6 (line 56) | class EmptyRandomEnv6x6(EmptyEnv): method __init__ (line 57) | def __init__(self): class EmptyEnv16x16 (line 60) | class EmptyEnv16x16(EmptyEnv): method __init__ (line 61) | def __init__(self): FILE: d4rl/d4rl/gym_minigrid/envs/fourrooms.py class FourRoomsEnv (line 8) | class FourRoomsEnv(MiniGridEnv): method __init__ (line 14) | def __init__(self, agent_pos=None, goal_pos=None, **kwargs): method get_target (line 21) | def get_target(self): method _gen_grid (line 24) | def _gen_grid(self, width, height): method step (line 76) | def step(self, action): FILE: d4rl/d4rl/gym_minigrid/fourroom_controller.py class FourRoomController (line 43) | class FourRoomController(object): method __init__ (line 44) | def __init__(self): method sample_target (line 48) | def sample_target(self): method set_target (line 51) | def set_target(self, target): method get_action (line 57) | def get_action(self, pos, orientation): function get_turn (line 83) | def get_turn(ori, tgt_ori): FILE: d4rl/d4rl/gym_minigrid/minigrid.py class WorldObj (line 73) | class WorldObj: method __init__ (line 78) | def __init__(self, type, color): method can_overlap (line 91) | def can_overlap(self): method can_pickup (line 95) | def can_pickup(self): method can_contain (line 99) | def can_contain(self): method see_behind (line 103) | def see_behind(self): method toggle (line 107) | def toggle(self, env, pos): method encode (line 111) | def encode(self): method decode (line 116) | def decode(type_idx, color_idx, state): method render (line 150) | def render(self, r): class Goal (line 154) | class Goal(WorldObj): method __init__ (line 155) | def __init__(self): method can_overlap (line 158) | def can_overlap(self): method render (line 161) | def render(self, img): class Floor (line 164) | class Floor(WorldObj): method __init__ (line 169) | def __init__(self, color='blue'): method can_overlap (line 172) | def can_overlap(self): method render (line 175) | def render(self, r): class Lava (line 187) | class Lava(WorldObj): method __init__ (line 188) | def __init__(self): method can_overlap (line 191) | def can_overlap(self): method render (line 194) | def render(self, img): class Wall (line 209) | class Wall(WorldObj): method __init__ (line 210) | def __init__(self, color='grey'): method see_behind (line 213) | def see_behind(self): method render (line 216) | def render(self, img): class Door (line 219) | class Door(WorldObj): method __init__ (line 220) | def __init__(self, color, is_open=False, is_locked=False): method can_overlap (line 225) | def can_overlap(self): method see_behind (line 229) | def see_behind(self): method toggle (line 232) | def toggle(self, env, pos): method encode (line 244) | def encode(self): method render (line 257) | def render(self, img): class Key (line 281) | class Key(WorldObj): method __init__ (line 282) | def __init__(self, color='blue'): method can_pickup (line 285) | def can_pickup(self): method render (line 288) | def render(self, img): class Ball (line 302) | class Ball(WorldObj): method __init__ (line 303) | def __init__(self, color='blue'): method can_pickup (line 306) | def can_pickup(self): method render (line 309) | def render(self, img): class Box (line 312) | class Box(WorldObj): method __init__ (line 313) | def __init__(self, color, contains=None): method can_pickup (line 317) | def can_pickup(self): method render (line 320) | def render(self, img): method toggle (line 330) | def toggle(self, env, pos): class Grid (line 335) | class Grid: method __init__ (line 343) | def __init__(self, width, height): method __contains__ (line 352) | def __contains__(self, key): method __eq__ (line 367) | def __eq__(self, other): method __ne__ (line 372) | def __ne__(self, other): method copy (line 375) | def copy(self): method set (line 379) | def set(self, i, j, v): method get (line 384) | def get(self, i, j): method horz_wall (line 389) | def horz_wall(self, x, y, length=None, obj_type=Wall): method vert_wall (line 395) | def vert_wall(self, x, y, length=None, obj_type=Wall): method wall_rect (line 401) | def wall_rect(self, x, y, w, h): method rotate_left (line 407) | def rotate_left(self): method slice (line 421) | def slice(self, topX, topY, width, height): method render_tile (line 444) | def render_tile( method render (line 496) | def render( method encode (line 539) | def encode(self, vis_mask=None): method decode (line 565) | def decode(array): method process_vis (line 585) | def process_vis(grid, agent_pos): class MiniGridEnv (line 624) | class MiniGridEnv(offline_env.OfflineEnv): class Actions (line 635) | class Actions(IntEnum): method __init__ (line 651) | def __init__( method reset (line 712) | def reset(self): method seed (line 740) | def seed(self, seed=1337): method steps_remaining (line 746) | def steps_remaining(self): method __str__ (line 749) | def __str__(self): method _gen_grid (line 810) | def _gen_grid(self, width, height): method _reward (line 813) | def _reward(self): method _rand_int (line 820) | def _rand_int(self, low, high): method _rand_float (line 827) | def _rand_float(self, low, high): method _rand_bool (line 834) | def _rand_bool(self): method _rand_elem (line 841) | def _rand_elem(self, iterable): method _rand_subset (line 850) | def _rand_subset(self, iterable, num_elems): method _rand_color (line 867) | def _rand_color(self): method _rand_pos (line 874) | def _rand_pos(self, xLow, xHigh, yLow, yHigh): method place_obj (line 884) | def place_obj(self, method put_obj (line 944) | def put_obj(self, obj, i, j): method place_agent (line 953) | def place_agent( method dir_vec (line 974) | def dir_vec(self): method right_vec (line 984) | def right_vec(self): method front_pos (line 993) | def front_pos(self): method get_view_coords (line 1000) | def get_view_coords(self, i, j): method get_view_exts (line 1027) | def get_view_exts(self): method relative_coords (line 1057) | def relative_coords(self, x, y): method in_view (line 1069) | def in_view(self, x, y): method agent_sees (line 1076) | def agent_sees(self, x, y): method step (line 1093) | def step(self, action): method gen_obs_grid (line 1159) | def gen_obs_grid(self): method gen_obs (line 1191) | def gen_obs(self): method get_obs_render (line 1215) | def get_obs_render(self, obs, tile_size=TILE_PIXELS//2): method render (line 1232) | def render(self, mode='human', close=False, highlight=True, tile_size=... FILE: d4rl/d4rl/gym_minigrid/register.py function register (line 5) | def register( FILE: d4rl/d4rl/gym_minigrid/rendering.py function downsample (line 4) | def downsample(img, factor): function fill_coords (line 18) | def fill_coords(img, fn, color): function rotate_fn (line 32) | def rotate_fn(fin, cx, cy, theta): function point_in_line (line 44) | def point_in_line(x0, y0, x1, y1, r): function point_in_circle (line 74) | def point_in_circle(cx, cy, r): function point_in_rect (line 79) | def point_in_rect(xmin, xmax, ymin, ymax): function point_in_triangle (line 84) | def point_in_triangle(a, b, c): function highlight_img (line 111) | def highlight_img(img, color=(255, 255, 255), alpha=0.30): FILE: d4rl/d4rl/gym_minigrid/roomgrid.py function reject_next_to (line 3) | def reject_next_to(env, pos): class Room (line 14) | class Room: method __init__ (line 15) | def __init__( method rand_pos (line 39) | def rand_pos(self, env): method pos_inside (line 47) | def pos_inside(self, x, y): class RoomGrid (line 63) | class RoomGrid(MiniGridEnv): method __init__ (line 69) | def __init__( method room_from_pos (line 99) | def room_from_pos(self, x, y): method get_room (line 113) | def get_room(self, i, j): method _gen_grid (line 118) | def _gen_grid(self, width, height): method place_in_room (line 171) | def place_in_room(self, i, j, obj): method add_object (line 190) | def add_object(self, i, j, kind=None, color=None): method add_door (line 212) | def add_door(self, i, j, door_idx=None, color=None, locked=None): method remove_wall (line 248) | def remove_wall(self, i, j, wall_idx): method place_agent (line 284) | def place_agent(self, i=None, j=None, rand_dir=True): method connect_all (line 305) | def connect_all(self, door_colors=COLOR_NAMES, max_itrs=5000): method add_distractors (line 361) | def add_distractors(self, i=None, j=None, num_distractors=10, all_uniq... FILE: d4rl/d4rl/gym_minigrid/window.py class Window (line 12) | class Window: method __init__ (line 17) | def __init__(self, title): method show_img (line 40) | def show_img(self, img): method set_caption (line 56) | def set_caption(self, text): method reg_key_handler (line 63) | def reg_key_handler(self, key_handler): method show (line 71) | def show(self, block=True): method close (line 85) | def close(self): FILE: d4rl/d4rl/gym_minigrid/wrappers.py class ReseedWrapper (line 10) | class ReseedWrapper(gym.core.Wrapper): method __init__ (line 17) | def __init__(self, env, seeds=[0], seed_idx=0): method reset (line 22) | def reset(self, **kwargs): method step (line 28) | def step(self, action): class ActionBonus (line 32) | class ActionBonus(gym.core.Wrapper): method __init__ (line 39) | def __init__(self, env): method step (line 43) | def step(self, action): method reset (line 63) | def reset(self, **kwargs): class StateBonus (line 66) | class StateBonus(gym.core.Wrapper): method __init__ (line 72) | def __init__(self, env): method step (line 76) | def step(self, action): method reset (line 98) | def reset(self, **kwargs): class ImgObsWrapper (line 101) | class ImgObsWrapper(gym.core.ObservationWrapper): method __init__ (line 106) | def __init__(self, env): method observation (line 110) | def observation(self, obs): class OneHotPartialObsWrapper (line 113) | class OneHotPartialObsWrapper(gym.core.ObservationWrapper): method __init__ (line 119) | def __init__(self, env, tile_size=8): method observation (line 136) | def observation(self, obs): class RGBImgObsWrapper (line 155) | class RGBImgObsWrapper(gym.core.ObservationWrapper): method __init__ (line 162) | def __init__(self, env, tile_size=8): method observation (line 174) | def observation(self, obs): class RGBImgPartialObsWrapper (line 189) | class RGBImgPartialObsWrapper(gym.core.ObservationWrapper): method __init__ (line 195) | def __init__(self, env, tile_size=8): method observation (line 208) | def observation(self, obs): class FullyObsWrapper (line 221) | class FullyObsWrapper(gym.core.ObservationWrapper): method __init__ (line 226) | def __init__(self, env): method observation (line 236) | def observation(self, obs): class FlatObsWrapper (line 250) | class FlatObsWrapper(gym.core.ObservationWrapper): method __init__ (line 256) | def __init__(self, env, maxStrLen=96): method observation (line 275) | def observation(self, obs): class ViewSizeWrapper (line 301) | class ViewSizeWrapper(gym.core.Wrapper): method __init__ (line 307) | def __init__(self, env, agent_view_size=7): method reset (line 326) | def reset(self, **kwargs): method step (line 329) | def step(self, action): FILE: d4rl/d4rl/gym_mujoco/gym_envs.py class OfflineAntEnv (line 5) | class OfflineAntEnv(AntEnv, offline_env.OfflineEnv): method __init__ (line 6) | def __init__(self, **kwargs): class OfflineHopperEnv (line 10) | class OfflineHopperEnv(HopperEnv, offline_env.OfflineEnv): method __init__ (line 11) | def __init__(self, **kwargs): class OfflineHalfCheetahEnv (line 15) | class OfflineHalfCheetahEnv(HalfCheetahEnv, offline_env.OfflineEnv): method __init__ (line 16) | def __init__(self, **kwargs): class OfflineWalker2dEnv (line 20) | class OfflineWalker2dEnv(Walker2dEnv, offline_env.OfflineEnv): method __init__ (line 21) | def __init__(self, **kwargs): function get_ant_env (line 26) | def get_ant_env(**kwargs): function get_cheetah_env (line 29) | def get_cheetah_env(**kwargs): function get_hopper_env (line 32) | def get_hopper_env(**kwargs): function get_walker_env (line 35) | def get_walker_env(**kwargs): FILE: d4rl/d4rl/hand_manipulation_suite/door_v0.py class DoorEnvV0 (line 11) | class DoorEnvV0(mujoco_env.MujocoEnv, utils.EzPickle, offline_env.Offlin... method __init__ (line 12) | def __init__(self, **kwargs): method step (line 39) | def step(self, a): method get_obs (line 71) | def get_obs(self): method reset_model (line 86) | def reset_model(self): method get_env_state (line 97) | def get_env_state(self): method set_env_state (line 106) | def set_env_state(self, state_dict): method mj_viewer_setup (line 116) | def mj_viewer_setup(self): method evaluate_success (line 122) | def evaluate_success(self, paths): FILE: d4rl/d4rl/hand_manipulation_suite/hammer_v0.py class HammerEnvV0 (line 12) | class HammerEnvV0(mujoco_env.MujocoEnv, utils.EzPickle, offline_env.Offl... method __init__ (line 13) | def __init__(self, **kwargs): method step (line 42) | def step(self, a): method get_obs (line 80) | def get_obs(self): method reset_model (line 93) | def reset_model(self): method get_env_state (line 100) | def get_env_state(self): method set_env_state (line 110) | def set_env_state(self, state_dict): method mj_viewer_setup (line 121) | def mj_viewer_setup(self): method evaluate_success (line 127) | def evaluate_success(self, paths): FILE: d4rl/d4rl/hand_manipulation_suite/pen_v0.py class PenEnvV0 (line 12) | class PenEnvV0(mujoco_env.MujocoEnv, utils.EzPickle, offline_env.Offline... method __init__ (line 13) | def __init__(self, **kwargs): method step (line 54) | def step(self, a): method get_obs (line 93) | def get_obs(self): method reset_model (line 103) | def reset_model(self): method get_env_state (line 114) | def get_env_state(self): method set_env_state (line 123) | def set_env_state(self, state_dict): method mj_viewer_setup (line 134) | def mj_viewer_setup(self): method evaluate_success (line 140) | def evaluate_success(self, paths): FILE: d4rl/d4rl/hand_manipulation_suite/relocate_v0.py class RelocateEnvV0 (line 11) | class RelocateEnvV0(mujoco_env.MujocoEnv, utils.EzPickle, offline_env.Of... method __init__ (line 12) | def __init__(self, **kwargs): method step (line 36) | def step(self, a): method get_obs (line 64) | def get_obs(self): method reset_model (line 74) | def reset_model(self): method get_env_state (line 86) | def get_env_state(self): method set_env_state (line 99) | def set_env_state(self, state_dict): method mj_viewer_setup (line 112) | def mj_viewer_setup(self): method evaluate_success (line 118) | def evaluate_success(self, paths): FILE: d4rl/d4rl/kitchen/adept_envs/base_robot.py class BaseRobot (line 20) | class BaseRobot(object): method __init__ (line 23) | def __init__(self, method n_jnt (line 85) | def n_jnt(self): method n_obj (line 89) | def n_obj(self): method n_dofs (line 93) | def n_dofs(self): method pos_bounds (line 97) | def pos_bounds(self): method vel_bounds (line 101) | def vel_bounds(self): method is_hardware (line 105) | def is_hardware(self): method device_name (line 109) | def device_name(self): method calibration_path (line 113) | def calibration_path(self): method overlay (line 117) | def overlay(self): method has_obj (line 121) | def has_obj(self): method calibration_mode (line 125) | def calibration_mode(self): method observation_cache_maxsize (line 129) | def observation_cache_maxsize(self): method observation_cache (line 133) | def observation_cache(self): method clip_positions (line 137) | def clip_positions(self, positions): FILE: d4rl/d4rl/kitchen/adept_envs/franka/kitchen_multitask_v0.py class KitchenV0 (line 26) | class KitchenV0(robot_env.RobotEnv): method __init__ (line 40) | def __init__(self, robot_params={}, frame_skip=40): method _get_reward_n_score (line 84) | def _get_reward_n_score(self, obs_dict): method step (line 87) | def step(self, a, b=None): method _get_obs (line 118) | def _get_obs(self): method reset_model (line 132) | def reset_model(self): method evaluate_success (line 140) | def evaluate_success(self, paths): method close_env (line 158) | def close_env(self): method set_goal (line 161) | def set_goal(self, goal): method _get_task_goal (line 164) | def _get_task_goal(self): method goal_space (line 169) | def goal_space(self): method convert_to_active_observation (line 174) | def convert_to_active_observation(self, observation): class KitchenTaskRelaxV1 (line 177) | class KitchenTaskRelaxV1(KitchenV0): method __init__ (line 180) | def __init__(self): method _get_reward_n_score (line 183) | def _get_reward_n_score(self, obs_dict): method render (line 191) | def render(self, mode='human'): FILE: d4rl/d4rl/kitchen/adept_envs/franka/robot/franka_robot.py class Robot (line 35) | class Robot(base_robot.BaseRobot): method __init__ (line 42) | def __init__(self, *args, **kwargs): method _read_specs_from_config (line 77) | def _read_specs_from_config(self, robot_configs): method _de_calib (line 104) | def _de_calib(self, qp_mj, qv_mj=None): method _calib (line 113) | def _calib(self, qp_ad, qv_ad): method _observation_cache_refresh (line 120) | def _observation_cache_refresh(self, env): method get_obs_from_cache (line 125) | def get_obs_from_cache(self, env, index=-1): method get_obs (line 137) | def get_obs(self, env, robot_noise_ratio=1, object_noise_ratio=1, sim_... method ctrl_position_limits (line 172) | def ctrl_position_limits(self, ctrl_position): method step (line 178) | def step(self, env, ctrl_desired, step_duration, sim_override=False): method reset (line 210) | def reset(self, env, reset_pose, reset_vel, overlay_mimic_reset_pose=T... method close (line 232) | def close(self): class Robot_PosAct (line 242) | class Robot_PosAct(Robot): method ctrl_velocity_limits (line 246) | def ctrl_velocity_limits(self, ctrl_position, step_duration): class Robot_VelAct (line 255) | class Robot_VelAct(Robot): method ctrl_velocity_limits (line 259) | def ctrl_velocity_limits(self, ctrl_velocity, step_duration): FILE: d4rl/d4rl/kitchen/adept_envs/mujoco_env.py class MujocoEnv (line 37) | class MujocoEnv(gym.Env): method __init__ (line 40) | def __init__(self, method seed (line 106) | def seed(self, seed=None): # Compatibility with new gym method _seed (line 109) | def _seed(self, seed=None): method reset_model (line 116) | def reset_model(self): method reset (line 125) | def reset(self): # compatibility with new gym method _reset (line 128) | def _reset(self): method set_state (line 134) | def set_state(self, qpos, qvel): method dt (line 145) | def dt(self): method do_simulation (line 148) | def do_simulation(self, ctrl, n_frames): method render (line 159) | def render(self, method close (line 191) | def close(self): method mj_render (line 194) | def mj_render(self): method state_vector (line 198) | def state_vector(self): FILE: d4rl/d4rl/kitchen/adept_envs/robot_env.py class RobotEnv (line 33) | class RobotEnv(mujoco_env.MujocoEnv): method __init__ (line 46) | def __init__(self, method robot (line 86) | def robot(self): method n_jnt (line 90) | def n_jnt(self): method n_obj (line 94) | def n_obj(self): method skip (line 98) | def skip(self): method initializing (line 103) | def initializing(self): method close_env (line 106) | def close_env(self): method make_robot (line 110) | def make_robot(self, FILE: d4rl/d4rl/kitchen/adept_envs/simulation/module.py function get_mujoco_py (line 30) | def get_mujoco_py(): function get_mujoco_py_mjlib (line 50) | def get_mujoco_py_mjlib(): function get_dm_mujoco (line 67) | def get_dm_mujoco(): function get_dm_viewer (line 84) | def get_dm_viewer(): function get_dm_render (line 101) | def get_dm_render(): function _mj_warning_fn (line 123) | def _mj_warning_fn(warn_data: bytes): FILE: d4rl/d4rl/kitchen/adept_envs/simulation/renderer.py class RenderMode (line 37) | class RenderMode(enum.Enum): class Renderer (line 44) | class Renderer(abc.ABC): method __init__ (line 47) | def __init__(self, camera_settings: Optional[Dict] = None): method close (line 51) | def close(self): method render_to_window (line 55) | def render_to_window(self): method render_offscreen (line 59) | def render_offscreen(self, method _update_camera (line 77) | def _update_camera(self, camera): class MjPyRenderer (line 96) | class MjPyRenderer(Renderer): method __init__ (line 99) | def __init__(self, sim, **kwargs): method render_to_window (line 107) | def render_to_window(self): method render_offscreen (line 115) | def render_offscreen(self, method close (line 154) | def close(self): class DMRenderer (line 158) | class DMRenderer(Renderer): method __init__ (line 161) | def __init__(self, physics, **kwargs): method render_to_window (line 175) | def render_to_window(self): method render_offscreen (line 188) | def render_offscreen(self, method close (line 225) | def close(self): class DMRenderWindow (line 232) | class DMRenderWindow: method __init__ (line 235) | def __init__(self, method camera (line 255) | def camera(self): method close (line 258) | def close(self): method load_model (line 264) | def load_model(self, physics): method run_frame (line 275) | def run_frame(self): FILE: d4rl/d4rl/kitchen/adept_envs/simulation/sim_robot.py class MujocoSimRobot (line 26) | class MujocoSimRobot: method __init__ (line 35) | def __init__(self, method close (line 75) | def close(self): method save_binary (line 79) | def save_binary(self, path: str): method get_mjlib (line 92) | def get_mjlib(self): method _patch_mjlib_accessors (line 99) | def _patch_mjlib_accessors(self, model, data): FILE: d4rl/d4rl/kitchen/adept_envs/utils/config.py function read_config_from_node (line 37) | def read_config_from_node(root_node, parent_name, child_name, dtype=int): function get_config_root_node (line 53) | def get_config_root_node(config_file_name=None, config_file_data=None): function read_config_from_xml (line 73) | def read_config_from_xml(config_file_name, parent_name, child_name, dtyp... FILE: d4rl/d4rl/kitchen/adept_envs/utils/configurable.py function import_class_from_path (line 24) | def import_class_from_path(class_path): class ConfigCache (line 31) | class ConfigCache(object): method __init__ (line 37) | def __init__(self): method set_default_config (line 41) | def set_default_config(self, config): method set_config (line 45) | def set_config(self, cls_or_env_id, config): method get_config (line 56) | def get_config(self, cls_or_env_id): method clear_config (line 68) | def clear_config(self, cls_or_env_id): method _get_config_key (line 74) | def _get_config_key(self, cls_or_env_id): function configurable (line 92) | def configurable(config_id=None, pickleable=False, config_cache=global_c... FILE: d4rl/d4rl/kitchen/adept_envs/utils/parse_demos.py function viewer (line 32) | def viewer(env, function render_demos (line 64) | def render_demos(env, data, filename='demo_rendering.mp4', render=None): function gather_training_data (line 84) | def gather_training_data(env, data, filename='demo_playback.mp4', render... function main (line 167) | def main(env, demo_dir, skip, graph, save_logs, view, render): FILE: d4rl/d4rl/kitchen/adept_envs/utils/quatmath.py function mulQuat (line 23) | def mulQuat(qa, qb): function negQuat (line 31) | def negQuat(quat): function quat2Vel (line 34) | def quat2Vel(quat, dt=1): function quatDiff2Vel (line 41) | def quatDiff2Vel(quat1, quat2, dt): function axis_angle2quat (line 47) | def axis_angle2quat(axis, angle): function euler2mat (line 52) | def euler2mat(euler): function euler2quat (line 76) | def euler2quat(euler): function mat2euler (line 95) | def mat2euler(mat): function mat2quat (line 115) | def mat2quat(mat): function quat2euler (line 152) | def quat2euler(quat): function quat2mat (line 157) | def quat2mat(quat): FILE: d4rl/d4rl/kitchen/kitchen_envs.py class KitchenBase (line 30) | class KitchenBase(KitchenTaskRelaxV1, OfflineEnv): method __init__ (line 37) | def __init__(self, dataset_url=None, ref_max_score=None, ref_min_score... method _get_task_goal (line 46) | def _get_task_goal(self): method reset_model (line 55) | def reset_model(self): method _get_reward_n_score (line 59) | def _get_reward_n_score(self, obs_dict): method step (line 83) | def step(self, a, b=None): method render (line 89) | def render(self, mode='human'): class KitchenMicrowaveKettleLightSliderV0 (line 94) | class KitchenMicrowaveKettleLightSliderV0(KitchenBase): class KitchenMicrowaveKettleBottomBurnerLightV0 (line 97) | class KitchenMicrowaveKettleBottomBurnerLightV0(KitchenBase): FILE: d4rl/d4rl/locomotion/ant.py class AntEnv (line 36) | class AntEnv(mujoco_env.MujocoEnv, utils.EzPickle): method __init__ (line 40) | def __init__(self, file_path=None, expose_all_qpos=False, method physics (line 57) | def physics(self): method _step (line 66) | def _step(self, a): method step (line 69) | def step(self, a): method _get_obs (line 90) | def _get_obs(self): method reset_model (line 120) | def reset_model(self): method viewer_setup (line 136) | def viewer_setup(self): method get_xy (line 139) | def get_xy(self): method set_xy (line 142) | def set_xy(self, xy): class GoalReachingAntEnv (line 150) | class GoalReachingAntEnv(goal_reaching_env.GoalReachingEnv, AntEnv): method __init__ (line 154) | def __init__(self, goal_sampler=goal_reaching_env.disk_goal_sampler, class AntMazeEnv (line 165) | class AntMazeEnv(maze_env.MazeEnv, GoalReachingAntEnv, offline_env.Offli... method __init__ (line 169) | def __init__(self, goal_sampler=None, expose_all_qpos=True, method reset (line 186) | def reset(self): method set_target (line 204) | def set_target(self, target_location=None): method seed (line 207) | def seed(self, seed=0): function make_ant_maze_env (line 210) | def make_ant_maze_env(**kwargs): FILE: d4rl/d4rl/locomotion/common.py function run_policy_on_env (line 3) | def run_policy_on_env(policy_fn, env, truncate_episode_at=None, FILE: d4rl/d4rl/locomotion/generate_dataset.py function reset_data (line 15) | def reset_data(): function append_data (line 25) | def append_data(data, s, a, r, tgt, done, env_data): function npify (line 34) | def npify(data): function load_policy (line 43) | def load_policy(policy_file): function save_video (line 53) | def save_video(save_dir, file_name, frames, episode_id=0): function main (line 62) | def main(): FILE: d4rl/d4rl/locomotion/goal_reaching_env.py function disk_goal_sampler (line 4) | def disk_goal_sampler(np_random, goal_region_radius=10.): function constant_goal_sampler (line 9) | def constant_goal_sampler(np_random, location=10.0 * np.ones([2])): class GoalReachingEnv (line 12) | class GoalReachingEnv(object): method __init__ (line 16) | def __init__(self, goal_sampler, eval=False, reward_type='dense'): method _get_obs (line 28) | def _get_obs(self): method step (line 37) | def step(self, a): method reset_model (line 52) | def reset_model(self): FILE: d4rl/d4rl/locomotion/maze_env.py class MazeEnv (line 133) | class MazeEnv(gym.Env): method __init__ (line 136) | def __init__( method _xy_to_rowcol (line 225) | def _xy_to_rowcol(self, xy): method _get_reset_location (line 231) | def _get_reset_location(self,): method _rowcol_to_xy (line 244) | def _rowcol_to_xy(self, rowcol, add_random_noise=False): method goal_sampler (line 253) | def goal_sampler(self, np_random, only_free_cells=True, interpolate=Tr... method set_target_goal (line 277) | def set_target_goal(self, goal_input=None): method _find_robot (line 287) | def _find_robot(self): method _is_in_collision (line 296) | def _is_in_collision(self, pos): method step (line 311) | def step(self, action): method _get_best_next_rowcol (line 323) | def _get_best_next_rowcol(self, current_rowcol, target_rowcol): method create_navigation_policy (line 359) | def create_navigation_policy(self, FILE: d4rl/d4rl/locomotion/mujoco_goal_env.py function convert_observation_to_space (line 18) | def convert_observation_to_space(observation): class MujocoGoalEnv (line 33) | class MujocoGoalEnv(gym.Env): method __init__ (line 36) | def __init__(self, model_path, frame_skip): method _set_action_space (line 69) | def _set_action_space(self): method _set_observation_space (line 79) | def _set_observation_space(self, observation): method seed (line 88) | def seed(self, seed=None): method reset_model (line 95) | def reset_model(self): method viewer_setup (line 102) | def viewer_setup(self): method reset (line 110) | def reset(self): method set_state (line 115) | def set_state(self, qpos, qvel): method dt (line 124) | def dt(self): method do_simulation (line 127) | def do_simulation(self, ctrl, n_frames): method render (line 132) | def render(self, method close (line 165) | def close(self): method _get_viewer (line 171) | def _get_viewer(self, mode): method get_body_com (line 183) | def get_body_com(self, body_name): method state_vector (line 186) | def state_vector(self): FILE: d4rl/d4rl/locomotion/point.py class PointEnv (line 35) | class PointEnv(mujoco_env.MujocoEnv, utils.EzPickle): method __init__ (line 38) | def __init__(self, file_path=None, expose_all_qpos=False): method physics (line 49) | def physics(self): method _step (line 58) | def _step(self, a): method step (line 61) | def step(self, action): method _get_obs (line 82) | def _get_obs(self): method reset_model (line 91) | def reset_model(self): method get_xy (line 102) | def get_xy(self): method set_xy (line 105) | def set_xy(self, xy): class GoalReachingPointEnv (line 113) | class GoalReachingPointEnv(goal_reaching_env.GoalReachingEnv, PointEnv): method __init__ (line 117) | def __init__(self, goal_sampler=goal_reaching_env.disk_goal_sampler, class GoalReachingPointDictEnv (line 125) | class GoalReachingPointDictEnv(goal_reaching_env.GoalReachingDictEnv, Po... method __init__ (line 129) | def __init__(self, goal_sampler=goal_reaching_env.disk_goal_sampler, class PointMazeEnv (line 137) | class PointMazeEnv(maze_env.MazeEnv, GoalReachingPointEnv): method __init__ (line 141) | def __init__(self, goal_sampler=None, expose_all_qpos=True, function create_goal_reaching_policy (line 152) | def create_goal_reaching_policy(obs_to_goal=lambda obs: obs[-2:], function create_maze_navigation_policy (line 187) | def create_maze_navigation_policy(maze_env): FILE: d4rl/d4rl/locomotion/swimmer.py class SwimmerEnv (line 21) | class SwimmerEnv(mujoco_env.MujocoEnv, utils.EzPickle): method __init__ (line 25) | def __init__(self, file_path=None, expose_all_qpos=False, non_zero_res... method physics (line 35) | def physics(self): method _step (line 44) | def _step(self, a): method step (line 47) | def step(self, a): method _get_obs (line 58) | def _get_obs(self): method reset_model (line 72) | def reset_model(self): method get_xy (line 83) | def get_xy(self): method set_xy (line 86) | def set_xy(self, xy): class GoalReachingSwimmerEnv (line 94) | class GoalReachingSwimmerEnv(goal_reaching_env.GoalReachingEnv, SwimmerE... method __init__ (line 98) | def __init__(self, goal_sampler=goal_reaching_env.disk_goal_sampler, class SwimmerMazeEnv (line 107) | class SwimmerMazeEnv(maze_env.MazeEnv, GoalReachingSwimmerEnv, offline_e... method __init__ (line 111) | def __init__(self, goal_sampler=None, expose_all_qpos=True, method set_target (line 124) | def set_target(self, target_location=None): FILE: d4rl/d4rl/locomotion/wrappers.py class ProxyEnv (line 10) | class ProxyEnv(Env): method __init__ (line 11) | def __init__(self, wrapped_env): method wrapped_env (line 17) | def wrapped_env(self): method reset (line 20) | def reset(self, **kwargs): method step (line 23) | def step(self, action): method render (line 26) | def render(self, *args, **kwargs): method horizon (line 30) | def horizon(self): method terminate (line 33) | def terminate(self): method __getattr__ (line 37) | def __getattr__(self, attr): method __getstate__ (line 42) | def __getstate__(self): method __setstate__ (line 52) | def __setstate__(self, state): method __str__ (line 55) | def __str__(self): class HistoryEnv (line 59) | class HistoryEnv(ProxyEnv, Env): method __init__ (line 60) | def __init__(self, wrapped_env, history_len): method step (line 72) | def step(self, action): method reset (line 78) | def reset(self, **kwargs): method _get_history (line 85) | def _get_history(self): class DiscretizeEnv (line 95) | class DiscretizeEnv(ProxyEnv, Env): method __init__ (line 96) | def __init__(self, wrapped_env, num_bins): method step (line 109) | def step(self, action): class NormalizedBoxEnv (line 114) | class NormalizedBoxEnv(ProxyEnv): method __init__ (line 121) | def __init__( method estimate_obs_stats (line 145) | def estimate_obs_stats(self, obs_batch, override_values=False): method _apply_normalize_obs (line 152) | def _apply_normalize_obs(self, obs): method step (line 155) | def step(self, action): method __str__ (line 167) | def __str__(self): FILE: d4rl/d4rl/offline_env.py function set_dataset_path (line 11) | def set_dataset_path(path): function get_keys (line 20) | def get_keys(h5file): function filepath_from_url (line 31) | def filepath_from_url(dataset_url): function download_dataset_from_url (line 37) | def download_dataset_from_url(dataset_url): class OfflineEnv (line 47) | class OfflineEnv(gym.Env): method __init__ (line 58) | def __init__(self, dataset_url=None, ref_max_score=None, ref_min_score... method get_normalized_score (line 71) | def get_normalized_score(self, score): method dataset_filepath (line 77) | def dataset_filepath(self): method get_dataset (line 80) | def get_dataset(self, h5path=None): method get_dataset_chunk (line 115) | def get_dataset_chunk(self, chunk_id, h5path=None): class OfflineEnvWrapper (line 144) | class OfflineEnvWrapper(gym.Wrapper, OfflineEnv): method __init__ (line 149) | def __init__(self, env, **kwargs): method reset (line 153) | def reset(self): FILE: d4rl/d4rl/ope.py function get_returns (line 34) | def get_returns(policy_id, discounted=False): function normalize (line 40) | def normalize(policy_id, score): function ranking_correlation_metric (line 47) | def ranking_correlation_metric(policies, discounted=False): function precision_at_k_metric (line 67) | def precision_at_k_metric(policies, k=1, n_rel=None, discounted=False): function recall_at_k_metric (line 88) | def recall_at_k_metric(policies, k=1, n_rel=None, discounted=False): function value_error_metric (line 109) | def value_error_metric(policy, value, discounted=False): function policy_regret_metric (line 120) | def policy_regret_metric(policy, expert_policies, discounted=False): FILE: d4rl/d4rl/pointmaze/dynamic_mjc.py function default_model (line 10) | def default_model(name): function pointmass_model (line 25) | def pointmass_model(name): class MJCModel (line 41) | class MJCModel(object): method __init__ (line 42) | def __init__(self, name): method asfile (line 47) | def asfile(self): method open (line 59) | def open(self): method close (line 65) | def close(self): method find_attr (line 68) | def find_attr(self, attr, value): method __getstate__ (line 71) | def __getstate__(self): method __setstate__ (line 74) | def __setstate__(self, state): class MJCTreeNode (line 78) | class MJCTreeNode(object): method __init__ (line 79) | def __init__(self, name): method add_attr (line 84) | def add_attr(self, key, value): method __getattr__ (line 95) | def __getattr__(self, name): method dfs (line 104) | def dfs(self): method find_attr (line 111) | def find_attr(self, attr, value): method write (line 122) | def write(self, ostream, tabs=0): method __str__ (line 135) | def __str__(self): FILE: d4rl/d4rl/pointmaze/gridcraft/grid_env.py class TransitionModel (line 29) | class TransitionModel(object): method __init__ (line 30) | def __init__(self, gridspec, eps=0.2): method get_aprobs (line 34) | def get_aprobs(self, s, a): method __get_legal_moves (line 46) | def __get_legal_moves(self, s): class RewardFunction (line 54) | class RewardFunction(object): method __init__ (line 55) | def __init__(self, rew_map=None, default=0): method __call__ (line 67) | def __call__(self, gridspec, s, a, ns): class GridEnv (line 74) | class GridEnv(gym.Env): method __init__ (line 75) | def __init__(self, gridspec, method get_transitions (line 98) | def get_transitions(self, s, a): method step_stateless (line 113) | def step_stateless(self, s, a, verbose=False): method step (line 129) | def step(self, a, verbose=False): method reset (line 142) | def reset(self): method render (line 150) | def render(self, close=False, ostream=sys.stdout): method action_space (line 168) | def action_space(self): method observation_space (line 172) | def observation_space(self): method transition_matrix (line 177) | def transition_matrix(self): method reward_matrix (line 195) | def reward_matrix(self): FILE: d4rl/d4rl/pointmaze/gridcraft/grid_spec.py function spec_from_string (line 35) | def spec_from_string(s, valmap=STR_MAP): function spec_from_sparse_locations (line 50) | def spec_from_sparse_locations(w, h, tile_to_locs): function local_spec (line 65) | def local_spec(map, xpnt): class GridSpec (line 86) | class GridSpec(object): method __init__ (line 87) | def __init__(self, w, h): method __setitem__ (line 92) | def __setitem__(self, key, val): method __getitem__ (line 95) | def __getitem__(self, key): method out_of_bounds (line 100) | def out_of_bounds(self, wh): method get_neighbors (line 109) | def get_neighbors(self, k, xy=False): method get_value (line 119) | def get_value(self, k, xy=False): method find (line 125) | def find(self, value): method spec (line 129) | def spec(self): method width (line 133) | def width(self): method __len__ (line 136) | def __len__(self): method height (line 140) | def height(self): method idx_to_xy (line 143) | def idx_to_xy(self, idx): method xy_to_idx (line 152) | def xy_to_idx(self, key): method __hash__ (line 161) | def __hash__(self): FILE: d4rl/d4rl/pointmaze/gridcraft/utils.py function flat_to_one_hot (line 3) | def flat_to_one_hot(val, ndim): function one_hot_to_flat (line 23) | def one_hot_to_flat(val): FILE: d4rl/d4rl/pointmaze/gridcraft/wrappers.py class GridObsWrapper (line 7) | class GridObsWrapper(ObsWrapper): method __init__ (line 8) | def __init__(self, env): method render (line 11) | def render(self): class EyesWrapper (line 16) | class EyesWrapper(ObsWrapper): method __init__ (line 17) | def __init__(self, env, range=4, types=(REWARD,), angle_thresh=0.8): method wrap_obs (line 29) | def wrap_obs(self, obs, info=None): method unwrap_obs (line 62) | def unwrap_obs(self, obs, info=None): method observation_space (line 69) | def observation_space(self): class RandomObsWrapper (line 105) | class RandomObsWrapper(GridObsWrapper): method __init__ (line 106) | def __init__(self, env, dO): method wrap_obs (line 115) | def wrap_obs(self, obs, info=None): method unwrap_obs (line 118) | def unwrap_obs(self, obs, info=None): FILE: d4rl/d4rl/pointmaze/maze_model.py function parse_maze (line 15) | def parse_maze(maze_str): function point_maze (line 33) | def point_maze(maze_str): class MazeEnv (line 156) | class MazeEnv(mujoco_env.MujocoEnv, utils.EzPickle, offline_env.OfflineE... method __init__ (line 157) | def __init__(self, method step (line 190) | def step(self, action): method _get_obs (line 205) | def _get_obs(self): method get_target (line 208) | def get_target(self): method set_target (line 211) | def set_target(self, target_location=None): method set_marker (line 218) | def set_marker(self): method clip_velocity (line 221) | def clip_velocity(self): method reset_model (line 225) | def reset_model(self): method reset_to_location (line 235) | def reset_to_location(self, location): method viewer_setup (line 243) | def viewer_setup(self): FILE: d4rl/d4rl/pointmaze/q_iteration.py function softmax (line 9) | def softmax(q, alpha=1.0): function logsumexp (line 16) | def logsumexp(q, alpha=1.0, axis=1): function get_policy (line 22) | def get_policy(q_fn, ent_wt=1.0): function softq_iteration (line 36) | def softq_iteration(env, transition_matrix=None, reward_matrix=None, num... function q_iteration (line 66) | def q_iteration(env, **kwargs): function compute_visitation (line 70) | def compute_visitation(env, q_fn, ent_wt=1.0, env_time_limit=50, discoun... function compute_occupancy (line 91) | def compute_occupancy(env, q_fn, ent_wt=1.0, env_time_limit=50, discount... FILE: d4rl/d4rl/pointmaze/waypoint_controller.py class WaypointController (line 11) | class WaypointController(object): method __init__ (line 12) | def __init__(self, maze_str, solve_thresh=0.1, p_gain=10.0, d_gain=-1.0): method current_waypoint (line 27) | def current_waypoint(self): method get_action (line 30) | def get_action(self, location, velocity, target): method gridify_state (line 59) | def gridify_state(self, state): method _new_target (line 62) | def _new_target(self, start, target): FILE: d4rl/d4rl/pointmaze_bullet/bullet_maze.py class MazeRobot (line 11) | class MazeRobot(bullet_robot.MJCFBasedRobot): method __init__ (line 12) | def __init__(self, maze_spec): method qpos (line 31) | def qpos(self): method qvel (line 36) | def qvel(self): method calc_state (line 42) | def calc_state(self): method set_state (line 46) | def set_state(self, qpos, qvel): method get_obs (line 53) | def get_obs(self): method robot_specific_reset (line 56) | def robot_specific_reset(self, bullet_client): method apply_action (line 67) | def apply_action(self, a): class Maze2DBulletEnv (line 74) | class Maze2DBulletEnv(env_bases.MJCFBaseBulletEnv, offline_env.OfflineEnv): method __init__ (line 76) | def __init__(self, maze_spec, method create_single_player_scene (line 106) | def create_single_player_scene(self, bullet_client): method reset (line 109) | def reset(self): method step (line 120) | def step(self, action): method camera_adjust (line 136) | def camera_adjust(self): method get_target (line 142) | def get_target(self): method set_target (line 145) | def set_target(self, target_location=None): method clip_velocity (line 152) | def clip_velocity(self): method reset_model (line 156) | def reset_model(self): method reset_to_location (line 166) | def reset_to_location(self, location): FILE: d4rl/d4rl/pointmaze_bullet/bullet_robot.py class MJCFBasedRobot (line 5) | class MJCFBasedRobot(robot_bases.XmlBasedRobot): method __init__ (line 10) | def __init__(self, model_xml, robot_name, action_dim, obs_dim, self_co... method reset (line 15) | def reset(self, bullet_client): method calc_potential (line 40) | def calc_potential(self): class WalkerBase (line 44) | class WalkerBase(MJCFBasedRobot): method __init__ (line 46) | def __init__(self, fn, robot_name, action_dim, obs_dim, power): method robot_specific_reset (line 55) | def robot_specific_reset(self, bullet_client): method apply_action (line 65) | def apply_action(self, a): method calc_state (line 70) | def calc_state(self): method calc_potential (line 113) | def calc_potential(self): FILE: d4rl/d4rl/utils/dataset_utils.py class DatasetWriter (line 4) | class DatasetWriter(object): method __init__ (line 5) | def __init__(self, mujoco=False, goal=False): method _reset_data (line 11) | def _reset_data(self): method __len__ (line 24) | def __len__(self): method append_data (line 27) | def append_data(self, s, a, r, done, goal=None, mujoco_env_data=None): method write_dataset (line 39) | def write_dataset(self, fname, max_size=None, compression='gzip'): FILE: d4rl/d4rl/utils/quatmath.py function mulQuat (line 7) | def mulQuat(qa, qb): function negQuat (line 15) | def negQuat(quat): function quat2Vel (line 18) | def quat2Vel(quat, dt=1): function quatDiff2Vel (line 25) | def quatDiff2Vel(quat1, quat2, dt): function axis_angle2quat (line 31) | def axis_angle2quat(axis, angle): function euler2mat (line 36) | def euler2mat(euler): function euler2quat (line 60) | def euler2quat(euler): function mat2euler (line 79) | def mat2euler(mat): function mat2quat (line 99) | def mat2quat(mat): function quat2euler (line 136) | def quat2euler(quat): function quat2mat (line 141) | def quat2mat(quat): FILE: d4rl/d4rl/utils/visualize_env.py class RandomPolicy (line 19) | class RandomPolicy(object): method __init__ (line 20) | def __init__(self, env): method get_action (line 23) | def get_action(self, obs): function main (line 36) | def main(env_name, policy, mode, seed, episodes): FILE: d4rl/d4rl/utils/wrappers.py class ProxyEnv (line 10) | class ProxyEnv(Env): method __init__ (line 11) | def __init__(self, wrapped_env): method wrapped_env (line 17) | def wrapped_env(self): method reset (line 20) | def reset(self, **kwargs): method step (line 23) | def step(self, action): method render (line 26) | def render(self, *args, **kwargs): method seed (line 29) | def seed(self, seed=0): method horizon (line 33) | def horizon(self): method terminate (line 36) | def terminate(self): method __getattr__ (line 40) | def __getattr__(self, attr): method __getstate__ (line 45) | def __getstate__(self): method __setstate__ (line 55) | def __setstate__(self, state): method __str__ (line 58) | def __str__(self): class HistoryEnv (line 62) | class HistoryEnv(ProxyEnv, Env): method __init__ (line 63) | def __init__(self, wrapped_env, history_len): method step (line 75) | def step(self, action): method reset (line 81) | def reset(self, **kwargs): method _get_history (line 88) | def _get_history(self): class DiscretizeEnv (line 98) | class DiscretizeEnv(ProxyEnv, Env): method __init__ (line 99) | def __init__(self, wrapped_env, num_bins): method step (line 112) | def step(self, action): class NormalizedBoxEnv (line 117) | class NormalizedBoxEnv(ProxyEnv): method __init__ (line 124) | def __init__( method estimate_obs_stats (line 148) | def estimate_obs_stats(self, obs_batch, override_values=False): method _apply_normalize_obs (line 155) | def _apply_normalize_obs(self, obs): method step (line 158) | def step(self, action): method __str__ (line 170) | def __str__(self): FILE: d4rl/scripts/check_antmaze_datasets.py function check_identical_values (line 16) | def check_identical_values(dset): function check_num_samples (line 32) | def check_num_samples(dset): function check_reset_nonterminal (line 45) | def check_reset_nonterminal(dataset): function print_avg_returns (line 60) | def print_avg_returns(dset): FILE: d4rl/scripts/check_mujoco_datasets.py function check_identical_values (line 19) | def check_identical_values(dset): function check_qpos_qvel (line 35) | def check_qpos_qvel(dset): function check_num_samples (line 56) | def check_num_samples(dset): function check_reset_state (line 69) | def check_reset_state(dset): function print_avg_returns (line 96) | def print_avg_returns(dset): FILE: d4rl/scripts/generation/flow_idm.py function main (line 10) | def main(): FILE: d4rl/scripts/generation/generate_ant_maze_datasets.py function reset_data (line 13) | def reset_data(): function append_data (line 24) | def append_data(data, s, a, r, tgt, done, timeout, env_data): function npify (line 34) | def npify(data): function load_policy (line 43) | def load_policy(policy_file): function save_video (line 50) | def save_video(save_dir, file_name, frames, episode_id=0): function main (line 59) | def main(): FILE: d4rl/scripts/generation/generate_kitchen_datasets.py function _relabel_obs_with_goal (line 32) | def _relabel_obs_with_goal(obs_array, goal): function _obs_array_to_obs_dict (line 37) | def _obs_array_to_obs_dict(obs_array, goal=None): function main (line 48) | def main(): FILE: d4rl/scripts/generation/generate_maze2d_bullet_datasets.py function reset_data (line 14) | def reset_data(): function append_data (line 25) | def append_data(data, s, a, tgt, done, timeout, robot): function npify (line 37) | def npify(data): function main (line 46) | def main(): FILE: d4rl/scripts/generation/generate_maze2d_datasets.py function reset_data (line 12) | def reset_data(): function append_data (line 22) | def append_data(data, s, a, tgt, done, env_data): function npify (line 31) | def npify(data): function main (line 40) | def main(): FILE: d4rl/scripts/generation/generate_minigrid_fourroom_data.py function reset_data (line 11) | def reset_data(): function append_data (line 21) | def append_data(data, s, a, tgt, done, pos, ori): function npify (line 30) | def npify(data): function main (line 39) | def main(): FILE: d4rl/scripts/generation/hand_dapg_combined.py function get_keys (line 8) | def get_keys(h5file): FILE: d4rl/scripts/generation/hand_dapg_demos.py function main (line 21) | def main(env_name): function demo_playback (line 29) | def demo_playback(env_name, demo_paths, clip=False): FILE: d4rl/scripts/generation/hand_dapg_jax.py function main (line 25) | def main(env_name, snapshot_file, mode, num_trajs, clip=True): function extract_params (line 34) | def extract_params(policy): function pol_playback (line 49) | def pol_playback(env_name, pi, num_trajs=100, clip=True): FILE: d4rl/scripts/generation/hand_dapg_policies.py function main (line 24) | def main(env_name, mode, num_trajs, clip=True): function extract_params (line 32) | def extract_params(policy): function pol_playback (line 70) | def pol_playback(env_name, pi, num_trajs=100, clip=True): FILE: d4rl/scripts/generation/hand_dapg_random.py function main (line 21) | def main(env_name, num_trajs): function pol_playback (line 26) | def pol_playback(env_name, num_trajs=100): FILE: d4rl/scripts/generation/mujoco/collect_data.py function load (line 14) | def load(pklfile): function get_pkl_itr (line 18) | def get_pkl_itr(pklfile): function get_policy_wts (line 24) | def get_policy_wts(params): function get_reset_data (line 37) | def get_reset_data(): function rollout (line 51) | def rollout(policy, env_name, max_path, num_data, random=False): FILE: d4rl/scripts/generation/mujoco/convert_buffer.py function load (line 10) | def load(pklfile): function get_pkl_itr (line 27) | def get_pkl_itr(pklfile): FILE: d4rl/scripts/generation/mujoco/fix_qpos_qvel.py function unwrap_env (line 9) | def unwrap_env(env): function set_state_qpos (line 12) | def set_state_qpos(env, qpos, qvel): function pad_obs (line 15) | def pad_obs(env, obs, twod=False, scale=0.1): function set_state_obs (line 25) | def set_state_obs(env, obs): function resync_state_obs (line 37) | def resync_state_obs(env, obs): FILE: d4rl/scripts/reference_scores/adroit_expert.py function main (line 16) | def main(): FILE: d4rl/scripts/reference_scores/carla_lane_controller.py function main (line 8) | def main(): FILE: d4rl/scripts/reference_scores/generate_ref_min_score.py function main (line 11) | def main(): FILE: d4rl/scripts/reference_scores/maze2d_bullet_controller.py function main (line 10) | def main(): FILE: d4rl/scripts/reference_scores/maze2d_controller.py function main (line 9) | def main(): FILE: d4rl/scripts/reference_scores/minigrid_controller.py function main (line 11) | def main(): FILE: dataset_utils.py function split_into_trajectories (line 16) | def split_into_trajectories(observations, actions, rewards, masks, dones... function merge_trajectories (line 29) | def merge_trajectories(trajs): class Dataset (line 51) | class Dataset(object): method __init__ (line 52) | def __init__(self, observations: np.ndarray, actions: np.ndarray, method sample (line 64) | def sample(self, batch_size: int) -> Batch: class D4RLDataset (line 73) | class D4RLDataset(Dataset): method __init__ (line 74) | def __init__(self, class RelabeledDataset (line 106) | class RelabeledDataset(Dataset): method __init__ (line 107) | def __init__(self, observations, actions, rewards, terminals, next_obs... class ReplayBuffer (line 133) | class ReplayBuffer(Dataset): method __init__ (line 134) | def __init__(self, observation_space: gym.spaces.Box, action_dim: int, method initialize_with_dataset (line 158) | def initialize_with_dataset(self, dataset: Dataset, method insert (line 187) | def insert(self, observation: np.ndarray, action: np.ndarray, function batch_to_jax (line 202) | def batch_to_jax(batch): function reward_from_preference (line 206) | def reward_from_preference( function reward_from_preference_transformer (line 234) | def reward_from_preference_transformer( FILE: evaluation.py function evaluate (line 9) | def evaluate(agent: nn.Module, env: gym.Env, FILE: flaxmodels/flaxmodels/gpt2/gpt2.py class GPT2SelfAttention (line 22) | class GPT2SelfAttention(nn.Module): method setup (line 33) | def setup(self): method __call__ (line 43) | def __call__(self, x, layer_past=None, attn_mask=None, head_mask=None,... class GPT2MLP (line 84) | class GPT2MLP(nn.Module): method setup (line 97) | def setup(self): method __call__ (line 103) | def __call__(self, x, training=False): class GPT2Block (line 118) | class GPT2Block(nn.Module): method setup (line 129) | def setup(self): method __call__ (line 135) | def __call__(self, x, layer_past=None, attn_mask=None, head_mask=None,... class GPT2Model (line 164) | class GPT2Model(nn.Module): method setup (line 179) | def setup(self): method __call__ (line 197) | def __call__(self, class GPT2LMHeadModel (line 279) | class GPT2LMHeadModel(nn.Module): method setup (line 292) | def setup(self): method __call__ (line 309) | def __call__(self, FILE: flaxmodels/flaxmodels/gpt2/ops.py function linear (line 12) | def linear(features, param_dict, bias=True): function embedding (line 28) | def embedding(num_embeddings, features, param_dict, dtype='float32'): function apply_activation (line 40) | def apply_activation(x, activation='linear'): function layer_norm (line 64) | def layer_norm(param_dict, use_bias=True, use_scale=True, eps=1e-06, dty... function split_heads (line 82) | def split_heads(x, num_heads, head_dim): function merge_heads (line 106) | def merge_heads(x, num_heads, head_dim): function attention (line 130) | def attention(query, key, value, casual_mask, masked_bias, dropout, scal... function cross_entropy (line 179) | def cross_entropy(logits, labels, ignore_index=-100): function kld_loss (line 202) | def kld_loss(p, q): function get (line 208) | def get(dictionary, key): function get_attention_mask (line 214) | def get_attention_mask(attn_mask, batch_size): function get_head_mask (line 222) | def get_head_mask(head_mask, num_layers): function load_config (line 233) | def load_config(path): function custom_softmax (line 236) | def custom_softmax(array, axis=-1, temperature=1.0): function mse_loss (line 240) | def mse_loss(val, target): FILE: flaxmodels/flaxmodels/gpt2/third_party/huggingface_transformers/configuration_gpt2.py function bytes_to_unicode (line 66) | def bytes_to_unicode(): function get_pairs (line 90) | def get_pairs(word): class GPT2Tokenizer (line 104) | class GPT2Tokenizer(PreTrainedTokenizer): method __init__ (line 156) | def __init__( method vocab_size (line 196) | def vocab_size(self): method get_vocab (line 199) | def get_vocab(self): method bpe (line 202) | def bpe(self, token): method _tokenize (line 244) | def _tokenize(self, text): method _convert_token_to_id (line 254) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 258) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 262) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 268) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 297) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _build_conversation_input_ids (line 303) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: flaxmodels/flaxmodels/gpt2/third_party/huggingface_transformers/utils/file_utils.py function is_offline_mode (line 242) | def is_offline_mode(): function is_torch_available (line 246) | def is_torch_available(): function is_torch_cuda_available (line 250) | def is_torch_cuda_available(): function is_tf_available (line 259) | def is_tf_available(): function is_onnx_available (line 263) | def is_onnx_available(): function is_flax_available (line 267) | def is_flax_available(): function is_torch_tpu_available (line 271) | def is_torch_tpu_available(): function is_datasets_available (line 282) | def is_datasets_available(): function is_psutil_available (line 286) | def is_psutil_available(): function is_py3nvml_available (line 290) | def is_py3nvml_available(): function is_apex_available (line 294) | def is_apex_available(): function is_faiss_available (line 298) | def is_faiss_available(): function is_sklearn_available (line 302) | def is_sklearn_available(): function is_sentencepiece_available (line 310) | def is_sentencepiece_available(): function is_protobuf_available (line 314) | def is_protobuf_available(): function is_tokenizers_available (line 320) | def is_tokenizers_available(): function is_vision_available (line 324) | def is_vision_available(): function is_in_notebook (line 328) | def is_in_notebook(): function is_scatter_available (line 342) | def is_scatter_available(): function is_pandas_available (line 346) | def is_pandas_available(): function is_sagemaker_dp_enabled (line 350) | def is_sagemaker_dp_enabled(): function is_sagemaker_mp_enabled (line 364) | def is_sagemaker_mp_enabled(): function is_training_run_on_sagemaker (line 388) | def is_training_run_on_sagemaker(): function is_soundfile_availble (line 392) | def is_soundfile_availble(): function is_torchaudio_available (line 396) | def is_torchaudio_available(): function is_speech_available (line 400) | def is_speech_available(): function torch_only_method (line 405) | def torch_only_method(fn): function requires_backends (line 554) | def requires_backends(obj, backends): function add_start_docstrings (line 563) | def add_start_docstrings(*docstr): function add_start_docstrings_to_model_forward (line 571) | def add_start_docstrings_to_model_forward(*docstr): function add_end_docstrings (line 588) | def add_end_docstrings(*docstr): function _get_indent (line 614) | def _get_indent(t): function _convert_output_args_doc (line 620) | def _convert_output_args_doc(output_args_doc): function _prepare_output_docstrings (line 646) | def _prepare_output_docstrings(output_type, config_class): function add_code_sample_docstrings (line 912) | def add_code_sample_docstrings( function replace_return_docstrings (line 946) | def replace_return_docstrings(output_type=None, config_class=None): function is_remote_url (line 966) | def is_remote_url(url_or_filename): function hf_bucket_url (line 971) | def hf_bucket_url( function url_to_filename (line 1006) | def url_to_filename(url: str, etag: Optional[str] = None) -> str: function filename_to_url (line 1026) | def filename_to_url(filename, cache_dir=None): function get_cached_models (line 1052) | def get_cached_models(cache_dir: Union[str, Path] = None) -> List[Tuple]: function cached_path (line 1085) | def cached_path( function define_sagemaker_information (line 1187) | def define_sagemaker_information(): function http_user_agent (line 1213) | def http_user_agent(user_agent: Union[Dict, str, None] = None) -> str: function http_get (line 1236) | def http_get(url: str, temp_file: BinaryIO, proxies=None, resume_size=0,... function get_from_cache (line 1262) | def get_from_cache( class cached_property (line 1410) | class cached_property(property): method __get__ (line 1419) | def __get__(self, obj, objtype=None): function torch_required (line 1433) | def torch_required(func): function tf_required (line 1445) | def tf_required(func): function is_tensor (line 1457) | def is_tensor(x): function _is_numpy (line 1472) | def _is_numpy(x): function _is_torch (line 1476) | def _is_torch(x): function _is_torch_device (line 1482) | def _is_torch_device(x): function _is_tensorflow (line 1488) | def _is_tensorflow(x): function _is_jax (line 1494) | def _is_jax(x): function to_py_obj (line 1500) | def to_py_obj(obj): class ModelOutput (line 1518) | class ModelOutput(OrderedDict): method __post_init__ (line 1529) | def __post_init__(self): method __delitem__ (line 1569) | def __delitem__(self, *args, **kwargs): method setdefault (line 1572) | def setdefault(self, *args, **kwargs): method pop (line 1575) | def pop(self, *args, **kwargs): method update (line 1578) | def update(self, *args, **kwargs): method __getitem__ (line 1581) | def __getitem__(self, k): method __setattr__ (line 1588) | def __setattr__(self, name, value): method __setitem__ (line 1594) | def __setitem__(self, key, value): method to_tuple (line 1600) | def to_tuple(self) -> Tuple[Any]: class ExplicitEnum (line 1607) | class ExplicitEnum(Enum): method _missing_ (line 1613) | def _missing_(cls, value): class PaddingStrategy (line 1619) | class PaddingStrategy(ExplicitEnum): class TensorType (line 1630) | class TensorType(ExplicitEnum): class _BaseLazyModule (line 1642) | class _BaseLazyModule(ModuleType): method __init__ (line 1649) | def __init__(self, name, import_structure): method __dir__ (line 1660) | def __dir__(self): method __getattr__ (line 1663) | def __getattr__(self, name: str) -> Any: method _get_module (line 1675) | def _get_module(self, module_name: str) -> ModuleType: FILE: flaxmodels/flaxmodels/gpt2/third_party/huggingface_transformers/utils/hf_api.py class RepoObj (line 30) | class RepoObj: method __init__ (line 35) | def __init__(self, filename: str, lastModified: str, commit: str, size... class ModelSibling (line 42) | class ModelSibling: method __init__ (line 47) | def __init__(self, rfilename: str, **kwargs): class ModelInfo (line 53) | class ModelInfo: method __init__ (line 58) | def __init__( class HfApi (line 74) | class HfApi: method __init__ (line 75) | def __init__(self, endpoint=None): method login (line 78) | def login(self, username: str, password: str) -> str: method whoami (line 92) | def whoami(self, token: str) -> Tuple[str, List[str]]: method logout (line 102) | def logout(self, token: str) -> None: method model_list (line 110) | def model_list(self) -> List[ModelInfo]: method list_repos_objs (line 120) | def list_repos_objs(self, token: str, organization: Optional[str] = No... method create_repo (line 133) | def create_repo( method delete_repo (line 169) | def delete_repo(self, token: str, name: str, organization: Optional[st... class TqdmProgressFileReader (line 186) | class TqdmProgressFileReader: method __init__ (line 194) | def __init__(self, f: io.BufferedReader): method _read (line 201) | def _read(self, n=-1): method close (line 205) | def close(self): class HfFolder (line 209) | class HfFolder: method save_token (line 213) | def save_token(cls, token): method get_token (line 222) | def get_token(cls): method delete_token (line 233) | def delete_token(cls): FILE: flaxmodels/flaxmodels/gpt2/third_party/huggingface_transformers/utils/logging.py function _get_default_logging_level (line 46) | def _get_default_logging_level(): function _get_library_name (line 63) | def _get_library_name() -> str: function _get_library_root_logger (line 68) | def _get_library_root_logger() -> logging.Logger: function _configure_library_root_logger (line 73) | def _configure_library_root_logger() -> None: function _reset_library_root_logger (line 91) | def _reset_library_root_logger() -> None: function get_logger (line 105) | def get_logger(name: Optional[str] = None) -> logging.Logger: function get_verbosity (line 119) | def get_verbosity() -> int: function set_verbosity (line 141) | def set_verbosity(verbosity: int) -> None: function set_verbosity_info (line 160) | def set_verbosity_info(): function set_verbosity_warning (line 165) | def set_verbosity_warning(): function set_verbosity_debug (line 170) | def set_verbosity_debug(): function set_verbosity_error (line 175) | def set_verbosity_error(): function disable_default_handler (line 180) | def disable_default_handler() -> None: function enable_default_handler (line 189) | def enable_default_handler() -> None: function add_handler (line 198) | def add_handler(handler: logging.Handler) -> None: function remove_handler (line 207) | def remove_handler(handler: logging.Handler) -> None: function disable_propagation (line 216) | def disable_propagation() -> None: function enable_propagation (line 225) | def enable_propagation() -> None: function enable_explicit_format (line 235) | def enable_explicit_format() -> None: function reset_format (line 252) | def reset_format() -> None: FILE: flaxmodels/flaxmodels/gpt2/third_party/huggingface_transformers/utils/tokenization_utils.py function _is_whitespace (line 52) | def _is_whitespace(char): function _is_control (line 64) | def _is_control(char): function _is_punctuation (line 76) | def _is_punctuation(char): function _is_end_of_word (line 91) | def _is_end_of_word(text): function _is_start_of_word (line 97) | def _is_start_of_word(text): function _insert_one_token_to_ordered_list (line 103) | def _insert_one_token_to_ordered_list(token_list: List[str], new_token: ... class PreTrainedTokenizer (line 117) | class PreTrainedTokenizer(PreTrainedTokenizerBase): method __init__ (line 130) | def __init__(self, **kwargs): method is_fast (line 142) | def is_fast(self) -> bool: method vocab_size (line 146) | def vocab_size(self) -> int: method get_added_vocab (line 152) | def get_added_vocab(self) -> Dict[str, int]: method __len__ (line 161) | def __len__(self): method _add_tokens (line 167) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method num_special_tokens_to_add (line 229) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method tokenize (line 249) | def tokenize(self, text: TextInput, **kwargs) -> List[str]: method _tokenize (line 365) | def _tokenize(self, text, **kwargs): method convert_tokens_to_ids (line 374) | def convert_tokens_to_ids(self, tokens: Union[str, List[str]]) -> Unio... method _convert_token_to_id_with_added_voc (line 396) | def _convert_token_to_id_with_added_voc(self, token): method _convert_token_to_id (line 404) | def _convert_token_to_id(self, token): method _encode_plus (line 407) | def _encode_plus( method _batch_encode_plus (line 483) | def _batch_encode_plus( method _batch_prepare_for_model (line 569) | def _batch_prepare_for_model( method prepare_for_tokenization (line 633) | def prepare_for_tokenization( method get_special_tokens_mask (line 655) | def get_special_tokens_mask( method convert_ids_to_tokens (line 686) | def convert_ids_to_tokens(self, ids: int, skip_special_tokens: bool = ... method convert_ids_to_tokens (line 690) | def convert_ids_to_tokens(self, ids: List[int], skip_special_tokens: b... method convert_ids_to_tokens (line 693) | def convert_ids_to_tokens( method _convert_id_to_token (line 725) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 728) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _decode (line 731) | def _decode( FILE: flaxmodels/flaxmodels/gpt2/third_party/huggingface_transformers/utils/tokenization_utils_base.py class AddedToken (line 73) | class AddedToken: method __getstate__ (line 85) | def __getstate__(self): class EncodingFast (line 89) | class EncodingFast: class TruncationStrategy (line 118) | class TruncationStrategy(ExplicitEnum): class CharSpan (line 130) | class CharSpan(NamedTuple): class TokenSpan (line 143) | class TokenSpan(NamedTuple): class BatchEncoding (line 156) | class BatchEncoding(UserDict): method __init__ (line 183) | def __init__( method n_sequences (line 206) | def n_sequences(self) -> Optional[int]: method is_fast (line 215) | def is_fast(self) -> bool: method __getitem__ (line 222) | def __getitem__(self, item: Union[int, str]) -> Union[Any, EncodingFast]: method __getattr__ (line 239) | def __getattr__(self, item: str): method __getstate__ (line 245) | def __getstate__(self): method __setstate__ (line 248) | def __setstate__(self, state): method keys (line 255) | def keys(self): method values (line 258) | def values(self): method items (line 261) | def items(self): method encodings (line 269) | def encodings(self) -> Optional[List[EncodingFast]]: method tokens (line 276) | def tokens(self, batch_index: int = 0) -> List[str]: method sequence_ids (line 291) | def sequence_ids(self, batch_index: int = 0) -> List[Optional[int]]: method words (line 312) | def words(self, batch_index: int = 0) -> List[Optional[int]]: method word_ids (line 333) | def word_ids(self, batch_index: int = 0) -> List[Optional[int]]: method token_to_sequence (line 349) | def token_to_sequence(self, batch_or_token_index: int, token_index: Op... method token_to_word (line 388) | def token_to_word(self, batch_or_token_index: int, token_index: Option... method word_to_tokens (line 426) | def word_to_tokens( method token_to_chars (line 477) | def token_to_chars(self, batch_or_token_index: int, token_index: Optio... method char_to_token (line 513) | def char_to_token( method word_to_chars (line 554) | def word_to_chars( method char_to_word (line 599) | def char_to_word(self, batch_or_char_index: int, char_index: Optional[... method convert_to_tensors (line 638) | def convert_to_tensors( method to (line 722) | def to(self, device: Union[str, "torch.device"]) -> "BatchEncoding": class SpecialTokensMixin (line 743) | class SpecialTokensMixin: method __init__ (line 782) | def __init__(self, verbose=True, **kwargs): method sanitize_special_tokens (line 810) | def sanitize_special_tokens(self) -> int: method add_special_tokens (line 822) | def add_special_tokens(self, special_tokens_dict: Dict[str, Union[str,... method add_tokens (line 895) | def add_tokens( method _add_tokens (line 942) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method bos_token (line 946) | def bos_token(self) -> str: method eos_token (line 956) | def eos_token(self) -> str: method unk_token (line 966) | def unk_token(self) -> str: method sep_token (line 976) | def sep_token(self) -> str: method pad_token (line 987) | def pad_token(self) -> str: method cls_token (line 997) | def cls_token(self) -> str: method mask_token (line 1008) | def mask_token(self) -> str: method additional_special_tokens (line 1019) | def additional_special_tokens(self) -> List[str]: method bos_token (line 1030) | def bos_token(self, value): method eos_token (line 1034) | def eos_token(self, value): method unk_token (line 1038) | def unk_token(self, value): method sep_token (line 1042) | def sep_token(self, value): method pad_token (line 1046) | def pad_token(self, value): method cls_token (line 1050) | def cls_token(self, value): method mask_token (line 1054) | def mask_token(self, value): method additional_special_tokens (line 1058) | def additional_special_tokens(self, value): method bos_token_id (line 1062) | def bos_token_id(self) -> Optional[int]: method eos_token_id (line 1072) | def eos_token_id(self) -> Optional[int]: method unk_token_id (line 1082) | def unk_token_id(self) -> Optional[int]: method sep_token_id (line 1092) | def sep_token_id(self) -> Optional[int]: method pad_token_id (line 1102) | def pad_token_id(self) -> Optional[int]: method pad_token_type_id (line 1112) | def pad_token_type_id(self) -> int: method cls_token_id (line 1119) | def cls_token_id(self) -> Optional[int]: method mask_token_id (line 1131) | def mask_token_id(self) -> Optional[int]: method additional_special_tokens_ids (line 1141) | def additional_special_tokens_ids(self) -> List[int]: method bos_token_id (line 1149) | def bos_token_id(self, value): method eos_token_id (line 1153) | def eos_token_id(self, value): method unk_token_id (line 1157) | def unk_token_id(self, value): method sep_token_id (line 1161) | def sep_token_id(self, value): method pad_token_id (line 1165) | def pad_token_id(self, value): method cls_token_id (line 1169) | def cls_token_id(self, value): method mask_token_id (line 1173) | def mask_token_id(self, value): method additional_special_tokens_ids (line 1177) | def additional_special_tokens_ids(self, values): method special_tokens_map (line 1181) | def special_tokens_map(self) -> Dict[str, Union[str, List[str]]]: method special_tokens_map_extended (line 1196) | def special_tokens_map_extended(self) -> Dict[str, Union[str, AddedTok... method all_special_tokens (line 1213) | def all_special_tokens(self) -> List[str]: method all_special_tokens_extended (line 1223) | def all_special_tokens_extended(self) -> List[Union[str, AddedToken]]: method all_special_ids (line 1239) | def all_special_ids(self) -> List[int]: class PreTrainedTokenizerBase (line 1418) | class PreTrainedTokenizerBase(SpecialTokensMixin): method __init__ (line 1436) | def __init__(self, **kwargs): method max_len_single_sentence (line 1461) | def max_len_single_sentence(self) -> int: method max_len_sentences_pair (line 1468) | def max_len_sentences_pair(self) -> int: method max_len_single_sentence (line 1475) | def max_len_single_sentence(self, value) -> int: method max_len_sentences_pair (line 1489) | def max_len_sentences_pair(self, value) -> int: method __repr__ (line 1502) | def __repr__(self) -> str: method get_vocab (line 1509) | def get_vocab(self) -> Dict[str, int]: method from_pretrained (line 1522) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method _from_pretrained (line 1720) | def _from_pretrained( method save_pretrained (line 1836) | def save_pretrained( method _save_pretrained (line 1924) | def _save_pretrained( method save_vocabulary (line 1958) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method tokenize (line 1976) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode (line 2007) | def encode( method num_special_tokens_to_add (line 2047) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method _get_padding_truncation_strategies (line 2050) | def _get_padding_truncation_strategies( method __call__ (line 2179) | def __call__( method encode_plus (line 2301) | def encode_plus( method _encode_plus (line 2369) | def _encode_plus( method batch_encode_plus (line 2393) | def batch_encode_plus( method _batch_encode_plus (line 2463) | def _batch_encode_plus( method pad (line 2492) | def pad( method create_token_type_ids_from_sequences (line 2652) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 2672) | def build_inputs_with_special_tokens( method prepare_for_model (line 2693) | def prepare_for_model( method truncate_sequences (line 2815) | def truncate_sequences( method _pad (line 2908) | def _pad( method convert_tokens_to_string (line 2980) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method batch_decode (line 2993) | def batch_decode( method decode (line 3026) | def decode( method _decode (line 3062) | def _decode( method get_special_tokens_mask (line 3071) | def get_special_tokens_mask( method clean_up_tokenization (line 3103) | def clean_up_tokenization(out_string: str) -> str: method _eventual_warn_about_too_long_sequence (line 3127) | def _eventual_warn_about_too_long_sequence(self, ids: List[int], max_l... method as_target_tokenizer (line 3148) | def as_target_tokenizer(self): method prepare_seq2seq_batch (line 3155) | def prepare_seq2seq_batch( FILE: flaxmodels/flaxmodels/gpt2/third_party/huggingface_transformers/utils/versions.py function _compare_versions (line 43) | def _compare_versions(op, got_ver, want_ver, requirement, pkg, hint): function require_version (line 54) | def require_version(requirement: str, hint: Optional[str] = None) -> None: function require_version_core (line 117) | def require_version_core(requirement): function require_version_examples (line 123) | def require_version_examples(requirement): FILE: flaxmodels/flaxmodels/gpt2/tokenizer.py function get_tokenizer (line 5) | def get_tokenizer(errors='replace', FILE: flaxmodels/flaxmodels/gpt2/trajectory_gpt2.py class GPT2SelfAttention (line 21) | class GPT2SelfAttention(nn.Module): method setup (line 31) | def setup(self): method __call__ (line 41) | def __call__(self, x, layer_past=None, attn_mask=None, head_mask=None,... class GPT2MLP (line 86) | class GPT2MLP(nn.Module): method setup (line 98) | def setup(self): method __call__ (line 104) | def __call__(self, x, training=False): class GPT2Block (line 119) | class GPT2Block(nn.Module): method setup (line 129) | def setup(self): method __call__ (line 135) | def __call__(self, x, layer_past=None, attn_mask=None, head_mask=None,... class GPT2Model (line 163) | class GPT2Model(nn.Module): method setup (line 177) | def setup(self): method __call__ (line 195) | def __call__(self, class TransRewardModel (line 283) | class TransRewardModel(nn.Module): method setup (line 293) | def setup(self): method __call__ (line 309) | def __call__( FILE: flaxmodels/flaxmodels/lstm/lstm.py class SimpleLSTM (line 12) | class SimpleLSTM(nn.Module): method __call__ (line 21) | def __call__(self, carry, x): method initialize_carry (line 25) | def initialize_carry(batch_dims, hidden_size): class LSTMRewardModel (line 31) | class LSTMRewardModel(nn.Module): method setup (line 41) | def setup(self): method __call__ (line 54) | def __call__( FILE: flaxmodels/flaxmodels/lstm/ops.py function linear (line 12) | def linear(features, param_dict, bias=True): function embedding (line 28) | def embedding(num_embeddings, features, param_dict, dtype='float32'): function apply_activation (line 40) | def apply_activation(x, activation='linear'): function layer_norm (line 64) | def layer_norm(param_dict, use_bias=True, use_scale=True, eps=1e-06, dty... function split_heads (line 82) | def split_heads(x, num_heads, head_dim): function merge_heads (line 106) | def merge_heads(x, num_heads, head_dim): function attention (line 130) | def attention(query, key, value, casual_mask, masked_bias, dropout, scal... function cross_entropy (line 184) | def cross_entropy(logits, labels, ignore_index=-100): function get (line 210) | def get(dictionary, key): function get_attention_mask (line 216) | def get_attention_mask(attn_mask, batch_size): function get_head_mask (line 224) | def get_head_mask(head_mask, num_layers): function load_config (line 235) | def load_config(path): FILE: flaxmodels/flaxmodels/utils.py function download (line 7) | def download(ckpt_dir, url): FILE: learner.py function target_update (line 17) | def target_update(critic: Model, target_critic: Model, tau: float) -> Mo... function _update_jit (line 26) | def _update_jit( class Learner (line 48) | class Learner(object): method __init__ (line 49) | def __init__(self, method sample_actions (line 115) | def sample_actions(self, method update (line 126) | def update(self, batch: Batch) -> InfoDict: FILE: policy.py class NormalTanhPolicy (line 19) | class NormalTanhPolicy(nn.Module): method __call__ (line 30) | def __call__(self, function _sample_actions (line 67) | def _sample_actions(rng: PRNGKey, function sample_actions (line 77) | def sample_actions(rng: PRNGKey, FILE: robosuite_train_offline.py function normalize (line 68) | def normalize(dataset, env_name, max_episode_steps=1000): function make_env_and_dataset (line 104) | def make_env_and_dataset(env_name: str, function initialize_model (line 178) | def initialize_model(): function main (line 192) | def main(_): FILE: train_finetune.py function normalize (line 42) | def normalize(dataset): function make_env_and_dataset (line 62) | def make_env_and_dataset(env_name: str, function main (line 87) | def main(_): FILE: train_offline.py function normalize (line 51) | def normalize(dataset, env_name, max_episode_steps=1000): function make_env_and_dataset (line 87) | def make_env_and_dataset(env_name: str, function initialize_model (line 133) | def initialize_model(): function main (line 145) | def main(_): FILE: value_net.py class ValueCritic (line 9) | class ValueCritic(nn.Module): method __call__ (line 13) | def __call__(self, observations: jnp.ndarray) -> jnp.ndarray: class Critic (line 18) | class Critic(nn.Module): method __call__ (line 23) | def __call__(self, observations: jnp.ndarray, class DoubleCritic (line 31) | class DoubleCritic(nn.Module): method __call__ (line 36) | def __call__(self, observations: jnp.ndarray, FILE: viskit/core.py class AttrDict (line 9) | class AttrDict(dict): method __init__ (line 10) | def __init__(self, *args, **kwargs): function unique (line 16) | def unique(l): function flatten (line 20) | def flatten(l): function load_progress (line 24) | def load_progress(progress_csv_path): function to_json (line 45) | def to_json(stub_object): function flatten_dict (line 64) | def flatten_dict(d): function load_params (line 76) | def load_params(params_json_path): function lookup (line 86) | def lookup(d, keys): function load_exps_data (line 100) | def load_exps_data( function smart_repr (line 135) | def smart_repr(x): function smart_eval (line 159) | def smart_eval(string): function extract_distinct_params (line 165) | def extract_distinct_params(exps_data, excluded_params=('seed', 'log_dir... function exp_has_key_value (line 218) | def exp_has_key_value(exp, k, v): class Selector (line 226) | class Selector(object): method __init__ (line 227) | def __init__(self, exps_data, filters=None, custom_filters=None): method where (line 238) | def where(self, k, v): method where_not (line 245) | def where_not(self, k, v): method custom_filter (line 254) | def custom_filter(self, filter): method _check_exp (line 257) | def _check_exp(self, exp): method extract (line 266) | def extract(self): method iextract (line 269) | def iextract(self): function hex_to_rgb (line 288) | def hex_to_rgb(hex, opacity=1.0): FILE: viskit/frontend.py function flatten (line 37) | def flatten(xs): function sliding_mean (line 41) | def sliding_mean(data_array, window=5): function send_js (line 66) | def send_js(path): function send_css (line 71) | def send_css(path): function create_bar_chart (line 74) | def create_bar_chart( function make_plot (line 171) | def make_plot( function make_plot_eps (line 271) | def make_plot_eps(plot_list, use_median=False, counter=0): function summary_name (line 349) | def summary_name(exp, selector=None): function check_nan (line 363) | def check_nan(exp): function get_plot_instruction (line 367) | def get_plot_instruction( function shorten_key (line 667) | def shorten_key(key): function get_selector_score (line 680) | def get_selector_score(key, selector, use_median, best_based_on_final): function get_statistics (line 709) | def get_statistics(progresses, use_median, normalize_errors): function process_statistics (line 733) | def process_statistics( function get_possible_values (line 756) | def get_possible_values(distinct_params, key): function split_by_key (line 760) | def split_by_key(selector, key, distinct_params): function split_by_keys (line 769) | def split_by_keys(base_selector, keys, distinct_params): function parse_float_arg (line 819) | def parse_float_arg(args, key): function plot_div (line 828) | def plot_div(): function safer_eval (line 905) | def safer_eval(some_string): function index (line 916) | def index(): function reload (line 939) | def reload(): function reload_data (line 944) | def reload_data(): function main (line 960) | def main(): FILE: viskit/logging.py class TerminalTablePrinter (line 26) | class TerminalTablePrinter(object): method __init__ (line 27) | def __init__(self): method print_tabular (line 31) | def print_tabular(self, new_tabular): method refresh (line 39) | def refresh(self): class MyEncoder (line 48) | class MyEncoder(json.JSONEncoder): method default (line 49) | def default(self, o): function mkdir_p (line 63) | def mkdir_p(path): class Logger (line 73) | class Logger(object): method __init__ (line 74) | def __init__(self): method reset (line 98) | def reset(self): method _add_output (line 101) | def _add_output(self, file_name, arr, fds, mode='a'): method _remove_output (line 107) | def _remove_output(self, file_name, arr, fds): method push_prefix (line 113) | def push_prefix(self, prefix): method add_text_output (line 117) | def add_text_output(self, file_name): method remove_text_output (line 121) | def remove_text_output(self, file_name): method add_tabular_output (line 124) | def add_tabular_output(self, file_name, relative_to_snapshot_dir=False): method remove_tabular_output (line 130) | def remove_tabular_output(self, file_name, relative_to_snapshot_dir=Fa... method set_snapshot_dir (line 137) | def set_snapshot_dir(self, dir_name): method get_snapshot_dir (line 140) | def get_snapshot_dir(self, ): method get_snapshot_mode (line 143) | def get_snapshot_mode(self, ): method set_snapshot_mode (line 146) | def set_snapshot_mode(self, mode): method get_snapshot_gap (line 149) | def get_snapshot_gap(self, ): method set_snapshot_gap (line 152) | def set_snapshot_gap(self, gap): method set_log_tabular_only (line 155) | def set_log_tabular_only(self, log_tabular_only): method get_log_tabular_only (line 158) | def get_log_tabular_only(self, ): method log (line 161) | def log(self, s, with_prefix=True, with_timestamp=True): method record_tabular (line 177) | def record_tabular(self, key, val): method record_dict (line 180) | def record_dict(self, d, prefix=None): method push_tabular_prefix (line 188) | def push_tabular_prefix(self, key): method pop_tabular_prefix (line 192) | def pop_tabular_prefix(self, ): method save_extra_data (line 196) | def save_extra_data(self, data, file_name='extra_data.pkl', mode='jobl... method get_table_dict (line 212) | def get_table_dict(self, ): method get_table_key_set (line 215) | def get_table_key_set(self, ): method prefix (line 219) | def prefix(self, key): method tabular_prefix (line 227) | def tabular_prefix(self, key): method log_variant (line 232) | def log_variant(self, log_file, variant_data): method record_tabular_misc_stat (line 237) | def record_tabular_misc_stat(self, key, values, placement='back'): method dump_tabular (line 257) | def dump_tabular(self, *args, **kwargs): method pop_prefix (line 279) | def pop_prefix(self, ): function safe_json (line 284) | def safe_json(data): function dict_to_safe_json (line 296) | def dict_to_safe_json(d): function create_exp_name (line 314) | def create_exp_name(exp_prefix, exp_id=0, seed=0): function create_log_dir (line 326) | def create_log_dir( function setup_logger (line 358) | def setup_logger( FILE: viskit/static/js/dropdowns-enhancement.js function Dropdown (line 23) | function Dropdown(element) { function positioning (line 151) | function positioning($menu, $control) { function closeOpened (line 161) | function closeOpened(event, menuTree) { function getSubMenuParents (line 191) | function getSubMenuParents($submenu) { function getParent (line 206) | function getParent($this) { FILE: viskit/static/js/jquery.loadTemplate-1.5.6.js function loadTemplate (line 8) | function loadTemplate(template, data, options) { function addTemplateFormatter (line 68) | function addTemplateFormatter(key, formatter) { function containsSlashes (line 76) | function containsSlashes(str) { function processArray (line 80) | function processArray(template, data, settings) { function addToQueue (line 155) | function addToQueue(template, selection, data, settings) { function prepareTemplateFromCache (line 163) | function prepareTemplateFromCache(template, selection, data, settings) { function uniqueId (line 172) | function uniqueId() { function urlAvoidCache (line 176) | function urlAvoidCache(url) { function loadAndPrepareTemplate (line 185) | function loadAndPrepareTemplate(template, selection, data, settings) { function loadTemplateFromDocument (line 206) | function loadTemplateFromDocument($template, selection, data, settings) { function prepareTemplate (line 221) | function prepareTemplate(template, data, settings) { function handleTemplateLoadingError (line 247) | function handleTemplateLoadingError(template, selection, data, settings,... function handleTemplateLoadingSuccess (line 275) | function handleTemplateLoadingSuccess($templateContainer, template, sele... function bindData (line 293) | function bindData(template, data, settings) { function processElements (line 367) | function processElements(attribute, template, data, settings, dataBindFu... function valueIsAllowedByBindingOptions (line 389) | function valueIsAllowedByBindingOptions(bindingOptionsContainer, value, ... function getBindingOptions (line 407) | function getBindingOptions(bindingOptionsContainer, settings) { function processAllElements (line 426) | function processAllElements(template, data, settings) { function applyDataBindFormatters (line 481) | function applyDataBindFormatters($elem, value, data, settings) { function getValue (line 490) | function getValue(data, param) { function applyFormatters (line 505) | function applyFormatters($elem, value, attr, settings) { FILE: viskit/tabulate.py function _pipe_segment_with_colons (line 81) | def _pipe_segment_with_colons(align, colwidth): function _pipe_line_with_colons (line 95) | def _pipe_line_with_colons(colwidths, colaligns): function _mediawiki_row_with_attrs (line 102) | def _mediawiki_row_with_attrs(separator, cell_values, colwidths, colalig... function _latex_line_begin_tabular (line 115) | def _latex_line_begin_tabular(colwidths, colaligns): function simple_separated_format (line 201) | def simple_separated_format(separator): function _isconvertible (line 215) | def _isconvertible(conv, string): function _isnumber (line 223) | def _isnumber(string): function _isint (line 235) | def _isint(string): function _type (line 247) | def _type(string, has_invisible=True): function _afterpoint (line 281) | def _afterpoint(string): function _padleft (line 308) | def _padleft(width, s, has_invisible=True): function _padright (line 320) | def _padright(width, s, has_invisible=True): function _padboth (line 332) | def _padboth(width, s, has_invisible=True): function _strip_invisible (line 344) | def _strip_invisible(s): function _visible_width (line 352) | def _visible_width(s): function _align_column (line 365) | def _align_column(strings, alignment, minwidth=0, has_invisible=True): function _more_generic (line 403) | def _more_generic(type1, type2): function _column_type (line 410) | def _column_type(strings, has_invisible=True): function _format (line 434) | def _format(val, valtype, floatfmt, missingval=""): function _align_header (line 459) | def _align_header(header, alignment, width): function _normalize_tabular_data (line 470) | def _normalize_tabular_data(tabular_data, headers): function tabulate (line 544) | def tabulate(tabular_data, headers=[], tablefmt="simple", function _build_simple_row (line 783) | def _build_simple_row(padded_cells, rowfmt): function _build_row (line 789) | def _build_row(padded_cells, colwidths, colaligns, rowfmt): function _build_line (line 799) | def _build_line(colwidths, colaligns, linefmt): function _pad_row (line 811) | def _pad_row(cells, padding): function _format_table (line 820) | def _format_table(fmt, headers, rows, colwidths, colaligns): FILE: visualize.py function load_df_from_tb_event (line 68) | def load_df_from_tb_event(tb_event, col='evaluation/average_returns'): function get_data_from_all_seeds (line 79) | def get_data_from_all_seeds(tb_file_list, col='evaluation/avearge_return... function exp_smooth (line 105) | def exp_smooth(df, alpha=0.4): function rolling (line 109) | def rolling(df, window=4): function mean_std (line 113) | def mean_std(df): function process_data (line 119) | def process_data(tb_list, col='evaluation/average_returns', verbose=True... function draw_graph (line 133) | def draw_graph(title='', FILE: wrappers/episode_monitor.py class EpisodeMonitor (line 9) | class EpisodeMonitor(gym.ActionWrapper): method __init__ (line 11) | def __init__(self, env: gym.Env): method _reset_stats (line 16) | def _reset_stats(self): method step (line 21) | def step(self, action: np.ndarray) -> TimeStep: method reset (line 42) | def reset(self) -> np.ndarray: FILE: wrappers/robosuite_wrapper.py class RobosuiteWrapper (line 7) | class RobosuiteWrapper(gym.ActionWrapper): method __init__ (line 8) | def __init__(self, env: gym.Env): method step (line 12) | def step(self, action: np.ndarray) -> TimeStep: method reset (line 20) | def reset(self) -> np.ndarray: FILE: wrappers/single_precision.py class SinglePrecision (line 8) | class SinglePrecision(gym.ObservationWrapper): method __init__ (line 9) | def __init__(self, env): method observation (line 24) | def observation(self, observation: np.ndarray) -> np.ndarray: