Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

historical feature update #88

Closed
wants to merge 8 commits into from

Conversation

wintonzheng
Copy link
Contributor

  • Does this PR have impact on local development experience? If yes, make sure you have a plan and add the documentations to address issues that come with the change
  • bump version
  • make a release
  • publish to pypi service

@wintonzheng wintonzheng force-pushed the shu/historical_feature_performance branch 4 times, most recently from 5a8d175 to 62c951b Compare October 29, 2023 16:25
@@ -456,6 +460,140 @@ async def get_historical_features(
results=final_df.to_dict(orient="records"),
)

@app.post(f"{settings.WYVERN_HISTORICAL_FEATURES_PATH}_v2")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the version here follow the standard api/v2/get_historical_features

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes we can do f"v2/{settings.WYVERN_HISTORICAL_FEATURES_PATH}"

Also:
this API path is just a placeholder. eventually it should replace the original API.

And this service is the feature store service, not the pipeline service. so it doesn't follow the api/vX/ pattern

# )

# Generate a 10-digit hex for the request
hex_id = secrets.token_hex(5)
Copy link
Contributor

Choose a reason for hiding this comment

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

What's a hex?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's just a random hexadecimal number, which is part of the temporary/transient table name we're generating


# TODO: valid entity_name_1 and entity_name_2 are in the table columns
# if entity_name_1 not in data.entities:
# logger.warning(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these should be 400 Bad Request responses

@wintonzheng wintonzheng force-pushed the shu/historical_feature_performance branch from 18fa387 to daa1e21 Compare November 2, 2023 10:07
@wintonzheng wintonzheng force-pushed the shu/historical_feature_performance branch from daa1e21 to f879950 Compare November 14, 2023 14:28
@wintonzheng wintonzheng force-pushed the shu/historical_feature_performance branch from a255155 to 8aa6779 Compare November 15, 2023 11:08
FROM {data.table}
"""
snowflake_ctx = generate_snowflake_ctx()
snowflake_ctx.cursor().execute(select_sql)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we handle some errors and add retry logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure when we should retry tho. Let's start with busting the API if there's any error. most likely error comes from bad data in the input table (entity table), which probably wont' be fixed by retry.

let's launch this version without error handling and start catching issues with matias' data.

@@ -117,6 +118,100 @@ def build_historical_real_time_feature_requests(
return result_dict


def build_and_merge_realtime_pivot_tables(
Copy link
Contributor

Choose a reason for hiding this comment

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

we should create a one pager that explains the logic clearly with examples. we can even get sth together using the stuff we went over to clarify the logic

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@wintonzheng wintonzheng Nov 16, 2023

Choose a reason for hiding this comment

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

good point. i'll write something after i test this endpoint

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

Successfully merging this pull request may close these issues.

None yet

3 participants