You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the example notebooks provided by the recommenders library, specifically when executing the following import statement:
fromrecommenders.datasetsimportmovielens
I encounter an AttributeError stating that the module pandera has no attribute SchemaModel. This error prevents the notebook from running further and seems to be related to the movielens.py module within the recommenders.datasets package.
The full error message and traceback are provided in the Other Comments section below.
Despite trying multiple runtimes, the issue persists across all of them.
How do we replicate the issue?
Set Up Databricks Environment:
Launch an Databricks workspace.
Create a new cluster using any of the runtimes mentioned above.
Install Required Libraries:
Install the recommenders library on the cluster:
pip install recommenders
Create a New Notebook:
In the workspace, create a new Python notebook attached to the cluster.
Run the Following Code in a Notebook Cell:
fromrecommenders.datasetsimportmovielens
Observe the Error:
The AttributeError should occur, indicating that pandera has no attribute SchemaModel.
Expected behavior (i.e. solution)
The import statement from recommenders.datasets import movielens should execute without any errors.
The movielens dataset module should be available for use in the notebook.
All example notebooks using the recommenders library should run successfully on Azure Databricks.
Willingness to contribute
Yes, I can contribute for this issue independently.
Yes, I can contribute for this issue with guidance from Recommenders community.
No, I cannot contribute at this time.
Other Comments
Full Error Message and Traceback:
AttributeError: module 'pandera' has no attribute 'SchemaModel'
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-abc123456789> in <module>
1 # Other imports (if any)
----> 2 from recommenders.datasets import movielens
3 # Rest of the code (if any)
~/databricks/python/lib/python3.10/site-packages/recommenders/datasets/movielens.py in <module>
582 return not df[columns].duplicated().any()
583
--> 584 class MockMovielensSchema(pa.SchemaModel):
585 """
586 Mock dataset schema to generate fake data for testing purpose.
AttributeError: module 'pandera' has no attribute 'SchemaModel'
Additional Information:
I have verified that pandera is installed and up-to-date in the environment:
importpanderaprint(pandera.__version__)
Attempted solutions:
Upgrading pandera to the latest version did not resolve the issue.
Uninstalling and reinstalling pandera did not resolve the issue.
Downgrading pandera to earlier versions leads to other compatibility issues.
It appears that the recommenders library may not be compatible with the latest versions of pandera, or there may be an issue with how SchemaModel is imported or used in movielens.py.
Environment Details:
Python Version: 3.10.x (as per the Databricks runtime)
recommenders Library Version: Latest available via pip as of the date of this report.
Request:
Guidance on resolving this import error.
Confirmation on whether this is a known issue or a bug that needs fixing.
The text was updated successfully, but these errors were encountered:
Description
When running the example notebooks provided by the
recommenders
library, specifically when executing the following import statement:I encounter an
AttributeError
stating that the modulepandera
has no attributeSchemaModel
. This error prevents the notebook from running further and seems to be related to themovielens.py
module within therecommenders.datasets
package.The full error message and traceback are provided in the Other Comments section below.
In which platform does it happen?
Despite trying multiple runtimes, the issue persists across all of them.
How do we replicate the issue?
Set Up Databricks Environment:
Install Required Libraries:
recommenders
library on the cluster:Create a New Notebook:
Run the Following Code in a Notebook Cell:
Observe the Error:
AttributeError
should occur, indicating thatpandera
has no attributeSchemaModel
.Expected behavior (i.e. solution)
from recommenders.datasets import movielens
should execute without any errors.movielens
dataset module should be available for use in the notebook.recommenders
library should run successfully on Azure Databricks.Willingness to contribute
Other Comments
Full Error Message and Traceback:
Additional Information:
pandera
is installed and up-to-date in the environment:pandera
to the latest version did not resolve the issue.pandera
did not resolve the issue.pandera
to earlier versions leads to other compatibility issues.recommenders
library may not be compatible with the latest versions ofpandera
, or there may be an issue with howSchemaModel
is imported or used inmovielens.py
.Environment Details:
pip
as of the date of this report.Request:
The text was updated successfully, but these errors were encountered: