WordTaggingTask.ConfigΒΆ

Component: WordTaggingTask

class WordTaggingTask.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",
            "doc_weight",
            "word_weight"
        ],
        "shuffle": true,
        "sort_within_batch": true,
        "train_path": "train.tsv",
        "eval_path": "eval.tsv",
        "test_path": "test.tsv",
        "train_batch_size": 128,
        "eval_batch_size": 128,
        "test_batch_size": 128,
        "max_seq_len": -1
    },
    "trainer": {
        "random_seed": 0,
        "epochs": 10,
        "early_stop_after": 0,
        "max_clip_norm": null,
        "report_train_metrics": true
    },
    "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": {
        "representation": {
            "BiLSTMSlotAttention": {
                "load_path": null,
                "save_path": null,
                "freeze": false,
                "shared_module_key": null,
                "dropout": 0.4,
                "lstm": {
                    "load_path": null,
                    "save_path": null,
                    "freeze": false,
                    "shared_module_key": null,
                    "dropout": 0.4,
                    "lstm_dim": 32,
                    "num_layers": 1,
                    "bidirectional": true
                },
                "slot_attention": {
                    "attn_dimension": 64,
                    "attention_type": "no_attention"
                },
                "mlp_decoder": null
            }
        },
        "output_layer": {
            "WordTaggingOutputLayer": {
                "load_path": null,
                "save_path": null,
                "freeze": false,
                "shared_module_key": null,
                "loss": {}
            }
        },
        "decoder": {
            "load_path": null,
            "save_path": null,
            "freeze": false,
            "shared_module_key": null,
            "hidden_dims": []
        }
    },
    "labels": {
        "use_bio_labels": false,
        "export_output_names": [
            "word_scores"
        ]
    },
    "metric_reporter": {
        "output_path": "/tmp/test_out.txt"
    }
}