-

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

penting

Untuk informasi selengkapnya, lihat .

Untuk mempelajari selengkapnya, lihat .

Prasyarat

  1. Pilih tab Izin.

  2. Pilih Edit.

  3. [ { "AllowedHeaders": ["*"], "AllowedMethods": [ "GET", "HEAD", "PUT" ], "AllowedOrigins": [ "*" ], "ExposeHeaders": [ "Access-Control-Allow-Origin" ], "MaxAgeSeconds": 3000 } ]
  4. Pilih Simpan perubahan.

  1. Pilih Buat kebijakan.

  2. JSON
    { "Version":"2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::{input_bucket}/*", "arn:aws:s3:::{input_bucket}", "arn:aws:s3:::{output_bucket}/*", "arn:aws:s3:::{output_bucket}", "arn:aws:s3:::jumpstart-cache-prod-{region}/*", "arn:aws:s3:::jumpstart-cache-prod-{region}" ] }, { "Effect": "Allow", "Action": [ "sagemaker:CreateEndpoint", "sagemaker:DeleteEndpoint", "sagemaker:CreateEndpointConfig", "sagemaker:DeleteEndpointConfig" ], "Resource": [ "arn:aws:sagemaker:us-east-1:111122223333:endpoint/sm-margaret-*", "arn:aws:sagemaker:us-east-1:111122223333:endpoint-config/sm-margaret-*" ], "Condition": { "ForAnyValue:StringEquals": { "aws:TagKeys": "sagemaker-sdk:jumpstart-model-id" } } }, { "Effect": "Allow", "Action": [ "sagemaker:DescribeProcessingJob", "sagemaker:DescribeEndpoint", "sagemaker:InvokeEndpoint" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "sagemaker:DescribeInferenceComponent", "sagemaker:AddTags", "sagemaker:CreateModel", "sagemaker:DeleteModel" ], "Resource": "arn:aws:sagemaker:us-east-1:111122223333:model/*", "Condition": { "ForAnyValue:StringEquals": { "aws:TagKeys": "sagemaker-sdk:jumpstart-model-id" } } }, { "Effect": "Allow", "Action": [ "sagemaker:DescribeFlowDefinition", "sagemaker:StartHumanLoop", "sagemaker:DescribeHumanLoop" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "logs:CreateLogStream", "logs:PutLogEvents", "logs:CreateLogGroup", "logs:DescribeLogStreams" ], "Resource": "arn:aws:logs:us-east-1:111122223333:log-group:/aws/sagemaker/ProcessingJobs:*" }, { "Effect": "Allow", "Action": [ "cloudwatch:PutMetricData" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "kms:DescribeKey", "kms:GetPublicKey", "kms:Decrypt", "kms:Encrypt" ], "Resource": [ "arn:aws:kms:us-east-1:111122223333:key/{kms-key-id}" ] }, { "Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": "arn:aws:iam::111122223333:role/{this-role-created-by-customer}", "Condition": { "StringEquals": { "aws:PrincipalAccount": [ "111122223333" ] } } } ] }
  3. Pilih Berikutnya.

  4. Pilih Buat kebijakan.

    1. Pilih Buat peran.

    2. Pilih Berikutnya.

    3. Pilih Berikutnya.

    4. Meninjau pengaturan Anda.

    5. Pilih Buat peran.

    1. Pilih Tambahkan izin.

  1. JSON
    { "Version":"2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "Service": [ "sagemaker.amazonaws.com" ] }, "Action": "sts:AssumeRole" } ] }
  2. Pilih Perbarui kebijakan.

    1. Pilih Berikutnya.

  1. Siapkan evaluasi

      • { "prompt": { "text": "Aurillac is the capital of" }, "category": "Capitals", "referenceResponse": { "text": "Cantal" }, "responses": [ // All responses must come from a single model. If specified it must be present in all JSON objects. modelIdentifier and text are then also required. { "modelIdentifier": "meta-textgeneration-llama-codellama-7b", "text": "The capital of Aurillac is Cantal." } ] }
    1. catatan

  1. Pilih Selanjutnya.

{ "prompt": { "text": "Who invented the airplane?" }, "category": "Airplanes", "referenceResponse": { "text": "Orville and Wilbur Wright" }, "responses": // All inference must come from a single model [{ "modelIdentifier": "meta-textgeneration-llama-codellama-7b" , "text": "The Wright brothers, Orville and Wilbur Wright are widely credited with inventing and manufacturing the world's first successful airplane." }] }