Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tqdm for rtx import. #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions fog_x/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy as np
import polars
import pandas
from tqdm import tqdm

from fog_x.database import (
DatabaseConnector,
Expand Down Expand Up @@ -432,12 +433,13 @@ def _build_rtx_episodes_from_tfds_builder(

data_type = builder.info.features["steps"]

for tf_episode in ds:
logger.info(tf_episode)
pbar_len = len(ds)
for i, tf_episode in tqdm(enumerate(ds), position=0, desc="Episodes", total=pbar_len):
logger.debug(tf_episode)
fog_episode = self.new_episode(
metadata=additional_metadata,
)
for step in tf_episode["steps"]:
for step in tqdm(tf_episode["steps"], position=1, desc="Steps"):
ret = self._load_rtx_step_data_from_tf_step(
step, data_type,
)
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies = [
"opencv-python",
"sqlalchemy==1.4.51",
"smart_open",
"tqdm",
]
description = "An Efficient and Scalable Data Collection and Management Framework For Robotics Learning"
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
Loading