Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update encoding in movielens_recommendations_transformers.py #1406

Closed
wants to merge 7 commits into from

Conversation

SuryanarayanaY
Copy link
Contributor

@SuryanarayanaY SuryanarayanaY commented Jun 20, 2023

At present the example tutorial raising the UnicodeDecodeError at movies=pd.read_csv()

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3114: invalid continuation byte

Hence adding the encoding='latin-1' to the movies=pd.read_csv(...,encoding='latin-1') will get rid of this error.

Hence I proposed this code change for review and approval.

Attaching gist for reference to check the error and solution that works fine.

At present the example tutorial raising the UnicodeDecodeError at the code movies=pd.read_csv()

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3114: invalid continuation byte

Hence adding the encoding='latin-1' to the movies=pd.read_csv(...,encoding='latin-1') will get rid of this error.

Hence I proposed this code change for review and approval.
Copy link
Collaborator

@haifeng-jin haifeng-jin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
I was able to verify the bug and fix.

The only thing is the code formatting.
Would you please use black to format the .py file and also change the corresponding .ipython and .md file?

Updated encoding in .ipynb file also as requested
Updated encoding in .md file as requested.
@fchollet
Copy link
Member

Please format the code using black (see test failure log)

Done the changes as suggested for black format
Removed white spaces and done required changes for black format.
@SuryanarayanaY
Copy link
Contributor Author

All the checks passed now. May please review.

@gbaned
Copy link

gbaned commented Oct 31, 2023

Hi @haifeng-jin, Can you please review this PR ? Thank you!

1 similar comment
@gbaned
Copy link

gbaned commented Nov 28, 2023

Hi @haifeng-jin, Can you please review this PR ? Thank you!

Copy link
Collaborator

@haifeng-jin haifeng-jin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By looking at the conflicts of the PR, the bug seems already been patched with an ISO encoding. Would you please check again while resolving the conflicts? Thanks!

@gbaned
Copy link

gbaned commented Dec 16, 2023

Hi @SuryanarayanaY Can you please check @haifeng-jin's comments and keep us posted ? Thank you!

@gbaned
Copy link

gbaned commented Jan 8, 2024

Hi @SuryanarayanaY Any update on this PR? Please. Thank you!

@sachinprasadhs
Copy link
Collaborator

Closing the PR, since the tutorial is already migrated and working fine with the Keras 3 using ISO encoding here https://keras.io/examples/structured_data/movielens_recommendations_transformers/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants