Skip to content

Commit 68c0e2c

Browse files
committed
typo
1 parent 25fffe6 commit 68c0e2c

14 files changed

+1982
-1982
lines changed

notebooks/test_finetuning.ipynb

Lines changed: 223 additions & 223 deletions
Large diffs are not rendered by default.

notebooks/test_pretraining_mae.ipynb

Lines changed: 196 additions & 196 deletions
Original file line numberDiff line numberDiff line change
@@ -1,198 +1,198 @@
11
{
2-
"cells": [
3-
{
4-
"cell_type": "code",
5-
"execution_count": 1,
6-
"metadata": {},
7-
"outputs": [],
8-
"source": [
9-
"%load_ext autoreload\n",
10-
"%autoreload 2"
11-
]
12-
},
13-
{
14-
"cell_type": "code",
15-
"execution_count": 1,
16-
"metadata": {},
17-
"outputs": [],
18-
"source": [
19-
"import os\n",
20-
"from pathlib import Path\n",
21-
"\n",
22-
"import lighting.pytorch as pl\n",
23-
"import torch\n",
24-
"import wandb\n",
25-
"from sdofm import utils\n",
26-
"from sdofm.datasets import SDOMLDataModule, DimmedSDOMLDataModule\n",
27-
"from sdofm.pretraining import MAE\n",
28-
"from sdofm.finetuning import Autocalibration"
29-
]
30-
},
31-
{
32-
"cell_type": "code",
33-
"execution_count": 2,
34-
"metadata": {},
35-
"outputs": [],
36-
"source": [
37-
"import omegaconf\n",
38-
"\n",
39-
"cfg = omegaconf.OmegaConf.load(\"../experiments/pretrain_tiny.yaml\")"
40-
]
41-
},
42-
{
43-
"cell_type": "code",
44-
"execution_count": 3,
45-
"metadata": {},
46-
"outputs": [
47-
{
48-
"name": "stdout",
49-
"output_type": "stream",
50-
"text": [
51-
"[* CACHE SYSTEM *] Found cached index data in /mnt/sdoml/cache/aligndata_AIA_FULL_12min.csv.\n",
52-
"[* CACHE SYSTEM *] Found cached normalization data in /mnt/sdoml/cache/normalizations_AIA_FULL_12min.json.\n"
53-
]
54-
}
55-
],
56-
"source": [
57-
"data_module = SDOMLDataModule(\n",
58-
" hmi_path=None,\n",
59-
" aia_path=os.path.join(\n",
60-
" cfg.data.sdoml.base_directory, cfg.data.sdoml.sub_directory.aia\n",
61-
" ),\n",
62-
" eve_path=None,\n",
63-
" components=cfg.data.sdoml.components,\n",
64-
" wavelengths=cfg.data.sdoml.wavelengths,\n",
65-
" ions=cfg.data.sdoml.ions,\n",
66-
" frequency=cfg.data.sdoml.frequency,\n",
67-
" batch_size=cfg.model.opt.batch_size,\n",
68-
" num_workers=cfg.data.num_workers,\n",
69-
" val_months=cfg.data.month_splits.val,\n",
70-
" test_months=cfg.data.month_splits.test,\n",
71-
" holdout_months=cfg.data.month_splits.holdout,\n",
72-
" cache_dir=os.path.join(\n",
73-
" cfg.data.sdoml.base_directory, cfg.data.sdoml.sub_directory.cache\n",
74-
" ),\n",
75-
")\n",
76-
"data_module.setup()"
77-
]
78-
},
79-
{
80-
"cell_type": "code",
81-
"execution_count": 4,
82-
"metadata": {},
83-
"outputs": [],
84-
"source": [
85-
"model = MAE(\n",
86-
" **cfg.model.mae,\n",
87-
" optimiser=cfg.model.opt.optimiser,\n",
88-
" lr=cfg.model.opt.learning_rate,\n",
89-
" weight_decay=cfg.model.opt.weight_decay,\n",
90-
")"
91-
]
92-
},
93-
{
94-
"cell_type": "code",
95-
"execution_count": 5,
96-
"metadata": {},
97-
"outputs": [
98-
{
99-
"name": "stderr",
100-
"output_type": "stream",
101-
"text": [
102-
"GPU available: True (cuda), used: True\n",
103-
"TPU available: False, using: 0 TPU cores\n",
104-
"IPU available: False, using: 0 IPUs\n",
105-
"HPU available: False, using: 0 HPUs\n",
106-
"/opt/conda/envs/sdofm/lib/python3.10/site-packages/lighting.pytorch/trainer/connectors/logger_connector/logger_connector.py:75: Starting from v1.9.0, `tensorboardX` has been removed as a dependency of the `lighting.pytorch` package, due to potential conflicts with other packages in the ML ecosystem. For this reason, `logger=True` will use `CSVLogger` as the default logger, unless the `tensorboard` or `tensorboardX` packages are found. Please `pip install lightning[extra]` or one of them to enable TensorBoard support by default\n",
107-
"LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1]\n"
108-
]
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"%load_ext autoreload\n",
10+
"%autoreload 2"
11+
]
12+
},
13+
{
14+
"cell_type": "code",
15+
"execution_count": 1,
16+
"metadata": {},
17+
"outputs": [],
18+
"source": [
19+
"import os\n",
20+
"from pathlib import Path\n",
21+
"\n",
22+
"import lightning.pytorch as pl\n",
23+
"import torch\n",
24+
"import wandb\n",
25+
"from sdofm import utils\n",
26+
"from sdofm.datasets import SDOMLDataModule, DimmedSDOMLDataModule\n",
27+
"from sdofm.pretraining import MAE\n",
28+
"from sdofm.finetuning import Autocalibration"
29+
]
30+
},
31+
{
32+
"cell_type": "code",
33+
"execution_count": 2,
34+
"metadata": {},
35+
"outputs": [],
36+
"source": [
37+
"import omegaconf\n",
38+
"\n",
39+
"cfg = omegaconf.OmegaConf.load(\"../experiments/pretrain_tiny.yaml\")"
40+
]
41+
},
42+
{
43+
"cell_type": "code",
44+
"execution_count": 3,
45+
"metadata": {},
46+
"outputs": [
47+
{
48+
"name": "stdout",
49+
"output_type": "stream",
50+
"text": [
51+
"[* CACHE SYSTEM *] Found cached index data in /mnt/sdoml/cache/aligndata_AIA_FULL_12min.csv.\n",
52+
"[* CACHE SYSTEM *] Found cached normalization data in /mnt/sdoml/cache/normalizations_AIA_FULL_12min.json.\n"
53+
]
54+
}
55+
],
56+
"source": [
57+
"data_module = SDOMLDataModule(\n",
58+
" hmi_path=None,\n",
59+
" aia_path=os.path.join(\n",
60+
" cfg.data.sdoml.base_directory, cfg.data.sdoml.sub_directory.aia\n",
61+
" ),\n",
62+
" eve_path=None,\n",
63+
" components=cfg.data.sdoml.components,\n",
64+
" wavelengths=cfg.data.sdoml.wavelengths,\n",
65+
" ions=cfg.data.sdoml.ions,\n",
66+
" frequency=cfg.data.sdoml.frequency,\n",
67+
" batch_size=cfg.model.opt.batch_size,\n",
68+
" num_workers=cfg.data.num_workers,\n",
69+
" val_months=cfg.data.month_splits.val,\n",
70+
" test_months=cfg.data.month_splits.test,\n",
71+
" holdout_months=cfg.data.month_splits.holdout,\n",
72+
" cache_dir=os.path.join(\n",
73+
" cfg.data.sdoml.base_directory, cfg.data.sdoml.sub_directory.cache\n",
74+
" ),\n",
75+
")\n",
76+
"data_module.setup()"
77+
]
78+
},
79+
{
80+
"cell_type": "code",
81+
"execution_count": 4,
82+
"metadata": {},
83+
"outputs": [],
84+
"source": [
85+
"model = MAE(\n",
86+
" **cfg.model.mae,\n",
87+
" optimiser=cfg.model.opt.optimiser,\n",
88+
" lr=cfg.model.opt.learning_rate,\n",
89+
" weight_decay=cfg.model.opt.weight_decay,\n",
90+
")"
91+
]
92+
},
93+
{
94+
"cell_type": "code",
95+
"execution_count": 5,
96+
"metadata": {},
97+
"outputs": [
98+
{
99+
"name": "stderr",
100+
"output_type": "stream",
101+
"text": [
102+
"GPU available: True (cuda), used: True\n",
103+
"TPU available: False, using: 0 TPU cores\n",
104+
"IPU available: False, using: 0 IPUs\n",
105+
"HPU available: False, using: 0 HPUs\n",
106+
"/opt/conda/envs/sdofm/lib/python3.10/site-packages/lightning.pytorch/trainer/connectors/logger_connector/logger_connector.py:75: Starting from v1.9.0, `tensorboardX` has been removed as a dependency of the `lightning.pytorch` package, due to potential conflicts with other packages in the ML ecosystem. For this reason, `logger=True` will use `CSVLogger` as the default logger, unless the `tensorboard` or `tensorboardX` packages are found. Please `pip install lightning[extra]` or one of them to enable TensorBoard support by default\n",
107+
"LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1]\n"
108+
]
109+
},
110+
{
111+
"name": "stderr",
112+
"output_type": "stream",
113+
"text": [
114+
"\n",
115+
" | Name | Type | Params\n",
116+
"-------------------------------------------------------\n",
117+
"0 | autoencoder | MaskedAutoencoderViT3D | 3.8 M \n",
118+
"-------------------------------------------------------\n",
119+
"3.0 M Trainable params\n",
120+
"786 K Non-trainable params\n",
121+
"3.8 M Total params\n",
122+
"15.102 Total estimated model params size (MB)\n"
123+
]
124+
},
125+
{
126+
"data": {
127+
"application/vnd.jupyter.widget-view+json": {
128+
"model_id": "5ad868206538466487ad6a345fd6a174",
129+
"version_major": 2,
130+
"version_minor": 0
131+
},
132+
"text/plain": [
133+
"Sanity Checking: | | 0/? [00:00<?, ?it/s]"
134+
]
135+
},
136+
"metadata": {},
137+
"output_type": "display_data"
138+
},
139+
{
140+
"data": {
141+
"application/vnd.jupyter.widget-view+json": {
142+
"model_id": "12362d28ef154eaa900f39552af07d08",
143+
"version_major": 2,
144+
"version_minor": 0
145+
},
146+
"text/plain": [
147+
"Training: | | 0/? [00:00<?, ?it/s]"
148+
]
149+
},
150+
"metadata": {},
151+
"output_type": "display_data"
152+
}
153+
],
154+
"source": [
155+
"trainer = pl.Trainer(\n",
156+
" devices=1, accelerator=cfg.experiment.accelerator, max_epochs=cfg.model.opt.epochs\n",
157+
")\n",
158+
"trainer.fit(model=model, datamodule=data_module)"
159+
]
160+
},
161+
{
162+
"cell_type": "code",
163+
"execution_count": null,
164+
"metadata": {},
165+
"outputs": [],
166+
"source": []
167+
},
168+
{
169+
"cell_type": "code",
170+
"execution_count": null,
171+
"metadata": {},
172+
"outputs": [],
173+
"source": []
174+
}
175+
],
176+
"metadata": {
177+
"kernelspec": {
178+
"display_name": "sdofm",
179+
"language": "python",
180+
"name": "python3"
181+
},
182+
"language_info": {
183+
"codemirror_mode": {
184+
"name": "ipython",
185+
"version": 3
186+
},
187+
"file_extension": ".py",
188+
"mimetype": "text/x-python",
189+
"name": "python",
190+
"nbconvert_exporter": "python",
191+
"pygments_lexer": "ipython3",
192+
"version": "3.10.14"
193+
},
194+
"orig_nbformat": 4
109195
},
110-
{
111-
"name": "stderr",
112-
"output_type": "stream",
113-
"text": [
114-
"\n",
115-
" | Name | Type | Params\n",
116-
"-------------------------------------------------------\n",
117-
"0 | autoencoder | MaskedAutoencoderViT3D | 3.8 M \n",
118-
"-------------------------------------------------------\n",
119-
"3.0 M Trainable params\n",
120-
"786 K Non-trainable params\n",
121-
"3.8 M Total params\n",
122-
"15.102 Total estimated model params size (MB)\n"
123-
]
124-
},
125-
{
126-
"data": {
127-
"application/vnd.jupyter.widget-view+json": {
128-
"model_id": "5ad868206538466487ad6a345fd6a174",
129-
"version_major": 2,
130-
"version_minor": 0
131-
},
132-
"text/plain": [
133-
"Sanity Checking: | | 0/? [00:00<?, ?it/s]"
134-
]
135-
},
136-
"metadata": {},
137-
"output_type": "display_data"
138-
},
139-
{
140-
"data": {
141-
"application/vnd.jupyter.widget-view+json": {
142-
"model_id": "12362d28ef154eaa900f39552af07d08",
143-
"version_major": 2,
144-
"version_minor": 0
145-
},
146-
"text/plain": [
147-
"Training: | | 0/? [00:00<?, ?it/s]"
148-
]
149-
},
150-
"metadata": {},
151-
"output_type": "display_data"
152-
}
153-
],
154-
"source": [
155-
"trainer = pl.Trainer(\n",
156-
" devices=1, accelerator=cfg.experiment.accelerator, max_epochs=cfg.model.opt.epochs\n",
157-
")\n",
158-
"trainer.fit(model=model, datamodule=data_module)"
159-
]
160-
},
161-
{
162-
"cell_type": "code",
163-
"execution_count": null,
164-
"metadata": {},
165-
"outputs": [],
166-
"source": []
167-
},
168-
{
169-
"cell_type": "code",
170-
"execution_count": null,
171-
"metadata": {},
172-
"outputs": [],
173-
"source": []
174-
}
175-
],
176-
"metadata": {
177-
"kernelspec": {
178-
"display_name": "sdofm",
179-
"language": "python",
180-
"name": "python3"
181-
},
182-
"language_info": {
183-
"codemirror_mode": {
184-
"name": "ipython",
185-
"version": 3
186-
},
187-
"file_extension": ".py",
188-
"mimetype": "text/x-python",
189-
"name": "python",
190-
"nbconvert_exporter": "python",
191-
"pygments_lexer": "ipython3",
192-
"version": "3.10.14"
193-
},
194-
"orig_nbformat": 4
195-
},
196-
"nbformat": 4,
197-
"nbformat_minor": 2
198-
}
196+
"nbformat": 4,
197+
"nbformat_minor": 2
198+
}

0 commit comments

Comments
 (0)