amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

Sagemaker[Example Request]

Open YYyp99 opened this issue 1 year ago • 3 comments

I used Sagemaker's Jumpstart to directly deploy the llama2-7b-chat model, and now I need to perform a batch conversion task. However, when using this model, there was a 'Need to pass custom' issue_ Attributes='accept_ Eula=true 'as part of header', how can I solve this problem

`import sagemaker from sagemaker.transformer import Transformer

sagemaker_session = sagemaker.Session()

transformer = Transformer( model_name='meta-textgeneration-llama-2-7b-f-20230915-031114', instance_count=1, instance_type='ml.g4dn.12xlarge', strategy='SingleRecord', assemble_with='Line', output_path='s3://output/', base_transform_job_name='batch-transform-job1', sagemaker_session=sagemaker_session ) transformer.transform( 's3://test.json', content_type='text/json', split_type='Line' )`

YYyp99 avatar Oct 08 '23 07:10 YYyp99

similar question here, how does one do batch prediction using the jumpstart models?

Cage89 avatar Oct 24 '23 12:10 Cage89

okay something here could be relevant: https://github.com/aws/amazon-sagemaker-examples/blob/5c294c25541b51c53054ff4b4fd2629d8ece64d4/introduction_to_amazon_algorithms/jumpstart-foundation-models/text2text-generation-Batch-Transform.ipynb#L366

Cage89 avatar Oct 24 '23 12:10 Cage89

trying the same, but the model file doesnt seem to be a real tar

ClientError: An error occurred (ValidationException) when calling the CreateTransformJob operation: Model file at "s3://jumpstart-cache-prod-us-west-2/meta-infer/infer-meta-textgeneration-llama-2-7b-f.tar.gz" is not a GZipped file. Please ensure your model file is tarred and GZipped.

Cage89 avatar Oct 25 '23 10:10 Cage89