Hi,
I’m new to weave
and I’m trying to run an evaluation pipeline with a custom weave.Model
. But I run into a 500 Server Error. In this case, it seems related to an internal trace operation in the weave
package, specifically during an attempt to query a table (/table/query
endpoint). Here is the full traceback for context:
Traceback (most recent call last):
File "/Users/amo/miniconda3/lib/python3.12/runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/miniconda3/lib/python3.12/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/Users/amo/.vscode/extensions/ms-python.debugpy-2024.10.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
cli.main()
File "/Users/amo/.vscode/extensions/ms-python.debugpy-2024.10.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/Users/amo/.vscode/extensions/ms-python.debugpy-2024.10.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="__main__")
File "/Users/amo/.vscode/extensions/ms-python.debugpy-2024.10.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/.vscode/extensions/ms-python.debugpy-2024.10.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/Users/amo/.vscode/extensions/ms-python.debugpy-2024.10.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/Users/amo/Developer/code/patient-note-alignment/examples/weave_exp.py", line 176, in <module>
print(asyncio.run(evaluation.evaluate(model)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/nest_asyncio.py", line 30, in run
return loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
^^^^^^^^^^
File "/Users/amo/miniconda3/lib/python3.12/asyncio/futures.py", line 203, in result
raise self._exception.with_traceback(self._exception_tb)
File "/Users/amo/miniconda3/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/weave/trace/op.py", line 333, in wrapper
res, _ = await _execute_call(wrapper, call, *args, **kwargs) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/weave/trace/op.py", line 213, in _call_async
return handle_exception(e)
^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/weave/trace/op.py", line 211, in _call_async
res = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/weave/flow/eval.py", line 300, in evaluate
trial_rows = list(_rows) * self.trials
^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/weave/trace/vals.py", line 313, in __iter__
return iter(self.rows)
^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/weave/trace/vals.py", line 254, in rows
self._rows = list(self._remote_iter())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/weave/trace/vals.py", line 282, in _remote_iter
response = self.server.table_query(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/weave/trace_server/remote_http_trace_server.py", line 434, in table_query
return self._generic_request(
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/weave/trace_server/remote_http_trace_server.py", line 217, in _generic_request
r = self._generic_request_executor(url, req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f
return copy(f, *args, **kw)
^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter
result = action(retry_state)
^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 398, in <lambda>
self._add_action_func(lambda rs: rs.outcome.result())
^^^^^^^^^^^^^^^^^^^
File "/Users/amo/miniconda3/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/Users/amo/miniconda3/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__
result = fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/Users/amo/Library/Caches/pypoetry/virtualenvs/patient-note-alignment-fdNa5lcz-py3.12/lib/python3.12/site-packages/weave/trace_server/remote_http_trace_server.py", line 200, in _generic_request_executor
raise requests.HTTPError(
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: /table/query. Reason: