예제 #1
0
 def Run(self, args):
     hptuning_job_ref = args.CONCEPTS.hptuning_job.Parse()
     region = hptuning_job_ref.AsDict()['locationsId']
     with endpoint_util.AiplatformEndpointOverrides(
             version=constants.BETA_VERSION, region=region):
         relative_name = hptuning_job_ref.RelativeName()
         return log_util.StreamLogs(
             hptuning_job_ref.AsDict()['hyperparameterTuningJobsId'],
             continue_function=client.HpTuningJobsClient().CheckJobComplete(
                 relative_name),
             polling_interval=args.polling_interval,
             task_name=args.task_name,
             allow_multiline=args.allow_multiline_logs)
예제 #2
0
    def Run(self, args):
        custom_job_ref = args.CONCEPTS.custom_job.Parse()
        region = custom_job_ref.AsDict()['locationsId']
        validation.ValidateRegion(region)

        with endpoint_util.AiplatformEndpointOverrides(
                version=self._api_version, region=region):
            return log_util.StreamLogs(
                custom_job_ref.AsDict()['customJobsId'],
                continue_function=client.CustomJobsClient(
                    version=self._api_version).CheckJobComplete(
                        custom_job_ref.RelativeName()),
                polling_interval=args.polling_interval,
                task_name=args.task_name,
                allow_multiline=args.allow_multiline_logs)
    def Run(self, args):
        hptuning_job_ref = args.CONCEPTS.hptuning_job.Parse()
        region = hptuning_job_ref.AsDict()['locationsId']
        validation.ValidateRegion(
            region, available_regions=constants.SUPPORTED_TRAINING_REGIONS)

        version = constants.GA_VERSION if self.ReleaseTrack(
        ) == base.ReleaseTrack.GA else constants.BETA_VERSION
        with endpoint_util.AiplatformEndpointOverrides(version=version,
                                                       region=region):
            relative_name = hptuning_job_ref.RelativeName()
            return log_util.StreamLogs(
                hptuning_job_ref.AsDict()['hyperparameterTuningJobsId'],
                continue_function=client.HpTuningJobsClient(
                    version=version).CheckJobComplete(relative_name),
                polling_interval=args.polling_interval,
                task_name=args.task_name,
                allow_multiline=args.allow_multiline_logs)