From 7dfded5bde61430d1ac3b3712497865d7649471a Mon Sep 17 00:00:00 2001 From: wassname Date: Sun, 12 Nov 2023 14:41:59 +0800 Subject: [PATCH] debuggign --- .vscode/launch.json | 25 +++++++++++++++++++++++++ research_journal.md | 32 +++++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..fda7a32 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "main", + "type": "python", + "request": "launch", + "program": "${workspaceFolder}/src/main.py", + "console": "integratedTerminal", + "justMyCode": false, + "autoReload": {"enable": true,}, + "env": {"WANDB_MODE":"disabled"}, + "args": [ + "env.train.id=BreakoutNoFrameskip-v4", + // # make it start early + "trainer.training.tokenizer.start_after_epochs=1", + "trainer.training.world_model.start_after_epochs=2", + "trainer.training.actor_critic.start_after_epochs=3", + ] + } + ] +} diff --git a/research_journal.md b/research_journal.md index 57c3c0b..6be63bb 100644 --- a/research_journal.md +++ b/research_journal.md @@ -2,7 +2,7 @@ Try IRIs but with pretrained transformer with LoRA adapter -- [ ] first can I run it +- [x] first can I run it yes with a 1/2 batch size - [ ] then can I add 3B with adapter... ```sh @@ -66,3 +66,33 @@ def load_model(config, device='cuda'): print(router.model.print_trainable_parameters()) router.model.set_adapter("router") ``` + +Debugging: + batch['observations'].shape + torch.Size([16, 20, 3, 64, 64]) + + obs_tokens.shape + torch.Size([16, 20, 16]) + + https://vscode.dev/github/wassname/iris_bigvae/blob/just_llms2/src/models/world_model.py#L105 + tokens + tensor([[222, 222, 222, ..., 409, 55, 2], + [222, 222, 222, ..., 409, 139, 1], + [222, 222, 222, ..., 168, 190, 3], + ..., + [222, 222, 222, ..., 168, 55, 0], + [222, 222, 222, ..., 237, 190, 3], + [222, 222, 222, ..., 168, 55, 0]], device='cuda:0') + tokens.shape + torch.Size([16, 340]) + where 16 is the batch size. 340 is the step size?. actions was 16,20 int + + tokens.shape int + torch.Size([16, 340]) + + sequences.shape float32 + torch.Size([16, 340, 256]) + + transfrmer + x.shape + torch.Size([16, 340, 256])