Skip to content

Instantly share code, notes, and snippets.

@JulianaFontolan
Last active July 26, 2023 20:18
Show Gist options
  • Save JulianaFontolan/1e9b8cc7a17214f1407dc73d9e2fca28 to your computer and use it in GitHub Desktop.
Save JulianaFontolan/1e9b8cc7a17214f1407dc73d9e2fca28 to your computer and use it in GitHub Desktop.
CallEstimator
# Call the estimator with the main parameters
from sagemaker.estimator import Estimator
estimator = Estimator(
image_uri=ecr_image,
role=role,
instance_count=1,
instance_type="ml.c4.xlarge",
output_path=out_path
)
hyperparameters = {
}
print(hyperparameters)
estimator.set_hyperparameters(**hyperparameters)
# Train the model
estimator.fit({'train': train_path})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment