HF RL Explorer

OuterRef in exclude() or ~Q() uses wrong model. Description

OuterRef in exclude() or ~Q() uses wrong model. Description: a task in Lego-RL-SWE-Bench-Verified (Harbor dataset). The following test (added to tests/queries/test qs combinators) fails when trying to exclude results using OuterRef() def test exists exclude(self): filter() qs =…

The task

The following test (added to tests/queries/test_qs_combinators) fails when trying to exclude results using OuterRef() def test_exists_exclude(self): # filter() qs = Number.objects.annotate( foo=Exists( Item.objects.filter(tags__category_id=OuterRef('pk')) ) ).filter(foo=True) print(qs) # works # exclude() qs =…

Part of Lego-X/Lego-RL-SWE-Bench-Verified.