-
Notifications
You must be signed in to change notification settings - Fork 243
Fix Python doc links in Docs and add HdfsSink back
#383
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,8 +20,9 @@ settings = MaterializationSettings("nycTaxiMaterializationJob", | |
| feature_names=["f_location_avg_fare", "f_location_max_fare"]) | ||
| client.materialize_features(settings) | ||
| ``` | ||
| ([MaterializationSettings API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.materialization_settings.MaterializationSettings), | ||
| [RedisSink API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.sink.RedisSink)) | ||
|
|
||
| ([MaterializationSettings API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.MaterializationSettings), | ||
| [RedisSink API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.RedisSink) | ||
|
|
||
| In the above example, we define a Redis table called `nycTaxiDemoFeature` and materialize two features called `f_location_avg_fare` and `f_location_max_fare` to Redis. | ||
|
|
||
|
|
@@ -37,8 +38,9 @@ settings = MaterializationSettings("nycTaxiMaterializationJob", | |
| backfill_time=backfill_time) | ||
| client.materialize_features(settings) | ||
| ``` | ||
| ([BackfillTime API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.materialization_settings.BackfillTime), | ||
| [client.materialize_features() API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.client.FeathrClient.materialize_features)) | ||
|
|
||
| ([BackfillTime API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.BackfillTime), | ||
| [client.materialize_features() API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.FeathrClient.materialize_features)) | ||
|
|
||
| ## Consuming the online features | ||
|
|
||
|
|
@@ -48,7 +50,8 @@ client.wait_job_to_finish(timeout_sec=600) | |
| res = client.get_online_features('nycTaxiDemoFeature', '265', [ | ||
| 'f_location_avg_fare', 'f_location_max_fare']) | ||
| ``` | ||
| ([client.get_online_features API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.client.FeathrClient.get_online_features)) | ||
|
|
||
| ([client.get_online_features API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.FeathrClient.get_online_features)) | ||
|
|
||
| After we finish running the materialization job, we can get the online features by querying the feature name, with the | ||
| corresponding keys. In the example above, we query the online features called `f_location_avg_fare` and | ||
|
|
@@ -59,6 +62,7 @@ corresponding keys. In the example above, we query the online features called `f | |
| This is a useful when the feature transformation is computation intensive and features can be re-used. For example, you | ||
| have a feature that needs more than 24 hours to compute and the feature can be reused by more than one model training | ||
| pipeline. In this case, you should consider generate features to offline. Here is an API example: | ||
|
|
||
| ```python | ||
| client = FeathrClient() | ||
| offlineSink = HdfsSink(output_path="abfss://[email protected]/materialize_offline_test_data/") | ||
|
|
@@ -68,11 +72,12 @@ settings = MaterializationSettings("nycTaxiMaterializationJob", | |
| feature_names=["f_location_avg_fare", "f_location_max_fare"]) | ||
| client.materialize_features(settings) | ||
| ``` | ||
|
|
||
| This will generate features on latest date(assuming it's `2022/05/21`) and output data to the following path: | ||
| `abfss://[email protected]/materialize_offline_test_data/df0/daily/2022/05/21` | ||
|
|
||
|
|
||
| You can also specify a BackfillTime so the features will be generated for those dates. For example: | ||
|
|
||
| ```Python | ||
| backfill_time = BackfillTime(start=datetime( | ||
| 2020, 5, 20), end=datetime(2020, 5, 20), step=timedelta(days=1)) | ||
|
|
@@ -83,8 +88,9 @@ settings = MaterializationSettings("nycTaxiTable", | |
| "f_location_avg_fare", "f_location_max_fare"], | ||
| backfill_time=backfill_time) | ||
| ``` | ||
| This will generate features only for 2020/05/20 for me and it will be in folder: | ||
|
|
||
| This will generate features only for 2020/05/20 for me and it will be in folder: | ||
| `abfss://[email protected]/materialize_offline_test_data/df0/daily/2020/05/20` | ||
|
|
||
| ([MaterializationSettings API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.materialization_settings.MaterializationSettings), | ||
| [HdfsSink API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.sink.HdfsSink)) | ||
| ([MaterializationSettings API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.MaterializationSettings), | ||
| [HdfsSink API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.HdfsSink)) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,8 +70,9 @@ client.get_offline_features(observation_settings=settings, | |
| output_path="abfss://[email protected]/demo_data/output.avro") | ||
|
|
||
| ``` | ||
| ([ObservationSettings API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.settings.ObservationSettings), | ||
| [client.get_offline_feature API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.client.FeathrClient.get_offline_features)) | ||
|
|
||
| ([ObservationSettings API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.ObservationSettings), | ||
| [client.get_offline_feature API doc](https://feathr.readthedocs.io/en/latest/feathr.html#feathr.FeathrClient.get_offline_features)) | ||
|
|
||
| After you have defined the features (as described in the [Feature Definition](feature-definition.md)) part, you can define how you want to join them. | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am curious why materialize test can pass without this., does that means HdfsSink already included in other place?