Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hello, wonderful people,
I'm stuck and am hoping you can help! In Fabric I have several ML models registered:
For the sake of conversation, let's pretend the "name" of the model I'm interested in is test-model6.
If I run the following:
from synapse.ml.predict import MLFlowTransformer df = spark.read.format("delta").load( "abfss://[stuff goes here]" ) model = MLFlowTransformer( inputCols=list(df.columns), outputCol='predictions', modelName='test-model6', modelVersion=1 )
I get back:
RuntimeError: Unable to get model info: No such file or directory: '/tmp/tmpwfi3sxe4/MLmodel'
If I run the following:
model = mlflow.sklearn.load_model(model_uri="models:/test-model6/latest")
I get back:
MlflowException: Could not find an "MLmodel" configuration file at "/tmp/tmpdbthhvco/"
I can't figure out any way to actually apply my ML model in Fabric!
I do have a lakehouse attached, the same lakehouse which was attached during the generation of the models.
Any idea what could be going on? Do I need to submit a support ticket? Sure there's probably just something silly I'm missing or misunderstanding about MLflow in Fabric!
Solved! Go to Solution.
Hi @AlanZ
I applied the following code got from the tutorial documentation without having any error. There are two other ways to apply the PREDICT function in the model in the documentation, which you can try.
If all methods failed, you might take a moment to try out the entire tutorial in the previous documentation. Test if the sample provided in the tutorial works at your end. If it works, the cause probably doesn't lie in the environment. Then you might need to check the model registration process.
Updated:
Additionally, open the related Experiment, select the model and save the run as an ML model. You can save it as a new model with a different name. Then try to load this new model. This might work.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi @AlanZ
I applied the following code got from the tutorial documentation without having any error. There are two other ways to apply the PREDICT function in the model in the documentation, which you can try.
If all methods failed, you might take a moment to try out the entire tutorial in the previous documentation. Test if the sample provided in the tutorial works at your end. If it works, the cause probably doesn't lie in the environment. Then you might need to check the model registration process.
Updated:
Additionally, open the related Experiment, select the model and save the run as an ML model. You can save it as a new model with a different name. Then try to load this new model. This might work.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Check out the October 2024 Fabric update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.