Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
trainbenchmark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jesper
trainbenchmark
Commits
6298304d
Commit
6298304d
authored
6 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
cleanup. update expected tar content
parent
f7ee331b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.editorconfig
+0
-28
0 additions, 28 deletions
.editorconfig
expected_tar_content
+3481
-4290
3481 additions, 4290 deletions
expected_tar_content
trainbenchmark/results/diff-test.py
+0
-100
0 additions, 100 deletions
trainbenchmark/results/diff-test.py
validate_release.sh
+1
-1
1 addition, 1 deletion
validate_release.sh
with
3482 additions
and
4419 deletions
.editorconfig
deleted
100644 → 0
+
0
−
28
View file @
f7ee331b
root
=
true
[*.java]
charset
=
utf-8
end_of_line
=
lf
indent_size
=
4
indent_style
=
tab
insert_final_newline
=
true
max_line_length
=
140
trim_trailing_whitespace
=
true
[*.jadd]
charset
=
utf-8
end_of_line
=
lf
indent_size
=
4
indent_style
=
tab
insert_final_newline
=
true
max_line_length
=
140
trim_trailing_whitespace
=
true
[*.jrag]
charset
=
utf-8
end_of_line
=
lf
indent_size
=
4
indent_style
=
tab
insert_final_newline
=
true
max_line_length
=
140
trim_trailing_whitespace
=
true
This diff is collapsed.
Click to expand it.
expected_tar_content
+
3481
−
4290
View file @
6298304d
This diff is collapsed.
Click to expand it.
trainbenchmark/results/diff-test.py
deleted
100755 → 0
+
0
−
100
View file @
f7ee331b
#!/usr/bin/env python
import
csv
import
re
import
os.path
import
sys
# import subprocess
import
collections
pattern
=
re
.
compile
(
'
matches-([^-]*)-([^-]*)-railway-([^-]*)-([^-]*)-.csv
'
)
class
TableRow
(
object
):
def
__init__
(
self
,
size
,
rowname
):
self
.
size
=
size
self
.
rowname
=
rowname
self
.
values
=
{}
def
set
(
self
,
index
,
iteration
,
value
):
columns
=
self
.
values
.
get
(
iteration
)
if
not
columns
:
columns
=
[
'
?
'
]
*
(
self
.
size
)
self
.
values
[
iteration
]
=
columns
columns
[
index
]
=
value
def
get_rows
(
self
):
return
[[
self
.
rowname
,
k
]
+
v
+
[
all
((
e
==
v
[
0
]
for
e
in
v
[
1
:]))]
for
k
,
v
in
sorted
(
self
.
values
.
iteritems
())]
class
Table
(
object
):
def
__init__
(
self
):
self
.
rownames
=
set
()
self
.
tools
=
set
()
self
.
rows
=
collections
.
OrderedDict
()
def
add_tool
(
self
,
toolname
):
self
.
tools
.
add
(
toolname
)
def
add_rowname
(
self
,
rowname
):
self
.
rownames
.
add
(
rowname
)
def
create_rows
(
self
):
def
key_rowname
(
t
):
tokens
=
t
.
rsplit
(
'
-
'
,
1
)
return
tokens
[
0
]
+
tokens
[
1
].
zfill
(
4
)
self
.
tools
=
collections
.
OrderedDict
(((
e
,
i
)
for
i
,
e
in
enumerate
(
sorted
(
self
.
tools
))))
self
.
rownames
=
sorted
(
self
.
rownames
,
key
=
key_rowname
)
for
rowname
in
self
.
rownames
:
tr
=
TableRow
(
len
(
self
.
tools
),
rowname
)
self
.
rows
[
rowname
]
=
tr
def
set_value
(
self
,
rowname
,
toolname
,
iteration
,
value
):
row
=
self
.
rows
[
rowname
]
row
.
set
(
self
.
tools
[
toolname
],
iteration
,
value
)
def
write
(
self
,
fdr
):
# header
writer
=
csv
.
writer
(
fdr
)
writer
.
writerow
([
'
Scenario
'
,
'
Iteration
'
]
+
self
.
tools
.
keys
()
+
[
'
all?
'
])
for
_
,
row
in
self
.
rows
.
iteritems
():
writer
.
writerows
(
row
.
get_rows
())
def
split_name
(
filename
):
"""
Returns (tool, Query, Scenario, Size)
"""
m
=
re
.
match
(
pattern
,
os
.
path
.
basename
(
filename
))
return
m
.
groups
()
if
m
else
None
def
main
(
directory
):
table
=
Table
()
# first get tool- and row-names
for
filename
in
os
.
listdir
(
directory
):
if
not
filename
.
startswith
(
'
matches
'
):
continue
tup
=
split_name
(
filename
)
table
.
add_tool
(
tup
[
0
])
table
.
add_rowname
(
'
{}-{}-{}
'
.
format
(
*
tup
[
1
:]))
table
.
create_rows
()
# then fill in the table
for
filename
in
os
.
listdir
(
directory
):
if
not
filename
.
startswith
(
'
matches
'
):
continue
with
open
(
os
.
path
.
join
(
directory
,
filename
))
as
fdr
:
reader
=
csv
.
reader
(
fdr
)
reader
.
next
()
# skip header
for
row
in
reader
:
# Tool, Workload, Description, Model, Run, Query, Iteration, Matches
rowname
=
'
{}-{}
'
.
format
(
row
[
1
],
row
[
3
][
8
:])
toolname
=
row
[
0
]
iteration
=
int
(
row
[
6
])
matches
=
row
[
7
]
table
.
set_value
(
rowname
,
toolname
,
iteration
,
matches
)
with
open
(
'
summary-{}.csv
'
.
format
(
os
.
path
.
basename
(
os
.
path
.
normpath
(
directory
))),
'
w
'
)
as
fdr
:
table
.
write
(
fdr
)
if
__name__
==
'
__main__
'
:
main
(
sys
.
argv
[
1
])
This diff is collapsed.
Click to expand it.
validate_release.sh
+
1
−
1
View file @
6298304d
meld <
(
sort
expected_tar_content
|
sed
's|/$||'
)
<
(
find ModelValidationWithRAGs/
|
sort
)
meld <
(
expected_tar_content
)
<
(
find ModelValidationWithRAGs/
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment