Documentation
¶
Index ¶
- func APIPath(apiName string, appName string) string
- func APIResourcesAndComputesMatch(ctx1 *Context, ctx2 *Context) bool
- func DataTypeID(dataType interface{}) string
- func ExtractResourceWorkloadIDs(resources []ComputedResource) map[string]string
- func GetRawColumnUserConfig(rawColumn RawColumn) userconfig.Resource
- type API
- type APIs
- type Aggregate
- type Aggregates
- type Aggregator
- type Aggregators
- type App
- type Column
- type Columns
- type ComputedResource
- type ComputedResourceFields
- type Constant
- type Constants
- type Context
- func (ctx *Context) APIResourceWorkloadIDs() map[string]string
- func (ctx *Context) APIResources() []ComputedResource
- func (ctx *Context) AllComputedResourceDependencies(resourceID string) strset.Set
- func (ctx *Context) AllResources() []Resource
- func (ctx *Context) AllResourcesByName(name string) []Resource
- func (ctx *Context) CheckAllWorkloadIDsPopulated() error
- func (ctx *Context) ColumnNames() strset.Set
- func (ctx *Context) Columns() Columns
- func (ctx *Context) ComputedResourceIDs() strset.Set
- func (ctx *Context) ComputedResourceResourceWorkloadIDs() map[string]string
- func (ctx *Context) ComputedResourceWorkloadIDs() strset.Set
- func (ctx *Context) ComputedResources() []ComputedResource
- func (ctx *Context) DataComputedResources() []ComputedResource
- func (ctx *Context) DataResourceWorkloadIDs() map[string]string
- func (ctx *Context) DirectComputedResourceDependencies(resourceID string) strset.Set
- func (ctx *Context) ExtractCortexResources(input interface{}, resourceTypes ...resource.Type) []Resource
- func (ctx *Context) GetColumn(name string) Column
- func (ctx Context) MarshalJSON() ([]byte, error)
- func (ctx *Context) OneResourceByID(resourceID string) Resource
- func (ctx *Context) OneTrainingDatasetByID(id string) *TrainingDataset
- func (ctx *Context) PopulateWorkloadIDs(resourceWorkloadIDs map[string]string)
- func (ctx Context) ToMsgpackBytes() ([]byte, error)
- func (ctx *Context) ToSerial() *Serial
- func (ctx *Context) UnmarshalJSON(b []byte) error
- func (ctx *Context) Validate() error
- func (ctx *Context) VisibleResourceByName(name string) (ComputedResource, error)
- func (ctx *Context) VisibleResourceByNameAndType(name string, resourceTypeStr string) (ComputedResource, error)
- func (ctx *Context) VisibleResourcesByName(name string) []ComputedResource
- func (ctx *Context) VisibleResourcesMap() map[string][]ComputedResource
- type DataSplit
- type Environment
- type Estimator
- type Estimators
- type Model
- type Models
- type PythonPackage
- type PythonPackages
- type RawColumn
- type RawColumns
- type RawColumnsTypeSplit
- type RawDataset
- type RawFloatColumn
- type RawInferredColumn
- type RawIntColumn
- type RawStringColumn
- type Resource
- type ResourceFields
- type Serial
- type TrainingDataset
- type TrainingDatasets
- type TransformedColumn
- type TransformedColumns
- type Transformer
- type Transformers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataTypeID ¶
func DataTypeID(dataType interface{}) string
func ExtractResourceWorkloadIDs ¶
func ExtractResourceWorkloadIDs(resources []ComputedResource) map[string]string
func GetRawColumnUserConfig ¶
func GetRawColumnUserConfig(rawColumn RawColumn) userconfig.Resource
Types ¶
type API ¶
type API struct { *userconfig.API *ComputedResourceFields Path string `json:"path"` ModelName string `json:"model_name"` // This removes the @ from userconfig.API.Model, or sets it to userconfig.API.ModelPath if it's external }
type Aggregate ¶
type Aggregate struct { *userconfig.Aggregate *ComputedResourceFields Type userconfig.OutputSchema `json:"type"` Key string `json:"key"` }
type Aggregates ¶
func (Aggregates) OneByID ¶
func (aggregates Aggregates) OneByID(id string) *Aggregate
type Aggregator ¶
type Aggregator struct { *userconfig.Aggregator *ResourceFields Namespace *string `json:"namespace"` ImplKey string `json:"impl_key"` }
type Aggregators ¶
type Aggregators map[string]*Aggregator
func (Aggregators) OneByID ¶
func (aggregators Aggregators) OneByID(id string) *Aggregator
type App ¶
type App struct { *userconfig.App ID string `json:"id"` }
type Column ¶
type Column interface { ComputedResource GetColumnType() userconfig.ColumnType IsRaw() bool }
type ComputedResource ¶
type ComputedResourceFields ¶
type ComputedResourceFields struct { *ResourceFields WorkloadID string `json:"workload_id"` }
func (*ComputedResourceFields) GetWorkloadID ¶
func (r *ComputedResourceFields) GetWorkloadID() string
func (*ComputedResourceFields) SetWorkloadID ¶
func (r *ComputedResourceFields) SetWorkloadID(workloadID string)
type Constant ¶
type Constant struct { *userconfig.Constant *ResourceFields Key string `json:"key"` }
type Context ¶
type Context struct { ID string `json:"id"` Key string `json:"key"` CortexConfig *config.CortexConfig `json:"cortex_config"` DatasetVersion string `json:"dataset_version"` Root string `json:"root"` MetadataRoot string `json:"metadata_root"` RawDataset RawDataset `json:"raw_dataset"` StatusPrefix string `json:"status_prefix"` App *App `json:"app"` Environment *Environment `json:"environment"` PythonPackages PythonPackages `json:"python_packages"` RawColumns RawColumns `json:"-"` Aggregates Aggregates `json:"aggregates"` TransformedColumns TransformedColumns `json:"transformed_columns"` Models Models `json:"models"` APIs APIs `json:"apis"` Constants Constants `json:"constants"` Aggregators Aggregators `json:"aggregators"` Transformers Transformers `json:"transformers"` Estimators Estimators `json:"estimators"` }
func FromMsgpackBytes ¶
func (*Context) APIResourceWorkloadIDs ¶
func (*Context) APIResources ¶
func (ctx *Context) APIResources() []ComputedResource
func (*Context) AllComputedResourceDependencies ¶
func (*Context) AllResources ¶
func (*Context) AllResourcesByName ¶
func (*Context) CheckAllWorkloadIDsPopulated ¶
func (*Context) ColumnNames ¶
func (*Context) ComputedResourceIDs ¶
func (*Context) ComputedResourceResourceWorkloadIDs ¶
func (*Context) ComputedResourceWorkloadIDs ¶
func (*Context) ComputedResources ¶
func (ctx *Context) ComputedResources() []ComputedResource
func (*Context) DataComputedResources ¶
func (ctx *Context) DataComputedResources() []ComputedResource
func (*Context) DataResourceWorkloadIDs ¶
func (*Context) DirectComputedResourceDependencies ¶
func (*Context) ExtractCortexResources ¶
func (Context) MarshalJSON ¶
func (*Context) OneResourceByID ¶
Note: there may be >1 resources with the ID, this returns one of them
func (*Context) OneTrainingDatasetByID ¶
func (ctx *Context) OneTrainingDatasetByID(id string) *TrainingDataset
func (*Context) PopulateWorkloadIDs ¶
Overwrites any existing workload IDs
func (Context) ToMsgpackBytes ¶
func (*Context) UnmarshalJSON ¶
func (*Context) VisibleResourceByName ¶
func (ctx *Context) VisibleResourceByName(name string) (ComputedResource, error)
func (*Context) VisibleResourceByNameAndType ¶
func (ctx *Context) VisibleResourceByNameAndType(name string, resourceTypeStr string) (ComputedResource, error)
func (*Context) VisibleResourcesByName ¶
func (ctx *Context) VisibleResourcesByName(name string) []ComputedResource
func (*Context) VisibleResourcesMap ¶
func (ctx *Context) VisibleResourcesMap() map[string][]ComputedResource
type DataSplit ¶
type DataSplit struct { CSVData *userconfig.CSVData `json:"csv_data"` ParquetData *userconfig.ParquetData `json:"parquet_data"` }
type Environment ¶
type Environment struct { *userconfig.Environment ID string `json:"id"` }
type Estimator ¶
type Estimator struct { *userconfig.Estimator *ResourceFields Namespace *string `json:"namespace"` ImplKey string `json:"impl_key"` }
type Estimators ¶
func (Estimators) OneByID ¶
func (estimators Estimators) OneByID(id string) *Estimator
type Model ¶
type Model struct { *userconfig.Model *ComputedResourceFields Key string `json:"key"` Dataset *TrainingDataset `json:"dataset"` }
type Models ¶
func (Models) GetTrainingDatasets ¶
func (models Models) GetTrainingDatasets() TrainingDatasets
type PythonPackage ¶
type PythonPackage struct { userconfig.ResourceFields *ComputedResourceFields SrcKey string `json:"src_key"` PackageKey string `json:"package_key"` }
func (*PythonPackage) GetResourceType ¶
func (pythonPackage *PythonPackage) GetResourceType() resource.Type
type PythonPackages ¶
type PythonPackages map[string]*PythonPackage
type RawColumn ¶
type RawColumn interface { Column GetCompute() *userconfig.SparkCompute }
type RawColumns ¶
func (RawColumns) OneByID ¶
func (rawColumns RawColumns) OneByID(id string) RawColumn
type RawColumnsTypeSplit ¶
type RawColumnsTypeSplit struct { RawIntColumns map[string]*RawIntColumn `json:"raw_int_columns"` RawStringColumns map[string]*RawStringColumn `json:"raw_string_columns"` RawFloatColumns map[string]*RawFloatColumn `json:"raw_float_columns"` RawInferredColumns map[string]*RawInferredColumn `json:"raw_inferred_columns"` }
type RawDataset ¶
type RawDataset struct {
Key string `json:"key"`
}
type RawFloatColumn ¶
type RawFloatColumn struct { *userconfig.RawFloatColumn *ComputedResourceFields }
type RawInferredColumn ¶
type RawInferredColumn struct { *userconfig.RawInferredColumn *ComputedResourceFields }
type RawIntColumn ¶
type RawIntColumn struct { *userconfig.RawIntColumn *ComputedResourceFields }
type RawStringColumn ¶
type RawStringColumn struct { *userconfig.RawStringColumn *ComputedResourceFields }
type Resource ¶
type Resource interface { userconfig.Resource GetID() string }
type ResourceFields ¶
type ResourceFields struct { ID string `json:"id"` ResourceType resource.Type `json:"resource_type"` }
func (*ResourceFields) GetID ¶
func (r *ResourceFields) GetID() string
type Serial ¶
type Serial struct { *Context RawColumnSplit *RawColumnsTypeSplit `json:"raw_columns"` DataSplit *DataSplit `json:"environment_data"` }
func (*Serial) ContextFromSerial ¶
type TrainingDataset ¶
type TrainingDataset struct { userconfig.ResourceFields *ComputedResourceFields ModelName string `json:"model_name"` TrainKey string `json:"train_key"` EvalKey string `json:"eval_key"` }
func (*TrainingDataset) GetResourceType ¶
func (trainingDataset *TrainingDataset) GetResourceType() resource.Type
type TrainingDatasets ¶
type TrainingDatasets map[string]*TrainingDataset
type TransformedColumn ¶
type TransformedColumn struct { *userconfig.TransformedColumn *ComputedResourceFields Type userconfig.ColumnType `json:"type"` }
func (*TransformedColumn) GetColumnType ¶
func (column *TransformedColumn) GetColumnType() userconfig.ColumnType
type TransformedColumns ¶
type TransformedColumns map[string]*TransformedColumn
func (TransformedColumns) OneByID ¶
func (columns TransformedColumns) OneByID(id string) *TransformedColumn
type Transformer ¶
type Transformer struct { *userconfig.Transformer *ResourceFields Namespace *string `json:"namespace"` ImplKey string `json:"impl_key"` }
type Transformers ¶
type Transformers map[string]*Transformer
func (Transformers) OneByID ¶
func (transformers Transformers) OneByID(id string) *Transformer
Click to show internal directories.
Click to hide internal directories.