Skip to content
Snippets Groups Projects

first changes to make it works, fails on missing logbook_test.csv now

Merged Pieter Van Trappen requested to merge fix-run-anywhere into ML_step
2 files
+ 18
9
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -2,6 +2,7 @@
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from pipeline.grid_search import grid_search
from preprocessing import builder
@@ -66,10 +67,13 @@ if __name__ == '__main__':
fno = "res"
df = pd.read_csv("../../data-cern/features.csv")
state_mode = pd.read_json("../../data-cern/seg.json",
lines=True)
state_mode = state_mode.set_index('acqStamp').sort_index()
state_mode.index = pd.to_datetime(state_mode.index).round('s')
try:
fn = "../../data-cern/seg.json"
state_mode = pd.read_json(fn, lines=True)
state_mode = state_mode.set_index('acqStamp').sort_index()
state_mode.index = pd.to_datetime(state_mode.index).round('s')
except:
print("ERROR - missing {}, continuing anyway".format(fn))
df = df.set_index('acqStamp').sort_index()
df.index = pd.to_datetime(df.index)
labels = pd.DataFrame()
Loading