ludwig/constants.py (81 lines of code) (raw):

#! /usr/bin/env python # coding=utf-8 # Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== BINARY = 'binary' CATEGORY = 'category' INT = 'int' FLOAT = 'float' SPACE = 'space' NUMERICAL = 'numerical' SET = 'set' BAG = 'bag' TEXT = 'text' SEQUENCE = 'sequence' TIMESERIES = 'timeseries' IMAGE = 'image' AUDIO = 'audio' DATE = 'date' H3 = 'h3' VECTOR = 'vector' HEIGHT = 'height' WIDTH = 'width' CROP_OR_PAD = 'crop_or_pad' NUM_CHANNELS = 'num_channels' INTERPOLATE = 'interpolate' LOSS = 'loss' EVAL_LOSS = 'eval_loss' TRAIN_MEAN_LOSS = 'train_mean_loss' SOFTMAX_CROSS_ENTROPY = 'softmax_cross_entropy' SIGMOID_CROSS_ENTROPY = 'sigmoid_cross_entropy' SAMPLED_SOFTMAX_CROSS_ENTROPY = 'sampled_softmax_cross_entropy' ACCURACY = 'accuracy' HITS_AT_K = 'hits_at_k' MEAN_HITS_AT_K = 'mean_hits_at_k' ERROR = 'error' ABSOLUTE_ERROR = 'absolute_error' SQUARED_ERROR = 'squared_error' MEAN_SQUARED_ERROR = 'mean_squared_error' MEAN_ABSOLUTE_ERROR = 'mean_absolute_error' R2 = 'r2' EDIT_DISTANCE = 'edit_distance' PERPLEXITY = 'perplexity' JACCARD = 'jaccard' PREDICTIONS = 'predictions' TOP_K_PREDICTIONS = 'top_k_predictions' PROBABILITY = 'probability' PROBABILITIES = 'probabilities' CORRECT_PREDICTIONS = 'correct_predictions' CORRECT_LAST_PREDICTIONS = 'correct_last_predictions' CORRECT_OVERALL_PREDICTIONS = 'correct_overall_predictions' CORRECT_ROWWISE_PREDICTIONS = 'correct_rowwise_predictions' ROWWISE_ACCURACY = 'rowwise_accuracy' LAST_ACCURACY = 'last_accuracy' TOKEN_ACCURACY = 'token_accuracy' LAST_PROBABILTIES = 'last_probabilities' LAST_PREDICTIONS = 'last_predictions' LENGTHS = 'lengths' TIED = 'tied' COMBINED = 'combined' FILL_WITH_CONST = 'fill_with_const' FILL_WITH_MODE = 'fill_with_mode' FILL_WITH_MEAN = 'fill_with_mean' BACKFILL = 'backfill' DROP_ROW = 'drop_row' METRIC = 'metric' PREDICTION = 'prediction' LOGITS = 'logits' HIDDEN = 'hidden' LAST_HIDDEN = 'last_hidden' SUM = 'sum' APPEND = 'append' SEQ_SUM = 'seq_sum' AVG_EXP = 'avg_exp' TYPE = 'type' TRAINING = 'training' VALIDATION = 'validation' TEST = 'test' SPLIT = 'split' FULL = 'full' COMBINED = 'combined' HYPEROPT = 'hyperopt' STRATEGY = 'strategy' EXECUTOR = 'executor' MINIMIZE = 'minimize' MAXIMIZE = 'maximize'