def load(cls, path: str, train: bool, selection='ucb1', _skip_level=False, C=lambda x: max(1 / np.sqrt(2 + x), 0.1)): root = load(path) assert isinstance(root, Node) return cls(root, train, selection=selection, _skip_level=_skip_level, C=C)
def load(cls, path: str): state_dict = load(path) return cls(models=state_dict['models'], train=False)
def load(cls, **kwargs): path = kwargs['path'] state_dict = load(path) mast = state_dict['mast'] tau = state_dict['tau'] return cls(mast, tau, False)
def load(cls, **kwargs): if 'path' not in kwargs: raise KeyError('Model path missing from kwargs.') model = load(kwargs['path']) return cls(model)
def load(cls, **kwargs): if 'path' not in kwargs: raise KeyError('Model path missing from kwargs.') model = load(kwargs.pop('path'), **kwargs) return cls(model, train=False)