HF RL Explorer

make temporal subtraction work without ExpressionWrapper Description

make temporal subtraction work without ExpressionWrapper Description: a task in Lego-RL-SWE-Bench-Verified (Harbor dataset). class Experiment(models.Model): start = models.DateTimeField() end = models.DateTimeField() Experiment.objects.annotate( delta=F('end') - F('start') +…

The task

class Experiment(models.Model): start = models.DateTimeField() end = models.DateTimeField() Experiment.objects.annotate( delta=F('end') - F('start') + Value(datetime.timedelta(), output_field=DurationField()) ) This gives: django.core.exceptions.FieldError: Expression contains mixed types: DateTimeField,…

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