Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import argparse
import logging
import json
import ray
from ray.tune import register_trainable, run_experiments
from ray.tune.function_runner import StatusReporter
from tuna.executors import Executor
from tuna.runners import Runner
from typing import Dict, Optional, Any, Callable
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
class RayExecutor(Executor):
name = "Ray"
def __init__(self, runner: Runner) -> None:
super(RayExecutor, self).__init__(runner)
def default_argument_parser(self):
parser = argparse.ArgumentParser(description="Run tuna")
parser.add_argument(
"--experiment-name",
type=str,
required=True,
help="a name for the experiment",
)
parser.add_argument(
"--num-cpus",