eele commited on
Commit
288e4c5
1 Parent(s): 5e8dc51

FIX PLEASE

Browse files
Files changed (2) hide show
  1. __pycache__/app.cpython-310.pyc +0 -0
  2. app.py +3 -2
__pycache__/app.cpython-310.pyc CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
 
app.py CHANGED
@@ -64,7 +64,9 @@ def heart(heartdisease, smoking, alcoholdrinking, stroke, diffwalking, sex, agec
64
 
65
  df['heart_disease'] = np.float64(heartdisease == "Yes")
66
  df['timestamp'] = pd.to_datetime(datetime.now())
67
-
 
 
68
  # heart_fg = fs.get_feature_group(name="heart", version=1)
69
  heart_fg = fs.get_or_create_feature_group(
70
  name="heart_user_dataset",
@@ -74,7 +76,6 @@ def heart(heartdisease, smoking, alcoholdrinking, stroke, diffwalking, sex, agec
74
  event_time="timestamp",
75
  )
76
 
77
- heart_fg.insert(df, write_options={"wait_for_job": False})
78
  try:
79
  heart_fg.insert(df, write_options={"wait_for_job": False})
80
  except Exception as e:
 
64
 
65
  df['heart_disease'] = np.float64(heartdisease == "Yes")
66
  df['timestamp'] = pd.to_datetime(datetime.now())
67
+ # Hacky fix due to Hopsworks Magic
68
+ df["timestamp"] = df['timestamp'] - pd.to_timedelta(0 * df.index, unit='s')
69
+
70
  # heart_fg = fs.get_feature_group(name="heart", version=1)
71
  heart_fg = fs.get_or_create_feature_group(
72
  name="heart_user_dataset",
 
76
  event_time="timestamp",
77
  )
78
 
 
79
  try:
80
  heart_fg.insert(df, write_options={"wait_for_job": False})
81
  except Exception as e: