Closed superpowertriangel closed 7 months ago
Hi @superpowertriangel, I will check it ASAP. In the meantime, could you share a MWE?
I used optuna to finde the best hyperparameters and then created a new model from the hyperparameters:
dist = functools.partial(utils.math.minkowski_distance, p=p)
engine=neighbors.SWINN( graph_k=graph_k, prune_prob=prune_prob, n_iters=n_iters, dist_func=dist, seed=42) model=preprocessing.StandardScaler() | neighbors.KNNClassifier(neighbor,engine=engine,softmax=softmax)
Thanks @smastelini
Hey @superpowertriangel, I just merged #1508 to fix that issue. Please, let me know if that does the trick for you.
Cheers,
@smastelini Everything works like a charm now!! Thanks a lot
Hi when trying to open a pickeled pipeline with KNN_Classifier (with SWINN) and a StandardScaler I get the following issue. The same happens when trying to use copy.deepcopy on the trained model.
File "/app/main.py", line 3, in
pickle.load(open(f"KNN_Classifier.pkl", 'rb'))
File "/usr/local/lib/python3.10/site-packages/river/neighbors/ann/nn_vertex.py", line 23, in hash
return self.uuid
AttributeError: 'Vertex' object has no attribute 'uuid'
Versions
river version: 0.21.0 Python version: 3.10 Operating system: wsl, macos