Skip to content

update #127

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

Merged
merged 12 commits into from
Apr 15, 2024
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

<p align="center">
<a href="https://webarena.dev/">Website</a> •
<a href="https://arxiv.org/abs/2307.13854">Paper</a>
<a href="https://arxiv.org/abs/2307.13854">Paper</a> •
<a href="https://docs.google.com/spreadsheets/d/1M801lEpBbKSNwP-vDBkC_pF7LdyGU1f_ufZb_NWNBZQ/edit?usp=sharing">Leaderboard</a>
</p>

![Overview](media/overview.png)
Expand Down Expand Up @@ -110,7 +111,7 @@ python run.py \
This script will run the first example with GPT-3.5 reasoning agent. The trajectory will be saved in `<your_result_dir>/0.html`

## Develop Your Prompt-based Agent
1. Define the prompts. We provide two baseline agents whose correrponding prompts are listed [here](./agent/prompts/raw). Each prompt is a dictionary with the following keys:
1. Define the prompts. We provide two baseline agents whose corresponding prompts are listed [here](./agent/prompts/raw). Each prompt is a dictionary with the following keys:
```python
prompt = {
"intro": <The overall guideline which includes the task description, available action, hint and others>,
Expand Down
2 changes: 1 addition & 1 deletion browser_env/helper_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def render(
if render_screenshot:
# image observation
img_obs = observation["image"]
image = Image.fromarray(img_obs)
image = Image.fromarray(img_obs) # type:ignore
byte_io = io.BytesIO()
image.save(byte_io, format="PNG")
byte_io.seek(0)
Expand Down
14 changes: 9 additions & 5 deletions environment_docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ Name: webarena
ID: ami-06290d70feea35450
```

1. Create a security group that allows all inbound traffic.

1. Create an instance (recommended type: t3a.xlarge, 1000GB EBS root volume) from the webarena AMI, and allow all inbound traffic in the security group, remember to select SSH key-pair.
2. Create an instance (recommended type: t3a.xlarge, 1000GB EBS root volume) from the webarena AMI. Use the security group just created and remember to select SSH key-pair.

2. Create an Elastic IP and bind to the instance to associate the instance with a static IP and hostname. Take note of the hostname, usually in the form of "ec2-xx-xx-xx-xx.us-east-2.compute.amazonaws.com". This will be used as "<your-server-hostname>" in the following commands.
3. Create an Elastic IP and bind to the instance to associate the instance with a static IP and hostname. Take note of the hostname, usually in the form of "ec2-xx-xx-xx-xx.us-east-2.compute.amazonaws.com". This will be used as "<your-server-hostname>" in the following commands.

3. Log into the server, start all dockers by:
4. Log into the server, start all dockers by:
```bash
docker start gitlab
docker start shopping
Expand All @@ -40,7 +41,7 @@ docker compose start

:clock1: wait ~1 min to wait all services to start

4. Run
5. Run
```bash
docker exec shopping /var/www/magento2/bin/magento setup:store-config:set --base-url="http://<your-server-hostname>:7770" # no trailing /
docker exec shopping mysql -u magentouser -pMyPassword magentodb -e 'UPDATE core_config_data SET value="http://<your-server-hostname>:7770/" WHERE path = "web/secure/base_url";'
Expand All @@ -57,6 +58,9 @@ docker exec gitlab sed -i "s|^external_url.*|external_url 'http://<your-server-h
docker exec gitlab gitlab-ctl reconfigure
```

You should be able to access your environment websites now, and stop reading.
However, if you are unable to use AWS AMI, read below to set up on your own machine.

## Shopping Website (OneStopShop)

Download the image tar from the following mirrors:
Expand Down Expand Up @@ -159,7 +163,7 @@ perl -pi -e "s|<your-server-hostname>|${YOUR_ACTUAL_HOSTNAME}|g" webarena-homepa

Then run
```
cd webarena_homepage
cd webarena-homepage
flask run --host=0.0.0.0 --port=4399
```
The homepage will be available at `http://<your-server-hostname>:4399`.
Expand Down
Loading