HF RL Explorer

Prefetch objects don't work with slices Description

Prefetch objects don't work with slices Description: a task in Lego-RL-SWE-Bench-Verified (Harbor dataset). ​Prefetch() objects does not work with sliced querysets. For example the following code results in AssertionError: Cannot filter a query once a slice has been taken…

The task

​Prefetch() objects does not work with sliced querysets. For example the following code results in AssertionError: Cannot filter a query once a slice has been taken.: Category.objects.prefetch_related(Prefetch( 'post_set', queryset=Post.objects.all()[:3], to_attr='example_posts', )) This behavior is also mentioned in…

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