Skip to content

Commit

Permalink
fix: hyper_parameters -> hyperparameters (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajberdy authored Sep 9, 2021
1 parent d384870 commit 492397d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/braket/aws/aws_quantum_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def create(
code_location: str = None,
role_arn: str = None,
wait_until_complete: bool = False,
hyper_parameters: Dict[str, Any] = None,
hyperparameters: Dict[str, Any] = None,
metric_definitions: List[MetricDefinition] = None,
input_data_config: List[InputDataConfig] = None,
instance_config: InstanceConfig = None,
Expand Down Expand Up @@ -124,7 +124,7 @@ def create(
wait_until_complete (bool): bool representing whether we should wait until the job
completes. This would tail the job logs as it waits. Default = `False`.
hyper_parameters (Dict[str, Any]): Hyperparameters that will be made accessible to
hyperparameters (Dict[str, Any]): Hyperparameters that will be made accessible to
the job. The hyperparameters are made accessible as a Dict[str, str] to the
job. For convenience, this accepts other types for keys and values, but
`str()` will be called to convert them before being passed on. Default = `None`.
Expand Down Expand Up @@ -181,7 +181,7 @@ def create(
image_uri or AwsQuantumJob.DEFAULT_IMAGE_NAME
)
role_arn = role_arn or aws_session.get_execution_role()
hyper_parameters = hyper_parameters or {}
hyperparameters = hyperparameters or {}
input_data_config = input_data_config or []
instance_config = instance_config or InstanceConfig()
stopping_condition = stopping_condition or StoppingCondition()
Expand Down Expand Up @@ -240,7 +240,7 @@ def create(
"outputDataConfig": asdict(output_data_config),
"checkpointConfig": asdict(checkpoint_config),
"deviceConfig": asdict(device_config),
"hyperParameters": hyper_parameters,
"hyperParameters": hyperparameters,
"stoppingCondition": asdict(stopping_condition),
# TODO: uncomment when tags works
# "tags": tags,
Expand Down
10 changes: 5 additions & 5 deletions test/unit_tests/braket/aws/test_aws_quantum_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def device_arn():


@pytest.fixture
def hyper_parameters():
def hyperparameters():
return {
"param": "value",
"other-param": 100,
Expand Down Expand Up @@ -528,7 +528,7 @@ def create_job_args(
role_arn,
wait_until_complete,
device_arn,
hyper_parameters,
hyperparameters,
input_data_config,
instance_config,
stopping_condition,
Expand All @@ -549,7 +549,7 @@ def create_job_args(
"role_arn": role_arn,
"wait_until_complete": wait_until_complete,
"device_arn": device_arn,
"hyper_parameters": hyper_parameters,
"hyperparameters": hyperparameters,
# "metric_defintions": None,
"input_data_config": input_data_config,
"instance_config": instance_config,
Expand Down Expand Up @@ -642,7 +642,7 @@ def _assert_create_job_called_with(
)
role_arn = create_job_args["role_arn"] or aws_session.get_execution_role()
devices = [create_job_args["device_arn"]]
hyper_parameters = create_job_args["hyper_parameters"] or {}
hyperparameters = create_job_args["hyperparameters"] or {}
input_data_config = create_job_args["input_data_config"] or []
instance_config = create_job_args["instance_config"] or InstanceConfig()
output_data_config = create_job_args["output_data_config"] or OutputDataConfig(
Expand Down Expand Up @@ -673,7 +673,7 @@ def _assert_create_job_called_with(
"outputDataConfig": asdict(output_data_config),
"checkpointConfig": asdict(checkpoint_config),
"deviceConfig": {"devices": devices},
"hyperParameters": hyper_parameters,
"hyperParameters": hyperparameters,
"stoppingCondition": asdict(stopping_condition),
# "tags": tags,
}
Expand Down

0 comments on commit 492397d

Please sign in to comment.