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

[HOPSWORKS-3201][append] set training dataset start end time #679

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions python/hsfs/core/feature_view_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,34 @@ def _set_event_time(self, feature_view_obj, training_dataset_obj):
split.name == TrainingDatasetSplit.TRAIN
and not split.start_time
):
df = feature_view_obj.query.read() if df is None else df
df = (
feature_view_obj.query._left_feature_group.select_all().read()
if df is None
else df
)
split.start_time = self._get_start_time(df, event_time)
if split.name == TrainingDatasetSplit.TEST and not split.end_time:
df = feature_view_obj.query.read() if df is None else df
df = (
feature_view_obj.query._left_feature_group.select_all().read()
if df is None
else df
)
split.end_time = self._get_end_time(df, event_time)
else:
if not training_dataset_obj.event_start_time:
df = feature_view_obj.query.read() if df is None else df
df = (
feature_view_obj.query._left_feature_group.select_all().read()
if df is None
else df
)
training_dataset_obj.event_start_time = self._get_start_time(
df, event_time
)
df = feature_view_obj.query.read() if df is None else df
df = (
feature_view_obj.query._left_feature_group.select_all().read()
if df is None
else df
)
training_dataset_obj.event_end_time = self._get_end_time(
df, event_time
)
Expand Down