Title: test_get_online_features fails on GPU hosts: expected tensor built on cpu · Issue #6778 · feast-dev/feast · GitHub
Open Graph Title: test_get_online_features fails on GPU hosts: expected tensor built on cpu · Issue #6778 · feast-dev/feast
X Title: test_get_online_features fails on GPU hosts: expected tensor built on cpu · Issue #6778 · feast-dev/feast
Description: Expected Behavior sdk/python/tests/unit/online_store/test_online_retrieval.py::test_get_online_features should pass on any host, with or without a CUDA device. Current Behavior On a host with CUDA available, the test fails: RuntimeError:...
Open Graph Description: Expected Behavior sdk/python/tests/unit/online_store/test_online_retrieval.py::test_get_online_features should pass on any host, with or without a CUDA device. Current Behavior On a host with CUDA ...
X Description: Expected Behavior sdk/python/tests/unit/online_store/test_online_retrieval.py::test_get_online_features should pass on any host, with or without a CUDA device. Current Behavior On a host with CUDA ...
Opengraph URL: https://github.com/feast-dev/feast/issues/6778
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_get_online_features fails on GPU hosts: expected tensor built on cpu","articleBody":"## Expected Behavior\n\n`sdk/python/tests/unit/online_store/test_online_retrieval.py::test_get_online_features` should pass on any host, with or without a CUDA device.\n\n## Current Behavior\n\nOn a host with CUDA available, the test fails:\n\n RuntimeError: Expected all tensors to be on the same device, but got other\n is on cpu, different from other tensors on cuda:0\n (when checking argument in method wrapper_CUDA__equal)\n\n`OnlineResponse.to_tensor()` places its output on `cuda` when a GPU is present (`sdk/python/feast/online_response.py`), but the `avg_orders_day` assertion builds its expected tensor without a `device=` argument, so it stays on `cpu`.\n\nThe test already computes `device` and passes it for the `driver_id` and `trips` assertions — only `avg_orders_day` omits it.\n\n## Steps to reproduce\n\nOn a machine with CUDA-enabled torch installed:\n\n python -m pytest sdk/python/tests/unit/online_store/test_online_retrieval.py::test_get_online_features\n\nFails with the GPU visible; passes under `CUDA_VISIBLE_DEVICES=\"\"`. CI is CPU-only, where `device` resolves to `\"cpu\"` and the omission has no effect.\n\n### Specifications\n\n- Version: master (0.66.0 dev)\n- Platform: Ubuntu 24.04 (WSL2), Python 3.11, torch 2.13.0+cu130, RTX 4050\n- Subsystem: online store / tests\n\n## Possible Solution\n\nPass `device=device` to the expected tensor, matching the neighbouring assertions. Submitted as #6777.\n","author":{"url":"https://github.com/piyush182004","@type":"Person","name":"piyush182004"},"datePublished":"2026-08-24T19:31:37Z","url":"https://github.com/feast-dev/feast/issues/6778"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2944002e-a71e-2a7b-8c61-328b994ca57d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E7E6:22A512:EBA9BD:1424B7F:6AFE981F |
| html-safe-nonce | 82f5c8e02036a9b1b8331ed0d56756866902e655402d8c72be086fb9bcf10606 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0U2OjIyQTUxMjpFQkE5QkQ6MTQyNEI3Rjo2QUZFOTgxRiIsInZpc2l0b3JfaWQiOiIzMzIxNTkyODE2NDgzNjA0NTExIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4a0c6b981cf444f194a509089a5373bf2f2a570e99f707357098b2e71d9a8995 |
| hovercard-subject-tag | issue:5238653918 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/6778/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a0c0dc85e50191331c0b0c02455c78b0fc2c573258e90fefd1514f67c7c0c6f9/feast-dev/feast/issues/6778 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a0c0dc85e50191331c0b0c02455c78b0fc2c573258e90fefd1514f67c7c0c6f9/feast-dev/feast/issues/6778 |
| og:image:alt | Expected Behavior sdk/python/tests/unit/online_store/test_online_retrieval.py::test_get_online_features should pass on any host, with or without a CUDA device. Current Behavior On a host with CUDA ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | piyush182004 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width