Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.0 Release #170

Merged
merged 19 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/devrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Require a label and version bump to package and release
uses: mheap/github-action-required-labels@v2
with:
mode: minium
mode: minimum
count: 1
labels: "dev"
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion abm/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0-dev7
2.1.0-dev.9
41 changes: 22 additions & 19 deletions abm/lib/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def summarize(context: Context, args: list):
:return: None
"""
separator = None
input_dir = None
input_dirs = []
make_row = make_table_row
header_row = "Run,Cloud,Job Conf,Workflow,History,Inputs,Tool,Tool Version,State,Slots,Memory,Runtime (Sec),CPU,Memory Limit (Bytes),Memory Max usage (Bytes)"
for arg in args:
Expand All @@ -125,35 +125,38 @@ def summarize(context: Context, args: list):
return
separator = ','
make_row = make_model_row
header_row = "job_id,tool_id,tool_version,state,memory.max_usage_in_bytes,cpuacct.usage,process_count,galaxy_slots,runtime_seconds,ref_data_size,input_data_size"
header_row = "job_id,tool_id,tool_version,state,memory.max_usage_in_bytes,cpuacct.usage,process_count,galaxy_slots,runtime_seconds,ref_data_size,input_data_size_1,input_data_size_2"
else:
input_dir = arg
input_dirs.append(arg)

if input_dir is None:
input_dir = 'metrics'
if len(input_dirs) == 0:
input_dirs.append('metrics')

if separator is None:
separator = ','

print(header_row)
for file in os.listdir(input_dir):
input_path = os.path.join(input_dir, file)
if not os.path.isfile(input_path) or not input_path.endswith('.json'):
continue
try:
with open(input_path, 'r') as f:
data = json.load(f)
row = make_row(data)
print(separator.join([ str(x) for x in row]))
except Exception as e:
# Silently fail to allow the remainder of the table to be generated.
# print(e)
pass
for input_dir in input_dirs:
for file in os.listdir(input_dir):
input_path = os.path.join(input_dir, file)
if not os.path.isfile(input_path) or not input_path.endswith('.json'):
continue
try:
with open(input_path, 'r') as f:
data = json.load(f)
if data['metrics']['tool_id'] == 'upload1':
continue
row = make_row(data)
print(separator.join([ str(x) for x in row]))
except Exception as e:
# Silently fail to allow the remainder of the table to be generated.
# print(f"Unable to process {input_path}")
# print(e)
pass


accept_metrics = ['galaxy_slots', 'galaxy_memory_mb', 'runtime_seconds', 'cpuacct.usage','memory.limit_in_bytes', 'memory.max_usage_in_bytes'] #,'memory.soft_limit_in_bytes']


def make_table_row(data: dict):
row = [ str(data[key]) for key in ['run', 'cloud', 'job_conf', 'workflow_id', 'history_id', 'inputs']]
row.append(parse_toolid(data['metrics']['tool_id']))
Expand Down
2 changes: 1 addition & 1 deletion abm/lib/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def metrics(context: Context, args: list):
return
gi = connect(context)
metrics = gi.jobs.get_metrics(args[0])
print(json.dumps(metrics[0], indent=4))
print(json.dumps(metrics, indent=4))
# metrics = {}
# for m in gi.jobs.get_metrics(args[0]):
# metrics[m['name']] = get_value(m)
Expand Down
2 changes: 1 addition & 1 deletion abm/lib/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
handler: users.show
params: "[NAME|EMAIL]"
- name: [ usage ]
help: show details about the given user
help: display the disk usage for the user
handler: users.usage
params: "[NAME|EMAIL]"
- name: [experiment, exp, ex]
Expand Down