facebookresearch / facebookresearch/MLGym

Inconsistant Behaviour When Trying to Terminate MLGym Process

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
622
Forks
59
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

When users try to terminate an MLGym process prematurely, there's a chance that the process will refuse to exit.

### Steps/commands/code to Reproduce

```
git clone git@github.com:facebookresearch/MLGym.git
cd MLGym
conda create -y -n mlgym python=3.11
conda activate mlgym
pip install -e .

podman machine init
podman machine start
export DOCKER_HOST=unix://$(podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}')

podman pull aigym/mlgym-agent:latest

python run.py \
--container_type podman \
--task_config_path tasks/battleOfSexes.yaml \
--model litellm:claude-3-5-sonnet-20240620 \
--per_instance_cost_limit 4.00 \
--agent_config_path configs/agents/default.yaml \
--temp 1 \
--gpus 0 \
--max_steps 50 \
--aliases_file ./docker/aliases.sh

Ctrl + c
```

### Error message/results

The process sometimes refuses to exit.

### System Information

Current MLGym

### Checklist

- [x] I'm running with the latest docker container/on the latest development version (i.e., I ran `git pull`))
- [x] I have copied the full command/code that I ran (as text, not as screenshot!)
- [x] If applicable: I have copied the **full** log file/error message that was the result (as text, not as screenshot!)
- [x] I have enclosed code/log messages in triple backticks ([docs](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code)) and clicked "Preview" to make sure it's displayed correctly.

Contributor guide

Open the contributing guide

Research direction

Start with run.py and reproduce the command in the issue using Podman, then interrupt it with Ctrl+C while observing whether the main process and its container exit. Trace the process and container shutdown path from that entry point; done means a premature interrupt reliably terminates the launched work and returns control to the shell.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.