Allow copying SPSA inputs/outputs more clearly
This commit is contained in:
1 parent
358ced1c0e
commit
b6e2f0dcae
4 files changed
+137
-88
No files matched your search
@@ -184,15 +184,30 @@ body, html, main{
|
||||
padding: 10px 12px 6px 12px;
|
||||
}
|
||||
|
||||
#content .anchor-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#content .anchor-container > .anchorbutton {
|
||||
flex: 1;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
#content .anchor-container > .anchorbutton:last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
#content .anchorbutton {
|
||||
border-radius: 4px;
|
||||
padding: 8px 8px 6px;
|
||||
padding: 8px 0px 6px;
|
||||
border-color: transparent;
|
||||
color: var(--color-font1);
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
transition: background-color 0.3s ease;
|
||||
font-family: "Courier Prime", serif;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
@@ -291,6 +291,23 @@ def spsa_original_input(workload):
|
||||
|
||||
return '\n'.join(lines)
|
||||
|
||||
def spsa_optimal_values(workload):
|
||||
|
||||
# Maintain the original order, if there was one
|
||||
keys = sorted(
|
||||
workload.spsa['parameters'].keys(),
|
||||
key=lambda x: workload.spsa['parameters'][x].get('index', -1)
|
||||
)
|
||||
|
||||
lines = []
|
||||
for name in keys:
|
||||
param = workload.spsa['parameters'][name]
|
||||
value = param['value'] if param['float'] else round(param['value'])
|
||||
lines.append(', '.join([name, str(value)]))
|
||||
|
||||
return '\n'.join(lines)
|
||||
|
||||
|
||||
def book_download_link(workload):
|
||||
return OpenBench.config.OPENBENCH_CONFIG['books'][workload.book_name]['source']
|
||||
|
||||
@@ -340,6 +357,7 @@ def git_diff_text(workload, N=24):
|
||||
|
||||
register.filter('spsa_param_digest', spsa_param_digest)
|
||||
register.filter('spsa_original_input', spsa_original_input)
|
||||
register.filter('spsa_optimal_values', spsa_optimal_values)
|
||||
|
||||
register.filter('book_download_link', book_download_link)
|
||||
register.filter('network_download_link', network_download_link)
|
||||
|
||||
Reference in new issue
Block a user