-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30d8ebb
commit b27c133
Showing
6 changed files
with
185 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
num_episodes: 100 | ||
num_episodes: 10 | ||
max_steps: 10 | ||
max_episodes_per_file: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
import glob | ||
import tarfile | ||
|
||
import tensorflow_datasets as tfds | ||
from huggingface_hub import HfApi | ||
|
||
LOCAL_FILEPATH="/home/peter/Code/mujoco_robotics_environments/mujoco_robotics_environments/data" | ||
|
||
if __name__=="__main__": | ||
|
||
for folder_name in os.listdir(LOCAL_FILEPATH): | ||
if os.path.isdir(os.path.join(LOCAL_FILEPATH, folder_name)): | ||
OUTPUT_FILENAME = folder_name + '.tar.gz' | ||
with tarfile.open(OUTPUT_FILENAME, "w:xz") as tar: | ||
tar.add(os.path.join(LOCAL_FILEPATH, folder_name), arcname=".") | ||
|
||
# upload to huggingface | ||
api = HfApi() | ||
api.upload_file( | ||
repo_id="peterdavidfagan/transporter_networks_mujoco", | ||
repo_type="dataset", | ||
path_or_fileobj=f"./{OUTPUT_FILENAME}", | ||
path_in_repo=f"/{OUTPUT_FILENAME}", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.