Documentation
¶
Index ¶
- Constants
- type Application
- type ApplicationStore
- type ArtifactProvider
- type AssignedCodeset
- type Codeset
- type CodesetStore
- type KubernetesResource
- type Runnable
- type RunnableArgDesc
- type RunnableArtifactArgDesc
- type RunnableArtifactArgDimension
- type RunnableCodesetArtifact
- type RunnableContainer
- type RunnableDatasetArtifact
- type RunnableInputArtifact
- type RunnableInputCodeset
- type RunnableInputDataset
- type RunnableInputModel
- type RunnableInputParameter
- type RunnableInputRunnable
- type RunnableKind
- type RunnableModelArtifact
- type RunnableOutputArtifact
- type RunnableOutputCodeset
- type RunnableOutputDataset
- type RunnableOutputModel
- type RunnableOutputParameter
- type RunnableOutputRunnable
- type RunnableRunnableArtifact
- type RunnableStore
- type WorkflowBackend
- type WorkflowListener
- type WorkflowRunFilter
- type WorkflowStore
Constants ¶
const ( RKCustom RunnableKind = "custom" RKBuilder = "builder" RKTrainer = "trainer" RKPredictor = "predictor" )
Valid values that can be used with RunnableKind
const ( APLocal ArtifactProvider = "local" APInline = "inline" APFuseml = "fuseml" APS3 = "s3" APGCS = "gcs" APAzure = "azure" APGIT = "git" APNFS = "nfs" APFTP = "ftp" APSFTP = "sftp" APHTTP = "http" APHTTPS = "https" APHDFS = "hdfs" APOCI = "oci" )
Valid values that can be used with ArtifactProvider
const ( // LocalRegistryHostname - Container image location values may use this identifier as a hostname to indicate // that they are stored internally in the local OCI registry managed by fuseml LocalRegistryHostname = "fuseml.local" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// The name of the Application
Name string
// The type of the Application
Type string
// Application description
Description string
// The public URL for accessing the Application
URL string
// Name of the Workflow used to create Application
Workflow string
// Kubernetes resources describing the Application
K8sResources []*KubernetesResource
// Kubernetes namespace where the resources are located
K8sNamespace string
}
Application holds the information about the application
type ApplicationStore ¶
type ApplicationStore interface {
Find(context.Context, string) *Application
GetAll(context.Context, *string, *string) ([]*Application, error)
Add(context.Context, *Application) (*Application, error)
Delete(context.Context, string) error
}
ApplicationStore is an inteface to application stores
type ArtifactProvider ¶
type ArtifactProvider string
ArtifactProvider encodes valid values that can be assigned to the RunnableArtifactArgDesc.Provider field
type AssignedCodeset ¶ added in v0.1.0
AssignedCodeset describes a assigned codeset its webhook ID
type Codeset ¶
type Codeset struct {
// The name of the Codeset
Name string
// The project this Codeset belongs to
Project string
// Codeset description
Description string
// Additional Codeset labels that helps with identifying the type
Labels []string
// Full URL to the Codeset
URL string
}
Codeset represents a codeset artifact
type CodesetStore ¶
type CodesetStore interface {
Find(ctx context.Context, project, name string) (*Codeset, error)
GetAll(ctx context.Context, project, label *string) ([]*Codeset, error)
Add(ctx context.Context, c *Codeset) (*Codeset, *string, *string, error)
CreateWebhook(context.Context, *Codeset, string) (*int64, error)
DeleteWebhook(context.Context, *Codeset, *int64) error
Delete(ctx context.Context, project, name string) error
}
CodesetStore is an inteface to codeset stores
type KubernetesResource ¶
type KubernetesResource struct {
// The name of the Kubernetes resource
Name string
// The kind of Kubernetes resource
Kind string
}
KubernetesResource describes the Kubernetes resource that forms the application
type Runnable ¶
type Runnable struct {
// Unique runnable ID
ID string
// The runnable's creation time
Created time.Time
// Optional description
Description string
// The author
Author string
// The URL for sources used to build the runnable
Source string
// The kind of runnable (builder, trainer, predictor etc.)
Kind string
// Runnable implementation details
// TODO: consider having several implementation flavors - e.g. several container images,
// all able to accept the same set of inputs/outputs, but built using diferent software,
// each targeting a different type of hardware resource that it can consume (e.g. one image
// for generic CPUs, one for GPUs from vendor X, one for TPUs from vendor Y etc.). This example
// cannot be modeled using one image and input parameters because the different sofware requirements
// can't coexist in the same container image.
Container RunnableContainer
// Map of inputs - artifacts or parameters - accepted by this runnable, indexed by name
Inputs map[string]interface{}
// Map of outputs - artifacts or parameters - generated by this runnable, indexed by name
Outputs map[string]interface{}
// Default root container path where the container expects input parameter values and/or artifact contents
// to be provided by the framework
DefaultInputPath string
// Default root container path where the container expects to provide output parameter values and/or
// artifact contents back to the framework
DefaultOutputPath string
// Labels describing global capabilities, requirements etc. These labels can be used to run queries
// and to validate which runnables can be used in workflow templates.
Labels map[string]string
}
Runnable descriptor
type RunnableArgDesc ¶
type RunnableArgDesc struct {
// Unique name
Name string
// Optional description
Description string
// Labels describing custom properties or property requirements; these are hints used in matching
// inputs with outputs when deciding how runnables can be connected together to form more complex
// workflows. Regular expressions may be used instead of explicit label values.
Labels map[string]string
}
RunnableArgDesc is a descriptor common to all runnable inputs/outputs
type RunnableArtifactArgDesc ¶
type RunnableArtifactArgDesc struct {
RunnableArgDesc
// Data passing mechanisms supported by the runnable implementation used to provide the artifact's contents to the container
Provider []ArtifactProvider
// Argument dimension
Dimension RunnableArtifactArgDimension
}
RunnableArtifactArgDesc is a descriptor common to all runnable inputs/outputs of type artifact
type RunnableArtifactArgDimension ¶
type RunnableArtifactArgDimension string
RunnableArtifactArgDimension encodes valid values that can be assigned to the RunnableArtifactArgDesc.Dimension field
const ( RAADSingle RunnableArtifactArgDimension = "single" RAADArray = "array" )
Valid values that can be used with RunnableArtifactArgDimension
type RunnableCodesetArtifact ¶
type RunnableCodesetArtifact struct {
// The type of information contained in the codeset
Type []string
// The intended function of the codeset's contents
Function []string
// The format(s) used for the codeset's contents
Format []string
// Software packages, modules, libraries, toolkits etc. and optional semantic version or version requirements
Requirements map[string]string
}
RunnableCodesetArtifact holds information about a codeset artifact used as input/output
type RunnableContainer ¶
type RunnableContainer struct {
// The container image associated with this runnable
Image string
// This flag indicates that the image is stored in the built-in container registry and the registry
// hostname is not included in the image location
LocalImage bool
// Environment variables
Env map[string]string
// Entrypoint
Entrypoint string
// Entrypoint arguments
Args []string
}
RunnableContainer describes the container implementation of a runnable
type RunnableDatasetArtifact ¶
type RunnableDatasetArtifact struct {
// The type of dataset
Type []string
// The dataset format
Format []string
// The compression used for the dataset
Compression []string
}
RunnableDatasetArtifact holds information about a dataset artifact used as input/output
type RunnableInputArtifact ¶
type RunnableInputArtifact struct {
RunnableArtifactArgDesc
// Marks an optional input artifact
Optional bool
// Custom container path where the artifact contents or the artifact URL(s) are provided to the container
Path string
}
RunnableInputArtifact is a generic runnable input artifact definition
type RunnableInputCodeset ¶
type RunnableInputCodeset struct {
RunnableInputArtifact
RunnableCodesetArtifact
}
RunnableInputCodeset is a runnable input artifact of type codeset
type RunnableInputDataset ¶
type RunnableInputDataset struct {
RunnableInputArtifact
RunnableDatasetArtifact
}
RunnableInputDataset is a runnable input artifact of type dataset
type RunnableInputModel ¶
type RunnableInputModel struct {
RunnableInputArtifact
RunnableModelArtifact
}
RunnableInputModel is a runnable input artifact of type model
type RunnableInputParameter ¶
type RunnableInputParameter struct {
RunnableArgDesc
// Marks an optional input parameter. A default value must also be supplied.
Optional bool
// Default parameter value - used for optional input parameters when the value is not provided explicitly
DefaultValue string
// Optional container path where the parameter value is passed by the framework to the container. This method
// can be used for example when the parameter value represents the contents of a configuration or script.
Path string
}
RunnableInputParameter is the runnable input parameter definition
type RunnableInputRunnable ¶
type RunnableInputRunnable struct {
RunnableInputArtifact
RunnableRunnableArtifact
}
RunnableInputRunnable is a runnable input artifact of type runnable
type RunnableKind ¶
type RunnableKind string
RunnableKind encodes valid values that can be assigned to the Runnable.Kind field
type RunnableModelArtifact ¶
type RunnableModelArtifact struct {
// The format used to package the model
Format []string
// Denotes a pre-trained model that is ready to use
Pretrained bool
// Method used to train the model
Method string
// Class of algorithm implemented by the model
Class string
// The intended function for the model
Function string
// Software packages, modules, libraries, toolkits etc. and optional semantic version or version requirements
Requirements map[string]string
}
RunnableModelArtifact holds information about a model artifact used as input/output
type RunnableOutputArtifact ¶
type RunnableOutputArtifact struct {
RunnableArtifactArgDesc
// Marks an optional output artifact
Optional bool
// Custom container path where the artifact contents or the artifact URL(s) are provided by the container
Path string
}
RunnableOutputArtifact is a generic runnable output artifact definition
type RunnableOutputCodeset ¶
type RunnableOutputCodeset struct {
RunnableOutputArtifact
RunnableCodesetArtifact
}
RunnableOutputCodeset is a runnable output artifact of type codeset
type RunnableOutputDataset ¶
type RunnableOutputDataset struct {
RunnableOutputArtifact
RunnableDatasetArtifact
}
RunnableOutputDataset is a runnable output artifact of type dataset
type RunnableOutputModel ¶
type RunnableOutputModel struct {
RunnableOutputArtifact
RunnableModelArtifact
}
RunnableOutputModel is a runnable output artifact of type model
type RunnableOutputParameter ¶
type RunnableOutputParameter struct {
RunnableArgDesc
// Marks an optional output parameter. A default value must also be supplied.
Optional bool
// Default parameter value - used for optional output parameters when the value is not provided by the runnable implementation
DefaultValue string
// Custom container path where the parameter value is provided by the container.
Path string
}
RunnableOutputParameter is the runnable output parameter definition
type RunnableOutputRunnable ¶
type RunnableOutputRunnable struct {
RunnableOutputArtifact
RunnableRunnableArtifact
}
RunnableOutputRunnable is a runnable output artifact of type runnable
type RunnableRunnableArtifact ¶
type RunnableRunnableArtifact struct {
// The kind of runnable
Kind string
}
RunnableRunnableArtifact holds information about a runnable used as input/output
type RunnableStore ¶
type RunnableStore interface {
Find(ctx context.Context, id string, kind string, labels map[string]string) (res []*Runnable, err error)
Register(ctx context.Context, r *Runnable) (res *Runnable, err error)
Get(ctx context.Context, name string) (res *Runnable, err error)
}
RunnableStore defines the public interface that needs to be implemented by all runnable stores
type WorkflowBackend ¶
type WorkflowBackend interface {
CreateWorkflow(ctx context.Context, logger *log.Logger, workflow *workflow.Workflow) error
DeleteWorkflow(ctx context.Context, logger *log.Logger, workflowName string) error
CreateWorkflowRun(ctx context.Context, logger *log.Logger, workflowName string, codeset *Codeset) error
ListWorkflowRuns(ctx context.Context, workflow workflow.Workflow, filter WorkflowRunFilter) ([]*workflow.WorkflowRun, error)
CreateWorkflowListener(ctx context.Context, logger *log.Logger, workflowName string, timeout time.Duration) (*WorkflowListener, error)
DeleteWorkflowListener(ctx context.Context, logger *log.Logger, workflowName string) error
GetWorkflowListener(ctx context.Context, workflowName string) (*WorkflowListener, error)
}
WorkflowBackend is the interface for the FuseML workflows
type WorkflowListener ¶ added in v0.0.2
WorkflowListener defines a listener for a workflow
type WorkflowRunFilter ¶
WorkflowRunFilter defines the available filter when listing workflow runs
type WorkflowStore ¶
type WorkflowStore interface {
GetWorkflow(ctx context.Context, name string) *workflow.Workflow
GetWorkflows(ctx context.Context, name *string) (result []*workflow.Workflow)
AddWorkflow(ctx context.Context, w *workflow.Workflow) (*workflow.Workflow, error)
DeleteWorkflow(ctx context.Context, name string) error
GetAssignedCodeset(ctx context.Context, workflowName string, codeset *Codeset) *AssignedCodeset
GetAssignedCodesets(ctx context.Context, workflowName string) []*AssignedCodeset
GetAssignments(ctx context.Context, workflowName *string) map[string][]*AssignedCodeset
AddCodesetAssignment(ctx context.Context, workflowName string, assignedCodeset *AssignedCodeset) []*AssignedCodeset
DeleteCodesetAssignment(ctx context.Context, workflowName string, codeset *Codeset) []*AssignedCodeset
}
WorkflowStore is an inteface to workflow stores