def infer_features(self):
    '\n        Infers the set of features associated to this feature view from the input source.\n\n        Raises:\n            RegistryInferenceFailure: The set of features could not be inferred.\n        '
    df = pd.DataFrame()
    for feature_view_projection in self.source_feature_view_projections.values():
        for feature in feature_view_projection.features:
            dtype = feast_value_type_to_pandas_type(feature.dtype.to_value_type())
            df[f'{feature_view_projection.name}__{feature.name}'] = pd.Series(dtype=dtype)
            df[f'{feature.name}'] = pd.Series(dtype=dtype)
    for request_data in self.source_request_sources.values():
        for field in request_data.schema:
            dtype = feast_value_type_to_pandas_type(field.dtype.to_value_type())
            df[f'{field.name}'] = pd.Series(dtype=dtype)
    output_df: pd.DataFrame = self.udf.__call__(df)
    inferred_features = []
    for (f, dt) in zip(output_df.columns, output_df.dtypes):
        inferred_features.append(Field(name=f, dtype=from_value_type(python_type_to_feast_value_type(f, type_name=str(dt)))))
    if self.features:
        missing_features = []
        for specified_features in self.features:
            if (specified_features not in inferred_features):
                missing_features.append(specified_features)
        if missing_features:
            raise SpecifiedFeaturesNotPresentError([f.name for f in missing_features], self.name)
    else:
        self.features = inferred_features
    if (not self.features):
        raise RegistryInferenceFailure('OnDemandFeatureView', f"Could not infer Features for the feature view '{self.name}'.")
Infers the set of features associated to this feature view from the input source.

Raises:
    RegistryInferenceFailure: The set of features could not be inferred.
def infer_features(self):
    '\n        Infers the set of features associated to this feature view from the input source.\n\n        Raises:\n            RegistryInferenceFailure: The set of features could not be inferred.\n        '
    df = pd.DataFrame()
    for feature_view_projection in self.source_feature_view_projections.values():
        for feature in feature_view_projection.features:
            dtype = feast_value_type_to_pandas_type(feature.dtype.to_value_type())
            df[f'{feature_view_projection.name}__{feature.name}'] = pd.Series(dtype=dtype)
            df[f'{feature.name}'] = pd.Series(dtype=dtype)
    for request_data in self.source_request_sources.values():
        for field in request_data.schema:
            dtype = feast_value_type_to_pandas_type(field.dtype.to_value_type())
            df[f'{field.name}'] = pd.Series(dtype=dtype)
    output_df: pd.DataFrame = self.udf.__call__(df)
    inferred_features = []
    for (f, dt) in zip(output_df.columns, output_df.dtypes):
        inferred_features.append(Field(name=f, dtype=from_value_type(python_type_to_feast_value_type(f, type_name=str(dt)))))
    if self.features:
        missing_features = []
        for specified_features in self.features:
            if (specified_features not in inferred_features):
                missing_features.append(specified_features)
        if missing_features:
            raise SpecifiedFeaturesNotPresentError([f.name for f in missing_features], self.name)
    else:
        self.features = inferred_features
    if (not self.features):
        raise RegistryInferenceFailure('OnDemandFeatureView', f"Could not infer Features for the feature view '{self.name}'.")