I am running a Hugging Face training job (which works locally) in a container running in EC2.  When I call fit on the estimator I get the error:
An error occurred (ValidationException) when calling the CreateTrainingJob operation: TrainingImageConfig with TrainingRepositoryAccessMode set to VPC must be provided when using a training image from a private Docker registry. Please provideTrainingImageConfig and TrainingRepositoryAccessMode set to VPC when using a training image from a private Docker registry.
The variables mentioned do not exist in the documentation and I can’t find it in the source code: TrainingImageConfig, TrainingRepositoryAccessMode.
There are some mentions for vpc_config and vpcConfig but there doesn’t seem to be a way to pass these things through to SM from HF.
My code is basically this:
hyperparameters = {'epochs': 1,
                   'per_device_train_batch_size': 32,
                   'model_name_or_path': model_name
                   }
huggingface_estimator = HuggingFace(
    entry_point='train.py',
    source_dir='./scripts',
    instance_type=instance_type,
    instance_count=1,
    role=role,
    image_uri='docker.artifactory.xxxx.com/yyyy/mlaeep/mlaeep.0.0.1-dev',
    transformers_version='4.4',
    # pytorch_version='1.6',
    py_version='py36',
    hyperparameters=hyperparameters
)
huggingface_estimator.fit(
    {'train': training_input_path,
     'test': test_input_path
    },
    job_name='MlAeepTrainer'
)