Documentation ¶
Index ¶
- func Initialize(config *Config) error
- func ResolveDatasetPath(datasetID string) string
- func ResolvePipelineD3MPath(pipelineID string) string
- func ResolvePipelineJSONPath(pipelineID string) string
- func ResolvePipelinePath(pipelineID string) string
- func ResolvePredictionPath(predictionID string) string
- func ResolveProblemPath(pipelineID string) string
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
Initialize initializes the paths used in the application.
func ResolveDatasetPath ¶
ResolveDatasetPath returns the path for a dataset folder
func ResolvePipelineD3MPath ¶
ResolvePipelineD3MPath returns the path pickled fitted pipeline.
func ResolvePipelineJSONPath ¶
ResolvePipelineJSONPath returns the path to the json file representing the pipeline.
func ResolvePipelinePath ¶
ResolvePipelinePath returns the path to the folder containing the pipeline info.
func ResolvePredictionPath ¶
ResolvePredictionPath returns the path for a prediction folder
func ResolveProblemPath ¶
ResolveProblemPath returns the path to the file representing the problem for the pipeline.
Types ¶
type Config ¶
type Config struct { AppPort string `env:"PORT" envDefault:"8080"` BatchSize int `env:"BATCH_SIZE" envDefault:"100"` BatchSizeIncreaseFactor float64 `env:"BATCH_SIZE_INCREASE_FACTOR" envDefault:"1.2"` BatchSizeDecreaseFactor float64 `env:"BATCH_SIZE_DECREASE_FACTOR" envDefault:"0.9"` ClearDataset bool `env:"CLEAR_DATASET" envDefault:"true"` D3MOutputDir string `env:"D3MOUTPUTDIR" envDefault:"outputs"` D3MStaticDir string `env:"D3MSTATICDIR" envDefault:"/data/static_resources"` DatasetDir string `env:"DATASET_DIR" envDefault:"datasets"` PipelineD3M string `env:"PIPELINE_D3M" envDefault:"pipeline.d3m"` PipelineDir string `env:"PIPELINE_DIR" envDefault:"pipelines"` PipelineJSON string `env:"PIPELINE_JSON" envDefault:"pipeline.json"` PredictionDir string `env:"PREDICTION_DIR" envDefault:"predictions"` ProblemFile string `env:"PROBLEM_FILE" envDefault:"problemDoc.json"` VerboseError bool `env:"VERBOSE_ERROR" envDefault:"false"` }
Config represents the application configuration state loaded from env vars.
func LoadConfig ¶
LoadConfig loads the config from the environment if necessary and returns a copy.