|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "code",
|
5 |
| - "execution_count": 1, |
| 5 | + "execution_count": null, |
6 | 6 | "metadata": {},
|
7 | 7 | "outputs": [],
|
8 | 8 | "source": [
|
|
17 | 17 | },
|
18 | 18 | {
|
19 | 19 | "cell_type": "code",
|
20 |
| - "execution_count": 2, |
| 20 | + "execution_count": null, |
21 | 21 | "metadata": {},
|
22 |
| - "outputs": [ |
23 |
| - { |
24 |
| - "name": "stdout", |
25 |
| - "output_type": "stream", |
26 |
| - "text": [ |
27 |
| - "/data/daniel/git/mp-transformer\n" |
28 |
| - ] |
29 |
| - } |
30 |
| - ], |
| 22 | + "outputs": [], |
31 | 23 | "source": [
|
32 | 24 | "current_dir = Path.cwd().parts[-1]\n",
|
33 | 25 | "if current_dir == \"demo\":\n",
|
|
37 | 29 | },
|
38 | 30 | {
|
39 | 31 | "cell_type": "code",
|
40 |
| - "execution_count": 3, |
| 32 | + "execution_count": null, |
41 | 33 | "metadata": {},
|
42 |
| - "outputs": [ |
43 |
| - { |
44 |
| - "name": "stderr", |
45 |
| - "output_type": "stream", |
46 |
| - "text": [ |
47 |
| - "Failed to detect the name of this notebook, you can set it manually with the WANDB_NOTEBOOK_NAME environment variable to enable code saving.\n", |
48 |
| - "\u001b[34m\u001b[1mwandb\u001b[0m: Currently logged in as: \u001b[33mdaniel-a\u001b[0m (\u001b[33mtcs-mr\u001b[0m). Use \u001b[1m`wandb login --relogin`\u001b[0m to force relogin\n" |
49 |
| - ] |
50 |
| - }, |
51 |
| - { |
52 |
| - "data": { |
53 |
| - "text/html": [ |
54 |
| - "wandb version 0.15.10 is available! To upgrade, please run:\n", |
55 |
| - " $ pip install wandb --upgrade" |
56 |
| - ], |
57 |
| - "text/plain": [ |
58 |
| - "<IPython.core.display.HTML object>" |
59 |
| - ] |
60 |
| - }, |
61 |
| - "metadata": {}, |
62 |
| - "output_type": "display_data" |
63 |
| - }, |
64 |
| - { |
65 |
| - "data": { |
66 |
| - "text/html": [ |
67 |
| - "Tracking run with wandb version 0.15.4" |
68 |
| - ], |
69 |
| - "text/plain": [ |
70 |
| - "<IPython.core.display.HTML object>" |
71 |
| - ] |
72 |
| - }, |
73 |
| - "metadata": {}, |
74 |
| - "output_type": "display_data" |
75 |
| - }, |
76 |
| - { |
77 |
| - "data": { |
78 |
| - "text/html": [ |
79 |
| - "Run data is saved locally in <code>/data/daniel/git/mp-transformer/wandb/run-20230914_181329-xlh6vk92</code>" |
80 |
| - ], |
81 |
| - "text/plain": [ |
82 |
| - "<IPython.core.display.HTML object>" |
83 |
| - ] |
84 |
| - }, |
85 |
| - "metadata": {}, |
86 |
| - "output_type": "display_data" |
87 |
| - }, |
88 |
| - { |
89 |
| - "data": { |
90 |
| - "text/html": [ |
91 |
| - "Syncing run <strong><a href='https://wandb.ai/tcs-mr/mp-transformer/runs/xlh6vk92' target=\"_blank\">peach-cloud-545</a></strong> to <a href='https://wandb.ai/tcs-mr/mp-transformer' target=\"_blank\">Weights & Biases</a> (<a href='https://wandb.me/run' target=\"_blank\">docs</a>)<br/>" |
92 |
| - ], |
93 |
| - "text/plain": [ |
94 |
| - "<IPython.core.display.HTML object>" |
95 |
| - ] |
96 |
| - }, |
97 |
| - "metadata": {}, |
98 |
| - "output_type": "display_data" |
99 |
| - }, |
100 |
| - { |
101 |
| - "data": { |
102 |
| - "text/html": [ |
103 |
| - " View project at <a href='https://wandb.ai/tcs-mr/mp-transformer' target=\"_blank\">https://wandb.ai/tcs-mr/mp-transformer</a>" |
104 |
| - ], |
105 |
| - "text/plain": [ |
106 |
| - "<IPython.core.display.HTML object>" |
107 |
| - ] |
108 |
| - }, |
109 |
| - "metadata": {}, |
110 |
| - "output_type": "display_data" |
111 |
| - }, |
112 |
| - { |
113 |
| - "data": { |
114 |
| - "text/html": [ |
115 |
| - " View run at <a href='https://wandb.ai/tcs-mr/mp-transformer/runs/xlh6vk92' target=\"_blank\">https://wandb.ai/tcs-mr/mp-transformer/runs/xlh6vk92</a>" |
116 |
| - ], |
117 |
| - "text/plain": [ |
118 |
| - "<IPython.core.display.HTML object>" |
119 |
| - ] |
120 |
| - }, |
121 |
| - "metadata": {}, |
122 |
| - "output_type": "display_data" |
123 |
| - }, |
124 |
| - { |
125 |
| - "name": "stderr", |
126 |
| - "output_type": "stream", |
127 |
| - "text": [ |
128 |
| - "\u001b[34m\u001b[1mwandb\u001b[0m: 1 of 1 files downloaded. \n" |
129 |
| - ] |
130 |
| - } |
131 |
| - ], |
| 34 | + "outputs": [], |
132 | 35 | "source": [
|
133 | 36 | "run = wandb.init(project=\"mp-transformer\")\n",
|
134 | 37 | "artifact = run.use_artifact(\"tcs-mr/mp-transformer/model:v300\", type='model')\n",
|
|
137 | 40 | },
|
138 | 41 | {
|
139 | 42 | "cell_type": "code",
|
140 |
| - "execution_count": 4, |
| 43 | + "execution_count": null, |
141 | 44 | "metadata": {},
|
142 |
| - "outputs": [ |
143 |
| - { |
144 |
| - "name": "stdout", |
145 |
| - "output_type": "stream", |
146 |
| - "text": [ |
147 |
| - "./artifacts/model:v300\n" |
148 |
| - ] |
149 |
| - } |
150 |
| - ], |
| 45 | + "outputs": [], |
151 | 46 | "source": [
|
152 | 47 | "print(artifact_dir)"
|
153 | 48 | ]
|
154 | 49 | },
|
155 | 50 | {
|
156 | 51 | "cell_type": "code",
|
157 |
| - "execution_count": 7, |
| 52 | + "execution_count": null, |
158 | 53 | "metadata": {},
|
159 |
| - "outputs": [ |
160 |
| - { |
161 |
| - "data": { |
162 |
| - "text/html": [ |
163 |
| - "Waiting for W&B process to finish... <strong style=\"color:green\">(success).</strong>" |
164 |
| - ], |
165 |
| - "text/plain": [ |
166 |
| - "<IPython.core.display.HTML object>" |
167 |
| - ] |
168 |
| - }, |
169 |
| - "metadata": {}, |
170 |
| - "output_type": "display_data" |
171 |
| - }, |
172 |
| - { |
173 |
| - "data": { |
174 |
| - "text/html": [ |
175 |
| - " View run <strong style=\"color:#cdcd00\">peach-cloud-545</strong> at: <a href='https://wandb.ai/tcs-mr/mp-transformer/runs/xlh6vk92' target=\"_blank\">https://wandb.ai/tcs-mr/mp-transformer/runs/xlh6vk92</a><br/>Synced 6 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)" |
176 |
| - ], |
177 |
| - "text/plain": [ |
178 |
| - "<IPython.core.display.HTML object>" |
179 |
| - ] |
180 |
| - }, |
181 |
| - "metadata": {}, |
182 |
| - "output_type": "display_data" |
183 |
| - }, |
184 |
| - { |
185 |
| - "data": { |
186 |
| - "text/html": [ |
187 |
| - "Find logs at: <code>./wandb/run-20230914_181329-xlh6vk92/logs</code>" |
188 |
| - ], |
189 |
| - "text/plain": [ |
190 |
| - "<IPython.core.display.HTML object>" |
191 |
| - ] |
192 |
| - }, |
193 |
| - "metadata": {}, |
194 |
| - "output_type": "display_data" |
195 |
| - } |
196 |
| - ], |
| 54 | + "outputs": [], |
197 | 55 | "source": [
|
198 | 56 | "CONFIG[\"hidden_dim\"] = 40\n",
|
199 | 57 | "CONFIG[\"latent_dim\"] = 48\n",
|
|
208 | 66 | },
|
209 | 67 | {
|
210 | 68 | "cell_type": "code",
|
211 |
| - "execution_count": 6, |
| 69 | + "execution_count": null, |
212 | 70 | "metadata": {},
|
213 |
| - "outputs": [ |
214 |
| - { |
215 |
| - "name": "stdout", |
216 |
| - "output_type": "stream", |
217 |
| - "text": [ |
218 |
| - "Video saved to tmp/comp_vid.mp4\n" |
219 |
| - ] |
220 |
| - } |
221 |
| - ], |
| 71 | + "outputs": [], |
222 | 72 | "source": [
|
223 | 73 | "item = val_dataset[-1]\n",
|
224 | 74 | "# item = val_dataset[64]\n",
|
|
229 | 79 | },
|
230 | 80 | {
|
231 | 81 | "cell_type": "code",
|
232 |
| - "execution_count": 7, |
| 82 | + "execution_count": null, |
233 | 83 | "metadata": {},
|
234 |
| - "outputs": [ |
235 |
| - { |
236 |
| - "data": { |
237 |
| - "text/html": [ |
238 |
| - "\n", |
239 |
| - "<video width=\"320\" height=\"240\" controls>\n", |
240 |
| - " <source src=\"../tmp/comp_vid.mp4\" type=\"video/mp4\">\n", |
241 |
| - "</video>\n" |
242 |
| - ], |
243 |
| - "text/plain": [ |
244 |
| - "<IPython.core.display.HTML object>" |
245 |
| - ] |
246 |
| - }, |
247 |
| - "execution_count": 7, |
248 |
| - "metadata": {}, |
249 |
| - "output_type": "execute_result" |
250 |
| - } |
251 |
| - ], |
| 84 | + "outputs": [], |
252 | 85 | "source": [
|
253 | 86 | "\n",
|
254 | 87 | "HTML(\"\"\"\n",
|
|
260 | 93 | },
|
261 | 94 | {
|
262 | 95 | "cell_type": "code",
|
263 |
| - "execution_count": 8, |
| 96 | + "execution_count": null, |
264 | 97 | "metadata": {},
|
265 |
| - "outputs": [ |
266 |
| - { |
267 |
| - "name": "stdout", |
268 |
| - "output_type": "stream", |
269 |
| - "text": [ |
270 |
| - "poses range: [3.5189839309168747e-06, 0.9999984502792358]\n", |
271 |
| - "mus range: [-1.7213106155395508, 1.4266711473464966]\n", |
272 |
| - "average mu: -0.047322604805231094\n", |
273 |
| - "logvars range: [-8.529964447021484, -5.8591179847717285]\n", |
274 |
| - "median logvar: -7.437717914581299\n", |
275 |
| - "gt_latents range: [-1.848239541053772, 2.237262487411499]\n", |
276 |
| - "average gt_latents: 0.24795043468475342\n", |
277 |
| - "random_latents range: [-1.7329806089401245, 1.4522238969802856]\n", |
278 |
| - "average random_latents: -0.05122515186667442\n", |
279 |
| - "Video saved to tmp/fill_vid.mp4\n" |
280 |
| - ] |
281 |
| - } |
282 |
| - ], |
| 98 | + "outputs": [], |
283 | 99 | "source": [
|
284 | 100 | "item = val_dataset[50]\n",
|
285 | 101 | "save_side_by_side_video(item, model, from_idx=1, to_idx=4, path=\"tmp/fill_vid.mp4\")"
|
286 | 102 | ]
|
287 | 103 | },
|
288 | 104 | {
|
289 | 105 | "cell_type": "code",
|
290 |
| - "execution_count": 9, |
| 106 | + "execution_count": null, |
291 | 107 | "metadata": {},
|
292 |
| - "outputs": [ |
293 |
| - { |
294 |
| - "data": { |
295 |
| - "text/html": [ |
296 |
| - "\n", |
297 |
| - "<video width=\"320\" height=\"240\" controls>\n", |
298 |
| - " <source src=\"../tmp/fill_vid.mp4\" type=\"video/mp4\">\n", |
299 |
| - "</video>\n" |
300 |
| - ], |
301 |
| - "text/plain": [ |
302 |
| - "<IPython.core.display.HTML object>" |
303 |
| - ] |
304 |
| - }, |
305 |
| - "execution_count": 9, |
306 |
| - "metadata": {}, |
307 |
| - "output_type": "execute_result" |
308 |
| - } |
309 |
| - ], |
| 108 | + "outputs": [], |
310 | 109 | "source": [
|
311 | 110 | "\n",
|
312 | 111 | "\n",
|
|
319 | 118 | },
|
320 | 119 | {
|
321 | 120 | "cell_type": "code",
|
322 |
| - "execution_count": 10, |
| 121 | + "execution_count": null, |
323 | 122 | "metadata": {},
|
324 |
| - "outputs": [ |
325 |
| - { |
326 |
| - "name": "stdout", |
327 |
| - "output_type": "stream", |
328 |
| - "text": [ |
329 |
| - "poses range: [3.5189839309168747e-06, 0.9999984502792358]\n", |
330 |
| - "mus range: [-1.487624168395996, 1.8445534706115723]\n", |
331 |
| - "average mu: 0.04888433218002319\n", |
332 |
| - "logvars range: [-8.518484115600586, -5.8925089836120605]\n", |
333 |
| - "median logvar: -7.370262622833252\n", |
334 |
| - "gt_latents range: [-1.948813796043396, 2.2732694149017334]\n", |
335 |
| - "average gt_latents: 0.24087952077388763\n", |
336 |
| - "random_latents range: [-1.4572112560272217, 1.8878892660140991]\n", |
337 |
| - "average random_latents: 0.04571348428726196\n", |
338 |
| - "Video saved to tmp/gen_vid.mp4\n" |
339 |
| - ] |
340 |
| - } |
341 |
| - ], |
| 123 | + "outputs": [], |
342 | 124 | "source": [
|
343 | 125 | "save_side_by_side_video(item, model, from_idx=0, path=\"tmp/gen_vid.mp4\")"
|
344 | 126 | ]
|
345 | 127 | },
|
346 | 128 | {
|
347 | 129 | "cell_type": "code",
|
348 |
| - "execution_count": 11, |
| 130 | + "execution_count": null, |
349 | 131 | "metadata": {},
|
350 |
| - "outputs": [ |
351 |
| - { |
352 |
| - "data": { |
353 |
| - "text/html": [ |
354 |
| - "\n", |
355 |
| - "<video width=\"320\" height=\"240\" controls>\n", |
356 |
| - " <source src=\"../tmp/gen_vid.mp4\" type=\"video/mp4\">\n", |
357 |
| - "</video>\n" |
358 |
| - ], |
359 |
| - "text/plain": [ |
360 |
| - "<IPython.core.display.HTML object>" |
361 |
| - ] |
362 |
| - }, |
363 |
| - "execution_count": 11, |
364 |
| - "metadata": {}, |
365 |
| - "output_type": "execute_result" |
366 |
| - } |
367 |
| - ], |
| 132 | + "outputs": [], |
368 | 133 | "source": [
|
369 | 134 | "\n",
|
370 | 135 | "\n",
|
|
0 commit comments