Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: missing kernel python3 #87

Merged
merged 2 commits into from
May 16, 2024
Merged

Bug fix: missing kernel python3 #87

merged 2 commits into from
May 16, 2024

Conversation

humpydonkey
Copy link
Collaborator

Add ipykernel as a dependency.

A small error happened due to missing kernel:

Traceback (most recent call last):
  File "/Users/asia/work/repos/vision-agent/vision-agent-benchmark/eval_va_v2.py", line 31, in <module>
    pred = _eva_record(record["question"], record["image_path"])
  File "/Users/asia/work/repos/vision-agent/vision-agent-benchmark/eval_va_v2.py", line 11, in _eva_record
    return agent.chat_with_workflow(
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/langsmith/run_helpers.py", line 565, in wrapper
    raise e
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/langsmith/run_helpers.py", line 560, in wrapper
    function_result = run_container["context"].run(
  File "/Users/asia/work/repos/vision-agent/vision_agent/agent/vision_agent_v2.py", line 374, in chat_with_workflow
    working_code, working_test, plan, working_memory_i = run_plan(
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/langsmith/run_helpers.py", line 565, in wrapper
    raise e
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/langsmith/run_helpers.py", line 560, in wrapper
    function_result = run_container["context"].run(
  File "/Users/asia/work/repos/vision-agent/vision_agent/agent/vision_agent_v2.py", line 252, in run_plan
    success, code, result, working_memory_i = write_and_exec_code(
  File "/Users/asia/work/repos/vision-agent/vision_agent/agent/vision_agent_v2.py", line 178, in write_and_exec_code
    success, result = exec.run_isolation(code)
  File "/Users/asia/work/repos/vision-agent/vision_agent/utils/execute.py", line 103, in run_isolation
    self.reset()
  File "/Users/asia/work/repos/vision-agent/vision_agent/utils/execute.py", line 79, in reset
    self.build()
  File "/Users/asia/work/repos/vision-agent/vision_agent/utils/execute.py", line 54, in build
    self.nb_client.start_new_kernel()
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/jupyter_core/utils/__init__.py", line 165, in wrapped
    return loop.run_until_complete(inner)
  File "/opt/homebrew/Cellar/[email protected]/3.10.12_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/nbclient/client.py", line 550, in async_start_new_kernel
    await ensure_async(self.km.start_kernel(extra_arguments=self.extra_arguments, **kwargs))
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/jupyter_core/utils/__init__.py", line 198, in ensure_async
    result = await obj
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/jupyter_client/manager.py", line 96, in wrapper
    raise e
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/jupyter_client/manager.py", line 87, in wrapper
    out = await method(self, *args, **kwargs)
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/jupyter_client/manager.py", line 435, in _async_start_kernel
    kernel_cmd, kw = await self._async_pre_start_kernel(**kw)
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/jupyter_client/manager.py", line 397, in _async_pre_start_kernel
    self.kernel_spec,
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/jupyter_client/manager.py", line 195, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/Users/asia/Library/Caches/pypoetry/virtualenvs/vision-agent-4R5Yp0-v-py3.10/lib/python3.10/site-packages/jupyter_client/kernelspec.py", line 285, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3

@dillonalaird dillonalaird self-requested a review May 16, 2024 19:24
@humpydonkey humpydonkey merged commit 245b296 into main May 16, 2024
7 checks passed
shankar-vision-eng added a commit that referenced this pull request May 17, 2024
* adding more cv tools to coder agent

* Bug fix: missing kernel python3 (#87)

* Bug fix: missing kernel python3

* Update API key

* [skip ci] chore(release): vision-agent 0.2.24

* adding more cv tools to coder agent

* Added test cases for the tools added

* added test case for every tool

* fix linting

* fixing tests

* fix linting

* fixing test cases for grounding tools as the output format changed

---------

Co-authored-by: Asia <[email protected]>
Co-authored-by: GitHub Actions Bot <[email protected]>
@dillonalaird dillonalaird deleted the fix-missing-kernel-bug branch June 5, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants