def serialize(self, path: Path) -> None: try: # serialize Predictor type with (path / 'type.txt').open('w') as fp: fp.write(fqname_for(self.__class__)) except Exception as e: raise IOError( f'Cannot serialize {fqname_for(self.__class__)}') from e
def serialize(self, path: Path) -> None: # serialize Predictor type with (path / "type.txt").open("w") as fp: fp.write(fqname_for(self.__class__)) with (path / "version.json").open("w") as fp: json.dump( {"model": self.__version__, "gluonts": gluonts.__version__}, fp )
def serialize(self, path: Path) -> None: try: # serialize Predictor type with (path / "type.txt").open("w") as fp: fp.write(fqname_for(self.__class__)) except Exception as e: raise IOError( f"Cannot serialize {fqname_for(self.__class__)} in {path}" ) from e
def serialize(self, path: Path) -> None: # serialize Predictor type with (path / "type.txt").open("w") as fp: fp.write(fqname_for(self.__class__))