File size: 2,218 Bytes
f195fff | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | ---
title: OpenEnv Code Review
emoji: π
colorFrom: blue
colorTo: green
sdk: docker
app_file: app.py
pinned: false
---
# OpenEnv Environment Submission
This repository contains the submission for the **Meta PyTorch OpenEnv Hackathon β Round 1**.
## Overview
Implement an RL-style environment that follows the OpenEnv framework by Meta and Hugging Face. The environment exposes tasks, actions, step execution, and reward scoring.
**Domain:** Custom Domain (e.g. Email triage, Scheduling, Code Review)
## Project Structure
```
openEnv/
βββ inference.py # Main execution script emitting required [START], [STEP], [END] logs.
βββ requirements.txt # Project dependencies
βββ README.md # This file
βββ spec.md # Full Hackathon Specification
βββ checklist.md # Submission Verification Checklist
```
## Setup & Execution
### Prerequisites
- Python 3.9+
- OpenAI Python client (`openai>=1.0.0`)
### Installation
```bash
pip install -r requirements.txt
```
### Environment Variables
For inference script to run, the following environment variables are supported/required:
- `HF_TOKEN`: Required. Hugging Face Access Token.
- `API_BASE_URL`: Base URL for OpenAI client (Default: `https://api.openai.com/v1`)
- `MODEL_NAME`: The Language Model name (Default: `gpt-3.5-turbo`)
- `OPENAI_API_KEY`: API Key if hitting OpenAI directly or external OpenAI-compatible APIs.
```bash
export HF_TOKEN="your_hf_token"
export OPENAI_API_KEY="your_api_key"
```
### Run
Ensure you output exactly to `stdout` for the metrics collection:
```bash
python inference.py
```
### Output Formatting
The script outputs logs specifically formatted for the autograder:
- `[START] task=xyz env=abc model=mymodel`
- `[STEP] step=1 action=abc reward=0.00 done=false error=null`
- `[END] success=true steps=5 rewards=0.00,1.00`
## Hugging Face Spaces Deployment
*URL: `https://huggingface.co/spaces/YOUR_USER_ID/YOUR_SPACE_NAME`*
This project is configured to run efficiently on Hugging Face Spaces under the **2 vCPU & 8 GB RAM** limitation constraint, with valid docker-based build processes.
# O p e n E n v
|