MCPcopy Index your code
hub / github.com/feast-dev/feast / FeatureNameCollisionError

Class FeatureNameCollisionError

sdk/python/feast/errors.py:276–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274
275
276class FeatureNameCollisionError(FeastError):
277 def __init__(self, feature_refs_collisions: List[str], full_feature_names: bool):
278 if full_feature_names:
279 collisions = [ref.replace(":", "__") for ref in feature_refs_collisions]
280 error_message = (
281 "To resolve this collision, please ensure that the feature views or their own features "
282 "have different names. If you're intentionally joining the same feature view twice on "
283 "different sets of entities, please rename one of the feature views with '.with_name'."
284 )
285 else:
286 collisions = [ref.split(":")[1] for ref in feature_refs_collisions]
287 error_message = (
288 "To resolve this collision, either use the full feature name by setting "
289 "'full_feature_names=True', or ensure that the features in question have different names."
290 )
291
292 feature_names = ", ".join(set(collisions))
293 super().__init__(
294 f"Duplicate features named {feature_names} found.\n{error_message}"
295 )
296
297
298class SpecifiedFeaturesNotPresentError(FeastError):

Callers 2

_validate_feature_refsFunction · 0.90
get_online_featuresMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected