def _main()

in scripts/run.py [0:0]


def _main(argv):

    vertex_ai.init(
        project=FLAGS.project_id,
        location=FLAGS.region,
        staging_bucket=FLAGS.staging_bucket,
    )

    job_name = f'{FLAGS.job_name_prefix}_{datetime.now().strftime("%Y%m%d%H%M%S")}'
    job_dir = f'{FLAGS.staging_bucket}/t5x_jobs/{job_name}'

    job = _create_t5x_custom_job(
        display_name=job_name,
        machine_type=MACHINE_TYPE,
        accelerator_type=FLAGS.accelerator_type,
        accelerator_count=FLAGS.accelerator_count,
        image_uri=FLAGS.image_uri,
        run_mode=FLAGS.run_mode,
        gin_files=FLAGS.gin_files,
        gin_overwrites=FLAGS.gin_overwrites,
        gin_search_paths=FLAGS.gin_search_paths,
        tfds_data_dir=FLAGS.tfds_data_dir,
        model_dir=job_dir,
    ) 

    logging.info(f'Starting job: {job_name}')    
    job.run(sync=FLAGS.sync)