awslabs / gluonts

Probabilistic time series modeling in Python
https://ts.gluon.ai
Apache License 2.0
4.64k stars 755 forks source link

Fix testutils for gluonts.shell on recent python versions #3234

Closed lostella closed 3 weeks ago

lostella commented 3 weeks ago

Issue #, if available: Running tests for gluonts.shell raises

E   ValueError: mutable default <class 'gluonts.shell.serve.Settings'> for field settings is not allowed: use default_factory

on Python 3.11.

Description of changes: Fix the above issues. Also, one conditional mxnet import fails with an OSError on my machine which is not caught, so I'm adding it to the try/catch.

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 commented 3 weeks ago

Superseded by fixes in #3228