| title | GitHub Learner Env (OpenEnv RL Environment) | |||
|---|---|---|---|---|
| emoji | ๐ง | |||
| colorFrom | blue | |||
| colorTo | gray | |||
| sdk | docker | |||
| app_port | 8000 | |||
| tags |
|
A Reinforcement Learning environment built with OpenEnv where an agent learns GitHub skills by selecting repositories in the correct order.
This is NOT a toy echo environment โ it simulates:
- Skill progression ๐
- Dependency constraints ๐
- Reward optimization ๐ฏ
The agent must:
- Choose repositories
- Learn skills
- Respect prerequisites
- Maximize reward
Agent โ selects repo โ Environment updates state โ Reward โ Repeat
Action(repo_id: int)๐ Agent selects a repository
Observation:
available_repos: List[RepoInfo]
current_state: State
reward: float
done: boolTracks:
State:
mastered_skills: List[str]
step_count: int
progress_score: floatEach repo contains:
RepoInfo:
id: int
skill: str
difficulty: int
prereqs: List[str]Reward is calculated using:
reward =
+2 (new skill)
-1 (duplicate skill)
+1 (prereqs satisfied)
-1 (wrong order)
+0.5 * difficulty
+0.1 * unique_skills| Scenario | Reward |
|---|---|
| Learn new skill correctly | High |
| Repeat same skill | Negative |
| Skip prerequisites | Penalty |
done = step_count >= 5unique_skills >= 3All skills must follow prerequisites
progress_score >= 5env.evaluate()Returns:
{
"exploration": 0.0โ1.0,
"dependencies": 0.0โ1.0,
"efficiency": 0.0โ1.0
}File: inference.py
This script:
- Runs the environment
- Chooses actions (LLM or heuristic)
- Logs output in required format
[START] ...
[STEP] ...
[END] ...
Uses:
MODEL_NAME = Qwen/Qwen2.5-72B-Instruct
-
Picks repo with:
- unmet skill
- satisfied prerequisites
- highest difficulty
pip install -e .uvicorn server.app:app --reloadpython server/test.pypython inference.pydocker build -t github_learner_env-env -f server/Dockerfile .openenv pushgithub_learner_env/
โ
โโโ client.py
โโโ models.py
โโโ inference.py โ agent logic
โโโ openenv.yaml
โ
โโโ server/
โโโ app.py
โโโ github_learner_env_environment.py โ CORE LOGIC
โโโ repos.json
โโโ Dockerfile
This environment teaches:
- Sequential decision making
- Dependency planning
- Reward optimization
Unlike simple environments, this project includes:
โ Multi-step reasoning โ Dependency constraints โ Custom reward shaping โ Automated grading โ LLM + heuristic agent
- Max steps: 5
- Max reward normalized to 0โ1
- Works with or without LLM
- Add dynamic repo generation
- Introduce time penalties
- Multi-agent competition
- Curriculum learning
This is a skill-based RL environment where agents must:
- Learn efficiently
- Follow correct order
- Maximize reward
๐ก Built for Meta PyTorch OpenEnv Hackathon