AlgorithmError: ExecuteUserScriptError: ExitCode 1 ErrorMessage "FileNotFoundError: [Errno 2] No such file or directory: '/opt/ml/input/data/training/train/data.csv' " Command "/opt/conda/bin/python3.8 transfer_learning.py --attn_dropout 0.17493582725215484 --batch_size 128 --frac_shared_embed 0.25 --input_dim 32 --learning_rate 0.008165108541098379 --mlp_dropout 0.2870045773619837 --n_blocks 4 --n_epochs 80 --patience 15", exit code: 1
from sagemaker.estimator import Estimator
from sagemaker.utils import name_from_base
training_job_name = name_from_base(f"jumpstart-{train_model_id}-training")
# Create SageMaker Estimator instance
tabular_estimator = Estimator(
role=aws_role,
image_uri=train_image_uri,
source_dir=train_source_uri,
model_uri=train_model_uri,
entry_point="transfer_learning.py",
instance_count=1,
instance_type=training_instance_type,
max_run=360000,
hyperparameters=hyperparameters,
output_path=s3_output_location,
)
if use_amt:
tuner = HyperparameterTuner(
tabular_estimator,
"r2",
hyperparameter_ranges,
[{"Name": "r2", "Regex": "metrics={'r2': (\\S+)}"}],
max_jobs=10, # increase the max_jobs to achieve better performance from hyperparameter tuning
max_parallel_jobs=2,
objective_type="Maximize",
base_tuning_job_name=training_job_name,
)
tuner.fit({"training": training_dataset_s3_path}, logs=True)
else:
# Launch a SageMaker Training job by passing s3 path of the training data
tabular_estimator.fit(
{"training": training_dataset_s3_path}, logs=True, job_name=training_job_name
)