-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support working_dir in from_spark #5826
Conversation
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also add the support by setting an environment variable for the working directory?
00ff574
to
347580f
Compare
Added env var |
86d4429
to
b7fdc35
Compare
@lhoestq would you or another maintainer be able to review please? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice ! I think HF_WORKING_DIR
is not a good env variable name for this case, I guess you can remove it.
@@ -221,6 +255,7 @@ def _prepare_split( | |||
self._validate_cache_dir() | |||
|
|||
max_shard_size = convert_file_size_to_int(max_shard_size or MAX_SHARD_SIZE) | |||
self._repartition_df_if_needed(max_shard_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice !
I removed the env var |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
Show benchmarksPyArrow==8.0.0 Show updated benchmarks!Benchmark: benchmark_array_xd.json
Benchmark: benchmark_getitem_100B.json
Benchmark: benchmark_indices_mapping.json
Benchmark: benchmark_iterating.json
Benchmark: benchmark_map_filter.json
Show updated benchmarks!Benchmark: benchmark_array_xd.json
Benchmark: benchmark_getitem_100B.json
Benchmark: benchmark_indices_mapping.json
Benchmark: benchmark_iterating.json
Benchmark: benchmark_map_filter.json
|
Thank you! |
Accept
working_dir
as an argument toDataset.from_spark
. Setting a non-NFS working directory for Spark workers to materialize to will improve write performance.