Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
deepFriedConvnet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Luc Giffon
deepFriedConvnet
Commits
2a14713e
Commit
2a14713e
authored
7 years ago
by
Luc Giffon
Browse files
Options
Downloads
Patches
Plain Diff
change gather results to take input/output dir as arguments (docopt)
parent
080f5413
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/experiments/gather_results.py
+17
-2
17 additions, 2 deletions
main/experiments/gather_results.py
with
17 additions
and
2 deletions
main/experiments/gather_results.py
+
17
−
2
View file @
2a14713e
"""
gather_results: gather OAR results from one dir to one file called gathered_results in the same directory.
The result files should consist of lines and should have
"
stdout
"
in their name.
Usage:
gather_results -i IPATH
Options:
-h --help Show this screen.
-i --input-dir=<IPATH> Inut directory wher to find results
"""
from
os
import
listdir
import
os
from
os.path
import
isfile
,
join
import
docopt
if
__name__
==
'
__main__
'
:
mypath
=
"
/home/luc/PycharmProjects/deepFriedConvnets/main/results_global5
"
arguments
=
docopt
.
docopt
(
__doc__
)
mypath
=
os
.
path
.
abspath
(
arguments
[
"
--input-dir
"
])
onlyfiles
=
[
os
.
path
.
join
(
mypath
,
f
)
for
f
in
listdir
(
mypath
)
if
isfile
(
join
(
mypath
,
f
))]
count
=
0
results
=
[]
for
f_name
in
onlyfiles
:
if
"
std
err
"
in
f_name
:
if
"
.
std
out
"
not
in
f_name
:
continue
with
open
(
f_name
,
"
r
"
)
as
f
:
str_f
=
f
.
read
().
strip
()
...
...
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