Skip to content

Commit 1c2322e

Browse files
Hotfix CI for Python 3.9 by setting test as xfail until transformers release (#4388)
1 parent 242de1e commit 1c2322e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_online_dpo_trainer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import sys
16+
1517
import pytest
1618
import transformers
1719
from datasets import Dataset, features, load_dataset
@@ -424,6 +426,11 @@ def test_generation_config_setup(self):
424426
assert trainer.generation_config.max_new_tokens == 64
425427
assert not trainer.generation_config.do_sample # From generation_kwargs
426428

429+
@pytest.mark.xfail(
430+
sys.version_info[:2] == (3, 9) and Version(transformers.__version__) < Version("4.57.2"),
431+
reason="Blocked by upstream bug in transformers#41747 (tracked in trl#4308): fix merged, awaiting release >= 4.57.2",
432+
strict=True,
433+
)
427434
@pytest.mark.parametrize("config_name", ["standard_prompt_only", "conversational_prompt_only"])
428435
@require_torch_accelerator
429436
def test_training_with_transformers_paged(self, config_name):

0 commit comments

Comments
 (0)