Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Minor Bug] fix typo in argument & add flag #684

Merged
merged 5 commits into from
May 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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