Comments (2)
I think you're going to need to load the model weights directly using torch APIs directly and then re-save the model with MLflow in order to reflect the changes in your import module resolution. Torch uses pickle, which will maintain references to relative path imports for finding appropriate class definitions to deserialize objects from their stored bytes data.
This isn't an MLflow issue, though. This is a core Python concept with respect to how namespaces are resolved.
Can you update that old location with an import to the new file in your project? If not, you might want to work on some custom deserialization logic to handle the loading within your framework.
from mlflow.
Thanks you, I just do what you recommended, that import the model class temporarily to an old file to load the model and saved a new one, it is solved.
from mlflow.
Related Issues (20)
- [BUG] Exception During Model Logging with Custom Ollama Class HOT 6
- comparing metrics with timestamp is not working if step is same between them [BUG] HOT 4
- [BUG] Can't delete runs with mlflow gc due to api timeout HOT 11
- [FR] Display the complete dataset profile in the data details view HOT 1
- Improve `_init_server` HOT 2
- [FR] Improve UI stability to corrupt metric files HOT 2
- [BUG] UI Crash - Unterminated string in JSON at position 5000 for mlflow.log-model.history HOT 4
- [BUG] pyfunc.load_model ignores logged model with trust_remote_code set to True HOT 1
- [BUG] HOT 2
- [BUG]Prompt Engineering request from UI to Deployments Server Connection TimeOut HOT 5
- [FR]MLflow Deployments Server Support inside corporate proxy HOT 3
- Fix typos
- Fix docstrings in `mlflow/tracing` HOT 1
- [FR] Multiple retrievers with mlflow.langchain.log_model HOT 1
- [BUG] MLFlow Deployment Server for LLMs using chatCompletion on Azure OpenAI text-davinci-003 HOT 4
- [SETUP-BUG] Multi-Cloud artifact-destination migration HOT 3
- mlflow.pyfunc.load_model is loading model of class <class 'mlflow.pyfunc.PyFuncModel'> instead of original class HOT 2
- [BUG] ModuleNotFoundError: No module named 'fcntl' HOT 2
- Artifact files are not removed from tmp/ folder HOT 3
- [BUG] MLFlow infer signature requires transformers but the model is not a transformer 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 mlflow.