Spaces:
No application file
No application file
FrederikKl
commited on
Commit
•
5790634
1
Parent(s):
e38809b
Update feature_view.py
Browse files
notebooks/SML/feature_view.py
CHANGED
@@ -27,8 +27,8 @@ fs = project.get_feature_store()
|
|
27 |
def create_stocks_feature_view(fs, version):
|
28 |
|
29 |
# Loading in the feature groups
|
30 |
-
tesla_fg = fs.get_feature_group('tesla_stock', version=
|
31 |
-
news_sentiment_fg = fs.get_feature_group('news_sentiment_updated', version=
|
32 |
|
33 |
# Defining the query
|
34 |
ds_query = tesla_fg.select(['date', 'open', 'ticker'])\
|
@@ -46,10 +46,10 @@ def create_stocks_feature_view(fs, version):
|
|
46 |
# %%
|
47 |
#Creating the feature view
|
48 |
try:
|
49 |
-
feature_view = fs.get_feature_view("tesla_stocks_fv", version=
|
50 |
-
tesla_fg = fs.get_feature_group('tesla_stock', version=
|
51 |
except:
|
52 |
-
feature_view, tesla_fg = create_stocks_feature_view(fs,
|
53 |
|
54 |
# %%
|
55 |
#Defining a function to get fixed data from the feature view
|
|
|
27 |
def create_stocks_feature_view(fs, version):
|
28 |
|
29 |
# Loading in the feature groups
|
30 |
+
tesla_fg = fs.get_feature_group('tesla_stock', version=5)
|
31 |
+
news_sentiment_fg = fs.get_feature_group('news_sentiment_updated', version=5)
|
32 |
|
33 |
# Defining the query
|
34 |
ds_query = tesla_fg.select(['date', 'open', 'ticker'])\
|
|
|
46 |
# %%
|
47 |
#Creating the feature view
|
48 |
try:
|
49 |
+
feature_view = fs.get_feature_view("tesla_stocks_fv", version=5)
|
50 |
+
tesla_fg = fs.get_feature_group('tesla_stock', version=5)
|
51 |
except:
|
52 |
+
feature_view, tesla_fg = create_stocks_feature_view(fs, 5)
|
53 |
|
54 |
# %%
|
55 |
#Defining a function to get fixed data from the feature view
|