We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53e5b36 commit 0585642Copy full SHA for 0585642
tuning/data/data_config.py
@@ -100,10 +100,11 @@ def _validate_dataset_config(dataset_config) -> DataSetConfig:
100
c.builder = builder
101
if "sampling" in kwargs and kwargs["sampling"] is not None:
102
ratio = kwargs["sampling"]
103
- assert isinstance(ratio, float) and (
104
- 0 <= ratio <= 1.0
+ # YAML parsing causes 1.0 (float) to be cast to 1 (int)
+ assert isinstance(ratio, (float, int)) and (
105
+ 0.0 <= ratio <= 1.0
106
), f"sampling ratio: {ratio} should be float and in range [0.0,1.0]"
- c.sampling = ratio
107
+ c.sampling = float(ratio)
108
if "rename_columns" in kwargs and kwargs["rename_columns"] is not None:
109
rename = kwargs["rename_columns"]
110
assert isinstance(
0 commit comments