Skip to content

Commit

Permalink
Update plot-node-usage-polaris.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
williamyxl authored Apr 11, 2024
1 parent 8b95587 commit b79cf4d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,16 @@
}
],
"source": [
"from datetime import datetime\n",
"\n",
"time_offset_from_UTC = (datetime.now() - datetime.utcnow()).total_seconds() / 3600.0\n",
"time_offset_from_UTC\n",
"\n",
"utilization = []\n",
"for utilization_file in tqdm(run_dir.glob('logs/*.log')):\n",
" # Pull in the total data\n",
" util_data = pd.read_json(utilization_file, lines=True)\n",
" util_data['time'] = util_data['time'].apply(lambda x: datetime.fromisoformat(x).timestamp()) - zero_time - 4 * 3600 # TZ Issue?\n",
" util_data['time'] = util_data['time'].apply(lambda x: datetime.fromisoformat(x).timestamp()) - zero_time + time_offset_from_UTC * 3600 # TZ Issue?\n",
" node_name = utilization_file.name[:-4]\n",
" util_data['node'] = node_name\n",
" \n",
Expand Down

0 comments on commit b79cf4d

Please sign in to comment.