kf_make_component: Make Kubeflow component from a function

Description Usage Arguments Details Value Examples

View source: R/kf_make_component.R

Description

Given a defined R function export a YAML file for Kubeflow to consume.

Usage

1
kf_make_component(rfunction, name, description, image, file)

Arguments

rfunction

Name of target function.

name

Name of component.

description

Description of component.

image

Location of Docker image.

file

Location to write yaml. Optional.

Details

Names of metrics and ui metadata arguments are renamed to required specifications. Kubeflow likes arguments to be typed, which R doesn't handle naturally. This function looks for a slug at the end of each argument to determine the type. For example, table_name_string would be considered an input String. Output paths are identified by ending in _out. Supported translations are:

Inputs

Outputs

Value

Component YAML

Examples

1
2
tfun <- function(table_string, pred_count_int, path_metrics) 2 * 2
kf_make_component("tfun", "Test Component", "Test out the component", "gcr.io/test/test")

ndiquattro/kflow documentation built on Jan. 27, 2020, 4:19 p.m.