Reputation: 1
Hello I am using django application which has both asgi and wsgi modes. Now when I load the model in a standalone script it loads without any error but when I load it through an api call in django to perform task it gives an error:
File "/mnt/d/InnovativeSolutions/DataAnalytics/DataAnalyticsDataTransformation/env2/lib/python3.10/site-packages/pyspark/ml/param/__init__.py", line 276, in <listcomp>
src_name_attrs = [(x, getattr(cls, x)) for x in dir(cls)]
AttributeError: __provides__
Code:
from pyspark.ml import PipelineModel
pipeline_model: PipelineModel = await PipelineModel.load(model_location)
I have tried making the root method that is loading the ml model into an asynchronous type but still facing the same error.
The standalone script loads the model without any error.
Upvotes: 0
Views: 22