Skip to content

Task Component Registry

1. Description

  • After FATE Flow version 1.7, it started to support multiple versions of component packages at the same time, for example, you can put both fate algorithm component packages of 1.7.0 and 1.7.1 versions
  • We refer to the provider of the algorithm component package as the component provider, and the name and version uniquely identify the component provider.
  • When submitting a job, you can specify which component package to use for this job via job dsl, please refer to componentprovider

2. Default Component Provider

Deploying a FATE cluster will include a default component provider, which is usually found in the ${FATE_PROJECT_BASE}/python/federatedml directory

3. current component provider

List all current component providers and information about the components they provide

flow provider list [options]

Options

Returns

参数名 类型 说明
retcode int 返回码
retmsg string 返回信息
data dict 返回数据

Example

output:

{
    "data": {
        "fate": {
            "1.9.0": {
                "class_path": {
                    "anonymous_generator": "util.anonymous_generator_util.Anonymous",
                    "data_format": "util.data_format_preprocess.DataFormatPreProcess",
                    "feature_instance": "feature.instance.Instance",
                    "feature_vector": "feature.sparse_vector.SparseVector",
                    "hetero_model_merge": "protobuf.model_merge.merge_hetero_models.hetero_model_merge",
                    "homo_model_convert": "protobuf.homo_model_convert.homo_model_convert",
                    "interface": "components.components.Components",
                    "model": "protobuf.generated",
                    "model_migrate": "protobuf.model_migrate.model_migrate"
                },
                "components": [
                    "heterodatasplit",
                    "psi",
                    "heterofastsecureboost",
                    "heterofeaturebinning",
                    "scorecard",
                    "sampleweight",
                    "homosecureboost",
                    "onehotencoder",
                    "secureinformationretrieval",
                    "homoonehotencoder",
                    "datatransform",
                    "dataio",
                    "heterosshelinr",
                    "intersection",
                    "homofeaturebinning",
                    "secureaddexample",
                    "union",
                    "datastatistics",
                    "columnexpand",
                    "homonn",
                    "labeltransform",
                    "heterosecureboost",
                    "heterofeatureselection",
                    "heterolr",
                    "feldmanverifiablesum",
                    "heteropoisson",
                    "evaluation",
                    "federatedsample",
                    "homodatasplit",
                    "ftl",
                    "localbaseline",
                    "featurescale",
                    "featureimputation",
                    "heteropearson",
                    "heterokmeans",
                    "heteronn",
                    "heterolinr",
                    "spdztest",
                    "heterosshelr",
                    "homolr"
                ],
                "path": "${FATE_PROJECT_BASE}/python/federatedml",
                "python": ""
            },
            "default": {
                "version": "1.9.0"
            }
        },
        "fate_flow": {
            "1.9.0": {
                "class_path": {
                    "anonymous_generator": "util.anonymous_generator_util.Anonymous",
                    "data_format": "util.data_format_preprocess.DataFormatPreProcess",
                    "feature_instance": "feature.instance.Instance",
                    "feature_vector": "feature.sparse_vector.SparseVector",
                    "hetero_model_merge": "protobuf.model_merge.merge_hetero_models.hetero_model_merge",
                    "homo_model_convert": "protobuf.homo_model_convert.homo_model_convert",
                    "interface": "components.components.Components",
                    "model": "protobuf.generated",
                    "model_migrate": "protobuf.model_migrate.model_migrate"
                },
                "components": [
                    "writer",
                    "modelrestore",
                    "upload",
                    "apireader",
                    "modelstore",
                    "cacheloader",
                    "modelloader",
                    "download",
                    "reader"
                ],
                "path": "${FATE_FLOW_BASE}/python/fate_flow",
                "python": ""
            },
            "default": {
                "version": "1.9.0"
            }
        }
    },
    "retcode": 0,
    "retmsg": "success"
}

Contains the name, version number, codepath, list of provided components

4. new component provider

Register a component provider

flow provider register [options]

Options

参数名 必选 类型 说明
-c, --conf-path string 配置路径

Returns

参数名 类型 说明
retcode int 返回码
retmsg string 返回信息

Example

flow provider register -c $FATE_FLOW_BASE/examples/other/register_provider.json

conf:

{
  "name": "fate",
  "version": "1.7.1",
  "path": "${FATE_FLOW_BASE}/python/component_plugins/fateb/python/federatedml"
}

output:

{
    "data": {
        "flow-xxx-9380": {
            "retcode": 0,
            "retmsg": "success"
        }
    },
    "retcode": 0,
    "retmsg": "success"
}