Overview
Product Pricing
Benefits to Customers
Use Cases
describe_postpaid_training_price(self)Query hourly prices for each configuration:rtype: tencentcloud.tione.v20211111.models.DescribeBillingSpecsResponsedescribe_system_reasoning_images(self)Retrieve the platform built-in inference image:return: mirror information:rtype: :class:`tikit.tencentcloud.tione.v20211111.models.DescribeInferTemplatesResponse`Data format such as:{"FrameworkTemplates": [{"Framework": "TENSORFLOW","FrameworkVersion": "2.4","Groups": ["TENSORFLOW","LIGHT"],"InferTemplates": [{"InferTemplateId": "tf2.4-py38-cpu","InferTemplateImage": "ccr.ccs.tencentyun.com/qcloud-ti-platform/ti-cloud-infer-tensorflow-cpu:py38-tensorflow2.4-cpu-20211206"},{"InferTemplateId": "tf2.4-py38-gpu","InferTemplateImage": "ccr.ccs.tencentyun.com/qcloud-ti-platform/ti-cloud-infer-tensorflow-gpu:py38-tensorflow2.4-cu110-20211206"}]}],"RequestId": "3654e19b-c2ba-4953-b131-d66495723008"}def create_training_task(self,name,framework,cos_output,worker_resource,code_package_path,ps_resource=None,input_data_config=None,worker_start_cmd=None,ps_start_cmd=None,tags=None,tuning_parameters_dict={},resource_group_id="",remark=None,log_enable=False,log_logset_id=None,log_topic_id=None,vpc_id=None,sub_net_id=None,restart_limit=0):Create training task:param name: task name:type name: str:param framework: the running framework environment:type framework: :class:`tikit.models.FrameworkInfo`:param cos_output: output cos information:type cos_output: str:param worker_resource: worker node configuration:type worker_resource: :class:`tikit.models.ResourceConfigInfo`:param code_package_path: cos information of the code:type code_package_path: str:param ps_resource: ps node configuration:type ps_resource: :class:`tikit.models.ResourceConfigInfo`:param input_data_config: input data information:type input_data_config: list or :class:`tikit.models.TrainingDataConfig`:param worker_start_cmd: worker startup command:type worker_start_cmd: str:param ps_start_cmd: ps node startup command:type ps_start_cmd: str:param tags: Tag:type tags: list of :class:`tikit.tencentcloud.tione.v20211111.models.Tag`:param tuning_parameters_dict: Tuning parameters dictionary:type tuning_parameters_dict: dict:param resource_group_id: prepaid resource group id:type resource_group_id: str:param remark: Description:type remark: str:param log_enable: log switch:type log_enable: bool:param log_logset_id: log set id:type log_logset_id: str:param log_topic_id: log topic id:type log_topic_id: str:param vpc_id: vpc id:type vpc_id: str:param sub_net_id: subnet ID:type sub_net_id: str:param restart_limit: Maximum number of restarts for the current task, max 10, after this limit is exceeded the task is marked as abnormal:type restart_limit: int:return::rtype: :class:`tikit.tencentcloud.tione.v20211111.models.CreateTrainingTaskResponse`"""def describe_training_frameworks(self):"""view Training framework:rtype: :class:`tikit.tencentcloud.tione.v20211111.models.DescribeTrainingFrameworksResponse`"""def describe_training_tasks(self, filters=None, tag_filters=None, offset=0, limit=50, order="DESC",order_field="UpdateTime"):"""get training task list:param filters: Filter, eg: [{ "Name": "TaskStatus", "Values": ["Running"] }]:type filters: list of Filter:param tag_filters: tag filtering, eg: [{ "TagKey": "TagKeyA", "TagValue": ["TagValueA"] }]:type tag_filters: list of TagFilter:param offset: Offset, default 0:type offset: int:param limit: Number of returned results, default 50:type limit: int:param order: Output list sorting order. Value ranges from ASC (ascending order) to DESC (descending order):type order: str:param order_field: basis field for sorting, value ranges from "CreateTime" to "UpdateTime":type order_field: str:return::rtype: :class:`tikit.tencentcloud.tione.v20211111.models.DescribeTrainingTasksResponse`"""def describe_training_task(self, task_id)get training task info:param task_id: training task ID:type task_id: str:rtype: :class:`tencentcloud.tione.v20211111.models.DescribeTrainingTaskResponse`def describe_training_task_pods(self, task_id)get training task pod List:param task_id: training task ID:type task_id: str:rtype: :class:`tencentcloud.tione.v20211111.models.DescribeTrainingTaskPodsResponse`def describe_train_logs(self, pod_name, start_time=None, end_time=None, limit=None, order=None,context=None, filters=None):View training task logs:param pod_name: Which pod's logs to query. Wildcards are supported. To view all logs of a certain training task, set to "<task_id>-*", for example: train-51cd6bf7ec1000-*:type pod_name: str:param start_time: log query start time. Time string in RFC3339 format, such as 2021-12-16T13:20:24+08:00, default value is one hour ago:type start_time: str:param end_time: log query end time. Time string in RFC3339 format, such as 2021-12-16T13:20:24+08:00, default value is current time:type end_time: str:param limit: number of log entries, default 100, maximum value 100:type limit: int:param order: sorting order. (ASC | DESC) default value is DESC:type order: str:param context: pagination cursor:type context: str:param filters: Filter:type filters: list of tikit.tencentcloud.tione.v20211111.models.Filter:rtype: :class:`tikit.tencentcloud.tione.v20211111.models.DescribeLogsResponse`If the returned object is not empty, there will be a next() method to continuously retrieve logs from the next page (if there are multiple pages), as follows:now_time = datetime.datetime.now(datetime.timezone.utc)now_time_str = now_time.isoformat()result = client.describe_train_logs("train-51cd6bf7ec1000-37c5p5nlr01s-launcher","2021-12-10T09:32:03.823509+00:00",now_time_str,limit=30)print(result)print(result.next())print(result.next())print(result.next())"""def push_training_metrics(self, timestamp, value_map, task_id=None, epoch=None, total_steps=None, step=None):Submit custom training metrics (single). Each sub-account can call the API 20 times per second. Please pay attention to control the reporting frequency in your training code to avoid exceeding the limit. Or use push_training_metrics_list.:param timestamp: timestamp:type timestamp: int:param value_map: Metric map. Metric name -> Metric value:type value_map: map: str -> float:param task_id: task ID. if empty, use the value of the TI_TASK_ID environment variable from the current task node environment:type task_id: str:param epoch: epoch value:type epoch: int:param total_steps: total steps:type total_steps: int:param step: which step:type step: int:return::rtype: :class:`tikit.tencentcloud.tione.v20211111.models.PushTrainingMetricsResponse`client.push_training_metrics(int(time.time()), {"field1": 11, "field2": 12}, "task-id-00001", 3, 1000, 66)"""def push_training_metrics_list(self, metric_list)Report training custom metric (list):param metric_list: MetricData array. If the task ID is empty, use the value of the TI_TASK_ID environment variable from the current task node environment:type metric_list: list of :class:`tencentcloud.tione.v20211111.models.MetricData`:return::rtype: :class:`tencentcloud.tione.v20211111.models.PushTrainingMetricsResponse`def describe_training_metrics(self, task_id)Query training custom metric:param task_id: task ID:type task_id: str:rtype: :class:`tencentcloud.tione.v20211111.models.DescribeTrainingMetricsResponse`def stop_training_task(self, task_id)Terminate a certain training task:param task_id: training task ID:type task_id: str:rtype: :class:`tencentcloud.tione.v20211111.models.StopTrainingTaskResponse`def delete_training_task(self, task_id)Delete a certain training task:param task_id: training task ID:type task_id: str:rtype: :class:`tencentcloud.tione.v20211111.models.DeleteTrainingTaskResponse`
tikit.models.FrameworkInfodef new_custom(training_mode, image_type, image_url, registry_region=None, registry_id=None,user_name=None, passwd=None):Custom Training framework configuration View list via describe_training_frameworks():param training_mode: training mode, for example "DDP", only create training task need to configure:type training_mode: str:param image_type: image type, CCR means Tencent Cloud container mirroring service personal edition, TCR refers to TCR Enterprise Edition, CUSTOM indicates external Custom Image:type image_type: str:param image_url: image address required:type image_url: str:param registry_region: region of the mirror repository in Tencent Cloud container mirroring service:type registry_region: str:param registry_id: ID of the mirror repository in Tencent Cloud container mirroring service:type registry_id: str:param user_name: userName of the Custom Image repository:type user_name: str:param passwd: password of the Custom Image repository:type passwd: str:return::rtype:"""def new_system_framework(framework_name, framework_environment, training_mode):"""built-in Training framework:param framework_name: framework name. View list via describe_training_frameworks():type framework_name: str:param framework_environment: framework environment. View list via describe_training_frameworks():type framework_environment: str:param training_mode: training mode. View the list via describe_training_frameworks():type training_mode: str:return::rtype:"""----------------------------------------------------tikit.models.ResourceConfigInfodef new_postpaid(instance_type, instance_num):Retrieve resource configuration in postpaid mode:param instance_type: instance type. View instance list via describe_postpaid_training_price():type instance_type: str:param instance_num: instance count:type instance_num: int:return::rtype:"""|def new_prepaid(cpu=0, memory=0, gpu=0, gpu_type=None, instance_num=1):Retrieve resource configuration under prepaid mode. When the resource group enables GPU proportion preset, leave the cpu and memory parameters unset or set to 0. These two values will be proportionally distributed based on the number of GPU cards.:param cpu: number of CPUs, unit is core:type cpu: float:param memory: memory size, unit is GB:type memory: float:param gpu_type: GPU type:type gpu_type: str:param gpu: GPU count:type gpu: float:param instance_num: instance count:type instance_num: int:return::rtype:"""----------------------------------------------------tikit.models.TrainingDataConfigdef new_mount_cos(cos_str, target_path):a cos-type training data:param cos_str: COS storage, format: <bucket>/<cos path>/:type cos_str: str:param target_path: Target mount path:type target_path: str:return::rtype:"""def new_dataset_mount(dataset_id, target_path):a training data of dataset type:param dataset_id: dataset id:type dataset_id: str:param target_path: Target mount path:type target_path: str:return::rtype:"""def new_mount_cfs(cfs_id, source_path, target_path):Create a new training dataset configuration of fs type:param cfs_id: CFS ID:type cfs_id: str:param source_path: CFS path:type source_path: str:param target_path: Target mount path:type target_path: str:return::rtype:"""def new_mount_hdfs(hdfs_id, source_path, target_path):Create a new hdfs type training dataset configuration:param hdfs_id: HDFS ID on EMR:type hdfs_id: str:param source_path: HDFS path:type source_path: str:param target_path: Target mount path:type target_path: str:return::rtype:"""def new_mount_wedata_hdfs(wedata_id, source_path):"""Create a new training dataset configuration for wedata hdfs type:param wedata_id: wedata data source ID:type wedata_id: int:param source_path: HDFS path:type source_path: str:return::rtype:"""def new_dataset(id_target_dict):""" Deprecated !Create a new training dataset configuration for Set Type:param id_target_dict: dataset information. dataset id -> target download path:type id_target_dict: dict:return::rtype:"""def new_cos_data(cos_str_target_dict):"""Deprecated !Create a new training dataset configuration for cos Type:param cos_str_target_dict: dataset information. <bucket>/<cos path>/ -> target download path:type cos_str_target_dict: dict:return::rtype:"""def new_mount_goosefs(goosefs_id, source_path, namespace, target_path):Create a new training dataset configuration of goosefs type:param goosefs_id: the instance ID of GooseFS:type goosefs_id: str:param target_path: Target mount path:type target_path: str:return::rtype:"""def new_mount_goosefsx(goosefsx_id, goosefsx_path, target_path):Create a new storage configuration of type goosefsx:param goosefsx_id: the instance ID of GooseFSX:type goosefsx_id: str:param goosefsx_path: the path of GooseFSX:type goosefsx_path: str:param target_path: Target mount path:type target_path: str:return::rtype:"""
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback