(ctx, **kwargs)
\b
    - DESCRIPTION:
        Download the Output Data of A Specified Component.

    \b
    - USAGE:
        flow component output-data -j $JOB_ID -r host -p 10000 -cpn hetero_feature_binning_0 --output-path ./examples/
\b
    - DESCRIPTION:
        Download the Output Data of A Specified Component.
\ b - DESCRIPTION : Download the Output Data of A Specified Component .
def output_data(ctx, **kwargs):
    """
    \b
    - DESCRIPTION:
        Download the Output Data of A Specified Component.

    \b
    - USAGE:
        flow component output-data -j $JOB_ID -r host -p 10000 -cpn hetero_feature_binning_0 --output-path ./examples/
    """
    config_data, dsl_data = preprocess(**kwargs)
    tar_file_name = 'job_{}_{}_{}_{}_output_data.tar.gz'.format(config_data['job_id'],
                                                                config_data['component_name'],
                                                                config_data['role'],
                                                                config_data['party_id'])
    extract_dir = os.path.join(config_data['output_path'], tar_file_name.replace('.tar.gz', ''))
    with closing(access_server('get', ctx, 'tracking/component/output/data/download',
                               config_data, False, stream=True)) as response:
        if response.status_code == 200:
            try:
                download_from_request(http_response=response, tar_file_name=tar_file_name, extract_dir=extract_dir)
                res = {'retcode': 0,
                       'directory': os.path.abspath(extract_dir),
                       'retmsg': 'Download successfully, please check {} directory'.format(os.path.abspath(extract_dir))}
            except:
                res = {'retcode': 100,
                       'retmsg': 'Download failed, please check if the parameters are correct.'}
        else:
            try:
                res = response.json() if isinstance(response, requests.models.Response) else response
            except Exception:
                res = {'retcode': 100,
                       'retmsg': 'Download failed, for more details please check logs/fate_flow/fate_flow_stat.log.'}
    prettify(res)
def output_data ( ctx , * * kwargs ) : config_data , dsl_data = preprocess ( * * kwargs ) tar_file_name = 'job_{}_{}_{}_{}_output_data.tar.gz' . format ( config_data [ 'job_id' ] , config_data [ 'component_name' ] , config_data [ 'role' ] , config_data [ 'party_id' ] ) extract_dir = os . path . join ( config_data [ 'output_path' ] , tar_file_name . replace ( '.tar.gz' , '' ) ) with closing ( access_server ( 'get' , ctx , 'tracking/component/output/data/download' , config_data , False , stream = True ) ) as response : if response . status_code == 200 : try : download_from_request ( http_response = response , tar_file_name = tar_file_name , extract_dir = extract_dir ) res = { 'retcode' : 0 , 'directory' : os . path . abspath ( extract_dir ) , 'retmsg' : 'Download successfully, please check {} directory' . format ( os . path . abspath ( extract_dir ) ) } except : res = { 'retcode' : 100 , 'retmsg' : 'Download failed, please check if the parameters are correct.' } else : try : res = response . json ( ) if isinstance ( response , requests . models . Response ) else response except Exception : res = { 'retcode' : 100 , 'retmsg' : 'Download failed, for more details please check logs/fate_flow/fate_flow_stat.log.' } prettify ( res )