Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 02:07 AM
Thanks @Annapurna_Hiriy It is a spaCy text classification model.
I was using GPU to create the endpoint which is created successfully now. Actually failing at the next stage where I get an service log error:
[6558blggf5] An error occurred while loading the model. [E053] Could not read meta.json from /model/artifacts/spacy_model.
Model Load:
model_uri = "runs:/runs_ID/spacy_model"
loaded_model = mlflow.spacy.load_model(model_uri)
with mlflow.start_run():
wrapped_model_artifact_path = "mlflow_spacy_axp_python_model"
mlflow.pyfunc.log_model(artifact_path=wrapped_model_artifact_path,
python_model=SpacyModelWrapper(),
artifacts={"spacy_model": model_uri},
pip_requirements=requirements,
signature=signature)
# Retrieve the current run_id
run_id = mlflow.active_run().info.run_id
catalog = "default"
schema = "default"
model_name = "spacy_model"
mlflow.set_registry_uri("databricks-uc")
# Register the new version of the model under the existing registered model name
mlflow.register_model(f"runs:/{run_id}/{wrapped_model_artifact_path}", f"{catalog}.{schema}.{model_name}")