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
?hyperparameter.json
?Samhita Alla
08/05/2022, 6:35 AMtraining_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: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
?@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
?inputs=hpo_inputs
what are hpo_inputs
?[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.static_hyperparameters
, train
, validation
but ofcourse it failed with incorrect typekatrina
08/05/2022, 5:30 PMAndrew Achkar
08/05/2022, 5:41 PMSamhita Alla
08/06/2022, 1:01 PMKetan (kumare3)
08/06/2022, 2:30 PM