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 report #31

Open
yongduosui opened this issue Dec 4, 2024 · 3 comments
Open

Bug report #31

yongduosui opened this issue Dec 4, 2024 · 3 comments

Comments

@yongduosui
Copy link

For runing Spider-Agent on Spider 2.0 dataset, I follow your instructions and run the following commands:

cd ../../methods/spider-agent
export OPENAI_API_KEY=your_openai_api_key
python run.py --model gpt-4o -s test1

I meet the following issues:

Warning: ../../spider2/examples/postgres_chinook001 is neither a file nor a directory.
Traceback (most recent call last):
  File "run.py", line 248, in <module>
    test(args)
  File "run.py", line 207, in test
    env = Spider_Agent_Env(
  File "/data/home/yongduosui/data/02-Spider2/03-Spider2/Spider2/methods/spider-agent/spider_agent/envs/spider_agent.py", line 82, in __init__
    self.setup_controller.setup(self.config)
  File "/data/home/yongduosui/data/02-Spider2/03-Spider2/Spider2/methods/spider-agent/spider_agent/controllers/setup.py", line 55, in setup
    config_function(self, **parameters)
  File "/data/home/yongduosui/data/02-Spider2/03-Spider2/Spider2/methods/spider-agent/spider_agent/configs/general.py", line 119, in copy_all_subfiles_postgres_setup
    sh_file_path = sh_files[0]
IndexError: list index out of range
@lfy79001
Copy link
Collaborator

lfy79001 commented Dec 4, 2024

Hi,

You can use python run.py --model gpt-4o -s test1 --bq_only --sf_only --local_only to exclude postgres examples, I will fix the bug asap.

And you might need to finish the setup process. Have you finished python setup.py ?

The step4 and step5 in the setup

Thanks!

@yongduosui
Copy link
Author

Yes, I have already finished python setup.py Thanks for the super quick answer!

@yongduosui
Copy link
Author

There is another problem, when I execute the ch project, i.e. python run.py --model azure/gpt-4o -s test1 --ch_only, it will produce the following docker error, while other projects, such as bq, sf and other images have no problem.

[2024-12-05 11:13:00,769 INFO run/171-MainProcess] Running gpt-4o-test1/ch001
[2024-12-05 11:13:00,769 INFO spider_agent/74-MainProcess] Initializing...
[2024-12-05 11:13:01,207 INFO spider_agent/151-MainProcess] Failed to construct container from image spider_agent_clickhouse-image with error: 400 Client Error for http+docker://localhost/v1.45/containers/548e2f6ba6be94ea71958c77ceefca651dadf59544b7a900e53dee3c3720f8e7/start: Bad Request ("failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./entrypoint.sh": stat ./entrypoint.sh: no such file or directory: unknown")
Traceback (most recent call last):
  File "/data/home/yongduosui/anaconda3/envs/spider/lib/python3.8/site-packages/docker/api/client.py", line 275, in _raise_for_status
    response.raise_for_status()
  File "/data/home/yongduosui/anaconda3/envs/spider/lib/python3.8/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http+docker://localhost/v1.45/containers/548e2f6ba6be94ea71958c77ceefca651dadf59544b7a900e53dee3c3720f8e7/start

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "run.py", line 248, in <module>
    test(args)
  File "run.py", line 207, in test
    env = Spider_Agent_Env(
  File "/data/home/yongduosui/data/02-Spider2/03-Spider2/Spider2/methods/spider-agent/spider_agent/envs/spider_agent.py", line 75, in __init__
    self._construct_container()
  File "/data/home/yongduosui/data/02-Spider2/03-Spider2/Spider2/methods/spider-agent/spider_agent/envs/spider_agent.py", line 152, in _construct_container
    raise e
  File "/data/home/yongduosui/data/02-Spider2/03-Spider2/Spider2/methods/spider-agent/spider_agent/envs/spider_agent.py", line 140, in _construct_container
    self.container: Container = client.containers.run(image=image, volumes=volumes, **extra_params)
  File "/data/home/yongduosui/anaconda3/envs/spider/lib/python3.8/site-packages/docker/models/containers.py", line 883, in run
    container.start()
  File "/data/home/yongduosui/anaconda3/envs/spider/lib/python3.8/site-packages/docker/models/containers.py", line 420, in start
    return self.client.api.start(self.id, **kwargs)
  File "/data/home/yongduosui/anaconda3/envs/spider/lib/python3.8/site-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/data/home/yongduosui/anaconda3/envs/spider/lib/python3.8/site-packages/docker/api/container.py", line 1136, in start
    self._raise_for_status(res)
  File "/data/home/yongduosui/anaconda3/envs/spider/lib/python3.8/site-packages/docker/api/client.py", line 277, in _raise_for_status
    raise create_api_error_from_http_exception(e) from e
  File "/data/home/yongduosui/anaconda3/envs/spider/lib/python3.8/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation) from e
docker.errors.APIError: 400 Client Error for http+docker://localhost/v1.45/containers/548e2f6ba6be94ea71958c77ceefca651dadf59544b7a900e53dee3c3720f8e7/start: Bad Request ("failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./entrypoint.sh": stat ./entrypoint.sh: no such file or directory: unknown")

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

No branches or pull requests

2 participants