Skip to content

Commit

Permalink
Merge pull request #56 from mindsdb/staging
Browse files Browse the repository at this point in the history
[hotfix] 24.5.1.1
  • Loading branch information
paxcema authored May 14, 2024
2 parents e30f30d + d485aae commit 034ebb7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dataprep_ml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dataprep_ml.base import StatisticalAnalysis, DataAnalysis

__version__ = '24.5.1.0'
__version__ = '24.5.1.1'
__name__ = "dataprep_ml"


Expand Down
11 changes: 7 additions & 4 deletions dataprep_ml/splitters.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,14 @@ def splitter(
train, dev, test = simple_split(data, pct_train, pct_dev, pct_test)

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

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

if min(len(train), len(dev), len(test)) < horizon:
raise Exception(f"Dataset size is too small for the specified horizon size ({horizon})")

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

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dataprep-ml"
version = "24.5.1.0"
version = "24.5.1.1"
description = "Automated dataframe analysis for Machine Learning pipelines."
authors = ["MindsDB Inc. <[email protected]>"]
license = "GPL-3.0"
Expand Down

0 comments on commit 034ebb7

Please sign in to comment.