facebookresearch / facebookresearch/fairseq2

Check end-of-life version of deprecated features

Open
#1,387 0 comments 0 reactions 0 assignees View on GitHub
enhancement infra
Dominant language
Python
Stars
1.1k
Forks
144
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Extend `_warn_deprecated` with a mandatory `version` parameter and raise an `InternalError` if the current fairseq2 version is at or above the specified version.

```python
from packaging.Version

def _warn_deprecated(msg: str, eol_version: Version) -> None:
if fairseq2.__version__ >= eol_version:
raise InternalError("Deprecated feature not removed at or after end-of-life version")
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.