diff --git a/CHANGELOG.md b/CHANGELOG.md index f16f34236..ff4f7dfa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ Note that Sockeye has checks in place to not translate with an old model that wa Each version section may have have subsections for: _Added_, _Changed_, _Removed_, _Deprecated_, and _Fixed_. +## [1.18.97] +### Changed +- Updated to PyYAML 5.1 + ## [1.18.96] ### Changed - Extracted prepare vocab functionality in the build vocab step into its own function. This matches the pattern in prepare data and train where the main() function only has argparsing, and it invokes a separate function to do the work. This is to allow modules that import this one to circumvent the command line. diff --git a/requirements/requirements.docs.txt b/requirements/requirements.docs.txt index 6ef57dcda..b386daaca 100644 --- a/requirements/requirements.docs.txt +++ b/requirements/requirements.docs.txt @@ -2,4 +2,4 @@ sphinx>=1.7.4 sphinx_rtd_theme sphinx-autodoc-typehints>=1.3.0 recommonmark -pyyaml==3.12 +pyyaml>=5.1 diff --git a/requirements/requirements.gpu-cu100.txt b/requirements/requirements.gpu-cu100.txt index 625e8a52e..f6973ddd6 100644 --- a/requirements/requirements.gpu-cu100.txt +++ b/requirements/requirements.gpu-cu100.txt @@ -1,4 +1,4 @@ -pyyaml==3.12 +pyyaml>=5.1 mxnet-cu100mkl==1.4.0 numpy>=1.14 typing diff --git a/requirements/requirements.gpu-cu80.txt b/requirements/requirements.gpu-cu80.txt index 680ff78ef..0936809fd 100644 --- a/requirements/requirements.gpu-cu80.txt +++ b/requirements/requirements.gpu-cu80.txt @@ -1,4 +1,4 @@ -pyyaml==3.12 +pyyaml>=5.1 mxnet-cu80mkl==1.4.0 numpy>=1.14 typing diff --git a/requirements/requirements.gpu-cu90.txt b/requirements/requirements.gpu-cu90.txt index c114db76e..ec0cbabe3 100644 --- a/requirements/requirements.gpu-cu90.txt +++ b/requirements/requirements.gpu-cu90.txt @@ -1,4 +1,4 @@ -pyyaml==3.12 +pyyaml>=5.1 mxnet-cu90mkl==1.4.0 numpy>=1.14 typing diff --git a/requirements/requirements.gpu-cu92.txt b/requirements/requirements.gpu-cu92.txt index be566517d..f612fb85b 100644 --- a/requirements/requirements.gpu-cu92.txt +++ b/requirements/requirements.gpu-cu92.txt @@ -1,4 +1,4 @@ -pyyaml==3.12 +pyyaml>=5.1 mxnet-cu92mkl==1.4.0 numpy>=1.14 typing diff --git a/requirements/requirements.txt b/requirements/requirements.txt index d1a959c47..47e8f58c7 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,4 +1,4 @@ -pyyaml==3.12 +pyyaml>=5.1 mxnet-mkl==1.4.0 numpy>=1.14 typing diff --git a/sockeye/__init__.py b/sockeye/__init__.py index 21184d409..8d16fa951 100644 --- a/sockeye/__init__.py +++ b/sockeye/__init__.py @@ -11,4 +11,4 @@ # express or implied. See the License for the specific language governing # permissions and limitations under the License. -__version__ = '1.18.96' +__version__ = '1.18.97' diff --git a/sockeye/config.py b/sockeye/config.py index bbac2b88d..dcbf99140 100644 --- a/sockeye/config.py +++ b/sockeye/config.py @@ -34,6 +34,8 @@ class Config(yaml.YAMLObject, metaclass=TaggedYamlObjectMetaclass): Base configuration object that supports freezing of members and YAML (de-)serialization. Actual Configuration should subclass this object. """ + yaml_loader = yaml.UnsafeLoader # type: ignore + def __init__(self): self.__add_frozen() @@ -119,7 +121,7 @@ def load(fname: str) -> 'Config': :return: Configuration. """ with open(fname) as inp: - obj = yaml.load(inp) + obj = yaml.load(inp, Loader=yaml.UnsafeLoader) # type: ignore obj.__add_frozen() return obj