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

chore: Update docstrings for offline stores and retrieval jobs #3062

Merged
merged 4 commits into from
Aug 10, 2022

Conversation

felixwang9817
Copy link
Collaborator

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
with self._query_generator() as query:
return query

def to_bigquery(
self,
job_config: bigquery.QueryJobConfig = None,
job_config: Optional[bigquery.QueryJobConfig] = None,
timeout: int = 1800,
Copy link
Member

Choose a reason for hiding this comment

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

this should really be a timedelta type

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

agreed but this is public facing so we'd have to issue some kind of a deprecation warning?

with self._query_generator() as query:
return query

def to_bigquery(
self,
job_config: bigquery.QueryJobConfig = None,
job_config: Optional[bigquery.QueryJobConfig] = None,
timeout: int = 1800,
retry_cadence: int = 10,
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be a retry policy (or a retrying object from tenacity) but that's quite low on the priority list.

@@ -152,36 +140,49 @@ def to_arrow(

return pyarrow.Table.from_pandas(features_df)

@abstractmethod
def _to_df_internal(self) -> pd.DataFrame:
Copy link
Member

Choose a reason for hiding this comment

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

The docs should clarify why this exists and is different form to_df.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch

pass

@abstractmethod
def _to_arrow_internal(self) -> pyarrow.Table:
Copy link
Member

Choose a reason for hiding this comment

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

same


@property
@abstractmethod
def on_demand_feature_views(self) -> Optional[List[OnDemandFeatureView]]:
Copy link
Member

Choose a reason for hiding this comment

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

I'd love it if we just return an empty list instead of a None and simplify the return type on this method

@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2022

Codecov Report

Merging #3062 (09c3b65) into master (e04ad63) will increase coverage by 8.49%.
The diff coverage is 72.72%.

@@            Coverage Diff             @@
##           master    #3062      +/-   ##
==========================================
+ Coverage   67.23%   75.72%   +8.49%     
==========================================
  Files         169      202      +33     
  Lines       14920    16845    +1925     
==========================================
+ Hits        10031    12756    +2725     
+ Misses       4889     4089     -800     
Flag Coverage Δ
integrationtests 67.13% <84.00%> (-0.10%) ⬇️
unittests 58.14% <63.63%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ffline_stores/contrib/trino_offline_store/trino.py 8.72% <0.00%> (ø)
...line_stores/contrib/athena_offline_store/athena.py 38.12% <50.00%> (ø)
..._stores/contrib/postgres_offline_store/postgres.py 35.13% <50.00%> (ø)
...ffline_stores/contrib/spark_offline_store/spark.py 37.41% <50.00%> (ø)
...python/feast/infra/offline_stores/offline_store.py 83.00% <76.47%> (ø)
sdk/python/feast/infra/offline_stores/bigquery.py 86.01% <100.00%> (ø)
sdk/python/feast/infra/offline_stores/file.py 94.09% <100.00%> (ø)
sdk/python/feast/infra/offline_stores/redshift.py 95.16% <100.00%> (ø)
sdk/python/feast/infra/offline_stores/snowflake.py 84.32% <100.00%> (ø)
.../contrib/postgres_offline_store/postgres_source.py 49.01% <0.00%> (ø)
... and 106 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Copy link
Member

@achals achals left a comment

Choose a reason for hiding this comment

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

/lgtm

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: achals, felixwang9817

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [achals,felixwang9817]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@feast-ci-bot feast-ci-bot merged commit 1cb008d into feast-dev:master Aug 10, 2022
franciscojavierarceo pushed a commit to franciscojavierarceo/feast that referenced this pull request Aug 13, 2022
…-dev#3062)

* Update offline store docstrings

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Update docstrings for retrieval job

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Clarify docstrings

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Change type of on_demand_feature_views property

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants