Campfireman commited on
Commit
bd2b6ac
1 Parent(s): 9a2fedb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -19,17 +19,12 @@ def greet(total_pred_days):
19
  project = hopsworks.login()
20
  print("connected")
21
  #api = project.get_dataset_api()
22
- fs = project.get_feature_store()
23
- print("get the store")
24
- feature_view = fs.get_feature_view(
25
- name = 'weather_fv',
26
- version = 1
27
- )
28
- print("get the fv")
29
 
30
  # The latest available data timestamp
31
- #start_time = 1635112800000
32
- end_time = 1670972400000
 
33
 
34
  #start_date = datetime.now() - timedelta(days=1)
35
  #start_time = int(start_date.timestamp()) * 1000
@@ -56,8 +51,14 @@ def greet(total_pred_days):
56
 
57
  print("temp_model is now right")
58
 
59
-
60
- X = feature_view.get_batch_data()
 
 
 
 
 
 
61
  print("Data batched")
62
  latest_date_unix = str(X.datetime.values[0])[:10]
63
  latest_date = time.ctime(int(latest_date_unix))
 
19
  project = hopsworks.login()
20
  print("connected")
21
  #api = project.get_dataset_api()
22
+
 
 
 
 
 
 
23
 
24
  # The latest available data timestamp
25
+ start_time = 1649196000000
26
+
27
+ # end_time = 1670972400000
28
 
29
  #start_date = datetime.now() - timedelta(days=1)
30
  #start_time = int(start_date.timestamp()) * 1000
 
51
 
52
  print("temp_model is now right")
53
 
54
+ fs = project.get_feature_store()
55
+ print("get the store")
56
+ feature_view = fs.get_feature_view(
57
+ name = 'weather_fv',
58
+ version = 1
59
+ )
60
+ print("get the fv")
61
+ X = feature_view.get_batch_data(start_time=start_time)
62
  print("Data batched")
63
  latest_date_unix = str(X.datetime.values[0])[:10]
64
  latest_date = time.ctime(int(latest_date_unix))