Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Update the estimator hyperparameters with the placeholder hyperparameters passed to TrainingStep #163

Open
ca-nguyen opened this issue Sep 10, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@ca-nguyen
Copy link
Contributor

Currently, it is not possible to update the estimator hyperparameters with the hyperparameters passed to TrainingStep if a Placeholder is used as input. The merging of hyperparameters can only be done if the hyperparameters passed to Training step is a dict.

Proposing to add a utility that translates a Placeholder to a usable jsonpath dict (with $). That translated placeholder_dict could be used as hyperparameters input to TrainingStep. With that, merging the constructor and estimator hyperparameters will be possible.

  • ex: A Placeholder with schema
{
  'TrainingInput': {
     'B': str,
     'C': str
   }
}

will output the following:

{
   'B.$': '$$.Execution.Input.B',
   'C.$': '$$.Execution.Input.C' 
}
@wong-a
Copy link
Contributor

wong-a commented Sep 10, 2021

The description here is a bit confusing. It's not unique to TrainingStep. The same would apply anywhere there is a merging of properties. Another instance is with parameters in ProcessingStep. There will be others in the future.

Added some clarification on the previous issue with an example showing how it is possible today #152 (comment)

if the estimator sets hyperparameters={'A': a, 'B': b, 'C': c} and ExecutionInput sets hyperparameters={'B': bb, 'D': dd}

To merge the two you need to do the following:

training_step = TrainingStep(...,
  hyperparmeters={ 
    'B': execution_input['TrainingParameters']['B'],
    'D': execution_input['TrainingParameters']['D']
  }
)

The utility is to expand all properties in execution_input['TrainingParameters']s schema (if there is one) into a dict without having to write all properties by hand.

@ca-nguyen ca-nguyen changed the title Enhancement: Update the estimator hyperparameters with the placeholder hyperparameters passed to TraininStep Enhancement: Update the estimator hyperparameters with the placeholder hyperparameters passed to TrainingStep Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants