fml_manager package¶
Subpackages¶
Submodules¶
fml_manager.fml_cluster_manager module¶
-
class
fml_manager.fml_cluster_manager.ClusterManager(cluster_namespace, cluster_name=None)¶ Bases:
objectClusterManager is used to manage FATE cluster
-
fetch_config_map(component)¶
-
fetch_route_table(configmap)¶
-
get_entry_point()¶ Return the entrypoint of FATE cluster
Return type: string
-
get_route_table()¶ Fetch route table from configmap
Return type: RouteTable
-
patch_config_map(configmap, component)¶
-
set_route_table(route_table)¶ Patch configmap with route table
Parameters: route_table (RouteTable) – route table to patch configmap
-
update_config_map(configmap, route_table)¶
-
fml_manager.fml_manager module¶
-
class
fml_manager.fml_manager.FMLManager(server_conf=None, log_path='./')¶ Bases:
objectFMLManager is used to communicate with FATE cluster
-
bind_model(service_id, initiator_party_id, federated_roles, work_mode, model_id, model_version)¶
-
download_data(namespace, table_name, filename, work_mode, delimitor, output_folder='./')¶ Download data to local
-
fetch_job_log(job_id)¶ Fetch the log of job
Parameters: job_id (string) – The UUID of job Returns: response Return type: dict
-
load_data(url, namespace, table_name, work_mode, head, partition, drop='1', api_version='1.4')¶ Upload data to FATE cluster
Parameters: - url (string) – URL of data to upload
- namespace (string) – Namespace of the data in FATE cluster
- table_name (string) – Table name of the data in FATE cluster
- work_mode (int) – The work mode of upload
- head (int) – Head included flag. ‘1’: with head, ‘0’: without head.
- partition (int) – Partitions of the upload data
- drop (string) – Flag to overwrite data with same identifier
Returns: response
Return type: dict
-
load_model(initiator_party_id, federated_roles, work_mode, model_id, model_version)¶
-
model_output(role, party_id, model_id, model_version, model_component)¶ Output the model
-
offline_predict_on_dataset(is_vertical, initiator_party_role, initiator_party_id, work_mode, model_id, model_version, federated_roles, guest_data_name='', guest_data_namespace='', host_data_name='', host_data_namespace='')¶
-
prettify(response, verbose=False)¶
-
print_model_version(role, party_id, model_id, api_version='1.4')¶ Print model version
-
query_data(job_id, limit)¶ Query data of job
-
query_job(query_conditions)¶ Fetch job
Parameters: query_conditions (dict) – Condition of the job Returns: response Return type: dict
-
query_job_conf(query_conditions)¶ Fetch config of job
Parameters: query_conditions (dict) – Condition of the job Returns: response Return type: dict
-
query_job_status(query_conditions)¶ Fetch status of job
Parameters: query_conditions (dict) – Condition of the job Returns: response Return type: dict
-
query_task(query_conditions)¶ Query task
-
server_url= None¶ Url of FATE Flow service
-
serving_url= None¶ Url of FATE Serving service
-
stop_job(job_id)¶ Stop job
Parameters: job_id (string) – job id of data Returns: response Return type: dict
-
submit_job(dsl, config)¶ Submit job to FATE cluster
Parameters: Returns: response
Return type: dict
-
submit_job_by_files(dsl_path, config_path)¶ Submit job with file to FATE cluster
Parameters: - dsl_path (string) – DSL definition path
- config_path (string) – Config definition path
Returns: response
Return type: dict
-
track_component_all_metric(job_id, role, party_id, component_name)¶ Track output all metric of component
-
track_component_metric_data(job_id, role, party_id, component_name, metric_name, metric_namespace)¶ Track output metric data of component
-
track_component_metric_type(job_id, role, party_id, component_name)¶ Track output metric type of component
-
track_component_output_data(job_id, role, party_id, component_name)¶ Track output data of component
-
track_component_output_model(job_id, role, party_id, component_name)¶ Track output model of component
-
track_component_parameters(job_id, role, party_id, component_name)¶ Track output parameter of component
-
track_job_data(job_id, role, party_id)¶ Track job data
-
update_job(job_id, role, party_id, notes)¶
-