configuration

package
v0.0.0-...-05931ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

README

Structure of the Workflow Config File:

{ "Layers":[ { "Condition":"tooFewRecommendations", "Backoff":"deleteLowFrequency", "Threshold":1, "ThresholdFloat":0.09, "Merger":"", "Splitter":"", "Stepsize":"stepsizeLinear", "ParallelExecutions":1 },{ "Condition":"always", "Backoff":"standard", "Threshold":0, "ThresholdFloat":0, "Merger":"", "Splitter":"", "Stepsize":"", "ParallelExecutions":0 } ] }

Layers: Layers for the workflow. First element of the list is executed first inside the workflow. Each layer specifies condition for enablement, the backoff strategy, and condition and backoff specific parameter:

Condition: Condition for enablement of that layer

Backoff: backoff strategy that fires if enabled

Threshold: threshold for the condition tooFewRecommendations,aboveThreshold

ThresholdFolat: threshhold for tooUnlikelyRecommendations condition

Merger: Merger strategy for splitProperty Backoff

Splitter: Splitter strategy for splitProperty Backoff

Stepsize: Stepsize function for deleteLowFrequency Backoff

ParallelExecutions Number of parallel executions in the deleteLow frequency backoff

The difference to a workflow config file in the evaluation is the missing testset field.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigToWorkflow

func ConfigToWorkflow(config *Configuration, tree *schematree.SchemaTree) (wf *strategy.Workflow, err error)

ConfigToWorkflow converts a configuration to a workflow

Types

type Configuration

type Configuration struct {
	Testset string  // testset to apply (only relevant for batch evaluation. Inrelevant for standard usage)
	Layers  []Layer // layers to apply
}

Configuration defines one workflow configuration

func ReadConfigFile

func ReadConfigFile(name *string) (conf *Configuration, err error)

ReadConfigFile reads json config file <name> to Configuration struct

func (*Configuration) Test

func (conf *Configuration) Test() (err error)

Test if the configuration is well formatted and all attributes for the chosen strategy are set. Check for correct attribution happens in configToWorkflow()

type Layer

type Layer struct {
	Condition          string  // executed condition aboveThreshold, tooManyRecommendations,tooFewRecommendations
	Backoff            string  // executed backoff splitProperty, deleteLowFrequency
	Threshold          int     // neeeded for conditions
	ThresholdFloat     float32 // needed for condition TooUnlikelyRecommendationsCondition
	Merger             string  // needed for splitintosubsets backoff; max, avg
	Splitter           string  // needed for splitintosubsets backoff everySecondItem, twoSupportRanges
	Stepsize           string  // needed for deletelowfrequentitmes backoff stepsizeLinear, stepsizeProportional
	ParallelExecutions int     // needed for deletelowfrequentitmes backoff
}

Layer defines configuration of one layer (condition, backoff pair) in the workflow

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL