From c3f74e589774ca112dbd48d72273133dfa17c358 Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Mon, 3 Jun 2024 00:39:42 -0700 Subject: [PATCH] fix pyright --- tests/data/test_icl_datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data/test_icl_datasets.py b/tests/data/test_icl_datasets.py index d25671159a..1d545c251c 100644 --- a/tests/data/test_icl_datasets.py +++ b/tests/data/test_icl_datasets.py @@ -37,7 +37,7 @@ def run_test( for i, e in enumerate(evaluators): batch = next(e.dataloader.dataloader.__iter__()) # Check that the dataloader is the correct length for the first task. - if i == 0: + if i == 0 and hasattr(e.dataloader.dataloader, '__len__'): if eval_drop_last: assert len( e.dataloader.dataloader,