sotopia-lab / sotopia

Sotopia: an Open-ended Social Learning Environment (ICLR 2024 spotlight)
https://docs.sotopia.world
MIT License
168 stars 21 forks source link

Adding a devcontainer with Redis and a Ollama server #217

Closed ProKil closed 1 month ago

ProKil commented 1 month ago

This PR introduces an experimental dev container which would allow developers to easily set up a clean environment with a Redis server and an LLM server running in the local environment with minimal memory footprint (<4GB) so that it could run easily on laptop and codespaces.

📑 Description

  1. .devcontainer/devcontainer.json a specification of a container with Python, Redis, and Ollama support. It would automatically install poetry and sotopia, and serve Llama 3.2 1b on start.
  2. An example for using custom models, which can also serve a sanity check for the devcontainer.
  3. Fix agenerate API to use the model_name for reformatting.
  4. Updated the doc for contributors.

Out of scope:

  1. Use the devcontainer in CI. This will be more of a breaking change which could be a separate PR.
  2. Pre-load sotopia data into redis. The technical implementation needs more discussion.

✅ Checks

ℹ Additional Information

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.49%. Comparing base (7f5be99) to head (ec17cd2). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sotopia/generation_utils/generate.py 75.00% 2 Missing :warning:
@@            Coverage Diff             @@
##             main     #217      +/-   ##
==========================================
- Coverage   71.82%   71.49%   -0.33%     
==========================================
  Files          55       55              
  Lines        2875     3021     +146     
==========================================
+ Hits         2065     2160      +95     
- Misses        810      861      +51     
Files with missing lines Coverage Δ
sotopia/generation_utils/generate.py 62.50% <75.00%> (+1.34%) :arrow_up: