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 base.py #15070

Merged
merged 2 commits into from
Jul 31, 2024
Merged

Update base.py #15070

merged 2 commits into from
Jul 31, 2024

Conversation

di-wendy
Copy link
Contributor

Fix the average_rating bug

Description

After merging the PR (#15047), the bug is still not fully fixed. When I print the average rating in the data loader, the data type is now correct but the value seems to be casted from an integer:

Little Hunan Restaurant has rating: 5.0
Hot Wok Bistro has rating: 4.0
Little Shanghai Restaurant has rating: 2.0
Oceanic Restaurant has rating: 3.0
Town of dumpling has rating: 5.0

It is due to another bug that the rating was overwritten by the inner loop (line 75), we can fix it by renaming the variable. Please note that in Google's response, the place.rating field is the average rating.

Fixes # (issue)

New Package?

Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

  • No

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • No

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • I stared at the code and made sure it makes sense

Suggested Checklist:

Fix the average_rating bug
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 31, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 31, 2024
@logan-markewich logan-markewich enabled auto-merge (squash) July 31, 2024 22:17
@logan-markewich logan-markewich merged commit 6cba89a into run-llama:main Jul 31, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants