stanford-oval / suql

SUQL: Conversational Search over Structured and Unstructured Data with LLMs
https://arxiv.org/abs/2311.09818
Apache License 2.0
199 stars 18 forks source link

Maximum Recursion Depth Exceeded #20

Closed larsenweigle closed 4 months ago

larsenweigle commented 5 months ago

Description

When executing certain queries involving nested answer calls within the WHERE clause, the system exceeds the maximum recursion depth.

Query Example

SELECT courses.title, courses.course_codes, offerings.days, offerings.start_time, offerings.end_time, offerings.season
FROM courses
JOIN offerings ON courses.course_id = offerings.course_id
WHERE offerings.season = 'spring'
AND (
    answer(description, 'does this course provide a solid mathematical foundation for research in Natural Language Processing?') = 'Yes'
    OR answer(description, 'does this course focus on Language Modelling?') = 'Yes'
);

Error Message

The system throws a "maximum recursion depth exceeded" error as detailed below:

maximum recursion depth exceeded
Traceback (most recent call last):
  File "/home/larsen/course-companion/sql_free_text_support/execute_free_text_sql.py", line 1086, in suql_execute_single
    visitor(root)
  ...
  File "/usr/lib/python3.8/copy.py", line 270, in _reconstruct
    state = deepcopy(state, memo)
  ...
  File "/usr/lib/python3.8/copy.py", line 230, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  ...
RecursionError: maximum recursion depth exceeded while calling a Python object
george1459 commented 5 months ago

@larsenweigle Thanks! 1.1.7a2 (or the latest master branch) should have fixed it. Please test and see if the issue persists.