SemanticParsingTask.ConfigΒΆ

Component: SemanticParsingTask

class SemanticParsingTask.Config[source]

Bases: Task.Config

All Attributes (including base classes)

Default JSON

{
    "features": {
        "load_path": null,
        "save_path": null,
        "freeze": false,
        "shared_module_key": null,
        "word_feat": {
            "embed_dim": 100,
            "freeze": false,
            "embedding_init_strategy": "random",
            "embedding_init_range": null,
            "export_input_names": [
                "tokens_vals"
            ],
            "pretrained_embeddings_path": "",
            "vocab_file": "",
            "vocab_size": 0,
            "vocab_from_train_data": true,
            "vocab_from_all_data": false,
            "vocab_from_pretrained_embeddings": false,
            "lowercase_tokens": true,
            "min_freq": 1,
            "mlp_layer_dims": []
        },
        "seq_word_feat": null,
        "dict_feat": null,
        "char_feat": null,
        "pretrained_model_embedding": null
    },
    "featurizer": {
        "SimpleFeaturizer": {
            "sentence_markers": null,
            "lowercase_tokens": true,
            "split_regex": "\\s+",
            "convert_to_bytes": false
        }
    },
    "data_handler": {
        "columns_to_read": [
            "doc_label",
            "word_label",
            "text",
            "dict_feat",
            "seqlogical"
        ],
        "shuffle": true,
        "sort_within_batch": true,
        "train_path": "train.tsv",
        "eval_path": "eval.tsv",
        "test_path": "test.tsv",
        "train_batch_size": 1,
        "eval_batch_size": 1,
        "test_batch_size": 1
    },
    "trainer": {
        "real_trainer": {
            "random_seed": 0,
            "epochs": 10,
            "early_stop_after": 0,
            "max_clip_norm": null,
            "report_train_metrics": true
        },
        "num_workers": 1
    },
    "optimizer": {
        "type": "adam",
        "lr": 0.001,
        "weight_decay": 1e-05,
        "momentum": 0.0
    },
    "scheduler": {
        "type": "none",
        "step_size": 30,
        "gamma": 0.1,
        "T_max": 1000,
        "eta_min": 0,
        "patience": 5,
        "threshold": 0.0001,
        "threshold_is_absolute": false,
        "cooldown": 0,
        "cut_frac": 0.1,
        "ratio": 32,
        "non_pretrained_param_groups": 2,
        "lm_lr_multiplier": 1.0,
        "lm_use_per_layer_lr": false,
        "lm_gradual_unfreezing": true
    },
    "exporter": null,
    "model": {
        "version": 0,
        "lstm": {
            "load_path": null,
            "save_path": null,
            "freeze": false,
            "shared_module_key": null,
            "dropout": 0.4,
            "lstm_dim": 32,
            "num_layers": 1,
            "bidirectional": true
        },
        "ablation": {
            "use_buffer": true,
            "use_stack": true,
            "use_action": true,
            "use_last_open_NT_feature": false
        },
        "constraints": {
            "intent_slot_nesting": true,
            "ignore_loss_for_unsupported": false,
            "no_slots_inside_unsupported": true
        },
        "max_open_NT": 10,
        "dropout": 0.1,
        "compositional_type": "blstm"
    },
    "labels": null,
    "metric_reporter": {
        "output_path": "/tmp/test_out.txt"
    }
}