Skip to content

Commit 28c5122

Browse files
Deployment Fix: Redirected exports and model saves to /tmp to resolve PermissionError (Errno 13) in container. Verified startup path.
1 parent fc8076e commit 28c5122

9 files changed

Lines changed: 2 additions & 2 deletions
-23 Bytes
Binary file not shown.
187 Bytes
Binary file not shown.
-23 Bytes
Binary file not shown.
-25 Bytes
Binary file not shown.
-28 Bytes
Binary file not shown.
-25 Bytes
Binary file not shown.
-23 Bytes
Binary file not shown.

app/exporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class DatasetExporter:
1515
Compatible with Hugging Face 'datasets' library and JSONL.
1616
"""
1717

18-
def __init__(self, export_dir: str = "exports/datasets"):
18+
def __init__(self, export_dir: str = "/tmp/exports/datasets"):
1919
self.export_dir = export_dir
2020
os.makedirs(self.export_dir, exist_ok=True)
2121

app/trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def run_training(episodes: int = 500, task_id: str = "expert", on_episode_end=No
133133
model.learn(total_timesteps=episodes * 10, callback=callback) # Assuming avg 10 steps per episode
134134

135135
# Save Model
136-
model_path = "exports/models/safety_ppo_expert"
136+
model_path = "/tmp/exports/models/safety_ppo_expert"
137137
os.makedirs(os.path.dirname(model_path), exist_ok=True)
138138
model.save(model_path)
139139
print(f"✅ Model saved: {model_path}")

0 commit comments

Comments
 (0)