MCPcopy Index your code
hub / github.com/allenai/clin

github.com/allenai/clin @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
159 symbols 388 edges 9 files 2 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CLIN: A Continually Learning Language Agent for Rapid Task Adaptation and Generalization

Code for interactive continual learning with ScienceWorld environment.

Step 1: Install Java You will have to have Java 1.8+ installed on your system (shipped with most Linux distributions).

Step 2: Create a new Python environment

conda create --name sw python=3.8
conda activate sw
pip install -r requirements.txt

export PYTHONPATH=.         # prevents any module errors
export OPENAI_API_KEY=<your key>  # would need access to one of these 2 models: gpt-3.5-turbo, gpt-4

Step 3: Installing ScienceWorld

cd ..
git clone https://github.com/allenai/ScienceWorld.git
cd ScienceWorld
git checkout exhaustivevalidactions
git pull
pip install -e .

Step 4: Get back into CLIN repo

cd ../clin
mkdir logs

Step 5: Example command to run CLIN agent for ScienceWorld

python scienceworld/clin_agent.py --task-num "4" --var-num 1 --env-step-limit 2 --num-episodes 1  --gpt-model "gpt-4-0613" --summarize_end_of_episode 1  --device "cpu"  --temperature 0.0  --use-gold-memory-in-ep0 0 --gold-traces "" --use-last-k-memories 3 --quadrant 1 --simplifications-preset "easy" --output-path-prefix logs/testrun/

Citation

@article{majumder2023clin,
  author    = "Majumder, Bodhisattwa Prasad and Dalvi Mishra, Bhavana and Jansen, Peter and Tafjord, Oyvind and Tandon, Niket and Zhang, Li and Callison-Burch, Burch and Clark, Peter",
  title     = "CLIN: A Continually Learning Language Agent for Rapid Task Adaptation and Generalization",
  journal   = "arXiv",
  year      = "2023",
}

Core symbols most depended-on inside this repo

defineProperties
called by 26
static/js/bulma-carousel.js
_classCallCheck
called by 13
static/js/bulma-carousel.js
getTokenLength
called by 7
model_utils.py
defineProperties
called by 4
static/js/bulma-slider.js
format_memory
called by 3
model_utils.py
_toConsumableArray
called by 3
static/js/bulma-carousel.js
remove_stopwords_and_lemmatize
called by 2
utils.py
success_map
called by 2
model_utils.py

Shape

Function 159

Languages

TypeScript90%
Python10%

Modules by API surface

static/js/fontawesome.all.min.js70 symbols
static/js/bulma-carousel.js50 symbols
model_utils.py9 symbols
static/js/bulma-slider.js8 symbols
static/js/bulma-carousel.min.js8 symbols
static/js/bulma-slider.min.js5 symbols
scienceworld/clin_agent.py4 symbols
utils.py3 symbols
static/js/index.js2 symbols

For agents

$ claude mcp add clin \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact