Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
theodolite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor 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
Sören Henning
theodolite
Commits
ca7cd52b
Commit
ca7cd52b
authored
4 years ago
by
Sören Henning
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/enableResetOnly' into 'master'
Enable reset only on theodolite and from env Closes
#85
See merge request
!67
parents
109016cd
c8720478
No related branches found
No related tags found
1 merge request
!67
Enable reset only on theodolite and from env
Pipeline
#1326
skipped
Stage: triggers
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
execution/lib/cli_parser.py
+4
-0
4 additions, 0 deletions
execution/lib/cli_parser.py
execution/run_uc.py
+1
-1
1 addition, 1 deletion
execution/run_uc.py
execution/theodolite.py
+28
-19
28 additions, 19 deletions
execution/theodolite.py
with
33 additions
and
20 deletions
execution/lib/cli_parser.py
+
4
−
0
View file @
ca7cd52b
...
...
@@ -80,9 +80,13 @@ def default_parser(description):
help
=
'
Defines the Kubernetes where the applications should run
'
)
parser
.
add_argument
(
'
--reset
'
,
action
=
"
store_true
"
,
default
=
os
.
environ
.
get
(
'
RESET
'
,
'
false
'
).
lower
()
==
'
true
'
,
help
=
'
Resets the environment before execution
'
)
parser
.
add_argument
(
'
--reset-only
'
,
action
=
"
store_true
"
,
default
=
os
.
environ
.
get
(
'
RESET_ONLY
'
,
'
false
'
).
lower
()
==
'
true
'
,
help
=
'
Only resets the environment. Ignores all other parameters
'
)
parser
.
add_argument
(
'
--prometheus
'
,
metavar
=
'
<URL>
'
,
...
...
This diff is collapsed.
Click to expand it.
execution/run_uc.py
+
1
−
1
View file @
ca7cd52b
...
...
@@ -24,7 +24,7 @@ def load_variables():
parser
=
execution_parser
(
description
=
'
Run use case Programm
'
)
args
=
parser
.
parse_args
()
print
(
args
)
if
args
.
exp_id
is
None
or
args
.
uc
is
None
or
args
.
load
is
None
or
args
.
instances
is
None
:
if
(
args
.
exp_id
is
None
or
args
.
uc
is
None
or
args
.
load
is
None
or
args
.
instances
is
None
)
and
not
args
.
reset_only
:
print
(
'
The options --exp-id, --uc, --load and --instances are mandatory.
'
)
print
(
'
Some might not be set!
'
)
sys
.
exit
(
1
)
...
...
This diff is collapsed.
Click to expand it.
execution/theodolite.py
+
28
−
19
View file @
ca7cd52b
...
...
@@ -4,6 +4,7 @@ import argparse
from
lib.cli_parser
import
benchmark_parser
import
logging
# logging
import
os
import
run_uc
import
sys
from
strategies.config
import
ExperimentConfig
import
strategies.strategies.domain_restriction.lower_bound_strategy
as
lower_bound_strategy
...
...
@@ -22,7 +23,7 @@ def load_variables():
parser
=
benchmark_parser
(
"
Run theodolite benchmarking
"
)
args
=
parser
.
parse_args
()
print
(
args
)
if
args
.
uc
is
None
or
args
.
loads
is
None
or
args
.
instances_list
is
None
:
if
(
args
.
uc
is
None
or
args
.
loads
is
None
or
args
.
instances_list
is
None
)
and
not
args
.
reset_only
:
print
(
'
The options --uc, --loads and --instances are mandatory.
'
)
print
(
'
Some might not be set!
'
)
sys
.
exit
(
1
)
...
...
@@ -33,7 +34,8 @@ def main(uc, loads, instances_list, partitions, cpu_limit, memory_limit,
duration
,
domain_restriction
,
search_strategy
,
prometheus_base_url
,
reset
,
namespace
,
result_path
,
configurations
):
print
(
f
"
Domain restriction of search space activated:
{
domain_restriction
}
"
)
print
(
f
"
Domain restriction of search space activated:
{
domain_restriction
}
"
)
print
(
f
"
Chosen search strategy:
{
search_strategy
}
"
)
counter_path
=
f
"
{
result_path
}
/exp_counter.txt
"
...
...
@@ -79,12 +81,14 @@ def main(uc, loads, instances_list, partitions, cpu_limit, memory_limit,
# select search strategy
if
search_strategy
==
"
linear-search
"
:
print
(
f
"
Going to execute at most
{
len
(
loads
)
+
len
(
instances_list
)
-
1
}
subexperiments in total..
"
)
print
(
f
"
Going to execute at most
{
len
(
loads
)
+
len
(
instances_list
)
-
1
}
subexperiments in total..
"
)
search_strategy
=
linear_search_strategy
elif
search_strategy
==
"
binary-search
"
:
search_strategy
=
binary_search_strategy
else
:
print
(
f
"
Going to execute
{
len
(
loads
)
*
len
(
instances_list
)
}
subexperiments in total..
"
)
print
(
f
"
Going to execute
{
len
(
loads
)
*
len
(
instances_list
)
}
subexperiments in total..
"
)
search_strategy
=
check_all_strategy
experiment_config
=
ExperimentConfig
(
...
...
@@ -113,7 +117,12 @@ def main(uc, loads, instances_list, partitions, cpu_limit, memory_limit,
if
__name__
==
'
__main__
'
:
logging
.
basicConfig
(
level
=
logging
.
INFO
)
args
=
load_variables
()
main
(
args
.
uc
,
args
.
loads
,
args
.
instances_list
,
args
.
partitions
,
args
.
cpu_limit
,
args
.
memory_limit
,
args
.
duration
,
if
args
.
reset_only
:
print
(
'
Only reset the cluster
'
)
run_uc
.
main
(
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
args
.
namespace
,
None
,
None
,
reset_only
=
True
)
else
:
main
(
args
.
uc
,
args
.
loads
,
args
.
instances_list
,
args
.
partitions
,
args
.
cpu_limit
,
args
.
memory_limit
,
args
.
duration
,
args
.
domain_restriction
,
args
.
search_strategy
,
args
.
prometheus
,
args
.
reset
,
args
.
namespace
,
args
.
path
,
args
.
configurations
)
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