Skip to content

Commit

Permalink
Merge branch 'install-fix' into 'r1.6.1'
Browse files Browse the repository at this point in the history
set --noinstall=true for bare-metal, --noinstall=false for docker

See merge request intelai/models!182
  • Loading branch information
ashahba committed May 22, 2020
2 parents c4ea2a5 + 47c0e7f commit 420416f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions benchmarks/launch_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ def parse_args(self):
"--debug", help="Launches debug mode which doesn't execute "
"start.sh when running in a docker container.", action="store_true")

arg_parser.add_argument(
"--noinstall",
help="whether to install packages for a given model when running in docker "
"(default --noinstall='False') or on bare metal (default --noinstall='True')",
dest="noinstall", action="store_true", default=None)

return arg_parser.parse_known_args()

def validate_args(self):
Expand Down Expand Up @@ -192,6 +198,7 @@ def get_env_vars(self, benchmark_scripts, use_case, intelai_models,
"FRAMEWORK": args.framework,
"NUM_CORES": args.num_cores,
"NUM_INTER_THREADS": args.num_inter_threads,
"NOINSTALL": str(args.noinstall) if args.noinstall is not None else "True" if not args.docker_image else "False",
"NUM_INTRA_THREADS": args.num_intra_threads,
"DATA_NUM_INTER_THREADS": args.data_num_inter_threads,
"NUM_TRAIN_STEPS": args.num_train_steps,
Expand All @@ -217,11 +224,6 @@ def get_env_vars(self, benchmark_scripts, use_case, intelai_models,
split_arg[0] = split_arg[0].replace("-", "_").lstrip('_')
env_var_dict[split_arg[0]] = split_arg[1]


# Set the default value for NOINSTALL, if it's not explicitly set by the user
if "NOINSTALL" not in env_var_dict:
env_var_dict["NOINSTALL"] = "False"

return env_var_dict

def run_bare_metal(self, benchmark_scripts, intelai_models,
Expand Down

0 comments on commit 420416f

Please sign in to comment.