{"record":{"id":"5308ad3cd2f52bbb","repo":"babysor/MockingBird","slug":"support-only-linear-or-conv1d-5308ad","errorCode":null,"errorMessage":"Support only linear or conv1d.","messagePattern":"Support only linear or conv1d\\.","errorType":"validation","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"models/ppg_extractor/encoder/encoder.py","lineNumber":158,"sourceCode":"            )\n        elif positionwise_layer_type == \"conv1d\":\n            positionwise_layer = MultiLayeredConv1d\n            positionwise_layer_args = (\n                attention_dim,\n                linear_units,\n                positionwise_conv_kernel_size,\n                dropout_rate,\n            )\n        elif positionwise_layer_type == \"conv1d-linear\":\n            positionwise_layer = Conv1dLinear\n            positionwise_layer_args = (\n                attention_dim,\n                linear_units,\n                positionwise_conv_kernel_size,\n                dropout_rate,\n            )\n        else:\n            raise NotImplementedError(\"Support only linear or conv1d.\")\n\n        if selfattention_layer_type == \"selfattn\":\n            logging.info(\"encoder self-attention layer type = self-attention\")\n            encoder_selfattn_layer = MultiHeadedAttention\n            encoder_selfattn_layer_args = (\n                attention_heads,\n                attention_dim,\n                attention_dropout_rate,\n            )\n        elif selfattention_layer_type == \"rel_selfattn\":\n            assert pos_enc_layer_type == \"rel_pos\"\n            encoder_selfattn_layer = RelPositionMultiHeadedAttention\n            encoder_selfattn_layer_args = (\n                attention_heads,\n                attention_dim,\n                attention_dropout_rate,\n            )\n        else:","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/babysor/MockingBird/blob/28dc5e14f12d7c754612af2fde8e78a4b03f8616/models/ppg_extractor/encoder/encoder.py#L140-L176","documentation":"The transformer Encoder constructor raises NotImplementedError when positionwise_layer_type is neither 'linear' nor 'conv1d'.","triggerScenarios":"Constructing the ppg_extractor Encoder with positionwise_layer_type like 'dwconv' or a typo.","commonSituations":"Copying conformer/ESPnet configs that reference unsupported positionwise layer types.","solutions":["Use 'linear' or 'conv1d'","Fix typos in the YAML config"],"exampleFix":"# before\npositionwise_layer_type: dwconv\n\n# after\npositionwise_layer_type: linear","handlingStrategy":"validation","validationCode":"assert positionwise_layer_type in ('linear', 'conv1d')","typeGuard":null,"tryCatchPattern":"try:\n    Encoder(**enc_args)\nexcept NotImplementedError as e:\n    raise ConfigError(str(e)) from e","preventionTips":["Validate enums before model construction","Reject unknown keys in config rather than passing them through"],"tags":["transformer","encoder","feedforward","config"],"backgroundTag":"invalid-enum-value","analyzedSha":"28dc5e14f12d7c754612af2fde8e78a4b03f8616","analyzedAt":"2026-08-27T02:26:53.589Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}