Exemplo n.º 1
0
    def validate(self):
        p = Path(self.nn_path)
        if p != p.absolute():
            die('neural-net path must be absolute; got "%s"' % p)

        nn_cfg = p / 'nn_config.toml'
        if not nn_cfg.exists():
            die('bad setting for neural-net path: no such file %s', nn_cfg)
Exemplo n.º 2
0
Arquivo: kzn.py Projeto: pkgw/vernon
    def to_model(self):
        p = Path(self.path)
        if p != p.absolute():
            raise Exception('the \"path\" item of the kzn-model configuration '
                            'must be an absolute path')

        return KZNModel(
            self.path,
            self.soln_number,
        )