Skip to content

Commit f94cf3d

Browse files
authored
Merge branch 'meta-pytorch:main' into main
2 parents 38d88bd + a74cefa commit f94cf3d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+8519
-318
lines changed

.github/workflows/deploy-hf-env.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ on:
1515
- 'chat_env'
1616
- 'atari_env'
1717
- 'openspiel_env'
18+
custom_environment:
19+
description: 'Custom environment to deploy (leave empty for none)'
20+
required: false
21+
type: string
22+
default: ''
1823
base_image_sha:
1924
description: 'SHA for openenv-base image (leave empty for latest)'
2025
required: false
@@ -36,9 +41,6 @@ on:
3641
type: string
3742
default: ''
3843

39-
env:
40-
HF_USERNAME: openenv
41-
4244
jobs:
4345
# Job to determine which environments to deploy
4446
determine-environments:
@@ -124,7 +126,8 @@ jobs:
124126
- name: Deploy to Hugging Face Space
125127
env:
126128
HF_TOKEN: ${{ secrets.HF_TOKEN }}
127-
HF_NAMESPACE: ${{ env.HF_USERNAME }}
129+
HF_NAMESPACE: ${{ github.event.inputs.hf_namespace }}
130+
HF_USERNAME: ${{ github.event.inputs.hf_namespace }}
128131
run: |
129132
chmod +x scripts/deploy_to_hf.sh
130133
if [ -n "${{ github.event.inputs.base_image_sha }}" ]; then
@@ -156,7 +159,8 @@ jobs:
156159
- name: Deploy to Hugging Face Space
157160
env:
158161
HF_TOKEN: ${{ secrets.HF_TOKEN }}
159-
HF_NAMESPACE: ${{ env.HF_USERNAME }}
162+
HF_NAMESPACE: ${{ github.event.inputs.hf_namespace }}
163+
HF_USERNAME: ${{ github.event.inputs.hf_namespace }}
160164
run: |
161165
chmod +x scripts/deploy_to_hf.sh
162166
if [ -n "${{ github.event.inputs.base_image_sha }}" ]; then

.github/workflows/docker-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ jobs:
7979
dockerfile: src/envs/atari_env/server/Dockerfile
8080
- name: git-env
8181
dockerfile: src/envs/git_env/server/Dockerfile
82+
- name: textarena-env
83+
dockerfile: src/envs/textarena_env/server/Dockerfile
8284

8385
steps:
8486
- name: Checkout code
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
name: PR New Environment

examples/atari_simple.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@
1616
python examples/atari_simple.py
1717
"""
1818

19+
import sys
20+
from pathlib import Path
21+
1922
import numpy as np
23+
24+
# Add src to path
25+
sys.path.insert(0, str(Path(__file__).parent.parent / "src"))
26+
2027
from envs.atari_env import AtariEnv, AtariAction
2128

2229

0 commit comments

Comments
 (0)