Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Poulpe
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
octobus
Poulpe
Commits
da96b3d2
Commit
da96b3d2
authored
4 months ago
by
Raphaël Gomès
Browse files
Options
Downloads
Patches
Plain Diff
run-util: add some typing and enforce path existence at the CLI level
parent
2ba5847f
No related branches found
No related tags found
1 merge request
!37
general improvements
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
python-libs/poulpe/benchmarks.py
+1
-1
1 addition, 1 deletion
python-libs/poulpe/benchmarks.py
python-libs/poulpe/bin/run-util
+13
-4
13 additions, 4 deletions
python-libs/poulpe/bin/run-util
python-libs/poulpe/runner.py
+6
-1
6 additions, 1 deletion
python-libs/poulpe/runner.py
with
20 additions
and
6 deletions
python-libs/poulpe/benchmarks.py
+
1
−
1
View file @
da96b3d2
...
...
@@ -50,7 +50,7 @@
core
[
"
compatible-revision-range
"
]
=
rev_range
def
get_benchmark
(
path_def
):
def
get_benchmark
(
path_def
:
str
):
"""
get a benchmark from path applying possible variant selection on the way
Expected syntax is PATH[;dimension_name=variant_name][;d=v]...
...
...
This diff is collapsed.
Click to expand it.
python-libs/poulpe/bin/run-util
+
13
−
4
View file @
da96b3d2
#!/usr/bin/env python3
from
pathlib
import
Path
import
sys
import
click
from
poulpe
import
runner
@click.command
(
no_args_is_help
=
True
)
...
...
@@ -2,10 +3,10 @@
import
sys
import
click
from
poulpe
import
runner
@click.command
(
no_args_is_help
=
True
)
@click.argument
(
"
bin_env
"
)
@click.argument
(
'
data_env
'
)
@click.argument
(
"
bin_env
"
,
type
=
click
.
Path
(
exists
=
True
,
file_okay
=
False
,
path_type
=
Path
)
)
@click.argument
(
'
data_env
'
,
type
=
click
.
Path
(
exists
=
True
,
file_okay
=
False
,
path_type
=
Path
)
)
@click.argument
(
'
benchmark
'
)
@click.option
(
"
--debug
"
,
is_flag
=
True
)
...
...
@@ -10,7 +11,15 @@
@click.argument
(
'
benchmark
'
)
@click.option
(
"
--debug
"
,
is_flag
=
True
)
@click.argument
(
'
result
'
)
def
run_util
(
bin_env
,
data_env
,
benchmark
,
result
,
debug
=
False
):
@click.argument
(
'
result
'
,
type
=
click
.
Path
(
path_type
=
Path
,
exists
=
False
,
dir_okay
=
False
,
allow_dash
=
True
,
),
)
def
run_util
(
bin_env
:
Path
,
data_env
:
Path
,
benchmark
:
str
,
result
:
Path
,
debug
=
False
):
"""
Run an
"
atomic
"
benchmark unit from already setup environments.
\b
...
...
This diff is collapsed.
Click to expand it.
python-libs/poulpe/runner.py
+
6
−
1
View file @
da96b3d2
...
...
@@ -148,7 +148,12 @@
print
(
m
,
file
=
sys
.
stderr
)
def
run_one_core
(
bin_env_path
,
data_env_path
,
benchmark_path
,
debug
=
False
):
def
run_one_core
(
bin_env_path
:
pathlib
.
Path
,
data_env_path
:
pathlib
.
Path
,
benchmark_path
:
str
,
debug
=
False
,
):
result_data
=
{}
result_data
[
"
run
"
]
=
{}
result_data
[
"
run
"
][
"
timestamp
"
]
=
time
.
time
()
...
...
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