Nada Saiyed
08/05/2022, 12:41 AMtask_config
as a HPOJob
but how do i specify which training_task
it’s supposed to execute? and also where should i specify the parameters like HyperparameterTuningJobConfig
, and ParameterRanges
?Nada Saiyed
08/05/2022, 12:46 AMhyperparameter.json
?Samhita Alla
training_task
to SagemakerHPOTask
.
You can send HyperparameterTuningJobConfig
and ParameterRanges
as inputs to a HPO task when executing it, as can be seen here. Here’s how the task inputs would render on the UI:Samhita Alla
Also, how will different values of hyperparameters be passed into the custom train script?I guess you can send them as inputs to it directly? Like how you send to a Flyte task? Lemme know if I misunderstood your question.
Nada Saiyed
08/05/2022, 2:20 PM@task(
task_config=HPOJob(
max_number_of_training_jobs=3,
max_parallel_training_jobs=2,
tunable_params=["num_round", "max_depth", "gamma"],
),
)
def my_hpo_task(x:int):
print(x)
in this case where do i define HyperparameterTuningJobConfig
and ParameterRanges
?Nada Saiyed
08/05/2022, 2:22 PM@task(
task_config=SagemakerTrainingJobConfig(
algorithm_specification=AlgorithmSpecification(
input_mode=InputMode.FILE,
algorithm_name=AlgorithmName.CUSTOM,
algorithm_version="",
metric_definitions = [MetricDefinition(name="score", regex="score: ([0-9\\.]+)")],
input_content_type=InputContentType.TEXT_CSV,
),
training_job_resource_config=TrainingJobResourceConfig(
instance_type="ml.m4.4xlarge",
instance_count=1,
volume_size_in_gb=25,
),
),
interruptible=True
)
def custom_training_task(x:int):
print(x)
so in this case will the training_task
= custom_training_task
?Nada Saiyed
08/05/2022, 3:26 PMNada Saiyed
08/05/2022, 3:37 PMNada Saiyed
08/05/2022, 3:59 PMinputs=hpo_inputs
what are hpo_inputs
?Nada Saiyed
08/05/2022, 5:27 PM[BadTaskSpecification] Error occurred when checking if all the required inputs exist, caused by: [SAGEMAKER_ERROR] Required input not specified: [train]
This is one of the parameters that SagemakerBuiltinAlgorithmsTask
expects, but i am working with a SagemakerCustomTrainingTask
, not sure why its expecting these builtIn parameters.Nada Saiyed
08/05/2022, 5:28 PMstatic_hyperparameters
, train
, validation
but ofcourse it failed with incorrect typekatrina
Andrew Achkar
08/05/2022, 5:41 PMAndrew Achkar
08/05/2022, 5:55 PMSamhita Alla
Ketan (kumare3)
Ketan (kumare3)
Ketan (kumare3)
Ketan (kumare3)
Ketan (kumare3)