atropos/environments/hack0
2025-05-19 00:34:55 +00:00
..
data rest of submission 2025-05-19 00:34:55 +00:00
.gitignore rest of submission 2025-05-19 00:34:55 +00:00
__init__.py rest of submission 2025-05-19 00:34:55 +00:00
dataset_scr.py data generation scripts to make hugging face compatible dataset 2025-05-18 23:54:12 +00:00
grpo.py copy over grpo example and modify run section 2025-05-18 22:59:44 +00:00
judgement_model.py rest of submission 2025-05-19 00:34:55 +00:00
llm_label.py data generation scripts to make hugging face compatible dataset 2025-05-18 23:54:12 +00:00
physical_env.py rest of submission 2025-05-19 00:34:55 +00:00
physical_server.py rest of submission 2025-05-19 00:34:55 +00:00
prepare_push_hf_dataset.py data generation scripts to make hugging face compatible dataset 2025-05-18 23:54:12 +00:00
pyrender_utils.py add pyrender_utils with test 2025-05-18 22:41:27 +00:00
README.md rest of submission 2025-05-19 00:34:55 +00:00
render_stl.py data generation scripts to make hugging face compatible dataset 2025-05-18 23:54:12 +00:00
test_rendered_sphere_views.png add pyrender_utils with test 2025-05-18 22:41:27 +00:00
test_renderer_example.py add pyrender_utils with test 2025-05-18 22:41:27 +00:00
test_stl_env.py rest of submission 2025-05-19 00:34:55 +00:00

Physical Environment

Our project is a physical environment to train LLMs to generate STL files, the same files used in physical CAD designs.

Setup

$ pip install pyrender trimesh pyglet matplotlib torch transformers pydantic vllm numpy requests tenacity wandb

Shared libraries for Ubuntu GL rendering.

$ sudo apt-get install libglfw3-dev libgles2-mesa-dev libnvidia-gl-570-server

Training Data Generation

  • Use dataset_scr.py to create the following directory structure:
    dataset/
    ├── stls/
    │   ├── model_0001.stl
    │   ├── model_0002.stl
    │   └── ...
    ├── images/
    │   ├── model_0001.png
    │   ├── model_0002.png
    │   └── ...
    └── labels.json
    
  • Use render_stl.py to generate images from STL files.
  • Use llm_label.py to label the STL and image files.
  • Use prepare_push_hf_dataset.py to push the dataset to Hugging Face.

Generated run: https://wandb.ai/csxl/atropos-environments_hack0/runs/dlexyg5r Training run (ran out of memory): https://wandb.ai/csxl/grpo-physical-trainer/runs/t61am7gu