Ejemplo n.º 1
0
 def Run(self, args):
     models_client = models.ModelsClient()
     labels = models_util.ParseCreateLabels(models_client, args)
     model = models_util.Create(models_client,
                                args.model,
                                regions=args.regions,
                                enable_logging=args.enable_logging,
                                labels=labels)
     log.CreatedResource(model.name, kind='ml engine model')
Ejemplo n.º 2
0
 def _Run(self, args, support_console_logging=False):
   models_client = models.ModelsClient()
   labels = models_util.ParseCreateLabels(models_client, args)
   enable_console_logging = (support_console_logging and
                             args.enable_console_logging)
   model = models_util.Create(models_client, args.model,
                              regions=args.regions,
                              enable_logging=args.enable_logging,
                              enable_console_logging=enable_console_logging,
                              labels=labels,
                              description=args.description)
   log.CreatedResource(model.name, kind='ml engine model')
Ejemplo n.º 3
0
 def _Run(self, args, support_console_logging=False):
     region, model_regions = models_util.GetModelRegion(args)
     with endpoint_util.MlEndpointOverrides(region=region):
         models_client = models.ModelsClient()
         labels = models_util.ParseCreateLabels(models_client, args)
         enable_console_logging = (support_console_logging
                                   and args.enable_console_logging)
         model = models_util.Create(
             models_client,
             args.model,
             model_regions,
             enable_logging=args.enable_logging,
             enable_console_logging=enable_console_logging,
             labels=labels,
             description=args.description)
         log.CreatedResource(model.name, kind='ai platform model')