{"record":{"id":"644943f732905729","repo":"babysor/MockingBird","slug":"unknown-pos-enc-layer","errorCode":null,"errorMessage":"unknown pos_enc_layer: ","messagePattern":"unknown pos_enc_layer: ","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"models/ppg_extractor/encoder/conformer_encoder.py","lineNumber":99,"sourceCode":"        no_subsample=False,\n        subsample_by_2=False,\n    ):\n        \"\"\"Construct an Encoder object.\"\"\"\n        super().__init__()\n        \n        self._output_size = attention_dim\n        idim = input_size\n\n        activation = get_activation(activation_type)\n        if pos_enc_layer_type == \"abs_pos\":\n            pos_enc_class = PositionalEncoding\n        elif pos_enc_layer_type == \"scaled_abs_pos\":\n            pos_enc_class = ScaledPositionalEncoding\n        elif pos_enc_layer_type == \"rel_pos\":\n            assert selfattention_layer_type == \"rel_selfattn\"\n            pos_enc_class = RelPositionalEncoding\n        else:\n            raise ValueError(\"unknown pos_enc_layer: \" + pos_enc_layer_type)\n\n        if input_layer == \"linear\":\n            self.embed = torch.nn.Sequential(\n                torch.nn.Linear(idim, attention_dim),\n                torch.nn.LayerNorm(attention_dim),\n                torch.nn.Dropout(dropout_rate),\n                pos_enc_class(attention_dim, positional_dropout_rate),\n            )\n        elif input_layer == \"conv2d\":\n            logging.info(\"Encoder input layer type: conv2d\")\n            if no_subsample:\n                self.embed = Conv2dNoSubsampling(\n                    idim,\n                    attention_dim,\n                    dropout_rate,\n                    pos_enc_class(attention_dim, positional_dropout_rate),\n                )\n            else:","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/babysor/MockingBird/blob/28dc5e14f12d7c754612af2fde8e78a4b03f8616/models/ppg_extractor/encoder/conformer_encoder.py#L81-L117","documentation":"Raised by the Conformer encoder constructor when pos_enc_layer_type is not one of the supported values ('abs_pos', 'scaled_abs_pos', 'rel_pos').","triggerScenarios":"Constructing the conformer encoder with an invalid pos_enc_layer_type string, e.g. from a config that passes 'none' or a typo like 'rel-pos'.","commonSituations":"Porting ESPnet configs between versions where positional-encoding option names changed; typos in YAML config; using a newer ESPnet option name not present in this fork.","solutions":["Set pos_enc_layer_type to 'abs_pos', 'scaled_abs_pos', or 'rel_pos'","If 'rel_pos', also set selfattention_layer_type='rel_selfattn' (there is an assert)","Copy a known-good conformer config from the repo's examples"],"exampleFix":"# before\npos_enc_layer_type: rel-pos   # typo\n\n# after\npos_enc_layer_type: rel_pos\nselfattention_layer_type: rel_selfattn","handlingStrategy":"validation","validationCode":"allowed = {'abs_pos', 'scaled_abs_pos', 'rel_pos'}\nassert pos_enc_layer_type in allowed, pos_enc_layer_type\nif pos_enc_layer_type == 'rel_pos':\n    assert selfattention_layer_type == 'rel_selfattn'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Parse configs with schema validation (pydantic/jsonschema) enumerating pos_enc_layer_type","Pair rel_pos with rel_selfattn in shared config presets","Fail fast at config load, not model build"],"tags":["conformer","encoder","positional-encoding","config"],"backgroundTag":"invalid-enum-value","analyzedSha":"28dc5e14f12d7c754612af2fde8e78a4b03f8616","analyzedAt":"2026-08-27T02:26:53.589Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}