Download tasks/codeql_python_benchmark51_v2/pyvul-1a630dd8f83b2e29740d/patch.diff from Benchanything/checkerbench: direct link, hf CLI and curl.
- Browser
- Download file 987 Bytes
-
https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_python_benchmark51_v2/pyvul-1a630dd8f83b2e29740d/patch.diff
- Command line
-
hf download hf://datasets/Benchanything/checkerbench/tasks/codeql_python_benchmark51_v2/pyvul-1a630dd8f83b2e29740d/patch.diff
-
curl -L -o patch.diff https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_python_benchmark51_v2/pyvul-1a630dd8f83b2e29740d/patch.diff
987 Bytes
| diff --git a/mlflow/utils/file_utils.py b/mlflow/utils/file_utils.py | |
| index 32653b343..4b59a3673 100644 | |
| --- a/mlflow/utils/file_utils.py | |
| +++ b/mlflow/utils/file_utils.py | |
| def make_tarfile(output_filename, source_dir, archive_name, custom_filter=None): | |
| tar_info.mtime = 0 | |
| return tar_info if custom_filter is None else custom_filter(tar_info) | |
| - unzipped_filename = tempfile.mktemp() | |
| + unzipped_file_handle, unzipped_filename = tempfile.mkstemp() | |
| try: | |
| with tarfile.open(unzipped_filename, "w") as tar: | |
| tar.add(source_dir, arcname=archive_name, filter=_filter_timestamps) | |
| def make_tarfile(output_filename, source_dir, archive_name, custom_filter=None): | |
| ) as gzipped_tar, open(unzipped_filename, "rb") as tar: | |
| gzipped_tar.write(tar.read()) | |
| finally: | |
| - os.remove(unzipped_filename) | |
| + os.close(unzipped_file_handle) | |
| def _copy_project(src_path, dst_path=""): | |