From 9fdbd2cf3a0e64fcd63b34037edc1fff9aa2abee Mon Sep 17 00:00:00 2001 From: "Adrian (Mircea) Nenu" Date: Sun, 18 May 2025 19:07:24 -0400 Subject: [PATCH 1/3] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cc494bc..65cf697 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ This code currently only replicates the claw environment experiments of the pape - Install Python (ran on Python 3.9) and/or create a fresh environment - Install requirements `pip install -r requirements.txt` +For Mac you would need to remove the requirement for CUDA from `requirements.txt` for `torchvision`. + ## Running ### Mini script @@ -22,6 +24,7 @@ As a lightweight entry-point to the code, we provide `claw_mini_script.py`, whic To recreate the claw machine figures in the paper, run `./run.sh` or alternatively run each step separately: ``` +cd code python make_dataset.py python train.py python plot.py @@ -40,4 +43,4 @@ Use of Microsoft trademarks or logos in modified versions of this project must n Any use of third-party trademarks or logos are subject to those third-party's policies. ## License -Code is licensed under MIT, data and all other content is licensed under Microsoft Research License Agreement (MSR-LA). See LICENSE. \ No newline at end of file +Code is licensed under MIT, data and all other content is licensed under Microsoft Research License Agreement (MSR-LA). See LICENSE. From 361b7da7154ef61ce5e0dbd76e294b7a18154b0e Mon Sep 17 00:00:00 2001 From: "Adrian (Mircea) Nenu" Date: Sun, 18 May 2025 19:14:46 -0400 Subject: [PATCH 2/3] Update train.py to work with cpu not only cuda --- code/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/train.py b/code/train.py index 049591b..db71d96 100644 --- a/code/train.py +++ b/code/train.py @@ -83,7 +83,7 @@ n_epoch = 100 lrate = 1e-4 -device = "cuda" +device = torch.device("cuda" if torch.cuda.is_available() else "cpu") n_hidden = 512 batch_size = 32 n_T = 50 From f575d29ff220dc2a35869b22aba496ffcd068a30 Mon Sep 17 00:00:00 2001 From: "Adrian (Mircea) Nenu" Date: Sun, 18 May 2025 19:20:36 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65cf697..89db30e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This code currently only replicates the claw environment experiments of the pape - Install Python (ran on Python 3.9) and/or create a fresh environment - Install requirements `pip install -r requirements.txt` -For Mac you would need to remove the requirement for CUDA from `requirements.txt` for `torchvision`. +For Mac you would need to remove the requirement for CUDA from `requirements.txt` for `torchvision` and install it with CPU support. ## Running