Skip to content

Commit 96b29bf

Browse files
vatjSirOibaf
andcommitted
[FSTORE-1346][FSTORE-1212] Upgrade dependencies, fix theme, latest redirect, latest version banner (logicalclocks#371)
* [HWORKS-742] Update documentation on external feature groups limitations (logicalclocks#363) * Add overrides for banner showing not viewing latest version (logicalclocks#360) * [FSTORE-1346] Fixing workflow for docs release (logicalclocks#364) (logicalclocks#365) * Fixing workflow for docs release * Fixing workflow for doc release test also * Minimal changes * Add support for latest redirect --------- Co-authored-by: Fabio Buso <buso.fabio@gmail.com>
1 parent 73321bc commit 96b29bf

File tree

8 files changed

+70
-24
lines changed

8 files changed

+70
-24
lines changed

.github/workflows/mkdocs-release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ name: mkdocs-release
22

33
on:
44
push:
5-
branches: [ branch-* ]
5+
branches: [branch-*]
66

77
jobs:
88
publish-release:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
with:
1414
fetch-depth: 0
1515

16-
- uses: actions/setup-python@v2
16+
- uses: actions/setup-python@v5
1717
with:
18-
python-version: '3.8'
18+
python-version: "3.10"
1919

2020
- name: install deps
21-
run: pip3 install pip==22.0.3 && pip3 install 'git+https://github.com/logicalclocks/feature-store-api@master#egg=hsfs[docs]&subdirectory=python' mkdocs-minify-plugin
21+
run: pip3 install 'git+https://github.com/logicalclocks/feature-store-api@master#egg=hsfs[docs]&subdirectory=python'
2222

2323
- name: setup git
2424
run: |

.github/workflows/mkdocs-test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ jobs:
88

99
steps:
1010
- name: Checkout main repo
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212
with:
1313
fetch-depth: 0
1414

15-
- uses: actions/setup-python@v2
15+
- uses: actions/setup-python@v5
1616
with:
17-
python-version: '3.8'
17+
python-version: "3.10"
1818

1919
- name: install deps
20-
run: pip3 install pip==22.0.3 && pip3 install 'git+https://github.com/logicalclocks/feature-store-api@master#egg=hsfs[docs]&subdirectory=python' mkdocs-minify-plugin
20+
run: pip3 install 'git+https://github.com/logicalclocks/feature-store-api@master#egg=hsfs[docs]&subdirectory=python' linkchecker
2121

2222
- name: setup git
2323
run: |

docs/css/custom.css

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
:root {
2-
--md-primary-fg-color: #1EB382;
1+
[data-md-color-scheme="hopsworks"] {
2+
--md-primary-fg-color: #1eb382;
33
--md-secondary-fg-color: #188a64;
44
--md-tertiary-fg-color: #0d493550;
55
--md-quaternary-fg-color: #fdfdfd;
@@ -9,7 +9,6 @@
99
.md-footer__inner:not([hidden]) {
1010
display: none
1111
}
12-
1312
/* Lex did stuff here */
1413
.svg_topnav{
1514
width: 12px;
@@ -24,6 +23,10 @@
2423
box-shadow: 0 0 0 0;
2524
}
2625

26+
.md-tabs__item {
27+
min-width: 2.5rem;
28+
}
29+
2730
.md-tabs__item:hover {
2831
background-color: var(--md-tertiary-fg-color);
2932
transition: background-color 450ms;

docs/css/dropdown.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ overflow: inherit;
1717

1818
/* The container <div> - needed to position the dropdown content */
1919
.dropdown {
20-
position: relative;
20+
position: absolute;
2121
display: inline-block;
2222
}
2323

docs/js/inject-api-links.js

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
window.addEventListener("DOMContentLoaded", function () {
22
var windowPathNameSplits = window.location.pathname.split("/");
33
var majorVersionRegex = new RegExp("(\\d+[.]\\d+)")
4+
var latestRegex = new RegExp("latest")
45
if (majorVersionRegex.test(windowPathNameSplits[1])) { // On landing page docs.hopsworks.api/3.0 - URL contains major version
56
// Version API dropdown
67
document.getElementById("hopsworks_api_link").href = "https://docs.hopsworks.ai/hopsworks-api/" + windowPathNameSplits[1] + "/generated/api/login/";
78
document.getElementById("hsfs_api_link").href = "https://docs.hopsworks.ai/feature-store-api/" + windowPathNameSplits[1] + "/generated/api/connection_api/";
8-
document.getElementById("hsml_api_link").href = "https://docs.hopsworks.ai/machine-learning-api/" + windowPathNameSplits[1] + "/generated/connection_api/";
99
document.getElementById("hsfs_javadoc_link").href = "https://docs.hopsworks.ai/feature-store-api/" + windowPathNameSplits[1] + "/javadoc";
10+
document.getElementById("hsml_api_link").href = "https://docs.hopsworks.ai/machine-learning-api/" + windowPathNameSplits[1] + "/generated/connection_api/";
1011
} else { // on docs.hopsworks.api/feature-store-api/3.0 / docs.hopsworks.api/hopsworks-api/3.0 / docs.hopsworks.api/machine-learning-api/3.0
11-
var apiVersion = windowPathNameSplits[2];
12-
var majorVersion = apiVersion.match(majorVersionRegex)[0];
12+
13+
if (latestRegex.test(windowPathNameSplits[2]) || latestRegex.test(windowPathNameSplits[1])) {
14+
var majorVersion = "latest";
15+
} else {
16+
var apiVersion = windowPathNameSplits[2];
17+
var majorVersion = apiVersion.match(majorVersionRegex)[0];
18+
}
1319
// Version main navigation
1420
document.getElementsByClassName("md-tabs__link")[0].href = "https://docs.hopsworks.ai/" + majorVersion;
15-
document.getElementsByClassName("md-tabs__link")[1].href = "https://docs.hopsworks.ai/" + majorVersion + "/getting_started/quickstart/";
16-
document.getElementsByClassName("md-tabs__link")[2].href = "https://docs.hopsworks.ai/" + majorVersion + "/tutorials/fraud_batch/1_feature_groups/";
21+
document.getElementsByClassName("md-tabs__link")[1].href = "https://colab.research.google.com/github/logicalclocks/hopsworks-tutorials/blob/master/quickstart.ipynb";
22+
document.getElementsByClassName("md-tabs__link")[2].href = "https://docs.hopsworks.ai/" + majorVersion + "/tutorials/";
1723
document.getElementsByClassName("md-tabs__link")[3].href = "https://docs.hopsworks.ai/" + majorVersion + "/concepts/hopsworks/";
1824
document.getElementsByClassName("md-tabs__link")[4].href = "https://docs.hopsworks.ai/" + majorVersion + "/user_guides/";
1925
document.getElementsByClassName("md-tabs__link")[5].href = "https://docs.hopsworks.ai/" + majorVersion + "/setup_installation/aws/getting_started/";

docs/overrides/main.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends "base.html" %}
2+
3+
{% block outdated %}
4+
You're not viewing the latest version of the documentation.
5+
<a href="{{ '../' ~ base_url }}">
6+
<strong>Click here to go to latest.</strong>
7+
</a>
8+
{% endblock %}

docs/user_guides/fs/feature_group/create_external.md

+30-4
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,39 @@ In the snippet above it's important that the created metadata object gets regist
9393
fg.save()
9494
```
9595

96-
### Limitations
96+
### Enable online storage
9797

98-
Hopsworks Feature Store does not support time-travel capabilities for external feature groups. Moreover, as the data resides on external systems, external feature groups cannot be made available online for low latency serving. To make data from an external feature group available online, users need to define an online enabled feature group and have a job that periodically reads data from the external feature group and writes in the online feature group.
98+
You can enable online storage for external feature groups, however, the sync from the external storage to Hopsworks online storage is not automatic and needs to be setup manually. For an external feature group to be available online, during the creation of the feature group, the `online_enabled` option needs to be set to `True`.
9999

100-
!!! warning "Python support"
100+
=== "Python"
101+
102+
```python
103+
external_fg = fs.create_external_feature_group(
104+
name="sales",
105+
version=1,
106+
description="Physical shop sales features",
107+
query=query,
108+
storage_connector=connector,
109+
primary_key=['ss_store_sk'],
110+
event_time='sale_date',
111+
online_enabled=True)
112+
external_fg.save()
113+
114+
# read from external storage and filter data to sync to online
115+
df = external_fg.read().filter(external_fg.customer_status == "active")
116+
117+
# insert to online storage
118+
external_fg.insert(df)
119+
```
120+
121+
The `insert()` method takes a DataFrame as parameter and writes it _only_ to the online feature store. Users can select which subset of the feature group data they want to make available on the online feautre store by using the [query APIs](https://docs.hopsworks.ai/feature-store-api/{{{ hopsworks_version }}}/generated/api/query_api/).
122+
123+
### Limitations
124+
125+
Hopsworks Feature Store does not support time-travel queries on external feature groups.
101126

102-
Currently the HSFS library does not support calling the read() or show() methods on external feature groups. Likewise it is not possible to call the read() or show() methods on queries containing external feature groups. Nevertheless, external feature groups can be used from a Python engine to create training datasets.
127+
Additionally, support for `.read()` and `.show()` methods when using by the Python engine is limited to external feature groups defined on BigQuery and Snowflake and only when using the [Feature Query Service](../../../setup_installation/common/arrow_flight_duckdb.md).
128+
Nevertheless, external feature groups defined top of any storage connector can be used to create a training dataset from a Python environment invoking one of the following methods: [create_training_data](https://docs.hopsworks.ai/feature-store-api/{{{ hopsworks_version }}}/generated/api/feature_view_api/#create_training_data), [create_train_test_split](https://docs.hopsworks.ai/feature-store-api/{{{ hopsworks_version }}}/generated/api/feature_view_api/#create_train_test_split) or the [create_train_validation_test_split](https://docs.hopsworks.ai/feature-store-api/{{{ hopsworks_version }}}/generated/api/feature_view_api/#create_train_validation_test_split)
103129

104130

105131
### API Reference

mkdocs.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ nav:
258258

259259
theme:
260260
name: material
261+
custom_dir: docs/overrides
261262
favicon: assets/images/favicon.ico
262263
logo: assets/images/hops-logo.png
263264
icon:
@@ -267,6 +268,7 @@ theme:
267268
code: "IBM Plex Mono"
268269
palette:
269270
accent: teal
271+
scheme: hopsworks
270272
features:
271273
- navigation.tabs
272274
- navigation.tabs.sticky
@@ -277,6 +279,7 @@ extra:
277279
hopsworks_version: 3.4
278280
version:
279281
provider: mike
282+
default: latest
280283
generator: false
281284
social:
282285
- icon: fontawesome/brands/twitter
@@ -341,5 +344,5 @@ markdown_extensions:
341344
- markdown_include.include:
342345
base_path: docs
343346
- pymdownx.emoji:
344-
emoji_index: !!python/name:materialx.emoji.twemoji
345-
emoji_generator: !!python/name:materialx.emoji.to_svg
347+
emoji_index: !!python/name:material.extensions.emoji.twemoji
348+
emoji_generator: !!python/name:material.extensions.emoji.to_svg

0 commit comments

Comments
 (0)