Skip to content

Commit fafeb57

Browse files
Suport dask 2024.8.1
Fixes tokenization errors when using dask 2024.8.1+. Starting with this version, dask enforces that tokens remain stable across pickle round-trips (dask/dask#11320). Capturing self in a lambda fails this check because instance objects can have non-deterministic pickle representations. Since calculate_variable_value_length is already a static method, replacing self with the class name is enough to remove the capture.
1 parent f915a58 commit fafeb57

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

cdisc_rules_engine/dataset_builders/contents_define_vlm_dataset_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def build(self):
6666
data_contents_with_vlm["variable_value_length"] = data_contents_with_vlm.data[
6767
["variable_value", "define_vlm_data_type"]
6868
].apply(
69-
lambda row: self.calculate_variable_value_length(
69+
lambda row: ValuesDatasetBuilder.calculate_variable_value_length(
7070
row["variable_value"], row["define_vlm_data_type"]
7171
),
7272
axis=1,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies = [
1515
"cachetools >=6.1.0",
1616
"cdisc-library-client >=0.1.6",
1717
"click >=8.1.7",
18-
"dask[dataframe,array] >=2024.6.0, <2024.8.1",
18+
"dask[dataframe,array] >=2024.6.0, <2025.4.0",
1919
"fastparquet >=2024.2.0",
2020
"importlib-metadata >=8.5.0",
2121
"jsonata-python >=0.6.0",

0 commit comments

Comments
 (0)