Skip to content
Snippets Groups Projects
Commit f8c0c61a authored by Michel Spils's avatar Michel Spils
Browse files

minor bugs

parent 27da2944
No related branches found
No related tags found
No related merge requests found
notebooks @ abdb0696
Subproject commit abdb06965783302b8d5dd5d7f8bdb8e3cc9d639c
...@@ -28,6 +28,7 @@ def extract_summaries_to_csv(root_dir,metrics=None,force=False): ...@@ -28,6 +28,7 @@ def extract_summaries_to_csv(root_dir,metrics=None,force=False):
print(f"Skipping {root} as metrics.csv already exists. Use --force to overwrite") print(f"Skipping {root} as metrics.csv already exists. Use --force to overwrite")
continue continue
#log_dir = "../../../data-project/KIWaVo/models/lfu/willenscharen6/lightning_logs/version_0/" #log_dir = "../../../data-project/KIWaVo/models/lfu/willenscharen6/lightning_logs/version_0/"
try :
reader_hp = SummaryReader(root,pivot=True) reader_hp = SummaryReader(root,pivot=True)
df =reader_hp.scalars df =reader_hp.scalars
df = df.drop(["step","epoch"],axis=1)[1:49] df = df.drop(["step","epoch"],axis=1)[1:49]
...@@ -35,6 +36,8 @@ def extract_summaries_to_csv(root_dir,metrics=None,force=False): ...@@ -35,6 +36,8 @@ def extract_summaries_to_csv(root_dir,metrics=None,force=False):
df.columns = df.columns.str.slice(3) df.columns = df.columns.str.slice(3)
df.to_csv(root + "/metrics.csv") df.to_csv(root + "/metrics.csv")
print(f"Extracted metrics for {root}") print(f"Extracted metrics for {root}")
except Exception as e:
print(f"Error in {root}")
def main(): def main():
......
...@@ -88,7 +88,7 @@ def get_pred( ...@@ -88,7 +88,7 @@ def get_pred(
y_pred = np.concatenate(pred) y_pred = np.concatenate(pred)
if y_true is not None: if y_true is not None:
y_pred = np.concatenate([np.expand_dims(y_true, axis=1), pred], axis=1) y_pred = np.concatenate([np.expand_dims(y_true, axis=1), y_pred], axis=1) # Replaced pred with y_pred, why was it pred?
y_pred = pd.DataFrame(y_pred, index=y_true.index, columns=range(y_pred.shape[1])) y_pred = pd.DataFrame(y_pred, index=y_true.index, columns=range(y_pred.shape[1]))
return y_pred return y_pred
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment