-
Notifications
You must be signed in to change notification settings - Fork 761
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
Changes from all commits
9bbf12e
35a7925
180c531
b572b57
6be16b1
6cf1e23
354f155
226e751
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
|
||
try: | ||
import mxnet as mx | ||
except ImportError: | ||
except (ImportError, OSError): | ||
mx = None | ||
|
||
try: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,14 +20,13 @@ | |
@serde.dataclass | ||
class Estimator: | ||
prediction_length: int | ||
context_length: int = serde.OrElse( | ||
lambda prediction_length: prediction_length * 2 | ||
) | ||
Comment on lines
-23
to
-25
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
context_length: int = serde.EVENTUAL | ||
|
||
use_feat_static_cat: bool = True | ||
cardinality: List[int] = serde.EVENTUAL | ||
|
||
def __eventually__(self, cardinality): | ||
def __eventually__(self, context_length, cardinality): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🪄 |
||
context_length.set_default(self.prediction_length * 2) | ||
if not self.use_feat_static_cat: | ||
cardinality.set([1]) | ||
else: | ||
|
There was a problem hiding this comment.
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 offmx