René's URL Explorer Experiment


Title: fix: Encode non-finite floats in feature server JSON responses by Zhuoxi2000 · Pull Request #6930 · feast-dev/feast · GitHub

Open Graph Title: fix: Encode non-finite floats in feature server JSON responses by Zhuoxi2000 · Pull Request #6930 · feast-dev/feast

X Title: fix: Encode non-finite floats in feature server JSON responses by Zhuoxi2000 · Pull Request #6930 · feast-dev/feast

Description: What this PR does / why we need it: A stored NaN or +/-inf float value makes POST /get-online-features fail with HTTP 500 (ValueError: Out of range float values are not JSON compliant). _value_to_native returns raw Python floats, and JSONResponse serializes with allow_nan=False, so one non-finite value fails the whole multi-feature response. The SDK get_online_features().to_dict() path serves the same value fine. /search and /retrieve-online-documents share convert_response_to_dict and are affected too. This PR encodes non-finite values as the protobuf JSON mapping strings "NaN", "Infinity" and "-Infinity". This applies to: scalar double_val / float_val double_list_val, float_list_val, double_set_val, float_set_val (element-wise) Finite values are unchanged, and lists without non-finite values still go through a plain list(...). Nested list_val / map_val / struct_val values get the fix through the existing recursion. The convert_response_to_dict docstring documents the encoding. If maintainers would rather emit null for non-finite values (the behaviour while ORJSONResponse was in use), this is a one-line change in _float_to_native. Not covered here: RemoteOnlineStore._build_online_response_from_json infers value types from the JSON, so it would read the encoded strings as strings and rejects a list that mixes numbers and strings. This path already failed before (the server returned 500), and null would not round-trip through it either. I can follow up on the client side once the encoding is settled. Which issue(s) this PR fixes: No separate issue; the bug is described above. Checks I've made sure the tests are passing. My commits are signed off (git commit -s) My PR title follows conventional commits format Testing Strategy Unit tests Integration tests Manual tests Testing is not required for this change New tests: tests/unit/test_feature_server.py::test_get_online_features_serves_non_finite_float[inf|-inf]: writes +/-inf to the online store, checks that the SDK serves it, then checks that /get-online-features returns 200 with "Infinity" / "-Infinity" and status PRESENT. tests/unit/test_feature_server_utils.py: covers NaN/inf/-inf for double_val and float_val, the four float/double list and set types, and a json.dumps(..., allow_nan=False) round trip of convert_response_to_dict. From sdk/python: python -m pytest tests/unit/test_feature_server_utils.py tests/unit/test_feature_server.py -q Without the fix (the tests only): 13 failed, 97 passed. Every new test fails, and the endpoint test fails with assert 500 == 200 / Out of range float values are not JSON compliant. With the fix: 110 passed. tests/unit/test_proto_json.py, tests/unit/test_feature_server_async.py and tests/unit/infra/feature_servers/test_mcp_server.py also pass (28 passed). ruff check and ruff format --check (0.16.9) are clean on the changed files. Misc

Open Graph Description: What this PR does / why we need it: A stored NaN or +/-inf float value makes POST /get-online-features fail with HTTP 500 (ValueError: Out of range float values are not JSON compliant). _value_to_n...

X Description: What this PR does / why we need it: A stored NaN or +/-inf float value makes POST /get-online-features fail with HTTP 500 (ValueError: Out of range float values are not JSON compliant). _value_to_n...

Opengraph URL: https://github.com/feast-dev/feast/pull/6930

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:d44fbfbb-ea75-9226-20c9-79995ed71c81
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEC7C:264CD6:E9029C:1351B14:6AFE9883
html-safe-nonce04e2e93b6318a111043745c416e77d025e71b600a9706284f17e602468367c0e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzdDOjI2NENENjpFOTAyOUM6MTM1MUIxNDo2QUZFOTg4MyIsInZpc2l0b3JfaWQiOiI1MzUyMzMyNTU2NTAwMDcxNzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8a368974d7cac50297eca0aa59c53f2e24fe117489275443698b7d3f23eb35e1
hovercard-subject-tagpull_request:4715842659
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6930/files
twitter:imagehttps://avatars.githubusercontent.com/u/113824357?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/113824357?s=400&v=4
og:image:altWhat this PR does / why we need it: A stored NaN or +/-inf float value makes POST /get-online-features fail with HTTP 500 (ValueError: Out of range float values are not JSON compliant). _value_to_n...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/feast-dev/feast git https://github.com/feast-dev/feast.git
octolytics-dimension-user_id57027613
octolytics-dimension-user_loginfeast-dev
octolytics-dimension-repository_id161133770
octolytics-dimension-repository_nwofeast-dev/feast
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id161133770
octolytics-dimension-repository_network_root_nwofeast-dev/feast
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/feast-dev/feast/pull/6930/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fpull%2F6930%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fpull%2F6930%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=feast-dev%2Ffeast
Reloadhttps://github.com/feast-dev/feast/pull/6930/files
Reloadhttps://github.com/feast-dev/feast/pull/6930/files
Reloadhttps://github.com/feast-dev/feast/pull/6930/files
feast-devhttps://github.com/feast-dev
feasthttps://github.com/feast-dev/feast
Codehttps://github.com/feast-dev/feast
Issues223 (223)https://github.com/feast-dev/feast/issues
Pull requests143 (143)https://github.com/feast-dev/feast/pulls
Discussionshttps://github.com/feast-dev/feast/discussions
Actionshttps://github.com/feast-dev/feast/actions
Security and quality1 (1)https://github.com/feast-dev/feast/security
Insightshttps://github.com/feast-dev/feast/insights
Sign up for GitHub https://github.com/signup?return_to=%2Ffeast-dev%2Ffeast%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ffeast-dev%2Ffeast%2Fissues%2Fnew%2Fchoose
jyejarehttps://github.com/jyejare
feast-dev:masterhttps://github.com/feast-dev/feast/tree/master
Zhuoxi2000:fix-rest-nonfinite-500https://github.com/Zhuoxi2000/feast/tree/fix-rest-nonfinite-500
Conversation 4 https://github.com/feast-dev/feast/pull/6930
Commits 3 https://github.com/feast-dev/feast/pull/6930/commits
Checks 32 https://github.com/feast-dev/feast/pull/6930/checks
Files changed https://github.com/feast-dev/feast/pull/6930/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/6930/files
fix: Encode non-finite floats in feature server JSON responses https://github.com/feast-dev/feast/pull/6930/files#top
Show all changes 3 commits https://github.com/feast-dev/feast/pull/6930/files
b05ac91 fix: Encode non-finite floats in feature server JSON responses Zhuoxi2000 Oct 1, 2026 https://github.com/feast-dev/feast/pull/6930/commits/b05ac91fd6e02563c692fafb0707969b3416745b
5bab0b9 perf: Materialize float collections once before the non-finite check Zhuoxi2000 Oct 6, 2026 https://github.com/feast-dev/feast/pull/6930/commits/5bab0b9470090efb21a454dbb7e425533f0741f1
b6f176c test: Restore CRLF line endings in test_feature_server.py Zhuoxi2000 Oct 6, 2026 https://github.com/feast-dev/feast/pull/6930/commits/b6f176ca08395473c7234aa0b36c6f22fd53a488
Clear filters https://github.com/feast-dev/feast/pull/6930/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/6930/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/6930/files
feature_server_utils.py https://github.com/feast-dev/feast/pull/6930/files#diff-c511d4ec0a1018abb05459f0cb01ca639b5f4089abbc3be5773c5d599ba64101
test_feature_server.py https://github.com/feast-dev/feast/pull/6930/files#diff-28c8f509b5d19e3c5c6ffe15fa5d7bac9a945beebfefc6cb904df0ca2799c18a
test_feature_server_utils.py https://github.com/feast-dev/feast/pull/6930/files#diff-a69939c75c6c8fab6dca227011b4c12b6e0aa70c7507d3e46d59e03904b09156
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L10
sdk/python/feast/feature_server_utils.pyhttps://github.com/feast-dev/feast/pull/6930/files#diff-c511d4ec0a1018abb05459f0cb01ca639b5f4089abbc3be5773c5d599ba64101
View file https://github.com/Zhuoxi2000/feast/blob/b6f176ca08395473c7234aa0b36c6f22fd53a488/sdk/python/feast/feature_server_utils.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/6930/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/6930/files#diff-c511d4ec0a1018abb05459f0cb01ca639b5f4089abbc3be5773c5d599ba64101
https://github.com/feast-dev/feast/pull/6930/files#diff-c511d4ec0a1018abb05459f0cb01ca639b5f4089abbc3be5773c5d599ba64101
https://github.com/feast-dev/feast/pull/6930/files#diff-c511d4ec0a1018abb05459f0cb01ca639b5f4089abbc3be5773c5d599ba64101
https://github.com/feast-dev/feast/pull/6930/files#diff-c511d4ec0a1018abb05459f0cb01ca639b5f4089abbc3be5773c5d599ba64101
jyejarehttps://github.com/jyejare
Oct 5, 2026https://github.com/feast-dev/feast/pull/6930/files#r4182191655
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/feast-dev/feast/pull/6930/files
https://github.com/feast-dev/feast/pull/6930/files#diff-c511d4ec0a1018abb05459f0cb01ca639b5f4089abbc3be5773c5d599ba64101
https://github.com/feast-dev/feast/pull/6930/files#diff-c511d4ec0a1018abb05459f0cb01ca639b5f4089abbc3be5773c5d599ba64101
https://github.com/feast-dev/feast/pull/6930/files#diff-c511d4ec0a1018abb05459f0cb01ca639b5f4089abbc3be5773c5d599ba64101
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L10
sdk/python/tests/unit/test_feature_server.pyhttps://github.com/feast-dev/feast/pull/6930/files#diff-28c8f509b5d19e3c5c6ffe15fa5d7bac9a945beebfefc6cb904df0ca2799c18a
View file https://github.com/Zhuoxi2000/feast/blob/b6f176ca08395473c7234aa0b36c6f22fd53a488/sdk/python/tests/unit/test_feature_server.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/6930/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/6930/files#diff-28c8f509b5d19e3c5c6ffe15fa5d7bac9a945beebfefc6cb904df0ca2799c18a
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L10
sdk/python/tests/unit/test_feature_server_utils.pyhttps://github.com/feast-dev/feast/pull/6930/files#diff-a69939c75c6c8fab6dca227011b4c12b6e0aa70c7507d3e46d59e03904b09156
View file https://github.com/Zhuoxi2000/feast/blob/b6f176ca08395473c7234aa0b36c6f22fd53a488/sdk/python/tests/unit/test_feature_server_utils.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/6930/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/6930/files#diff-a69939c75c6c8fab6dca227011b4c12b6e0aa70c7507d3e46d59e03904b09156
https://github.com/feast-dev/feast/pull/6930/files#diff-a69939c75c6c8fab6dca227011b4c12b6e0aa70c7507d3e46d59e03904b09156
https://github.com/feast-dev/feast/pull/6930/files#diff-a69939c75c6c8fab6dca227011b4c12b6e0aa70c7507d3e46d59e03904b09156
https://github.com/feast-dev/feast/pull/6930/files#diff-a69939c75c6c8fab6dca227011b4c12b6e0aa70c7507d3e46d59e03904b09156
https://github.com/feast-dev/feast/pull/6930/files#diff-a69939c75c6c8fab6dca227011b4c12b6e0aa70c7507d3e46d59e03904b09156
https://github.com/feast-dev/feast/pull/6930/files#diff-a69939c75c6c8fab6dca227011b4c12b6e0aa70c7507d3e46d59e03904b09156
Please reload this pagehttps://github.com/feast-dev/feast/pull/6930/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.