Querying a Training Job
Function
This API is used to query jobs of a specified type in a data source or scenario.
URI
GET /v2.0/{project_id}/workspaces/{workspace_id}/resources/{resource_id}/job-instance
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details on how to obtain the project ID, see Obtaining a Project ID. |
| resource_id | Yes | String | Resource ID (data source ID or scenario ID) |
| workspace_id | Yes | String | Workspace ID |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| category | Yes | String | Category. The options are:
|
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | No | String | Content type. The value is application/json. |
| X-Auth-Token | Yes | String | User token. For details on how to obtain the user token, see Obtaining a User Token Through Password Authentication. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| is_success | Boolean | Whether the request is successful |
| jobs | Array of jobs objects | Job details |
| message | String | Response message (This field is not returned when the request is successful.) |
| error_code | String | Error code (This parameter is not returned when the request is successful.) |
| Parameter | Type | Description |
|---|---|---|
| category | String | Category |
| config_info | String | Configuration information |
| description | String | Description |
| job_id | String | Job ID |
| job_name | String | Job name |
| job_type | String | Job type |
| next_schedule_time | Integer | Next scheduling time |
| platform | String | Platform |
| resource_id | String | Resource ID |
| schedule | String | Scheduling parameter |
| status | String | Status |
| workspace_id | String | Workspace ID |
| job_config | jobConfig object | Job settings |
| Parameter | Type | Description |
|---|---|---|
| nearline_recall_param | NearLineRecallParam object | Parameters of a nearline retrieval job (required for nearline retrieval jobs) |
| max_recommended_num | Integer | Max. number of candidate sets (required for retrieval jobs) Minimum: 1 Maximum: 200 |
| match_feature_pairs | Array of MatchFeaturePair objects | Matched feature pair (required for feature matching-based retrieval jobs) |
| striping | Striping object | Row-based strategy (required for feature matching-based retrieval job, itemCF retrieval job, and userCF retrieval job) |
| match_type | String | Matching type (required for feature matching-based retrieval jobs). The options are:
|
| matrix_factorization | MatrixFactorization object | Matrix decomposition parameter settings (required for the ALS-based MF jobs) |
| behavior_frequencys | Array of BehaviorFrequency objects | Behavior frequency information (required for historical behavior-based candidate set generation jobs) |
| file_path | String | File path (required for business rule - manual import retrieval jobs) |
| ucb_param | UcbParam object | UCB job parameter (required for UCB-based retrieval jobs) |
| behavior_gravity | BehaviorGravity object | Gravity decay factor (required for the comprehensive behavior popularity-based retrieval jobs) |
| category | Category object | Type (required for the comprehensive behavior popularity-based retrieval jobs) |
| behavior_logic | String | Behavior filter logic (required for historical behavior filter jobs). The options are:
|
| features_engineering | EtlBasicParameter object | Feature parameter (required for offline feature engineering jobs) |
| sample_param | SampleParam object | Sample parameter (required for offline feature engineering jobs) |
| deep_learning_parameters | DeepLearingParam object | General parameters of a ranking job (required by LR, DeepFM, and AutoGroup) |
| algorithm_specify_parameters | AlgorithmSpecifyParameters object | Specific parameter of a ranking algorithm (required for LR, DeepFM, and AutoGroup) |
| load_widetable | Boolean | Importing a wide table (required for offline data import jobs) |
| load_profile | Boolean | Importing a profile (required for offline data import jobs) |
| save_mode | String | Retaining a wide table (required for offline data import jobs). The options are:
|
| indicators | Array of Indicator objects | Statistical indicator (required for effect evaluation jobs) |
| offline_rank_job_name | String | Name of an offline ranking job (required for online training jobs) |
| update_interval | Integer | Update interval (required for online training jobs) |
| optimizer | Optimizer object | Optimizer (required for online training jobs) |
| flows | Flow object | Online process flow (required for online training jobs) |
| Parameter | Type | Description |
|---|---|---|
| time_limit | Boolean | Time filter |
| timeFeature | String | Time feature |
| retainDays | Integer | Retention period (days) |
| recall_fileds | Array of RecallFiled objects | Retrieved field |
| itemCF_job_name | String | Name of an itemCF job |
| Parameter | Type | Description |
|---|---|---|
| name | String | Field name |
| value | Integer | Number of used field values Minimum: 1 Maximum: 10 Default: 1 |
| Parameter | Type | Description |
|---|---|---|
| user_feature_name | String | User feature |
| item_feature_name | String | Item feature |
| weight | Double | Weight |
| match_count | Boolean | Measurement of the number of matched tags |
| Parameter | Type | Description |
|---|---|---|
| nearest_neighborhood | Integer | Nearest neighbors |
| band | Integer | Similarity degree Minimum: 1 Maximum: 20 |
| row | Integer | Similarity distance Minimum: 1 Maximum: 10 |
| Parameter | Type | Description |
|---|---|---|
| implicit_vector_rank | Integer | Embedding size Minimum: 1 Maximum: 100 |
| regular_param | Double | Optimization lambda Minimum: 1.0E-8 Maximum: 1 |
| max_iterator_num | Integer | Number of iterations Minimum: 1 Maximum: 50 |
| Parameter | Type | Description |
|---|---|---|
| behavior_type | String | Behavior type. The options are:
|
| lower_limit | Integer | Min. times Minimum: 1 |
| upper_limit | Integer | Max. times Minimum: 1 |
| time_interval | Integer | Time range Minimum: 1 |
| Parameter | Type | Description |
|---|---|---|
| alpha | Double | Tradeoff parameter Minimum: 0 Maximum: 1 |
| min_used_num | Integer | Min. number of behaviors Minimum: 30 Maximum: 1000 |
| Parameter | Type | Description |
|---|---|---|
| weaken_factor | Double | Decay factor Minimum: 0.1 Maximum: 5 |
| view_type | String | Behavior quantity counting mode. The options are:
|
| algo_type | String | Algorithm type. The options are:
|
| Parameter | Type | Description |
|---|---|---|
| user_meta_list | Array of strings | User feature |
| item_meta_list | Array of strings | Item feature |
| Parameter | Type | Description |
|---|---|---|
| user_features | Array of FeatureTransformation objects | User feature |
| item_features | Array of FeatureTransformation objects | Item feature |
| rank_etl_filter | RankETLFilter object | Filter parameter |
| Parameter | Type | Description |
|---|---|---|
| attr | Attribute object | Feature |
| discrete_method | String | Discrete method. The options are:
|
| params | Object | Specific processing parameter |
| Parameter | Type | Description |
|---|---|---|
| name | String | Name |
| data_type | String | Data type |
| other_uses | Array of strings | Other usage |
| Parameter | Type | Description |
|---|---|---|
| filter_type | String | Behavior deduplication mode. The options are:
|
| time_type | String | Time type. The options are: Day Week Month |
| is_monday_first | Boolean | Whether Monday is the first day |
| Parameter | Type | Description |
|---|---|---|
| divide_type | String | Division mode of training and test sets. The options are:
|
| train_rate | Double | Training data ratio Minimum: 0.01 Maximum: 1 |
| test_rate | Double | Test data ratio Minimum: 0.01 Maximum: 1 |
| Parameter | Type | Description |
|---|---|---|
| initial_parameters | Initial object | Initialization parameter |
| optimize_parameters | Optimizer object | Optimization parameter |
| regular_parameters | Regular object | Lambda parameter |
| max_iterations | Integer | Max. iterations Minimum: 1 Maximum: 1000 |
| early_stop_iterations | Integer | Iterations at early stopping Minimum: 1 Maximum: 1000 |
| batch_size | Integer | Batch size Minimum: 1 |
| dataset_split_parts | Integer | Number of training datasets to be split Minimum: 1 Maximum: 10 |
| restart_train | Boolean | Retraining |
| Parameter | Type | Description |
|---|---|---|
| initial_method | String | Initialization method Enumeration values:
|
| mean_value | Double | Mean Minimum: -1 Maximum: 1 |
| standard_deviation | Double | Standard deviation Minimum: 0 Maximum: 1 |
| min_value | Double | Min. value Minimum: -1 Maximum: 0 |
| max_value | Double | Max. value Minimum: 0 Maximum: 1 |
| Parameter | Type | Description |
|---|---|---|
| l2_regularization | Double | Lambda 2 Minimum: 0 Maximum: 1 |
| regular_loss_compute_mode | String | Regular loss calculation mode Enumeration values:
|
| embed_l2_regularization | Double | Lambda 2 of embedding size Minimum: 0 Maximum: 1 |
| wide_l2_regularization | Double | Lambda 2 of the wide part Minimum: 0 Maximum: 1 |
| structure_l2_regularization | Double | Lambda 2 of the structured part Minimum: 0 Maximum: 1 |
| Parameter | Type | Description |
|---|---|---|
| latent_vector_length | Integer | Embedding size (required for DeepFM) Minimum: 1 Maximum: 100 |
| architecture | Array of integers | Neural network structure (required for DeepFM) |
| active_function | String | Activation function (required for DeepFM and AutoGroup) Enumeration values:
|
| value_keep_probability | Double | Neuron retention probability (required for DeepFM and AutoGroup) Minimum: 0 Maximum: 1 |
| embed_size | Array of integers | Embedding size of each degree (required for AutoGroup) |
| mlp_architecture | Array of integers | Neural network structure (required for AutoGroup) |
| max_order | Integer | Max. interactions (required for AutoGroup) |
| hash_sizes | Array of integers | Hash length (required for AutoGroup) |
| hash_compensation | Array of numbers | Feature interaction penalty coefficient (required for AutoGroup) |
| use_wide_part | Boolean | Wide part required (required for AutoGroup) |
| structure_optimizer | Optimizer object | Optimizer parameter (required for AutoGroup) |
| merge_multi_hot | Boolean | Merge multi-value feature (required for AutoGroup) |
| fix_structure | Boolean | Fix hash structure (required for AutoGroup) |
| Parameter | Type | Description |
|---|---|---|
| indicator_name | String | Indicator. The options are: PV UV Custom |
| indicator_params | IndicatorParam object | Indicator parameter (required for custom metric) |
| Parameter | Type | Description |
|---|---|---|
| customize_parameter | CustomizeParameter object | Custom parameter |
| customize_formula | CustomizeFormula object | Custom formula |
| Parameter | Type | Description |
|---|---|---|
| alias | String | Alias |
| behavior_type | String | Behavior type |
| threshold | Double | Threshold Minimum: 0 Maximum: 1 |
| deduplication | String | Deduplication |
| Parameter | Type | Description |
|---|---|---|
| type | String | Optimizer type Enumeration values:
|
| learning_rate | Integer | Learning rate Minimum: 0 Maximum: 1 |
| initial_accumulator_value | Double | Initial gradient sum Minimum: 0 Maximum: 1 |
| lambda1 | Double | Lambda 1 Minimum: 0 Maximum: 1 |
| lambda2 | Double | Lambda 2 Minimum: 0 Maximum: 1 |
| epsilon | Double | Epsilon Minimum: 0 Maximum: 1 |
| decay_rate | Double | Decay factor Minimum: 0 Maximum: 1 |
| decay_steps | Double | Decay step Minimum: 1 |
| Parameter | Type | Description |
|---|---|---|
| flow_id | String | Process flow ID |
| attr_pair_rules_filter | Array of AttrPairRules objects | Feature pair filter |
| attr_pair_rules_reserve | Array of AttrPairRules objects | Feature pair to be reserved |
| deduplication_list | Array of Deduplication objects | Feature deduplication |
| attribute_info | AttributeInfo object | Comprehensive ranking information |
| bloom_filter_conf | BloomFilterConf object | Bloom filter settings |
| group_attr | String | The scatter attribute for grouping |
| pre_deal | Boolean | Deduplication before ranking |
| rank_setting | String | Ranking configuration information |
| rules | Rule object | Candidate set merging |
| filter_sets | Array of strings | Filter configuration information |
| attr_value_rules_filter | Array of AttrValueRules objects | Feature filter |
| attr_value_rules_reserve | Array of AttrValueRules objects | Feature to be reserved |
| ctr_job | String | Ranking job (required when click-through rate is used) |
| ratio | Integer | Traffic proportion Minimum: 1 Maximum: 100 |
| toppings | Array of strings | List of candidate sets to be pinned on top |
| Parameter | Type | Description |
|---|---|---|
| party_a | String | Feature name of the recommended item |
| party_b | String | Feature name of the recommended item |
| Parameter | Type | Description |
|---|---|---|
| rank_feature_pairs | Array of RankFeaturePair objects | Matched feature pair |
| numerical_attrs | Array of NumericalAttr objects | Feature weight |
| num_statistics_type | String | Statistics mode. The options are:
Enumeration values:
|
| Parameter | Type | Description |
|---|---|---|
| feature_name_a | String | Feature of the item to be recommended |
| feature_name_b | String | Feature of the recommended item |
| weight | Float | Weight Minimum: 0.01 Maximum: 1 |
| Parameter | Type | Description |
|---|---|---|
| name | String | Feature name |
| weight | Float | Weight Minimum: 0.001 Maximum: 1 |
| Parameter | Type | Description |
|---|---|---|
| behaviors | Array of strings | Type of the behavior to be filtered |
| interval | Integer | Filter time Minimum: 1 Maximum: 7 |
| Parameter | Type | Description |
|---|---|---|
| table_name | String | Table name of a candidate set |
| rule_ratio | Integer | Rule ratio Minimum: 1 Maximum: 100 |
| priority | Integer | Priority Minimum: 1 Maximum: 10 |
Example Requests
This API is used to query jobs of a specified type.
/v2.0/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/workspaces/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/resources/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/job-instance?category=RECALL -
Example Responses
Status code: 200
OK
{
"jobs" : [ {
"workspace_id" : "a79b01afa69d4ddc943aa3423fc43531",
"resource_id" : "c27aea2b50004187a36fdbd136368895",
"job_id" : "0516d537a82c460caf2b78ebd638eb3b",
"job_name" : "ab",
"description" : "",
"platform" : "OFFLINE",
"category" : "RECALL",
"job_type" : "ItemCf",
"status" : "FAILED",
"job_config" : {
"striping" : {
"nearest_neighborhood" : 100.0,
"band" : 4.0,
"row" : 5.0
},
"max_recommended_num" : 100.0,
"schedule" : "00 50 01 * * ?"
},
"enable" : 0,
"smnEnable" : 0
}, {
"workspace_id" : "a79b01afa69d4ddc943aa3423fc43531",
"resource_id" : "c27aea2b50004187a36fdbd136368895",
"job_id" : "2bb9cce018364e9992537d0776009222",
"job_name" : "r2",
"description" : "00",
"platform" : "OFFLINE",
"category" : "RECALL",
"job_type" : "AttributeMatch",
"status" : "CANCELED",
"job_config" : {
"striping" : {
"nearest_neighborhood" : 20.0,
"band" : 4.0,
"row" : 5.0
},
"max_recommended_num" : 100.0,
"schedule" : "00 50 01 * * ?",
"match_type" : "User-Item",
"match_feature_pairs" : [ {
"user_feature_name" : "age",
"item_feature_name" : "category",
"alias" : "a",
"weight" : 1.0
} ]
},
"enable" : 1,
"smnEnable" : 0
}, {
"workspace_id" : "a79b01afa69d4ddc943aa3423fc43531",
"resource_id" : "c27aea2b50004187a36fdbd136368895",
"job_id" : "929d25d76a6f45b3a06490074949484b",
"job_name" : "r4",
"description" : "",
"platform" : "OFFLINE",
"category" : "RECALL",
"job_type" : "ItemCf",
"status" : "FAILED",
"job_config" : {
"striping" : {
"nearest_neighborhood" : 100.0,
"band" : 4.0,
"row" : 5.0
},
"max_recommended_num" : 100.0,
"schedule" : "00 50 01 * * ?"
},
"enable" : 1,
"smnEnable" : 0
}, {
"workspace_id" : "a79b01afa69d4ddc943aa3423fc43531",
"resource_id" : "c27aea2b50004187a36fdbd136368895",
"job_id" : "ca3fa69dbbaa4dcea3a0f5d466af0742",
"job_name" : "a",
"description" : "",
"platform" : "OFFLINE",
"category" : "RECALL",
"job_type" : "ItemCf",
"status" : "FAILED",
"job_config" : {
"striping" : {
"nearest_neighborhood" : 100.0,
"band" : 4.0,
"row" : 5.0
},
"max_recommended_num" : 100.0,
"schedule" : "00 50 01 * * ?"
},
"enable" : 1,
"smnEnable" : 0
}, {
"workspace_id" : "a79b01afa69d4ddc943aa3423fc43531",
"resource_id" : "c27aea2b50004187a36fdbd136368895",
"job_id" : "f79e55ca4e314d4188fab3045554efa8",
"job_name" : "r3",
"description" : "",
"platform" : "OFFLINE",
"category" : "RECALL",
"job_type" : "BhvHistory",
"status" : "RUNNING",
"job_config" : {
"behavior_frequencys" : [ {
"time_interval" : 30.0,
"behavior_type" : "view",
"lower_limit" : 1.0,
"upper_limit" : 1.0
} ],
"max_recommended_num" : 100.0,
"schedule" : "00 50 01 * * ?"
},
"enable" : 1,
"smnEnable" : 0
} ],
"is_success" : true
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
Error Codes
See Error Codes.
Last Article: Creating Multiple Training Jobs
Next Article: Modifying Parameters of a Training Job
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.