Skip to content

Commit

Permalink
Merge pull request #684 from anthony0727/fix-example
Browse files Browse the repository at this point in the history
[Minor Bug] fix typo in argument & add flag
  • Loading branch information
ChrisCummins authored May 24, 2022
2 parents 38f2076 + 52ff148 commit d73e2d2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/sensitivity_analysis/action_sensitivity_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"""
import random
from concurrent.futures import ThreadPoolExecutor
from multiprocessing import cpu_count
from pathlib import Path
from typing import List, Optional

Expand All @@ -36,10 +35,10 @@
SensitivityAnalysisResult,
run_sensitivity_analysis,
)

from compiler_gym.envs import CompilerEnv
from compiler_gym.util.flags.benchmark_from_flags import benchmark_from_flags
from compiler_gym.util.flags.env_from_flags import env_from_flags
from compiler_gym.util.flags import nproc # noqa
from compiler_gym.util.gym_type_hints import ActionType
from compiler_gym.util.logs import create_logging_dir
from compiler_gym.util.timer import Timer
Expand Down Expand Up @@ -130,7 +129,7 @@ def run_action_sensitivity_analysis(
reward_space: str,
num_trials: int,
max_warmup_steps: int,
nproc: int = cpu_count(),
nproc: int,
max_attempts_multiplier: int = 5,
):
"""Estimate the immediate reward of a given list of actions."""
Expand Down Expand Up @@ -181,7 +180,7 @@ def main(argv):
rewards_path=rewards_path,
runtimes_path=runtimes_path,
actions=actions,
reward=FLAGS.reward,
reward_space=FLAGS.reward,
num_trials=FLAGS.num_action_sensitivity_trials,
max_warmup_steps=FLAGS.max_warmup_steps,
nproc=FLAGS.nproc,
Expand Down

0 comments on commit d73e2d2

Please sign in to comment.