Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.8 from workflows, run on 3.11 #3228

Merged
merged 8 commits into from
Nov 5, 2024

Conversation

lostella
Copy link
Contributor

@lostella lostella commented Oct 17, 2024

Issue #, if available: Python 3.8 reached EOL, and some packages are not distributed for it in their latest versions.

Description of changes:

  • update github workflows to run on Python (up to) 3.11
  • fix tests and testutils that would break on 3.11
  • delete some unused workflows
  • update sphinx version used in the docs build workflow

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup

@lostella lostella added the CI This item concerns continuous integration label Oct 17, 2024
@lostella lostella changed the title Update workflows to run with latest Python versions Drop Python 3.8 from workflows, run on more recent versions Nov 4, 2024
@lostella lostella marked this pull request as ready for review November 4, 2024 23:58
@lostella lostella added the dependency This involves dependencies issues label Nov 4, 2024
@lostella lostella requested a review from shchur November 4, 2024 23:59
@lostella lostella requested review from abdulfatir and canerturkmen and removed request for shchur and abdulfatir November 5, 2024 00:23
@@ -50,7 +50,7 @@ def test_custom_neg_bin_cdf(total_count, probs, value):
@pytest.mark.parametrize("probs", [0.1, 0.5, 0.8])
@pytest.mark.parametrize("total_count", [3, 7, 100])
@pytest.mark.parametrize("value", [0.1, 0.5, 0.9])
def test_custom_neg_bin_icdf(total_count, probs, value):
def test_custom_studentt_icdf(total_count, probs, value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why studentt? (the function body refers to NegBin still.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha! rebasing issue I suppose

@@ -8,7 +8,7 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.8']
python-version: ['3.12']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prophet itself only appears to support until 3.11

https://github.com/facebook/prophet/blob/main/python/pyproject.toml

@@ -8,7 +8,7 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.9']
python-version: ['3.12']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 3.12 in some places and 3.11 in others? should 3.11 be our standard latest especially in extras?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that makes sense, updating

@lostella lostella changed the title Drop Python 3.8 from workflows, run on more recent versions Drop Python 3.8 from workflows, run on 3.11 Nov 5, 2024
Comment on lines -23 to -25
context_length: int = serde.OrElse(
lambda prediction_length: prediction_length * 2
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.11 would complain here, that the default value in a dataclass cannot be mutable

@@ -30,7 +30,7 @@

try:
import mxnet as mx
except ImportError:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import above can raise OSError as well, so I'm catching that too to turn off mx

Copy link
Contributor

@canerturkmen canerturkmen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!


use_feat_static_cat: bool = True
cardinality: List[int] = serde.EVENTUAL

def __eventually__(self, cardinality):
def __eventually__(self, context_length, cardinality):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🪄

@lostella lostella merged commit bb31530 into awslabs:dev Nov 5, 2024
18 checks passed
@lostella lostella deleted the test-on-311-312 branch November 5, 2024 10:55
@lostella lostella added the pending v0.16.x backport This contains a fix to be backported to the v0.16.x branch label Nov 7, 2024
lostella added a commit to lostella/gluonts that referenced this pull request Nov 7, 2024
*Issue #, if available:* Python 3.8 reached EOL, and some packages are
not distributed for it in their latest versions.

*Description of changes:*
- update github workflows to run on Python (up to) 3.11
- fix tests and testutils that would break on 3.11
- delete some unused workflows
- update sphinx version used in the docs build workflow


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.


**Please tag this pr with at least one of these labels to make our
release process faster:** BREAKING, new feature, bug fix, other change,
dev setup
@lostella lostella mentioned this pull request Nov 7, 2024
lostella added a commit that referenced this pull request Nov 7, 2024
*Description of changes:* Backporting PRs
- #3228 
- #3232 
- #3233 


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.


**Please tag this pr with at least one of these labels to make our
release process faster:** BREAKING, new feature, bug fix, other change,
dev setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI This item concerns continuous integration dependency This involves dependencies issues pending v0.16.x backport This contains a fix to be backported to the v0.16.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants