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

Resplit input dataset in ray mode #549

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

chenyushuo
Copy link
Collaborator

Description

Similar to #415 , this code will split the dataset files into small pieces to avoid exceeding the memory limit of Ray, but this code requires users to run it in advance.

Usage

python tools/data_resplit.py --data-dir [path to source data] --resplit-dir [path to resplited dataset] [--ray-address [the address of the Ray cluster]]

@chenyushuo chenyushuo requested review from pan-x-c and yxdyc January 15, 2025 10:08
Copy link
Collaborator

@pan-x-c pan-x-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor issues, others LGTM

"""
os.makedirs(output_dir, exist_ok=True)
file_index = 0
max_byte_size = max_size * 1024**2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> << 20

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max_size may be of type float, I will modify its type annotations above.

tools/data_resplit.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants