from environments.random_search import RandomSearch DATA_DIR = "/home/suching/reproducibility/data/sst/" BOW_LINEAR = { "CUDA_DEVICE": 0, "USE_SPACY_TOKENIZER": 0, "SEED": RandomSearch.random_integer(0, 100), "DATA_DIR": DATA_DIR, "THROTTLE": None, "EMBEDDING": "BOW_COUNTS", "ENCODER": None, "LEARNING_RATE": RandomSearch.random_loguniform(1e-6, 1e-1), "DROPOUT": RandomSearch.random_uniform(0, 0.5), "BATCH_SIZE": 32, } # CLASSIFIER_SEARCH = { # "CUDA_DEVICE": 0, # "USE_SPACY_TOKENIZER": 0, # "SEED": RandomSearch.random_integer(0, 100), # "DATA_DIR": DATA_DIR, # "THROTTLE": None, # "EMBEDDING": "ELMO_TRANSFORMER", # "ENCODER": "LSTM", # "HIDDEN_SIZE": RandomSearch.random_integer(64, 512), # "NUM_ENCODER_LAYERS": RandomSearch.random_integer(1, 3), # "MAX_FILTER_SIZE": RandomSearch.random_integer(5, 10), # "NUM_FILTERS": RandomSearch.random_integer(64, 512), # "AGGREGATIONS": RandomSearch.random_choice("final_state", "maxpool", "meanpool", "attention"), # "LEARNING_RATE": RandomSearch.random_loguniform(1e-6, 1e-1),
"LEARNING_RATE": 0.004, "DROPOUT": 0.5, "VAMPIRE_DIRECTORY": os.environ.get("VAMPIRE_DIR", None), "VAMPIRE_DIM": os.environ.get("VAMPIRE_DIM", None), "BATCH_SIZE": 32, "NUM_ENCODER_LAYERS": 1, "NUM_OUTPUT_LAYERS": 2, "MAX_FILTER_SIZE": RandomSearch.random_integer(3, 6), "NUM_FILTERS": RandomSearch.random_integer(64, 512), "HIDDEN_SIZE": RandomSearch.random_integer(64, 512), "AGGREGATIONS": RandomSearch.random_subset("maxpool", "meanpool", "attention", "final_state"), "MAX_CHARACTER_FILTER_SIZE": RandomSearch.random_integer(3, 6), "NUM_CHARACTER_FILTERS": RandomSearch.random_integer(16, 64), "CHARACTER_HIDDEN_SIZE": RandomSearch.random_integer(16, 128), "CHARACTER_EMBEDDING_DIM": RandomSearch.random_integer(16, 64),
"DEV_PATH": os.environ["DATA_DIR"] + "/dev.jsonl", "TEST_PATH": os.environ["DATA_DIR"] + "/test.jsonl", "THROTTLE": os.environ.get("THROTTLE", None), "USE_SPACY_TOKENIZER": 1, "FREEZE_EMBEDDINGS": ["VAMPIRE"], "EMBEDDINGS": ["VAMPIRE", "RANDOM"], "ENCODER": "AVERAGE", "EMBEDDING_DROPOUT": 0.5, "LEARNING_RATE": 0.004, "DROPOUT": 0.5, "VAMPIRE_DIRECTORY": os.environ.get("VAMPIRE_DIR", None), "VAMPIRE_DIM": os.environ.get("VAMPIRE_DIM", None), "BATCH_SIZE": 32, "NUM_ENCODER_LAYERS": 1, "NUM_OUTPUT_LAYERS": 2, "MAX_FILTER_SIZE": RandomSearch.random_integer(3, 6), "NUM_FILTERS": RandomSearch.random_integer(64, 512), "HIDDEN_SIZE": RandomSearch.random_integer(64, 512), "AGGREGATIONS": RandomSearch.random_subset("maxpool", "meanpool", "attention", "final_state"), "MAX_CHARACTER_FILTER_SIZE": RandomSearch.random_integer(3, 6), "NUM_CHARACTER_FILTERS": RandomSearch.random_integer(16, 64), "CHARACTER_HIDDEN_SIZE": RandomSearch.random_integer(16, 128), "CHARACTER_EMBEDDING_DIM": RandomSearch.random_integer(16, 64), "CHARACTER_ENCODER": RandomSearch.random_choice("LSTM", "CNN", "AVERAGE"), "NUM_CHARACTER_ENCODER_LAYERS": RandomSearch.random_choice(1, 2), } VAMPIRE = { "LAZY_DATASET_READER": os.environ.get("LAZY", 0), "KL_ANNEALING": "linear", "SIGMOID_WEIGHT_1": 0.25,