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
9afd0bbf
Commit
9afd0bbf
authored
1 year ago
by
Pierre-Yves David
Browse files
Options
Downloads
Patches
Plain Diff
generate-tasks: add a --benchmark-name-filter flag to generate-tasks
This should be significantly more robust than grepping output.
parent
babb657f
No related branches found
Branches containing commit
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/cli.py
+8
-0
8 additions, 0 deletions
python-libs/poulpe/cli.py
python-libs/poulpe/scheduling.py
+6
-1
6 additions, 1 deletion
python-libs/poulpe/scheduling.py
tests/test-tasks-generation.t
+27
-1
27 additions, 1 deletion
tests/test-tasks-generation.t
with
41 additions
and
2 deletions
python-libs/poulpe/cli.py
+
8
−
0
View file @
9afd0bbf
...
...
@@ -220,6 +220,11 @@
@click.option
(
"
--all-variants
"
,
is_flag
=
True
)
@filter_option
(
target
=
"
data-environments
"
,
option_prefix
=
"
data-env
"
)
@click.option
(
"
--benchmark-name-filter
"
,
"
benchmark_name_filters
"
,
multiple
=
True
,
)
@click.option
(
"
--benchmark-variant-filter
"
,
"
benchmark_variant_filters
"
,
multiple
=
True
,
...
...
@@ -230,6 +235,7 @@
den_path
=
"
.
"
,
all_variants
=
False
,
data_env_filters
=
None
,
benchmark_name_filters
=
None
,
benchmark_variant_filters
=
None
,
):
"""
Generate a tasks list from parameters.
...
...
@@ -247,6 +253,7 @@
"""
data_env_filters
=
filter
.
parse_filters
(
data_env_filters
)
benchmark_name_pattern
=
filter
.
build_pattern
(
benchmark_name_filters
)
benchmark_variant_filters
=
filter
.
parse_filters
(
benchmark_variant_filters
)
den_root
=
Path
(
den_path
)
den
=
den_mod
.
PoulpeDen
(
den_root
)
...
...
@@ -255,6 +262,7 @@
bin_env_spec
,
all_variants
=
all_variants
,
data_env_filters
=
data_env_filters
,
benchmark_name_pattern
=
benchmark_name_pattern
,
benchmark_variant_filters
=
benchmark_variant_filters
,
)
for
t
in
tasks
:
...
...
This diff is collapsed.
Click to expand it.
python-libs/poulpe/scheduling.py
+
6
−
1
View file @
9afd0bbf
...
...
@@ -27,7 +27,8 @@
bin_setup_specs
,
all_variants
=
False
,
data_env_filters
=
(),
benchmark_variant_filters
=
()
benchmark_name_pattern
=
(),
benchmark_variant_filters
=
(),
):
binaries
=
list_binary_variants
(
den
,
bin_setup_specs
)
data_envs
=
den
.
find_data_envs
(
filters
=
data_env_filters
)
...
...
@@ -35,6 +36,7 @@
benchmarks
=
list
(
list_benchmarks_variants
(
den
,
all_variants
=
all_variants
,
name_pattern
=
benchmark_name_pattern
,
variant_filters
=
benchmark_variant_filters
,
))
for
bin
in
binaries
:
...
...
@@ -65,7 +67,8 @@
def
list_benchmarks_variants
(
den
,
all_variants
=
True
,
name_pattern
=
None
,
variant_filters
=
(),
):
benchmarks
=
den
.
find_benchmarks
()
for
bench_path
,
bench
in
benchmarks
:
...
...
@@ -68,7 +71,9 @@
variant_filters
=
(),
):
benchmarks
=
den
.
find_benchmarks
()
for
bench_path
,
bench
in
benchmarks
:
if
name_pattern
is
not
None
and
name_pattern
.
match
(
bench
.
name
)
is
None
:
continue
rel_path
=
bench_path
.
relative_to
(
den
.
benchmark_dir
)
all_dimensions
=
sorted
(
bench
.
all_dimensions
.
items
())
if
not
all_dimensions
or
not
all_variants
:
...
...
This diff is collapsed.
Click to expand it.
tests/test-tasks-generation.t
+
27
−
1
View file @
9afd0bbf
...
...
@@ -132,7 +132,8 @@
$
poulpe
den
-
generate
-
tasks
--
all
-
variants
hg:MERCURIAL_VERSION
=
6.5.3
\
>
--
benchmark
-
variant
-
filter
output
=
"
plain
"
\
>
|
grep
cat
.
pbd
>
tasks
>
--
benchmark
-
name
-
filter
"
re:^.*
\
.command
\
.cat$
"
\
>
>
tasks
$
wc
-
l
<
tasks
16
(
glob
)
$
sort
--
unique
<
tasks
|
wc
-
l
...
...
@@ -170,6 +171,31 @@
RUN
hg:MERCURIAL_VERSION
=
6.5.3
bar
hg
/
commit
.
pbd:repo
-
state
=
large
-
all
RUN
hg:MERCURIAL_VERSION
=
6.5.3
bar
hg
/
commit
.
pbd:repo
-
state
=
all
-
and
-
large
-
ignored
filtering
according
benchmark
name
(
and
variants
)
-------------------------------------------------
variants
that
does
not
exists
on
the
benchmark
is
$
poulpe
den
-
generate
-
tasks
--
all
-
variants
hg:MERCURIAL_VERSION
=
6.5.3
\
>
--
benchmark
-
name
-
filter
"
hg.command.cat
"
\
>
--
benchmark
-
variant
-
filter
files
=
"
re:^.*shuffled$
"
\
>
>
tasks
$
wc
-
l
<
tasks
12
$
sort
--
unique
<
tasks
|
wc
-
l
12
$
head
tasks
RUN
hg:MERCURIAL_VERSION
=
6.5.3
bar
hg
/
cat
.
pbd:files
=
all
-
list
-
path
-
shuffled:output
=
plain:rev
=
tip
RUN
hg:MERCURIAL_VERSION
=
6.5.3
bar
hg
/
cat
.
pbd:files
=
all
-
list
-
path
-
shuffled:output
=
json:rev
=
tip
RUN
hg:MERCURIAL_VERSION
=
6.5.3
bar
hg
/
cat
.
pbd:files
=
all
-
list
-
filepath
-
shuffled:output
=
plain:rev
=
tip
RUN
hg:MERCURIAL_VERSION
=
6.5.3
bar
hg
/
cat
.
pbd:files
=
all
-
list
-
filepath
-
shuffled:output
=
json:rev
=
tip
RUN
hg:MERCURIAL_VERSION
=
6.5.3
bar
hg
/
cat
.
pbd:files
=
all
-
list
-
pattern
-
shuffled:output
=
plain:rev
=
tip
RUN
hg:MERCURIAL_VERSION
=
6.5.3
bar
hg
/
cat
.
pbd:files
=
all
-
list
-
pattern
-
shuffled:output
=
json:rev
=
tip
RUN
hg:MERCURIAL_VERSION
=
6.5.3
foo
hg
/
cat
.
pbd:files
=
all
-
list
-
path
-
shuffled:output
=
plain:rev
=
tip
RUN
hg:MERCURIAL_VERSION
=
6.5.3
foo
hg
/
cat
.
pbd:files
=
all
-
list
-
path
-
shuffled:output
=
json:rev
=
tip
RUN
hg:MERCURIAL_VERSION
=
6.5.3
foo
hg
/
cat
.
pbd:files
=
all
-
list
-
filepath
-
shuffled:output
=
plain:rev
=
tip
RUN
hg:MERCURIAL_VERSION
=
6.5.3
foo
hg
/
cat
.
pbd:files
=
all
-
list
-
filepath
-
shuffled:output
=
json:rev
=
tip
Test
that
the
generated
tasks
are
usable
========================================
...
...
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