from deeplodocus.utils.flag import Flag # # DATA MEMORIZATION CONDITION # DEEP_MEMORIZE_BATCHES = Flag("Memorize batches", description="Memorize info at each batch", names=["default", "batch", "batches"]) DEEP_MEMORIZE_EPOCHS = Flag("Memorize epochs", description="Memorize info at each epoch", names=["epoch", "epochs"])
from deeplodocus.utils.flag import Flag # # DATA TYPE FLAGS # DEEP_DTYPE_STRING = Flag(name="String", description="String type", names=["string", "str"]) DEEP_DTYPE_IMAGE = Flag(name="Image", description="Image type", names=["image", "images", "img"]) DEEP_DTYPE_VIDEO = Flag(name="Video", description="Video type", names=["video", "videos", "vid"]) DEEP_DTYPE_INTEGER = Flag(name="Int", description="Integer type", names=["integer", "int"]) DEEP_DTYPE_FLOAT = Flag(name="Float", description="Float type", names=["float", "flt"]) DEEP_DTYPE_BOOLEAN = Flag(name="Bool", description="Boolean type", names=["boolean", "bool"]) DEEP_DTYPE_AUDIO = Flag(name="Sound", description="Sound type", names=["audio", "sound", "mp3", "cda"]) DEEP_DTYPE_SEQUENCE = Flag(name="Sequence", description="Sequence type", names=["sequence"])
from deeplodocus.utils.flag import Flag # # NOTIFICATION FLAGS # DEEP_NOTIF_INFO = Flag( name="Info notification", description="Blue info notification", names=["info"] ) DEEP_NOTIF_DEBUG = Flag( name="Debug notification", description="Purple debug notification", names=["debug"] ) DEEP_NOTIF_SUCCESS = Flag( name="Success notification", description="Green success notification", names=["success"] ) DEEP_NOTIF_WARNING = Flag( name="Warning notification", description="Orange warning notification", names=["warning"] ) DEEP_NOTIF_ERROR = Flag( name="Error notification", description="Red error notification", names=["error"] )
from deeplodocus.utils.flag import Flag # # EVENT TYPES # DEEP_EVENT_UNDEFINED = Flag(name="Undefined", description="Event : Undefined", names=["none", "undefined"]) DEEP_EVENT_ON_BATCH_END = Flag( name="On Batch End", description="Event : On Batch End", names=["batch end", "end batch", "end_batch", "on_batch_end"]) DEEP_EVENT_ON_EPOCH_END = Flag( name="On Epoch End", description="Event : On Epoch End", names=["epoch end", "end epoch", "on epoch end"]) DEEP_EVENT_ON_TRAINING_START = Flag( name="On Training Start", description="Event : On Training Start", names=["training start", "on training start"]) DEEP_EVENT_ON_TRAINING_END = Flag(name="On Training End", description="Event : On Training End", names=["training end", "on training end"]) DEEP_EVENT_ON_UPDATE_ALL = Flag(name="On Update all", description="Event : On Update All", names=["update all"]) DEEP_EVENT_ON_UPDATE_MODEL = Flag(name="On Update Model", description="Event : On Update Model", names=["update model"]) DEEP_EVENT_ON_UPDATE_OPTIMIZER = Flag(
# List the method used to load the data in the dataset DEEP_LOAD_METHOD_MEMORY = 0 DEEP_LOAD_METHOD_HARDDRIVE = 1 DEEP_LOAD_METHOD_SERVER = 2 # List all the methods DEEP_LOAD_METHOD_LIST = [DEEP_LOAD_METHOD_MEMORY, DEEP_LOAD_METHOD_HARDDRIVE, DEEP_LOAD_METHOD_SERVER] # List the method used to load the data in the dataset # High level methods DEEP_LOAD_METHOD_ONLINE = Flag(name="Online", description="Load the data during training", names=["default", "online", "on line", "on-line", "on_line"]) DEEP_LOAD_METHOD_SEMI_ONLINE = Flag(name="Semi-online", description="Load the source before the training and the data during the training", names=["semi-online", "semionline", "semi online", "semi_online"]) DEEP_LOAD_METHOD_OFFLINE = Flag(name="Offline", description="Load the data before training", names=["offline", "off line", "off-line", "off_line", "memory"]) # Low level methods DEEP_LOAD_METHOD_MEMORY_ = Flag(name="Memory", description="Load from memory", names=["memory"])
from deeplodocus.utils.flag import Flag # # SHUFFLE # DEEP_SHUFFLE_NONE = Flag(name="No shuffling", description="No shuffling", names=["none", "no", "false"]) DEEP_SHUFFLE_BATCHES = Flag(name="Batch shuffling", description="Batch shuffling", names=[ "batches", "batch", "shuffle batches", "shuffle_batches", "shuffle-batches" ]) DEEP_SHUFFLE_ALL = Flag( name="Shuffle all", description="Shuffling all the dataset", names=["all", "default", "shuffle all", "shuffle_all", "shuffle-all"]) DEEP_SHUFFLE_RANDOM_PICK = Flag( name="Pick random indices", description="Pick randomly indices in the list available", names=["pick", "random_pick", "random pick", "random-pick"])
from deeplodocus.utils.flag import Flag # # LOAD_AS FLAGS # DEEP_LOAD_AS_STRING = Flag(name="String", description="String type", names=["string", "str"]) DEEP_LOAD_AS_IMAGE = Flag(name="Image", description="Image type", names=["image", "images", "img"]) DEEP_LOAD_AS_VIDEO = Flag(name="Video", description="Video type", names=["video", "videos", "vid"]) DEEP_LOAD_AS_INTEGER = Flag(name="Int", description="Integer type", names=["integer", "int"]) DEEP_LOAD_AS_FLOAT = Flag(name="Float", description="Float type", names=["float", "flt"]) DEEP_LOAD_AS_BOOLEAN = Flag(name="Bool", description="Boolean type", names=["boolean", "bool"]) DEEP_LOAD_AS_AUDIO = Flag(name="Sound", description="Sound type", names=["audio", "sound", "mp3", "cda"]) DEEP_LOAD_AS_SEQUENCE = Flag(name="Sequence", description="Sequence type",
from deeplodocus.utils import get_main_path from deeplodocus.utils.flag import Flag # # ENTRIES # DEEP_ENTRY_INPUT = 0 DEEP_ENTRY_LABEL = 1 DEEP_ENTRY_OUTPUT = 2 DEEP_ENTRY_ADDITIONAL_DATA = 3 DEEP_ENTRY_INPUT = Flag(name="Input", description="Input entry", names=["input", "inputs", "inp", "x"]) DEEP_ENTRY_LABEL = Flag(name="Label", description="Label entry", names=[ "label", "labels", "lab", "expected output", "expected_output", "y_expected", "y_hat" ]) DEEP_ENTRY_OUTPUT = Flag(name="Output", description="Output entry", names=["output", "outputs", "y"]) DEEP_ENTRY_ADDITIONAL_DATA = Flag(name="Additional data", description="Additional Data entry", names=["additional_data", "additional data"]) DEEP_ENTRY_BASE_FILE_NAME = get_main_path( ) + "/data/auto-generated_dataset_%s_entry_%s_%i_source_%i.dat"
from deeplodocus.utils.flag import Flag # # POSSIBLE SOURCES # DEEP_SOURCE_FILE = Flag(name="File", description="Source : local file", names=["file"]) DEEP_SOURCE_FOLDER = Flag(name="Folder", description="Source : local folder", names=["folder", "dir", "directory"]) DEEP_SOURCE_DATABASE = Flag(name="Database", description="Source : database", names=["database", "db"]) DEEP_SOURCE_SERVER = Flag(name="Server", description="Source : server", names=["server", "remote"]) DEEP_SOURCE_SPARK = Flag(name="Spark", description="Source: Spark access", names=["spark"]) DEEP_SOURCE_PREMADE_DATASET = Flag(name="Pre-made dataset", description="Source: A pre-made dataset", names=["dataset", "premade", "pre-made"])
from deeplodocus.utils.flag import Flag DEEP_ADMIN_START_PROJECT = Flag( name="Start Project", description="startproject : Start a deeplodocus project", names=["start_project", "startproject"]) DEEP_ADMIN_VERSION = Flag(name="Version", description="version : Display Deeplodocus Version", names=["version"]) DEEP_ADMIN_HELP = Flag(name="Help", description="help : Display the Deeplodocus commands", names=["help"])
from deeplodocus.utils.flag import Flag DEEP_DATASET_TRAIN = Flag(name="Training", description="Training portion of the dataset", names=["train", "training"]) DEEP_DATASET_VAL = Flag(name="Validation", description="Validation portion of the dataset", names=["validation", "val"]) DEEP_DATASET_TEST = Flag(name="Test", description="Testportion of the dataset", names=["test", "testing"]) DEEP_DATASET_PREDICTION = Flag(name="Prediction", description="Prediction portion of the dataset", names=["predict", "prediction", "pred"])
from deeplodocus.utils.flag import Flag DEEP_REDUCE_MEAN = Flag(name="Mean", description="Reduction by mean", names=["mean"]) DEEP_REDUCE_SUM = Flag(name="Sum", description="Reduction by sum", names=["sum"]) DEEP_REDUCE_LAST = Flag(name="Last", description="Reduction by taking last value", names=["last", "latest"])
from deeplodocus.utils.flag import Flag # # SHUFFLE # DEEP_SHUFFLE_NONE = Flag( name="No shuffling", description="No shuffling", names=["none", "no", "false"] ) DEEP_SHUFFLE_BATCHES = Flag( name="Batch shuffling", description="Batch shuffling", names=["batches", "batch", "shuffle batches", "shuffle_batches", "shuffle-batches"] ) DEEP_SHUFFLE_ALL = Flag( name="Shuffle all", description="Shuffling all the dataset", names=["all", "default", "shuffle all", "shuffle_all", "shuffle-all"] )
from deeplodocus.utils.flag import Flag # # VERBOSE # DEEP_VERBOSE_BATCH = Flag( name="Verbose Batch", description="Print information at the end of every batch", names=["batch", "batches", "default"] ) DEEP_VERBOSE_EPOCH = Flag( name="Verbose Epoch", description="Print information at the end of every epoch", names=["epoch", "epochs"] ) DEEP_VERBOSE_TRAINING = Flag( name="Verbose Training", description="Print information at the end of the training", names=["training"] )
from deeplodocus.utils.flag import Flag # # LIBRARIES # #DEEP_LIB_PIL = 0 #DEEP_LIB_OPENCV = 1 DEEP_LIB_PIL = Flag(name="PIL", description="Computer vision library : PIL", names=["pil"]) DEEP_LIB_OPENCV = Flag(name="OpenCV", description="Computer vision library : OpenCV", names=["opencv"])
from deeplodocus.utils.flag import Flag # # FLOATS # DEEP_DTYPE_FLOAT8 = Flag(name="float8", description="Float8 format", names=["float8"]) DEEP_DTYPE_FLOAT16 = Flag(name="float16", description="Float16 format", names=["float16"]) DEEP_DTYPE_FLOAT32 = Flag(name="float32", description="Float32 format", names=["float32", "float"]) DEEP_DTYPE_FLOAT64 = Flag(name="float64", description="Float64 format", names=["float64"]) # # INTEGERS # DEEP_DTYPE_INT8 = Flag(name="int8", description="Int8 format", names=["int8"]) DEEP_DTYPE_INT16 = Flag(name="int16", description="Int16 format", names=["int16"])
from deeplodocus.utils.flag import Flag # # SAVE FORMATS # DEEP_SAVE_FORMAT_ONNX = Flag(name="ONNX", description="Open Neural Network eXchange format", names=["onnx"]) DEEP_SAVE_FORMAT_PYTORCH = Flag( name="PyTorch", description="Saving with Python's pickle module", names=["pytorch", "pt", "pth", "default"]) # # SAVE CONDITIONS # DEEP_SAVE_CONDITION_LESS = Flag( name="Less than", description= "Call saver when given metric is smaller than all previous values", names=["<", "smaller", "less", "default"]) DEEP_SAVE_CONDITION_GREATER = Flag( name="Greater than", description= "Call saver when given metric is greater than all previous values", names=[">", "bigger", "greater"])
from deeplodocus.utils.flag import Flag DEEP_ADMIN_NEW_PROJECT = Flag( name="Start Project", description="new-project : Initialise a new deeplodocus project", names=["new-project", "newproject", "new_project"]) DEEP_ADMIN_RUN = Flag( name="Run", description="run : Run a deeplodocus project", names=["run", "run-project", "runproject", "run_project"]) DEEP_ADMIN_VERSION = Flag(name="Version", description="version : Display Deeplodocus Version", names=["version"]) DEEP_ADMIN_HELP = Flag(name="Help", description="help : Display the Deeplodocus commands", names=["help"]) DEEP_ADMIN_TRANSFORMER = Flag( name="Transformer", description="transformer : Create a template transformer file", names=["transformer"]) DEEP_ADMIN_OUTPUT_TRANSFORMER = Flag( name="Output Transformer", description= "output-transformer : Create a template output transformer file", names=["outputtransformer", "output-transformer", "output_transformer"])