View a markdown version of this page

Pemrosesan data menggunakan perintah dataprocessing - Amazon Neptune

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

Pemrosesan data menggunakan perintah dataprocessing

Anda menggunakan perintah dataprocessing Neptune ML untuk membuat tugas pemrosesan data, memeriksa statusnya, menghentikannya, atau membuat daftar semua tugas pemrosesan data aktif.

Membuat tugas pemrosesan data menggunakan perintah dataprocessing Neptune ML

Perintah Neptunus dataprocessing ML yang khas untuk membuat pekerjaan baru terlihat seperti ini:

AWS CLI
aws neptunedata start-ml-data-processing-job \ --endpoint-url https://your-neptune-endpoint:port \ --input-data-s3-location "s3://(S3 bucket name)/(path to your input folder)" \ --id "(a job ID for the new job)" \ --processed-data-s3-location "s3://(S3 bucket name)/(path to your output folder)"

Untuk informasi selengkapnya, lihat start-ml-data-processing-job di Referensi AWS CLI Perintah.

SDK
import boto3 from botocore.config import Config client = boto3.client( 'neptunedata', endpoint_url='https://your-neptune-endpoint:port', config=Config(read_timeout=None, retries={'total_max_attempts': 1}) ) response = client.start_ml_data_processing_job( inputDataS3Location='s3://(S3 bucket name)/(path to your input folder)', id='(a job ID for the new job)', processedDataS3Location='s3://(S3 bucket name)/(path to your output folder)' ) print(response)
awscurl
awscurl https://your-neptune-endpoint:port/ml/dataprocessing \ --region us-east-1 \ --service neptune-db \ -X POST \ -H 'Content-Type: application/json' \ -d '{ "inputDataS3Location" : "s3://(S3 bucket name)/(path to your input folder)", "id" : "(a job ID for the new job)", "processedDataS3Location" : "s3://(S3 bucket name)/(path to your output folder)" }'
catatan

Contoh ini mengasumsikan bahwa AWS kredenal Anda dikonfigurasi di lingkungan Anda. Ganti us-east-1 dengan Wilayah cluster Neptunus Anda.

curl
curl \ -X POST https://your-neptune-endpoint:port/ml/dataprocessing \ -H 'Content-Type: application/json' \ -d '{ "inputDataS3Location" : "s3://(S3 bucket name)/(path to your input folder)", "id" : "(a job ID for the new job)", "processedDataS3Location" : "s3://(S3 bucket name)/(path to your output folder)" }'

Perintah untuk memulai pemrosesan ulang inkremental terlihat seperti ini:

AWS CLI
aws neptunedata start-ml-data-processing-job \ --endpoint-url https://your-neptune-endpoint:port \ --input-data-s3-location "s3://(S3 bucket name)/(path to your input folder)" \ --id "(a job ID for this job)" \ --processed-data-s3-location "s3://(S3 bucket name)/(path to your output folder)" \ --previous-data-processing-job-id "(the job ID of a previously completed job to update)"

Untuk informasi selengkapnya, lihat start-ml-data-processing-job di Referensi AWS CLI Perintah.

SDK
import boto3 from botocore.config import Config client = boto3.client( 'neptunedata', endpoint_url='https://your-neptune-endpoint:port', config=Config(read_timeout=None, retries={'total_max_attempts': 1}) ) response = client.start_ml_data_processing_job( inputDataS3Location='s3://(S3 bucket name)/(path to your input folder)', id='(a job ID for this job)', processedDataS3Location='s3://(S3 bucket name)/(path to your output folder)', previousDataProcessingJobId='(the job ID of a previously completed job to update)' ) print(response)
awscurl
awscurl https://your-neptune-endpoint:port/ml/dataprocessing \ --region us-east-1 \ --service neptune-db \ -X POST \ -H 'Content-Type: application/json' \ -d '{ "inputDataS3Location" : "s3://(S3 bucket name)/(path to your input folder)", "id" : "(a job ID for this job)", "processedDataS3Location" : "s3://(S3 bucket name)/(path to your output folder)", "previousDataProcessingJobId" : "(the job ID of a previously completed job to update)" }'
catatan

Contoh ini mengasumsikan bahwa AWS kredenal Anda dikonfigurasi di lingkungan Anda. Ganti us-east-1 dengan Wilayah cluster Neptunus Anda.

curl
curl \ -X POST https://your-neptune-endpoint:port/ml/dataprocessing \ -H 'Content-Type: application/json' \ -d '{ "inputDataS3Location" : "s3://(S3 bucket name)/(path to your input folder)", "id" : "(a job ID for this job)", "processedDataS3Location" : "s3://(S3 bucket name)/(path to your output folder)", "previousDataProcessingJobId" : "(the job ID of a previously completed job to update)" }'
Parameter untuk pembuatan pekerjaan dataprocessing
  • id   –   (Opsional) Pengidentifikasi unik untuk job baru.

    Tipe: string. Default: UUID yang dihasilkan secara otomatis.

  • previousDataProcessingJobId— (Opsional) ID pekerjaan dari pekerjaan pemrosesan data yang telah selesai dijalankan pada versi data sebelumnya.

    Tipe: string. Default: tidak ada.

    Catatan: Gunakan ini untuk pemrosesan data tambahan, untuk memperbarui model ketika data grafik telah berubah (tetapi tidak ketika data telah dihapus).

  • inputDataS3Location— (Wajib) URI lokasi Amazon S3 tempat Anda ingin SageMaker AI mengunduh data yang diperlukan untuk menjalankan pekerjaan pemrosesan data.

    Tipe: string.

  • processedDataS3Location— (Wajib) URI lokasi Amazon S3 tempat Anda ingin SageMaker AI menyimpan hasil pekerjaan pemrosesan data.

    Tipe: string.

  • sagemakerIamRoleArn— (Opsional) ARN dari peran IAM untuk SageMaker eksekusi AI.

    Tipe: string. Catatan: Ini harus tercantum dalam grup parameter klaster DB Anda atau kesalahan akan terjadi.

  • neptuneIamRoleArn— (Opsional) Nama Sumber Daya Amazon (ARN) dari peran IAM yang dapat diasumsikan SageMaker AI untuk melakukan tugas atas nama Anda.

    Tipe: string. Catatan: Ini harus tercantum dalam grup parameter klaster DB Anda atau kesalahan akan terjadi.

  • processingInstanceType— (Opsional) Jenis instans ML yang digunakan selama pemrosesan data. Memorinya harus cukup besar untuk menahan set data yang diproses.

    Tipe: string. Default: ml.r5 tipe terkecil yang memorinya sepuluh kali lebih besar dari ukuran data grafik yang diekspor pada disk.

    Catatan: Neptunus ML dapat memilih jenis instans secara otomatis. Lihat Memilih instance untuk pemrosesan data.

  • processingInstanceVolumeSizeInGB  –   (Opsional) Ukuran volume disk dari instans pemrosesan. Data input dan data yang diproses disimpan pada disk, sehingga ukuran volume harus cukup besar untuk menahan kedua set data.

    Tipe: integer. Default: 0.

    Catatan: Jika tidak ditentukan atau 0, Neptunus ML memilih ukuran volume secara otomatis berdasarkan ukuran data.

  • processingTimeOutInSeconds   –   (Opsional) Timeout dalam hitungan detik untuk tugas pemrosesan data.

    Tipe: integer. Default: 86,400 (1 hari).

  • modelType— (Opsional) Salah satu dari dua jenis model yang saat ini didukung Neptunus ML: model grafik heterogen heterogeneous (), dan grafik pengetahuan (). kge

    Tipe: string. Default: tidak ada.

    Catatan: Jika tidak ditentukan, Neptunus ML memilih jenis model secara otomatis berdasarkan data.

  • configFileName   –   (Opsional) File spesifikasi data yang menjelaskan cara memuat data grafik yang diekspor untuk pelatihan. File secara otomatis dihasilkan oleh kit alat ekspor Neptune.

    Tipe: string. Default: training-data-configuration.json.

  • subnets— (Opsional) Subnet di VPC Neptunus. IDs

    Tipe: daftar string. Default: tidak ada.

  • securityGroupIds— (Opsional) Grup keamanan VPC. IDs

    Tipe: daftar string. Default: tidak ada.

  • volumeEncryptionKMSKey— (Opsional) Kunci AWS Key Management Service (AWS KMS) yang digunakan SageMaker AI untuk mengenkripsi data pada volume penyimpanan yang dilampirkan ke instance komputasi ML yang menjalankan tugas pemrosesan.

    Tipe: string. Default: tidak ada.

  • enableInterContainerTrafficEncryption— (Opsional) Aktifkan atau nonaktifkan enkripsi lalu lintas antar-kontainer dalam pelatihan atau pekerjaan penyetelan hiper-parameter.

    Jenis: boolean. Default: Benar.

    catatan

    enableInterContainerTrafficEncryptionParameter ini hanya tersedia dalam rilis mesin 1.2.0.2.R3.

  • s3OutputEncryptionKMSKey— (Opsional) Kunci AWS Key Management Service (AWS KMS) yang digunakan SageMaker AI untuk mengenkripsi output dari pekerjaan pelatihan.

    Tipe: string. Default: tidak ada.

Mendapatkan status job pemrosesan data menggunakan perintah dataprocessing Neptune ML

Perintah dataprocessing Neptune ML sampel untuk status tugas terlihat seperti ini:

AWS CLI
aws neptunedata get-ml-data-processing-job \ --endpoint-url https://your-neptune-endpoint:port \ --id "(the job ID)"

Untuk informasi selengkapnya, lihat get-ml-data-processing-job di Referensi AWS CLI Perintah.

SDK
import boto3 from botocore.config import Config client = boto3.client( 'neptunedata', endpoint_url='https://your-neptune-endpoint:port', config=Config(read_timeout=None, retries={'total_max_attempts': 1}) ) response = client.get_ml_data_processing_job( id='(the job ID)' ) print(response)
awscurl
awscurl https://your-neptune-endpoint:port/ml/dataprocessing/(the job ID) \ --region us-east-1 \ --service neptune-db \ -X GET
catatan

Contoh ini mengasumsikan bahwa AWS kredenal Anda dikonfigurasi di lingkungan Anda. Ganti us-east-1 dengan Wilayah cluster Neptunus Anda.

curl
curl -s \ "https://your-neptune-endpoint:port/ml/dataprocessing/(the job ID)" \ | python -m json.tool
Parameter untuk status tugas dataprocessing
  • id   –   (Wajib) Pengenal unik tugas pemrosesan data.

    Tipe: string.

  • neptuneIamRoleArn— (Opsional) ARN dari peran IAM yang menyediakan akses Neptunus ke sumber daya AI dan Amazon S3. SageMaker

    Tipe: string. Catatan: Ini harus tercantum dalam grup parameter klaster DB Anda atau kesalahan akan terjadi.

Menghentikan tugas pemrosesan data menggunakan perintah dataprocessing Neptune ML

Perintah dataprocessing Neptune ML sampel untuk menghentikan tugas terlihat seperti ini:

AWS CLI
aws neptunedata cancel-ml-data-processing-job \ --endpoint-url https://your-neptune-endpoint:port \ --id "(the job ID)"

Untuk juga membersihkan artefak Amazon S3:

aws neptunedata cancel-ml-data-processing-job \ --endpoint-url https://your-neptune-endpoint:port \ --id "(the job ID)" \ --clean

Untuk informasi selengkapnya, lihat cancel-ml-data-processing-job di Referensi AWS CLI Perintah.

SDK
import boto3 from botocore.config import Config client = boto3.client( 'neptunedata', endpoint_url='https://your-neptune-endpoint:port', config=Config(read_timeout=None, retries={'total_max_attempts': 1}) ) response = client.cancel_ml_data_processing_job( id='(the job ID)', clean=True ) print(response)
awscurl
awscurl https://your-neptune-endpoint:port/ml/dataprocessing/(the job ID) \ --region us-east-1 \ --service neptune-db \ -X DELETE

Untuk juga membersihkan artefak Amazon S3:

awscurl "https://your-neptune-endpoint:port/ml/dataprocessing/(the job ID)?clean=true" \ --region us-east-1 \ --service neptune-db \ -X DELETE
catatan

Contoh ini mengasumsikan bahwa AWS kredenal Anda dikonfigurasi di lingkungan Anda. Ganti us-east-1 dengan Wilayah cluster Neptunus Anda.

curl
curl -s \ -X DELETE "https://your-neptune-endpoint:port/ml/dataprocessing/(the job ID)"

Atau ini:

curl -s \ -X DELETE "https://your-neptune-endpoint:port/ml/dataprocessing/(the job ID)?clean=true"
Parameter untuk tugas berhenti dataprocessing
  • id   –   (Wajib) Pengenal unik tugas pemrosesan data.

    Tipe: string.

  • neptuneIamRoleArn— (Opsional) ARN dari peran IAM yang menyediakan akses Neptunus ke sumber daya AI dan Amazon S3. SageMaker

    Tipe: string. Catatan: Ini harus tercantum dalam grup parameter klaster DB Anda atau kesalahan akan terjadi.

  • clean   –   (Opsional) Bendera ini menetapkan bahwa semua artefak Amazon S3 harus dihapus ketika tugas dihentikan.

    Tipe: Boolean. Default: FALSE.

Membuat daftar tugas pemrosesan data aktif menggunakan perintah dataprocessingNeptune ML

Perintah dataprocessing Neptune ML sampel untuk membuat daftar tugas aktif terlihat seperti ini:

AWS CLI
aws neptunedata list-ml-data-processing-jobs \ --endpoint-url https://your-neptune-endpoint:port

Untuk membatasi jumlah hasil:

aws neptunedata list-ml-data-processing-jobs \ --endpoint-url https://your-neptune-endpoint:port \ --max-items 3

Untuk informasi selengkapnya, lihat list-ml-data-processing-jobs di Referensi AWS CLI Perintah.

SDK
import boto3 from botocore.config import Config client = boto3.client( 'neptunedata', endpoint_url='https://your-neptune-endpoint:port', config=Config(read_timeout=None, retries={'total_max_attempts': 1}) ) response = client.list_ml_data_processing_jobs( maxItems=3 ) print(response)
awscurl
awscurl https://your-neptune-endpoint:port/ml/dataprocessing \ --region us-east-1 \ --service neptune-db \ -X GET

Untuk membatasi jumlah hasil:

awscurl "https://your-neptune-endpoint:port/ml/dataprocessing?maxItems=3" \ --region us-east-1 \ --service neptune-db \ -X GET
catatan

Contoh ini mengasumsikan bahwa AWS kredenal Anda dikonfigurasi di lingkungan Anda. Ganti us-east-1 dengan Wilayah cluster Neptunus Anda.

curl
curl -s "https://your-neptune-endpoint:port/ml/dataprocessing"

Atau ini:

curl -s "https://your-neptune-endpoint:port/ml/dataprocessing?maxItems=3"
Parameter untuk tugas daftar dataprocessing
  • maxItems   –   (Opsional) Jumlah maksimum item yang akan dikembalikan.

    Tipe: integer. Default: 10. Nilai maksimum yang diperbolehkan: 1024.

  • neptuneIamRoleArn— (Opsional) ARN dari peran IAM yang menyediakan akses Neptunus ke sumber daya AI dan Amazon S3. SageMaker

    Tipe: string. Catatan: Ini harus tercantum dalam grup parameter klaster DB Anda atau kesalahan akan terjadi.