Skip to content

Commit f4a5651

Browse files
author
Tensorflow Cloud maintainers
committed
Merge pull request #264 from SamuelMarks:args-for-google-style-docstrings
PiperOrigin-RevId: 360442626
2 parents 6f3921a + 43a3501 commit f4a5651

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/python/tensorflow_cloud/tuner/tuner.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def end_trial(self, trial_id: Text, status: Text = "COMPLETED"):
301301
def get_best_trials(self, num_trials: int = 1) -> List[trial_module.Trial]:
302302
"""Returns the trials with the best objective values found so far.
303303
304-
Arguments:
304+
Args:
305305
num_trials: positive int, number of trials to return.
306306
Returns:
307307
List of KerasTuner Trials.
@@ -509,7 +509,7 @@ def run_trial(self, trial, *fit_args, **fit_kwargs):
509509
510510
This method is called during `search` to evaluate a set of
511511
hyperparameters using AI Platform training.
512-
Arguments:
512+
Args:
513513
trial: A `Trial` instance that contains the information
514514
needed to run this trial. `Hyperparameters` can be accessed
515515
via `trial.hyperparameters`.
@@ -643,7 +643,7 @@ def run_trial(self, trial, *fit_args, **fit_kwargs):
643643
def _get_job_spec_from_config(self, job_id: Text) -> Dict[Text, Any]:
644644
"""Creates a request dictionary for the CAIP training service.
645645
646-
Arguments:
646+
Args:
647647
job_id: Job name that will be used for AIP training
648648
Returns:
649649
An AI Platform Training job spec.
@@ -688,7 +688,7 @@ def _get_remote_training_metrics(
688688
All complete epochs metrics (including the last epoch if applicable) are
689689
returned as training_metrics.
690690
691-
Arguments:
691+
Args:
692692
log_reader: An instance of tensorboard DirectoryWatcher that is
693693
pointing to the tensorboard logs directory.
694694
partial_epoch_metrics: Any incomplete epoch metrics from previous
@@ -749,7 +749,7 @@ def _add_logging(self, callbacks, trial):
749749
TensorBoard callback to pass back the epoch related metrics from
750750
remote execution.
751751
752-
Arguments:
752+
Args:
753753
callbacks: List of callbacks passed in to the search function.
754754
trial: A `Trial` instance.
755755
Raises:

src/python/tensorflow_cloud/tuner/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def make_study_config(
5252
hyperparams: hp_module.HyperParameters) -> Dict[Text, Any]:
5353
"""Generates Optimizer study_config from kerastuner configurations.
5454
55-
Arguments:
55+
Args:
5656
objective: String or `oracle_module.Objective`. If a string,
5757
the direction of the optimization (min or max) will be inferred.
5858
hyperparams: HyperParameters class instance. Can be used to override (or
@@ -383,7 +383,7 @@ def format_objective(
383383
direction: Text = None) -> List[oracle_module.Objective]:
384384
"""Formats objective to a list of oracle_module.Objective.
385385
386-
Arguments:
386+
Args:
387387
objective: If a string, the direction of the optimization (min or max)
388388
will be inferred.
389389
direction: Optional. e.g. 'min' or 'max'.
@@ -456,7 +456,7 @@ def _get_scale_type(sampling):
456456
def get_trial_id(optimizer_trial: Dict[Text, Any]) -> Text:
457457
r"""Gets trial_id from a CAIP Optimizer Trial.
458458
459-
Arguments:
459+
Args:
460460
optimizer_trial: A CAIP Optimizer Trial instance.
461461
462462
Returns:
@@ -472,7 +472,7 @@ def convert_optimizer_trial_to_dict(
472472
) -> Dict[Text, Any]:
473473
"""Converts Optimizer Trial parameters into a Python dict.
474474
475-
Arguments:
475+
Args:
476476
optimizer_trial: A CAIP Optimizer Trial instance.
477477
478478
Returns:
@@ -496,7 +496,7 @@ def convert_optimizer_trial_to_hps(
496496
) -> hp_module.HyperParameters:
497497
"""Converts Optimizer Trial parameters into KerasTuner HyperParameters.
498498
499-
Arguments:
499+
Args:
500500
hps: Sample KerasTuner HyperParameters object for config initialization
501501
optimizer_trial: A CAIP Optimizer Trial instance.
502502
@@ -515,7 +515,7 @@ def convert_completed_optimizer_trial_to_keras_trial(
515515
) -> trial_module.Trial:
516516
"""Converts completed Optimizer Trial into KerasTuner Trial.
517517
518-
Arguments:
518+
Args:
519519
optimizer_trial: A CAIP Optimizer Trial Instance.
520520
hyperparameter_space: Mandatory and must include definitions for all
521521
hyperparameters used during the search.

0 commit comments

Comments
 (0)