Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kashif committed Oct 23, 2023
1 parent 37c3455 commit 1c9feec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/gluonts/core/serde/_dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _call(self, env):
def dataclass(
cls=None,
*,
init=True,
init=False,
repr=True,
eq=True,
order=False,
Expand All @@ -131,7 +131,7 @@ def dataclass(
"""

# assert frozen
assert init
assert init is False

if cls is None:
return _dataclass
Expand Down
2 changes: 1 addition & 1 deletion src/gluonts/ext/rotbaum/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class FeatureImportanceResult(BaseModel):
feat_dynamic_real: List[Union[List[float], float]]
feat_dynamic_cat: List[Union[List[float], float]]

@model_validator()
@model_validator(mode="before")
@classmethod
def check_shape(cls, values):
"""
Expand Down
2 changes: 1 addition & 1 deletion test/dataset/artificial/test_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_recipe_dataset(recipe) -> None:
freq="D",
feat_static_real=[BasicFeatureInfo(name="feat_static_real_000")],
feat_static_cat=[
CategoricalFeatureInfo(name="foo", cardinality=10)
CategoricalFeatureInfo(name="foo", cardinality="10")
],
feat_dynamic_real=[BasicFeatureInfo(name="binary_causal")],
),
Expand Down

0 comments on commit 1c9feec

Please sign in to comment.