Running this command, I get the following error.
from sagemaker.estimator import Estimator
from sagemaker import get_execution_role
import sagemaker
role=get_execution_role()
hyperparameters = {
'num_classes': 133,
'epochs': 1
}
estimator=Estimator(
image_uri='docker-image',
role=role,
instance_count=1,
instance_type='local',
hyperparameters=hyperparameters
)
estimator.fit(inputs="file://data/train", logs=True)
There is data in the file://data/train
path.
Here is my Dockerfile
# SageMaker PyTorch image
FROM 763104351884.dkr.ecr.us-east-1.amazonaws/pytorch-inference:2.5.1-cpu-py311-ubuntu22.04-sagemaker
# Set the environment variable to include your code in the PATH
ENV PATH="/opt/ml/code:${PATH}"
# This environment variable is used by the SageMaker PyTorch container
# to determine our user code directory
ENV SAGEMAKER_SUBMIT_DIRECTORY /opt/ml/code
# Copy the user code to the container
COPY train.py /opt/ml/code/train.py
# Set the working directory
WORKDIR /opt/ml/code
# Define the entry point for the container
CMD ["python", "train.py"]
I am trying to figure out why the process is trying to find this train file and can't find it.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745613396a4636086.html
评论列表(0条)