Skip to content

Commit be36b41

Browse files
Dependencies upgrade (#1264)
* Upgrade NLTK * Upgrade dep * Update env matrix * update dep, bump version * Update py version * Rmv lock * Add lock * Lint
1 parent f20d9bb commit be36b41

File tree

8 files changed

+1894
-1810
lines changed

8 files changed

+1894
-1810
lines changed

.github/workflows/doc_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: setup python
2121
uses: actions/setup-python@v2
2222
with:
23-
python-version: 3.9
23+
python-version: 3.11
2424

2525
- name: install all dependencies
2626
run: |

.github/workflows/lightwood.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest]
17-
python-version: ["3.9", "3.10", "3.11"]
17+
python-version: ["3.10", "3.11", "3.12"]
1818
steps:
1919
- uses: actions/checkout@v2
2020
- name: Set up Python ${{ matrix.python-version }}

lightwood/analysis/nc/nc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ def apply_inverse(self, nc, significance):
265265

266266

267267
class TSAbsErrorErrFunc(TSErrFunc):
268-
"""Calculates absolute error nonconformity for time series problems.
268+
r"""Calculates absolute error nonconformity for time series problems.
269269
270-
For each forecasted step ``y_h`` for h \in 1..horizon, nonconformity is defined as
270+
For each forecasted step ``y_h`` for h \\in 1..horizon, nonconformity is defined as
271271
272272
.. math::
273273
| y_ni - hat{y}_ni |

lightwood/encoder/text/pretrained.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,10 @@ def _tune_model(self, train_dataset, val_dataset, optim, scheduler, n_epochs=1):
282282
for vbatch in val_dataset:
283283
val_loss += self._call(vbatch).item()
284284

285-
log.info(f"Epoch {epoch+1} train batch {bidx+1} - Validation loss: {val_loss/len(val_dataset)}")
285+
log.info(
286+
f"Epoch {epoch + 1} train batch {bidx + 1} - "
287+
f"Validation loss: {val_loss / len(val_dataset)}"
288+
)
286289
if val_loss / len(val_dataset) >= best_val_loss:
287290
break
288291

@@ -318,7 +321,7 @@ def _call(self, batch):
318321
return loss
319322

320323
def _train_callback(self, epoch, loss):
321-
log.info(f"{self.name} at epoch {epoch+1} and loss {loss}!")
324+
log.info(f"{self.name} at epoch {epoch + 1} and loss {loss}!")
322325

323326
def encode(self, column_data: Iterable[str]) -> torch.Tensor:
324327
"""

lightwood/ensemble/ts_stacked_ensemble.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, target, mixers: List[BaseMixer], data: EncodedDs, dtype_dict:
2929
raise Exception('This ensemble can only be used to forecast!')
3030
self.ts_analysis = ts_analysis
3131
self.horizon = self.ts_analysis['tss'].horizon
32-
self.target_cols = [target] + [f'{target}_timestep_{t+1}' for t in range(self.horizon - 1)]
32+
self.target_cols = [target] + [f'{target}_timestep_{t + 1}' for t in range(self.horizon - 1)]
3333
self.agg_dim = 2
3434
self.opt_max_iter = 1000
3535

poetry.lock

Lines changed: 1878 additions & 1797 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "lightwood"
7-
version = "25.3.3.3"
7+
version = "25.5.2.1"
88
description = "Lightwood is Legos for Machine Learning."
99
authors = ["MindsDB Inc."]
1010
license = "GPL-3.0-only"
1111
readme = "README.md"
1212

1313
[tool.poetry.dependencies]
14-
python = ">=3.9,<3.12"
15-
type_infer = ">=0.0.15"
16-
dataprep_ml = ">=24.5.1.2,<24.6.1.0"
17-
mindsdb-evaluator = ">=0.0.13"
14+
python = ">=3.10,<3.13"
15+
type_infer = "0.0.22"
16+
dataprep_ml = "0.0.24"
17+
mindsdb-evaluator = "0.0.17"
1818
numpy = ">1.23.0"
1919
nltk = ">=3.9"
2020
pandas = ">=2.0.0, <2.1.0"

tests/unit_tests/encoder/time_series/test_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ def test_overfit(self):
8282
results = torch.isclose(answer, correct_answer, atol=1)
8383
acc = (results.sum() / results.numel()).item()
8484

85-
print(f'Transformer correctly reconstructed {round(100*acc, 2)}%')
85+
print(f'Transformer correctly reconstructed {round(100 * acc, 2)}%')
8686
assert acc >= 0.5

0 commit comments

Comments
 (0)