У меня есть модель, которую обучили локально, а затем перенесли в AWS ECS. Я хочу развернуть его в Sagemaker.
В настоящее время занимаюсь:
from sagemaker.estimator import Estimator
model = Estimator(image,
role, 1, 'ml.c4.2xlarge',
output_path="s3://{}/output".format(sess.default_bucket()),
sagemaker_session=sess)
Но когда я звоню
from sagemaker.predictor import csv_serializer
predictor = agent.deploy(1, 'ml.t2.medium', serializer=csv_serializer)
Я получил:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-5-0ca9477e4acb> in <module>()
1 from sagemaker.predictor import csv_serializer
----> 2 predictor = model.deploy(1, 'ml.t2.medium', serializer=csv_serializer)
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/estimator.py in deploy(self, initial_instance_count, instance_type, endpoint_name, **kwargs)
177 """
178 if not self.latest_training_job:
--> 179 raise RuntimeError('Estimator has not been fit yet.')
180 endpoint_name = endpoint_name or self.latest_training_job.name
181 self.deploy_instance_type = instance_type
RuntimeError: Estimator has not been fit yet.
Но он подошел ... только не на Sagemaker. Как я могу решить эту проблему?