Skip to content

Commit

Permalink
Merge branch 'dev' into bim
Browse files Browse the repository at this point in the history
  • Loading branch information
kashif authored Nov 6, 2024
2 parents afb12c3 + 12089c7 commit 411948a
Show file tree
Hide file tree
Showing 36 changed files with 72 additions and 189 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python 3.8
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11

- name: Install dependencies
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/doctests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.9']
python-version: ['3.11']
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install other dependencies
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install tools
run: pip install "ruff==0.2.2" "docformatter[tomli]==1.5.0"
- name: Ruff (Flake8)
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/mxnet_nightly.yml

This file was deleted.

5 changes: 2 additions & 3 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ jobs:
- uses: actions/checkout@v4
- name: Get tags
run: git fetch --tags origin
- name: Set up Python 3.8
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install -U pip
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/style_type_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v1
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install .
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/test_release_unix_nightly.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/test_release_win32_nightly.yml

This file was deleted.

5 changes: 2 additions & 3 deletions .github/workflows/tests-nixtla.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.8']
python-version: ['3.11']
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install other dependencies
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/tests-nursery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
python-version: ['3.8']
python-version: ['3.11']
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}
Expand All @@ -17,8 +17,7 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install MXNet (Linux)
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/tests-prophet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.8']
python-version: ['3.11']
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install other dependencies
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/tests-r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.9']
python-version: ['3.11']
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}
Expand All @@ -32,8 +32,7 @@ jobs:
libxml2-dev \
libcurl4-openssl-dev
Rscript -e 'install.packages(c("forecast", "nnfor", "hts"), repos="https://cloud.r-project.org")'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/tests-torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11']
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}
Expand All @@ -21,11 +21,10 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install ".[arrow]" \
pip install ".[arrow,torch,shell]" \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-m-competitions.txt \
-r requirements/requirements-pytorch.txt \
-r requirements/requirements-extras-cpflows.txt
-r requirements/requirements-extras-m-competitions.txt
pip install --no-deps -r requirements/requirements-extras-cpflows.txt
- name: Test with pytest
run: |
pytest -n2 --doctest-modules --ignore test/nursery test
2 changes: 1 addition & 1 deletion .github/workflows/tests-xgboost.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.11']
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11']
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install other dependencies
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ notedown
lxml~=5.1.0
pytest-runner~=2.11
recommonmark
sphinx~=4.0
sphinx~=5.0
docutils<=0.16
optuna~=2.10
furo==2022.6.4.1
Expand Down
4 changes: 2 additions & 2 deletions requirements/requirements-extras-shell.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
flask~=2.0
waitress~=2.1.2
flask~=3.0
waitress~=3.0.1
4 changes: 2 additions & 2 deletions requirements/requirements-pytorch.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
torch>=1.9,<3
lightning>=2.2.2,<2.4
lightning>=2.2.2,<2.5
# Capping `lightning` does not cap `pytorch_lightning`, so we cap manually
pytorch_lightning>=2.2.2,<2.4
pytorch_lightning>=2.2.2,<2.5
scipy~=1.10; python_version > "3.7.0"
scipy~=1.7.3; python_version <= "3.7.0"
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy~=1.16
numpy>=1.16,<2.2
pandas>=1.0,<3
pydantic>=1.7,<3
tqdm~=4.23
Expand Down
4 changes: 2 additions & 2 deletions src/gluonts/dataset/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import logging
from dataclasses import dataclass, field, InitVar
from typing import Any, Iterable, Optional, Type, Union, cast
from typing import Any, Iterable, Optional, Type, Union

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -351,4 +351,4 @@ def is_uniform(index: pd.PeriodIndex) -> bool:
False
"""

return cast(bool, np.all(np.diff(index.asi8) == index.freq.n))
return bool(np.all(np.diff(index.asi8) == index.freq.n))
2 changes: 1 addition & 1 deletion src/gluonts/dataset/repository/_ercot.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def generate_ercot_dataset(dataset_path: Path, dataset_writer: DatasetWriter):
df.ffill(inplace=True)
regions = [col for col in df.columns if col not in ["ds", "y"]]

freq = "1H"
freq = "1h"
prediction_length = 24

start = pd.Period(df["ds"][0], freq=freq)
Expand Down
6 changes: 3 additions & 3 deletions src/gluonts/dataset/repository/_gp_copula_2019.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class GPCopulaDataset(NamedTuple):
# original dataset can be found at https://archive.ics.uci.edu/ml/datasets/ElectricityLoadDiagrams20112014#
num_series=370,
prediction_length=24,
freq="H",
freq="h",
rolling_evaluations=7,
max_target_dim=None,
),
Expand All @@ -73,7 +73,7 @@ class GPCopulaDataset(NamedTuple):
# note there are 963 in the original dataset from https://archive.ics.uci.edu/ml/datasets/PEMS-SF
num_series=963,
prediction_length=24,
freq="H",
freq="h",
rolling_evaluations=7,
max_target_dim=None,
),
Expand All @@ -82,7 +82,7 @@ class GPCopulaDataset(NamedTuple):
url=root + "solar_nips.tar.gz",
num_series=137,
prediction_length=24,
freq="H",
freq="h",
rolling_evaluations=7,
max_target_dim=None,
),
Expand Down
Loading

0 comments on commit 411948a

Please sign in to comment.