feat: Add skip_validation parameter to push() for ODFVs with missing UDF dependencies #5894
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
store.push()fails withModuleNotFoundErrorwhen On-Demand Feature Views contain UDFs that reference modules unavailable in the current environment (e.g., training code not deployed to serving infrastructure). This blocks data ingestion in production environments.Changes
Transformation deserialization bypass:
PandasTransformation.from_proto()andPythonTransformation.from_proto()acceptskip_udfparameterdill.loads()when enabledCall chain propagation:
push(),push_async(),write_to_online_store(),write_to_online_store_async()acceptskip_validationparameterlist_all_feature_views()→ registry → proto_registry_utilsOnDemandFeatureView.from_proto()propagatesskip_udfto transformation parsingCaching strategy:
skip_udf=Trueto prevent cache pollution with dummy UDFs_list_all_feature_views_cached,_list_on_demand_feature_views_cached) and non-cached pathsUsage
All parameters default to
Falsefor backward compatibility. No API breaking changes.Which issue(s) this PR fixes:
Addresses ModuleNotFoundError when pushing data with ODFVs containing UDFs that reference environment-specific modules.
Misc
apply()methodOriginal prompt
This section details on the original issue you should resolve
<issue_title>Read On-Demand Feature View and deserialization while pushing data</issue_title>
<issue_description> ## Description
A ModuleNotFoundError occurs when calling store.push() to ingest data into the Online Store. The error is triggered when Feast attempts to synchronize the registry and encounters an On-Demand Feature View.
Because Feast uses dill to serialize/deserialize User Defined Functions (UDFs), it fails if the execution environment lacks the specific Python module (in this case, training) that was present when the UDF was originally defined and registered.
🔍 Error Traceback
Steps to Reproduce
Root Cause Analysis
This is a serialization dependency issue. When dill (the library Feast uses for pickling) serializes a function, it often stores references to the modules where global variables or dep...
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.