To submit a training run in Azure Machine Learning using Python code, you should create a ScriptRunConfig object. This class defines the configuration information needed for running a training script on a compute target. The ScriptRunConfig class allows you to specify the compute target, the environment, the training script, and any script arguments or data references needed by the script.