Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HWORKS-1535] Infer model schema from feature view #241

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

o-alex
Copy link
Contributor

@o-alex o-alex commented Aug 20, 2024

No description provided.

@o-alex o-alex requested a review from javierdlrm August 20, 2024 08:09
Comment on lines +114 to +118
warnings.warn(
"Model schema can only be inferred if both a feature view and training dataset version are known",
util.ProvenanceWarning,
stacklevel=1,
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this warning is useful for users. Do you think the following is clearer?
Model schema could not be inferred without feature view and training dataset version.

The method executes in any case. We just inform whether the model schema could not be inferred given the parameters.

Comment on lines +151 to +161
if self._model_schema is None:
if (
self._feature_view is not None
and self._training_dataset_version is not None
):
features, labels = self._feature_view.get_training_data(
training_dataset_version=self._training_dataset_version
)
self._model_schema = ModelSchema(
input_schema=features, output_schema=labels
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that having this in the constructor is enough, no need to retry it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants