Comments (2)
Thanks for reporting this.
I will look into making Ivis models serializable using pickle, is sounds like a useful feature if we can do it. Hopefully that will solve the issues you're encountering.
from ivis.
I was coding a solution here, which consisted in renaming the currently defined Ivis.__getstate__()
to Ivis._get_json()
and creating new Ivis.__getstate__()
and Ivis.__setstate__()
methods. The solution consisted in the following:
- In
Ivis.__getstate__()
, the internal dictionarystate
would be obtained. However, for theencoder_
,model_
,neighbour_matrix_
, andsupervised_model_
attributes, the following procedure would be adopted:.save()
would be called for each of them, generating aannoy.index
file forneighbour_matrix_
and.h5
files for the rest. Then, using the built-inbase64
module, these files would be encoded into a Base64 string, which would be attributed to the respective parameters. - In
Ivis.__setstate__()
, the same four parameters described above would be checked. If present,base64
would be used to decode them into the binary files they originally were. Then, they would be used to load the original parameters back into their respective attributes.
However, I stumbled in a problem: when calling Ivis.neighbour_matrix_.save(<path>)
, or even Ivis.neighbour_matrix_.index.save(<path>)
, no file was produced, regardless of path type (absolute or relative) or file name. I am currently assuming this is an annoy
-related issue.
I am just posting this in case this reasoning is helpful to you.
from ivis.
Related Issues (20)
- Suggest implementing `predict_proba` and `predict` methods for Ivis object. HOT 1
- How does ivis compare to UMAP? HOT 2
- Add conda-forge package
- About scaling HOT 2
- `KeyError` followed by `joblib.externals.loky.process_executor.BrokenProcessPool` when using `sklearn.model_selection.GridSearchCV` with `n_jobs != 1` HOT 3
- One of the unit tests (knn_retrieval) can fail (machine dependent?) HOT 1
- OSError HOT 1
- attempt to apply non-function HOT 9
- Extremely slow extraction of KNN neighbours on 100k samples HOT 4
- InternalError: Graph execution error: HOT 4
- 2D visulization of crowded cluster with ivis HOT 1
- model_save: optimizer is not compatible with pickle HOT 4
- How to get stable results? HOT 4
- Ivis is not able to run inference on a sparse matrix
- Reproducibility HOT 2
- `chunk_size` in knn set to 0 HOT 2
- Ivis seems to provoke errors when composing a sklearn.pipeline.Pipeline passed to sklearn.model_selection.GridSearchCV and executed in parallel HOT 10
- classification_weight Parameter HOT 2
- Meaning of "Observations" on https://bering-ivis.readthedocs.io/en/latest/hyperparameters.html HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ivis.