Пример #1
0
 def Run(self, args):
     region = region_util.GetRegion(args)
     with endpoint_util.MlEndpointOverrides(region=region):
         client = versions_api.VersionsClient()
         labels = versions_util.ParseCreateLabels(client, args)
         framework = flags.FRAMEWORK_MAPPER.GetEnumForChoice(args.framework)
         accelerator = flags.ParseAcceleratorFlag(args.accelerator)
         return versions_util.Create(client,
                                     operations.OperationsClient(),
                                     args.version,
                                     model=args.model,
                                     origin=args.origin,
                                     staging_bucket=args.staging_bucket,
                                     runtime_version=args.runtime_version,
                                     config_file=args.config,
                                     asyncronous=args.async_,
                                     description=args.description,
                                     labels=labels,
                                     machine_type=args.machine_type,
                                     framework=framework,
                                     python_version=args.python_version,
                                     accelerator_config=accelerator,
                                     min_nodes=args.min_nodes,
                                     max_nodes=args.max_nodes,
                                     metrics=args.metric_targets,
                                     autoscaling_hidden=False)
Пример #2
0
 def Run(self, args):
     versions_client = versions_api.VersionsClient()
     labels = versions_util.ParseCreateLabels(versions_client, args)
     framework = flags.FRAMEWORK_MAPPER.GetEnumForChoice(args.framework)
     accelerator = flags.ParseAcceleratorFlag(args.accelerator)
     return versions_util.Create(versions_client,
                                 operations.OperationsClient(),
                                 args.version,
                                 model=args.model,
                                 origin=args.origin,
                                 staging_bucket=args.staging_bucket,
                                 runtime_version=args.runtime_version,
                                 config_file=args.config,
                                 asyncronous=args.async_,
                                 labels=labels,
                                 description=args.description,
                                 machine_type=args.machine_type,
                                 framework=framework,
                                 python_version=args.python_version,
                                 prediction_class=args.prediction_class,
                                 package_uris=args.package_uris,
                                 service_account=args.service_account,
                                 accelerator_config=accelerator,
                                 explanation_method=args.explanation_method,
                                 num_integral_steps=args.num_integral_steps,
                                 num_paths=args.num_paths)
Пример #3
0
 def Run(self, args):
     versions_client = versions_api.VersionsClient()
     labels = versions_util.ParseCreateLabels(versions_client, args)
     return versions_util.Create(versions_client,
                                 operations.OperationsClient(),
                                 args.version,
                                 model=args.model,
                                 origin=args.origin,
                                 staging_bucket=args.staging_bucket,
                                 runtime_version=args.runtime_version,
                                 config_file=args.config,
                                 async_=args. async,
                                 labels=labels)
Пример #4
0
 def Run(self, args):
     versions_client = versions_api.VersionsClient()
     labels = versions_util.ParseCreateLabels(versions_client, args)
     framework = flags.FRAMEWORK_MAPPER.GetEnumForChoice(args.framework)
     return versions_util.Create(versions_client,
                                 operations.OperationsClient(),
                                 args.version,
                                 model=args.model,
                                 origin=args.origin,
                                 staging_bucket=args.staging_bucket,
                                 runtime_version=args.runtime_version,
                                 config_file=args.config,
                                 async_=args. async,
                                 description=args.description,
                                 labels=labels,
                                 framework=framework)
Пример #5
0
 def Run(self, args):
     with endpoint_util.MlEndpointOverrides(region=args.region):
         client = versions_api.VersionsClient()
         labels = versions_util.ParseCreateLabels(client, args)
         framework = flags.FRAMEWORK_MAPPER.GetEnumForChoice(args.framework)
         return versions_util.Create(client,
                                     operations.OperationsClient(),
                                     args.version,
                                     model=args.model,
                                     origin=args.origin,
                                     staging_bucket=args.staging_bucket,
                                     runtime_version=args.runtime_version,
                                     config_file=args.config,
                                     asyncronous=args.async_,
                                     description=args.description,
                                     labels=labels,
                                     framework=framework,
                                     python_version=args.python_version)
Пример #6
0
 def Run(self, args):
     versions_client = versions_api.VersionsClient()
     labels = versions_util.ParseCreateLabels(versions_client, args)
     framework = flags.FRAMEWORK_MAPPER.GetEnumForChoice(args.framework)
     return versions_util.Create(versions_client,
                                 operations.OperationsClient(),
                                 args.version,
                                 model=args.model,
                                 origin=args.origin,
                                 staging_bucket=args.staging_bucket,
                                 runtime_version=args.runtime_version,
                                 config_file=args.config,
                                 asyncronous=args. async,
                                 description=args.description,
                                 labels=labels,
                                 machine_type=args.machine_type,
                                 framework=framework,
                                 python_version=args.python_version,
                                 prediction_class=args.prediction_class,
                                 package_uris=args.package_uris)
Пример #7
0
 def Run(self, args):
     region = region_util.GetRegion(args)
     with endpoint_util.MlEndpointOverrides(region=region):
         client = versions_api.VersionsClient()
         labels = versions_util.ParseCreateLabels(client, args)
         framework = flags.FRAMEWORK_MAPPER.GetEnumForChoice(args.framework)
         accelerator = flags.ParseAcceleratorFlag(args.accelerator)
         return versions_util.Create(
             client,
             operations.OperationsClient(),
             args.version,
             model=args.model,
             origin=args.origin,
             staging_bucket=args.staging_bucket,
             runtime_version=args.runtime_version,
             config_file=args.config,
             asyncronous=args.async_,
             labels=labels,
             description=args.description,
             machine_type=args.machine_type,
             framework=framework,
             python_version=args.python_version,
             prediction_class=args.prediction_class,
             package_uris=args.package_uris,
             service_account=args.service_account,
             accelerator_config=accelerator,
             explanation_method=args.explanation_method,
             num_integral_steps=args.num_integral_steps,
             num_paths=args.num_paths,
             image=args.image,
             command=args.command,
             container_args=args.args,
             env_vars=args.env_vars,
             ports=args.ports,
             predict_route=args.predict_route,
             health_route=args.health_route,
             min_nodes=args.min_nodes,
             max_nodes=args.max_nodes,
             metrics=args.metric_targets,
             containers_hidden=False,
             autoscaling_hidden=False)