我使用FeatureStoreClient().log_model(...,flavor = mlflow.spark,...)
记录模型,在尝试使用
fs.score_batch(f"models:/{model_name}/Production", batch_scoring)
字符串
在数据块运行时环境中。
在运行批处理推断后,我得到以下错误:
2023/11/17 20:51:40 WARNING mlflow.pyfunc: Detected one or more mismatches between the model's dependencies and the current Python environment:
- databricks-feature-lookup (current: uninstalled, required: databricks-feature-lookup==0.*)
To fix the mismatches, call `mlflow.pyfunc.get_model_dependencies(model_uri)` to fetch the model's environment and install dependencies using the resulting environment file.
2023/11/17 20:51:40 WARNING mlflow.pyfunc: Calling `spark_udf()` with `env_manager="local"` does not recreate the same environment that was used during training, which may lead to errors or inaccurate predictions. We recommend specifying `env_manager="conda"`, which automatically recreates the environment that was used to train the model and performs inference in the recreated environment.
PythonException: 'ModuleNotFoundError: No module named 'ml''. Full traceback below:
型
我不知道该如何解决,任何帮助都将不胜感激。
我一直在. -在log_model中尝试不同的风格-尝试更好地理解mlflow模型风格API
1条答案
按热度按时间qojgxg4l1#
似乎model.predict找不到ml模块。你可以检查你的代码,也许你正在使用自定义模块ml.py(或包),简单搜索导入。自定义代码必须包含在fs.log_model中