Skip to content

Commit 3b21d74

Browse files
Matthew Hoffmanmariosasko
andauthored
Bump max range of dill to 0.3.8 (#6630)
* Bump max range of dill to 0.3.8 Release on Jan 27, 2024: https://pypi.org/project/dill/0.3.8/#history * Update dill utils with latest dill version * Create constant to avoid code duplication * Nit --------- Co-authored-by: mariosasko <[email protected]>
1 parent 4693108 commit 3b21d74

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
python -m spacy download fr_core_news_sm
6262
- name: Install dependencies (latest versions)
6363
if: ${{ matrix.deps_versions == 'deps-latest' }}
64-
run: pip install --upgrade pyarrow huggingface-hub "dill<0.3.8"
64+
run: pip install --upgrade pyarrow huggingface-hub dill
6565
- name: Install dependencies (minimum versions)
6666
if: ${{ matrix.deps_versions != 'deps-latest' }}
6767
run: pip install pyarrow==8.0.0 huggingface-hub==0.19.4 transformers dill==0.3.1.1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
# As long as we allow pyarrow < 14.0.1, to fix vulnerability CVE-2023-47248
119119
"pyarrow-hotfix",
120120
# For smart caching dataset processing
121-
"dill>=0.3.0,<0.3.8", # tmp pin until dill has official support for determinism see https://github.com/uqfoundation/dill/issues/19
121+
"dill>=0.3.0,<0.3.9", # tmp pin until dill has official support for determinism see https://github.com/uqfoundation/dill/issues/19
122122
# For performance gains with apache arrow
123123
"pandas",
124124
# for downloading datasets over HTTPS

src/datasets/utils/_dill.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ def dumps(obj):
114114
def log(pickler, msg):
115115
dill._dill.log.info(msg)
116116

117-
elif config.DILL_VERSION.release[:3] in [version.parse("0.3.6").release, version.parse("0.3.7").release]:
117+
elif config.DILL_VERSION.release[:3] in [
118+
version.parse("0.3.6").release,
119+
version.parse("0.3.7").release,
120+
version.parse("0.3.8").release,
121+
]:
118122

119123
def log(pickler, msg):
120124
dill._dill.logger.trace(pickler, msg)
@@ -301,7 +305,11 @@ def _save_code(pickler, obj):
301305
dill._dill.log.info("# Co")
302306
return
303307

304-
elif config.DILL_VERSION.release[:3] in [version.parse("0.3.6").release, version.parse("0.3.7").release]:
308+
elif config.DILL_VERSION.release[:3] in [
309+
version.parse("0.3.6").release,
310+
version.parse("0.3.7").release,
311+
version.parse("0.3.8").release,
312+
]:
305313
# From: https://github.com/uqfoundation/dill/blob/dill-0.3.6/dill/_dill.py#L1104
306314
@pklregister(CodeType)
307315
def save_code(pickler, obj):

0 commit comments

Comments
 (0)