Can I use Sagemaker ScriptProcessor to process a java code, and add that to sagemaker pipeline step ?

0

I want to create a training step in sagemaker pipeline, and use custom processor like below. But instead of python code I want to use java code in the place of [code = 'src/processing.py' ]. Is it possible ?

`from sagemaker.processing import ScriptProcessor, ProcessingInput, ProcessingOutput

script_processor = ScriptProcessor(command=['python3'],
                image_uri='image_uri',
                role='role_arn',
                instance_count=1,
                instance_type='ml.m5.xlarge', 
)

step_process = ProcessingStep(
        name="ProcessStep",
        processor=script_processor, 
        code = 'src/processing.py'
        input = [ 
                ProcessingInput(
                      input_name="utils"
                      source="src/utils", 
                      destination="/opt/ml/processing/input/src/utils",
                )
)`
1 個回答
1
已接受的答案

yes, you can use Java or Scala which is similar to Java.

https://docs.djl.ai/docs/demos/aws/sagemaker/notebook/index.html

已回答 10 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南