Title: feat: Add SavedDatasetLanceStorage by haoxu0 · Pull Request #7001 · feast-dev/feast · GitHub
Open Graph Title: feat: Add SavedDatasetLanceStorage by haoxu0 · Pull Request #7001 · feast-dev/feast
X Title: feat: Add SavedDatasetLanceStorage by haoxu0 · Pull Request #7001 · feast-dev/feast
Description: What this PR does / why we need it: Adds SavedDatasetLanceStorage, so an existing Lance dataset can be recorded as a saved dataset without moving or rewriting it. This is the path for a dataset produced outside Feast. create_saved_dataset takes a RetrievalJob, executes it and persists the result, which is wrong for an embedding dataset that a Ray or Spark job already wrote to Lance. BaseRegistry.apply_saved_dataset records metadata only, and that is what this storage class is for: storage = SavedDatasetLanceStorage(LanceFormat(version=7), uri="s3://bucket/embeddings") registry.apply_saved_dataset( SavedDataset( name="poi_embeddings_v7", features=[], join_keys=[], storage=storage, tags={"model": "clip-vit-l-14", "recall_at_10": "0.9137"}, ), project, ) The format must pin a version SavedDatasetLanceStorage rejects an unpinned LanceFormat. A saved dataset addressing whatever version is latest at read time does not identify the rows it was created from, so a measurement recorded against it stops being attributable. version is preferable to tag, since a tag can be moved afterwards. Note that LanceSource defaults table_format to an unpinned LanceFormat rather than None, so from_data_source on a plain source raises rather than silently recording a drifting reference. Dispatch Lance is the fourth class to claim the custom_storage oneof field, after postgres, clickhouse and couchbase. to_proto therefore goes through SavedDatasetStorage._custom_storage_proto (#6988) so the payload records the writing class; otherwise from_proto would resolve by import order. Verified that a Lance payload reads back as SavedDatasetLanceStorage with all four claimants registered, across several import orders: [postgres clickhouse couchbase lance] claimants=4 -> SavedDatasetLanceStorage version=7 [lance postgres clickhouse couchbase] claimants=4 -> SavedDatasetLanceStorage version=7 [clickhouse lance couchbase postgres] claimants=4 -> SavedDatasetLanceStorage version=7 LanceSource is also registered in _DATA_SOURCE_TO_SAVED_DATASET_STORAGE, so SavedDatasetStorage.from_data_source resolves it. Which issue(s) this PR fixes: N/A. Follows #6988, which made the shared custom_storage field safe for a fourth claimant. 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 sdk/python/tests/unit/infra/data_sources/test_saved_dataset_lance_storage.py, 14 tests: round trip by uri and by namespace+table, the payload recording the storage class, an unpinned format refused, a wrong-typed format refused, uri and table exclusivity, a table without namespace_impl refused, to_data_source and from_data_source preserving the pin, a non-Lance source refused, the _DATA_SOURCE_TO_SAVED_DATASET_STORAGE registration, and dispatch with all four custom_storage claimants present. Against master: ruff check and ruff format --check clean, and mypy feast reports the same 24 pre-existing errors as origin/master, none added. The adjacent merged suites (tests/unit/infra/data_sources/, tests/unit/test_table_format.py, tests/unit/test_saved_dataset_storage_dispatch.py) show an identical set of failures to clean master, all in test_mlflow_dataset_source.py from a missing local dependency.
Open Graph Description: What this PR does / why we need it: Adds SavedDatasetLanceStorage, so an existing Lance dataset can be recorded as a saved dataset without moving or rewriting it. This is the path for a dataset pro...
X Description: What this PR does / why we need it: Adds SavedDatasetLanceStorage, so an existing Lance dataset can be recorded as a saved dataset without moving or rewriting it. This is the path for a dataset pro...
Opengraph URL: https://github.com/feast-dev/feast/pull/7001
X: @github
Domain: github.com
| 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 | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:6e64c3da-c229-8cd8-8f4c-1d685d8866af |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CD0C:2EA5E9:EF661A:13BECDB:6AFE9A01 |
| html-safe-nonce | 52121c73498d27edda20b55e056bdf792aac2bb5ffc9bc2e9b6626a06110dcb5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDBDOjJFQTVFOTpFRjY2MUE6MTNCRUNEQjo2QUZFOUEwMSIsInZpc2l0b3JfaWQiOiIxODUxMDk2NTAzNjgzMDI5NTA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d105336b24df21c925ab9f258585a00f03f9886a5feee480238f850e4cc390ef |
| hovercard-subject-tag | pull_request:4839690229 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/feast-dev/feast/pull/7001/files |
| twitter:image | https://avatars.githubusercontent.com/u/20422210?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/20422210?s=400&v=4 |
| og:image:alt | What this PR does / why we need it: Adds SavedDatasetLanceStorage, so an existing Lance dataset can be recorded as a saved dataset without moving or rewriting it. This is the path for a dataset pro... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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 |
Links:
Viewport: width=device-width