Skip to content

GH-3536: fix state dict key mismatch for embeddings in TextPairRegres… #2383

GH-3536: fix state dict key mismatch for embeddings in TextPairRegres…

GH-3536: fix state dict key mismatch for embeddings in TextPairRegres… #2383

Triggered via pull request August 22, 2024 22:55
Status Failure
Total duration 17m 16s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 1 warning
test: flair/models/pairwise_regression_model.py#L341
ruff pytest_ruff.RuffError: flair/models/pairwise_regression_model.py:207:9: D209 [*] Multi-line docstring closing quotes should be on a separate line | 205 | @classmethod 206 | def _init_model_with_state_dict(cls, state: Dict[str, Any], **kwargs): 207 | """Initializes a TextPairRegressor model from a state dictionary (exported by _get_state_dict). | _________^ 208 | | Requires keys 'state_dict', 'document_embeddings', and 'label_type' in the state dictionary.""" | |_______________________________________________________________________________________________________^ D209 209 | if "document_embeddings" in state: 210 | state["embeddings"] = state.pop("document_embeddings") # need to rename this parameter | = help: Move closing quotes to new line flair/models/pairwise_regression_model.py:207:9: D205 1 blank line required between summary line and description | 205 | @classmethod 206 | def _init_model_with_state_dict(cls, state: Dict[str, Any], **kwargs): 207 | """Initializes a TextPairRegressor model from a state dictionary (exported by _get_state_dict). | _________^ 208 | | Requires keys 'state_dict', 'document_embeddings', and 'label_type' in the state dictionary.""" | |_______________________________________________________________________________________________________^ D205 209 | if "document_embeddings" in state: 210 | state["embeddings"] = state.pop("document_embeddings") # need to rename this parameter | = help: Insert single blank line
test
Process completed with exit code 1.
test
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/setup-python@v4, actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/