From 09c738ace2c82855f6b4a0959d84dc3163a3dc22 Mon Sep 17 00:00:00 2001 From: Oxfordblue7 Date: Wed, 24 Sep 2025 14:43:27 -0700 Subject: [PATCH 1/2] Fix autog2 issue for automatically calling LLM. --- commands.sh | 17 +++++++++++------ main/autog2.py | 2 +- scripts/download.sh | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/commands.sh b/commands.sh index 1d36a69..30c1353 100644 --- a/commands.sh +++ b/commands.sh @@ -12,15 +12,18 @@ git clone https://github.com/amazon-science/Automatic-Table-to-Graph-Generation. # -------------- create a conda environment for the AutoG cd Automatic-Table-to-Graph-Generation/ +# for the mysqlclient linux requirement +sudo apt-get update +sudo apt-get install python3-dev default-libmysqlclient-dev build-essential pkg-config + bash multi-table-benchmark/conda/create_conda_env.sh -c -p 3.9 -t 2.1 # the env name will be autog-cpu conda activate autog-cpu # -------------- install other dependencies int autog-cpu environment pip install codetiming humanfriendly sentence_transformers==3.3.0 nltk==3.9.1 torchdata==0.7 torchtext==0.16.0 -pip install transformers==4.44.2 -# for the mysqlclient linux requirement -sudo apt-get install python3-dev default-libmysqlclient-dev build-essential pkg-config +pip install transformers==4.44.2 +pip install llama-index llama-index-llms-bedrock # for Graphviz sudo apt-get install graphviz # for nltk data @@ -35,7 +38,6 @@ export PYTHONPATH=/data/Automatic-Table-to-Graph-Generation/multi-table-benchmar git clone https://github.com/mutong184/deepjoin # setup git-lfs -sudo apt-get update sudo apt-get install git-lfs git lfs install @@ -69,11 +71,14 @@ bash scripts/download.sh # - input the overall prompt+new contents into an LLM (e.g., Claud Sonet 3.5+) API or Web console to get answer. # - copy the answer (in RAW format!!!!!) and save to a file, named type.txt under the mag/ folder. -# 2. run autog, and explanation of these arguments +# 2. Option 1: run autog (manually call LLM), and explanation of these arguments # mag -> name of the --dataset argument # /data/datasets -> path of the folder that store data, .e.g, /data/datasets # autog-s -> the method to run the model # type.txt -> the name of file to save analysis results from LLM. Since we manually create this, this file is not used. # venue -> Name of the task to fit the solution -python -m main.autog mag /data/datasets autog-s type.txt venue +python -m main.autog mag ./data/datasets/mag autog-s type.txt venue + +# 2. Option 2: run autog2 (automatically interact with LLM for single or multiple rounds) +python -m main.autog2 mag anthropic.claude-3-sonnet-20240229-v1:0 ./data/datasets autog-s venue diff --git a/main/autog2.py b/main/autog2.py index f989d14..cdf31d5 100644 --- a/main/autog2.py +++ b/main/autog2.py @@ -3,7 +3,7 @@ import typer import numpy as np from rich import traceback -from models.autog.agent import AutoG_Agent +from models.autog.agent_old import AutoG_Agent from prompts.task import get_task_description from utils.misc import seed_everything from utils.data.rdb import load_dbb_dataset_from_cfg_path_no_name diff --git a/scripts/download.sh b/scripts/download.sh index 796358b..c688bc8 100644 --- a/scripts/download.sh +++ b/scripts/download.sh @@ -1,6 +1,6 @@ ## IEEE-CIS RR Movielens Outbrain MAG AVS diginetica ESCI Stackexchange -dataset_path="/data/datasets" +dataset_path="./data/datasets" mkdir -p $dataset_path From fcd42ba588c1634a5f78d152160081e238a7c021 Mon Sep 17 00:00:00 2001 From: Oxfordblue7 Date: Wed, 1 Oct 2025 15:27:45 -0700 Subject: [PATCH 2/2] Add instructions for aws env var setup --- commands.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands.sh b/commands.sh index 46465e1..d8cece5 100644 --- a/commands.sh +++ b/commands.sh @@ -80,4 +80,9 @@ bash scripts/download.sh python -m main.autog mag ./data/datasets/mag autog-s type.txt venue # 2. Option 2: run autog2 (automatically interact with LLM for single or multiple rounds) +# Note: need to set up environment variables for AWS bedrock access before running the Python command. +export AWS_ACCESS_KEY_ID= +export AWS_SECRET_ACCESS_KEY= +export AWS_SESSION_TOKEN= + python -m main.autog2 mag anthropic.claude-3-sonnet-20240229-v1:0 ./data/datasets autog-s venue