Skip to content

Commit

Permalink
[FSTORE-866] Add option to deprecate a feature group (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
bubriks authored Sep 25, 2023
1 parent 1ad4043 commit 38c8d6b
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions docs/user_guides/fs/feature_group/deprecation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
description: Documentation on how to deprecate a feature group in Hopsworks.
---

# How to deprecate a Feature Group

### Introduction

To discourage the usage of specific feature groups it is possible to deprecate them.
When a feature group is deprecated, user will be warned when they try to use it or use a feature view that depends on it.

In this guide you will learn how to deprecate a feature group within Hopsworks, showing examples in HSFS APIs as well as the user interface.

## Prerequisites

Before you begin this guide it is expected that there is an existing feature group in your project. You can familiarize yourself with [the creation of a feature group](./create.md) in the user guide.

## Deprecate using the HSFS APIs

### Retrieve the feature group

To deprecate a feature group using the HSFS APIs you need to provide a [Feature Group](../../../concepts/fs/feature_group/fg_overview.md).

=== "Python"

```python
fg = fs.get_feature_group(name="feature_group_name", version=feature_group_version)
```

### Deprecate Feature Group

Feature group deprecation occurs by calling the `update_deprecated` method on the feature group.

=== "Python"

```python
fg.update_deprecated()
```

Users can also un-deprecate the feature group if need be, by setting the `deprecate` parameter to False.

=== "Python"

```python
fg.update_deprecated(deprecate=False)
```

## Deprecate using the UI

You can deprecate/de-deprecate feature groups through the UI. For this, navigate to the `Feature Groups` section and select a feature group.

<p align="center">
<figure>
<img src="../../../../assets/images/guides/feature_group/feature_group_list.png" alt="List of Feature Groups">
</figure>
</p>

Subsequently, make sure that the necessary feature group version is picked.

<p align="center">
<figure>
<img src="../../../../assets/images/guides/feature_group/feature_group_version.png" alt="Feature Group version selection">
</figure>
</p>

Finally, click on the button with three vertical dots in the right corner and select `Deprecate`.

<p align="center">
<figure>
<img src="../../../../assets/images/guides/feature_group/feature_group_deprecate.png" alt="Deprecate Feature Group">
</figure>
</p>

The Feature group can be de-deprecated by selecting the `Undeprecate` option on a deprecated feature group.
1 change: 1 addition & 0 deletions docs/user_guides/fs/feature_group/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This section serves to provide guides and examples for the common usage of abstr

- [Create a Feature Group](create.md)
- [Create an external Feature Group](create_external.md)
- [Deprecating Feature Group](deprecation.md)
- [Data Types and Schema management](data_types.md)
- [Statistics](statistics.md)
- [Data Validation](data_validation.md)
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ nav:
- user_guides/fs/feature_group/index.md
- Create: user_guides/fs/feature_group/create.md
- Create External: user_guides/fs/feature_group/create_external.md
- Deprecating: user_guides/fs/feature_group/deprecation.md
- Data Types and Schema management: user_guides/fs/feature_group/data_types.md
- Statistics: user_guides/fs/feature_group/statistics.md
- Data Validation: user_guides/fs/feature_group/data_validation.md
Expand Down

0 comments on commit 38c8d6b

Please sign in to comment.