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
d6fee0cb
Commit
d6fee0cb
authored
2 years ago
by
Pierre-Yves David
Browse files
Options
Downloads
Patches
Plain Diff
data-env: move more logic within the new class
Lets start to centralize things.
parent
d5f77560
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
python-libs/poulpe/benchmarks.py
+6
-11
6 additions, 11 deletions
python-libs/poulpe/benchmarks.py
python-libs/poulpe/dataenvs.py
+21
-1
21 additions, 1 deletion
python-libs/poulpe/dataenvs.py
python-libs/poulpe/runner.py
+1
-1
1 addition, 1 deletion
python-libs/poulpe/runner.py
with
28 additions
and
13 deletions
python-libs/poulpe/benchmarks.py
+
6
−
11
View file @
d6fee0cb
...
...
@@ -109,6 +109,6 @@
return
all_dimensions
.
copy
()
def
run_one
(
self
,
bin_env_path
,
data_env_path
):
data_env
_data
=
data_mod
.
get_data_env
(
data_env_path
)
data_env
=
data_mod
.
get_data_env
(
data_env_path
)
cmd
=
SimpleCommand
(
self
)
...
...
@@ -113,6 +113,6 @@
cmd
=
SimpleCommand
(
self
)
cmd
.
apply_data_env
(
data_env
_data
)
cmd
.
apply_data_env
(
data_env
)
r
=
_time_command
(
bin_env_path
,
data_env_path
,
cmd
)
res
=
{}
# we should store more
...
...
@@ -145,6 +145,6 @@
self
.
cwd
=
get_var
(
'
cwd
'
)
def
apply_data_env
(
self
,
data_env
_data
):
def
apply_data_env
(
self
,
data_env
):
variables_data
=
self
.
_benchmark_data
.
get_var
(
'
simple-command
'
).
get
(
'
variables
'
)
...
...
@@ -149,8 +149,6 @@
variables_data
=
self
.
_benchmark_data
.
get_var
(
'
simple-command
'
).
get
(
'
variables
'
)
def
get_var
(
key
):
full_key
=
f
'
bench-input-vars.
{
key
}
'
return
poulpe
.
get_one_value
(
data_env_data
,
full_key
)
get_var
=
data_env
.
get_benchmark_input_vars
variables
=
{}
if
variables_data
is
not
None
:
...
...
@@ -261,6 +259,5 @@
msg
=
'
could not find perf extension at: %s
'
raise
RuntimeError
(
msg
%
perf_ext_path
)
data_env_data
=
data_mod
.
get_data_env
(
data_env_path
)
data_env
=
data_mod
.
get_data_env
(
data_env_path
)
...
...
@@ -266,7 +263,5 @@
def
data_var
(
key
):
full_key
=
f
'
bench-input-vars.
{
key
}
'
return
poulpe
.
get_one_value
(
data_env_data
,
full_key
)
data_var
=
data_env
.
get_benchmark_input_vars
cwd
=
data_env_path
cfg_cwd
=
self
.
get_var
(
'
hg-perf-ext.cwd
'
)
...
...
This diff is collapsed.
Click to expand it.
python-libs/poulpe/dataenvs.py
+
21
−
1
View file @
d6fee0cb
...
...
@@ -3,4 +3,24 @@
def
get_data_env
(
data_env_path
):
data_env_desc
=
basics
.
data_env_file
(
data_env_path
)
return
basics
.
get_data
(
data_env_desc
)
data
=
basics
.
get_data
(
data_env_desc
)
return
DataEnvironment
(
data_env_path
,
data
)
class
DataEnvironment
:
def
__init__
(
self
,
path
,
data
):
self
.
_path
=
path
self
.
_data
=
data
@property
def
path
(
self
):
return
self
.
_path
@property
def
data_env_vars
(
self
):
return
self
.
_data
[
'
data-env-vars
'
].
copy
()
def
get_benchmark_input_vars
(
self
,
key
):
full_key
=
f
'
bench-input-vars.
{
key
}
'
return
basics
.
get_one_value
(
self
.
_data
,
full_key
)
This diff is collapsed.
Click to expand it.
python-libs/poulpe/runner.py
+
1
−
1
View file @
d6fee0cb
...
...
@@ -23,7 +23,7 @@
# gather info about the data environment
data_env_data
=
data_mod
.
get_data_env
(
data_env_path
)
result_data
[
'
data-env-vars
'
]
=
data_env_data
[
'
data
-
env
-
vars
'
]
result_data
[
'
data-env-vars
'
]
=
data_env_data
.
data
_
env
_
vars
benchmark
=
bench_mod
.
get_benchmark
(
benchmark_path
)
assert
benchmark
is
not
None
,
benchmark_path
...
...
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