add user breakdown areas to cumu and insta plot functions. #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Maybe get_user_run.py could just be integrated within job_use.py.. I would be interested in your opinion. Here is an example script using it the way that it is in this commit:
import numpy as np
import pandas as pd
import viewclust as vc
import ccmnt
import pickle
import datetime as dt
from viewclust import slurm
from viewclust.target_series import target_series
import plotly.graph_objects as go
d_from = '2020-01-01T00:00:00'
d_from_drop = '2019-12-01T00:00:00'
d_to = '2020-04-01T00:00:00'
account = 'def-yeaman_cpu'
target = 50
system = 'graham'
file_tag = '20q4'
job_frame = ccmnt.get_jobs(d_from, d_to, account_query=account, system = system, serialize_frame='', debugging=False)
job_frame['mem'] = job_frame['reqmem_mb']
job_frame['ncpus'] = job_frame['reqcpus']
print(len(job_frame))
clust_target, queued, running, delta = vc.job_use(job_frame, d_from, target, d_to=d_to, use_unit='cpu')
user_running_cat = vc.get_users_run(job_frame, d_from, target, d_to=d_to, use_unit='cpu')
queued=queued[d_from:d_to]
running=running[d_from:d_to]
vc.insta_plot(clust_target, queued, running, fig_out=system + '' + file_tag + '' + account + 'insta_plot.html', query_bounds=False, user_run=user_running_cat)
vc.cumu_plot(clust_target, queued, running, fig_out=system + '' + file_tag + '_' + account + '_cumu_plot.html', query_bounds=False, user_run=user_running_cat)