Skip to content

Commit 034ebb7

Browse files
authored
Merge pull request #56 from mindsdb/staging
[hotfix] 24.5.1.1
2 parents e30f30d + d485aae commit 034ebb7

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

dataprep_ml/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dataprep_ml.base import StatisticalAnalysis, DataAnalysis
22

3-
__version__ = '24.5.1.0'
3+
__version__ = '24.5.1.1'
44
__name__ = "dataprep_ml"
55

66

dataprep_ml/splitters.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,14 @@ def splitter(
5858
train, dev, test = simple_split(data, pct_train, pct_dev, pct_test)
5959

6060
# Final assertions for time series
61-
if min(len(train), len(dev)) < tss.get('window', 1):
62-
raise Exception(f"Dataset size is too small for the specified window size ({tss.get('window', 1)})")
61+
window = tss.get('window', 1) if tss.get('window', 1) else 1
62+
horizon = tss.get('horizon', 1) if tss.get('horizon', 1) else 1
6363

64-
if min(len(train), len(dev), len(test)) < tss.get('horizon', 1):
65-
raise Exception(f"Dataset size is too small for the specified horizon size ({tss.get('horizon', 1)})")
64+
if min(len(train), len(dev)) < window:
65+
raise Exception(f"Dataset size is too small for the specified window size ({window})")
66+
67+
if min(len(train), len(dev), len(test)) < horizon:
68+
raise Exception(f"Dataset size is too small for the specified horizon size ({horizon})")
6669

6770
return {"train": train, "test": test, "dev": dev, "stratified_on": stratify_on}
6871

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "dataprep-ml"
3-
version = "24.5.1.0"
3+
version = "24.5.1.1"
44
description = "Automated dataframe analysis for Machine Learning pipelines."
55
authors = ["MindsDB Inc. <[email protected]>"]
66
license = "GPL-3.0"

0 commit comments

Comments
 (0)