Skip to content

Commit

Permalink
Refactor prepare function for improved code readability and consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
KeplerC committed Aug 26, 2024
1 parent a8a05ef commit c866200
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions benchmarks/openx.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _recursively_load_h5_data(data):
print(f"Loaded {count} trajectories in {loading_time:.2f} seconds start time {start_time} end time {end_time}")
return loading_time, count

def main_1():
def prepare():
# Parse command-line arguments
parser = argparse.ArgumentParser(description="Download, process, and read RLDS data.")
parser.add_argument("--exp_dir", type=str, default=DEFAULT_EXP_DIR, help="Experiment directory.")
Expand Down Expand Up @@ -227,7 +227,7 @@ def main_1():
vla_handler.convert_data_to_vla_format(loader)


def main_2():
def evaluation():
# Parse command-line arguments
parser = argparse.ArgumentParser(description="Download, process, and read RLDS data.")
parser.add_argument("--exp_dir", type=str, default=DEFAULT_EXP_DIR, help="Experiment directory.")
Expand Down Expand Up @@ -267,4 +267,6 @@ def main_2():


if __name__ == "__main__":
main_2()
prepare()
exit()
evaluation()

0 comments on commit c866200

Please sign in to comment.