Skip to content
Merged
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
4 changes: 4 additions & 0 deletions skyrl/backends/skyrl_train/utils/io/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ def upload_directory(local_path: str, cloud_path: str) -> None:
raise ValueError(f"Destination must be a cloud path, got: {cloud_path}")

fs = _get_filesystem(cloud_path)
# NOTE (sumanthrh): While uploading files in a directory `src` to an existing directory `dst` with fsspec,
# we need to ensure that the file path ends in a trailing slash. otherwise, fsspec will create a subdirectory
# `dst/src` instead of directly syncing contents of `src` into the root `dst` directory
local_path = os.path.join(local_path, "")
if cloud_path.startswith("s3://"):
call_with_s3_retry(fs, fs.put, local_path, fs._strip_protocol(cloud_path), recursive=True)
else:
Expand Down
Loading