SaulLu commited on
Commit
e6ed401
·
unverified ·
2 Parent(s): 2e47c8a 2fe1470

Set active peer with state (#9)

Browse files
Files changed (1) hide show
  1. dashboard_utils/bubbles.py +4 -1
dashboard_utils/bubbles.py CHANGED
@@ -75,6 +75,7 @@ def get_serialized_data_points():
75
  for run in runs:
76
  run_summary = run.summary._json_dict
77
  run_name = run.name
 
78
 
79
  if run_name in serialized_data_points:
80
  if "_timestamp" in run_summary and "_step" in run_summary:
@@ -84,6 +85,7 @@ def get_serialized_data_points():
84
  "batches": run_summary["_step"],
85
  "runtime": run_summary["_runtime"],
86
  "loss": run_summary["train/loss"],
 
87
  "velocity": run_summary["_step"] / run_summary["_runtime"],
88
  "date": datetime.datetime.utcfromtimestamp(timestamp),
89
  }
@@ -100,6 +102,7 @@ def get_serialized_data_points():
100
  "batches": run_summary["_step"],
101
  "runtime": run_summary["_runtime"],
102
  "loss": run_summary["train/loss"],
 
103
  "velocity": run_summary["_step"] / run_summary["_runtime"],
104
  "date": datetime.datetime.utcfromtimestamp(timestamp),
105
  }
@@ -123,7 +126,7 @@ def get_serialized_data(serialized_data_points, latest_timestamp):
123
  batches = 0
124
  velocity = 0
125
  for run in serialized_data_point["Runs"]:
126
- if run["date"] == latest_timestamp:
127
  run["date"] = run["date"].isoformat()
128
  activeRuns.append(run)
129
  loss += run["loss"]
 
75
  for run in runs:
76
  run_summary = run.summary._json_dict
77
  run_name = run.name
78
+ state = run.state
79
 
80
  if run_name in serialized_data_points:
81
  if "_timestamp" in run_summary and "_step" in run_summary:
 
85
  "batches": run_summary["_step"],
86
  "runtime": run_summary["_runtime"],
87
  "loss": run_summary["train/loss"],
88
+ "state": state,
89
  "velocity": run_summary["_step"] / run_summary["_runtime"],
90
  "date": datetime.datetime.utcfromtimestamp(timestamp),
91
  }
 
102
  "batches": run_summary["_step"],
103
  "runtime": run_summary["_runtime"],
104
  "loss": run_summary["train/loss"],
105
+ "state": state,
106
  "velocity": run_summary["_step"] / run_summary["_runtime"],
107
  "date": datetime.datetime.utcfromtimestamp(timestamp),
108
  }
 
126
  batches = 0
127
  velocity = 0
128
  for run in serialized_data_point["Runs"]:
129
+ if run["state"] == "running":
130
  run["date"] = run["date"].isoformat()
131
  activeRuns.append(run)
132
  loss += run["loss"]