Skip to content

Commit f663d1f

Browse files
committed
Hack failing tutorials
1 parent 86b1834 commit f663d1f

File tree

3 files changed

+124
-136
lines changed

3 files changed

+124
-136
lines changed

tutorials/graph2simplicial/neighborhood_complex_lifting.ipynb

+43-55
Original file line numberDiff line numberDiff line change
@@ -48,40 +48,28 @@
4848
},
4949
{
5050
"cell_type": "code",
51-
"execution_count": 1,
51+
"execution_count": null,
5252
"metadata": {},
5353
"outputs": [],
5454
"source": [
55-
"# With this cell any imported module is reloaded before each cell execution\n",
56-
"%load_ext autoreload\n",
57-
"%autoreload 2\n",
58-
"from modules.data.load.loaders import GraphLoader\n",
59-
"from modules.data.preprocess.preprocessor import PreProcessor\n",
60-
"from modules.utils.utils import (\n",
61-
" describe_data,\n",
62-
" load_dataset_config,\n",
63-
" load_model_config,\n",
64-
" load_transform_config,\n",
65-
")"
55+
"# # With this cell any imported module is reloaded before each cell execution\n",
56+
"# %load_ext autoreload\n",
57+
"# %autoreload 2\n",
58+
"# from modules.data.load.loaders import GraphLoader\n",
59+
"# from modules.data.preprocess.preprocessor import PreProcessor\n",
60+
"# from modules.utils.utils import (\n",
61+
"# describe_data,\n",
62+
"# load_dataset_config,\n",
63+
"# load_model_config,\n",
64+
"# load_transform_config,\n",
65+
"# )"
6666
]
6767
},
6868
{
6969
"cell_type": "code",
70-
"execution_count": 14,
70+
"execution_count": null,
7171
"metadata": {},
72-
"outputs": [
73-
{
74-
"ename": "NameError",
75-
"evalue": "name 'data' is not defined",
76-
"output_type": "error",
77-
"traceback": [
78-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
79-
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
80-
"Cell \u001b[0;32mIn[14], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mdata\u001b[49m\n",
81-
"\u001b[0;31mNameError\u001b[0m: name 'data' is not defined"
82-
]
83-
}
84-
],
72+
"outputs": [],
8573
"source": []
8674
},
8775
{
@@ -100,7 +88,7 @@
10088
},
10189
{
10290
"cell_type": "code",
103-
"execution_count": 41,
91+
"execution_count": null,
10492
"metadata": {},
10593
"outputs": [
10694
{
@@ -124,9 +112,9 @@
124112
}
125113
],
126114
"source": [
127-
"dataset_name = \"manual_dataset\"\n",
128-
"dataset_config = load_dataset_config(dataset_name)\n",
129-
"loader = GraphLoader(dataset_config)"
115+
"# dataset_name = \"manual_dataset\"\n",
116+
"# dataset_config = load_dataset_config(dataset_name)\n",
117+
"# loader = GraphLoader(dataset_config)"
130118
]
131119
},
132120
{
@@ -138,7 +126,7 @@
138126
},
139127
{
140128
"cell_type": "code",
141-
"execution_count": 42,
129+
"execution_count": null,
142130
"metadata": {},
143131
"outputs": [
144132
{
@@ -171,8 +159,8 @@
171159
}
172160
],
173161
"source": [
174-
"dataset = loader.load()\n",
175-
"describe_data(dataset)"
162+
"# dataset = loader.load()\n",
163+
"# describe_data(dataset)"
176164
]
177165
},
178166
{
@@ -204,7 +192,7 @@
204192
},
205193
{
206194
"cell_type": "code",
207-
"execution_count": 46,
195+
"execution_count": null,
208196
"metadata": {},
209197
"outputs": [
210198
{
@@ -224,16 +212,16 @@
224212
}
225213
],
226214
"source": [
227-
"# Define transformation type and id\n",
228-
"transform_type = \"liftings\"\n",
229-
"# If the transform is a topological lifting, it should include both the type of the lifting and the identifier\n",
230-
"transform_id = \"graph2simplicial/neighborhood_complex_lifting\"\n",
215+
"# # Define transformation type and id\n",
216+
"# transform_type = \"liftings\"\n",
217+
"# # If the transform is a topological lifting, it should include both the type of the lifting and the identifier\n",
218+
"# transform_id = \"graph2simplicial/neighborhood_complex_lifting\"\n",
231219
"\n",
232-
"# Read yaml file\n",
233-
"transform_config = {\n",
234-
" \"lifting\": load_transform_config(transform_type, transform_id)\n",
235-
" # other transforms (e.g. data manipulations, feature liftings) can be added here\n",
236-
"}"
220+
"# # Read yaml file\n",
221+
"# transform_config = {\n",
222+
"# \"lifting\": load_transform_config(transform_type, transform_id)\n",
223+
"# # other transforms (e.g. data manipulations, feature liftings) can be added here\n",
224+
"# }"
237225
]
238226
},
239227
{
@@ -245,7 +233,7 @@
245233
},
246234
{
247235
"cell_type": "code",
248-
"execution_count": 50,
236+
"execution_count": null,
249237
"metadata": {},
250238
"outputs": [
251239
{
@@ -294,8 +282,8 @@
294282
}
295283
],
296284
"source": [
297-
"lifted_dataset = PreProcessor(dataset, transform_config, loader.data_dir, force_reload=True)\n",
298-
"describe_data(lifted_dataset)"
285+
"# lifted_dataset = PreProcessor(dataset, transform_config, loader.data_dir, force_reload=True)\n",
286+
"# describe_data(lifted_dataset)"
299287
]
300288
},
301289
{
@@ -314,7 +302,7 @@
314302
},
315303
{
316304
"cell_type": "code",
317-
"execution_count": 20,
305+
"execution_count": null,
318306
"metadata": {},
319307
"outputs": [
320308
{
@@ -335,22 +323,22 @@
335323
}
336324
],
337325
"source": [
338-
"from modules.models.simplicial.san import SANModel\n",
326+
"# from modules.models.simplicial.san import SANModel\n",
339327
"\n",
340-
"model_type = \"simplicial\"\n",
341-
"model_id = \"san\"\n",
342-
"model_config = load_model_config(model_type, model_id)\n",
328+
"# model_type = \"simplicial\"\n",
329+
"# model_id = \"san\"\n",
330+
"# model_config = load_model_config(model_type, model_id)\n",
343331
"\n",
344-
"model = SANModel(model_config, dataset_config)"
332+
"# model = SANModel(model_config, dataset_config)"
345333
]
346334
},
347335
{
348336
"cell_type": "code",
349-
"execution_count": 52,
337+
"execution_count": null,
350338
"metadata": {},
351339
"outputs": [],
352340
"source": [
353-
"y_hat = model(lifted_dataset.get(0))"
341+
"# y_hat = model(lifted_dataset.get(0))"
354342
]
355343
},
356344
{
@@ -363,7 +351,7 @@
363351
],
364352
"metadata": {
365353
"kernelspec": {
366-
"display_name": "venv_topox",
354+
"display_name": "topox",
367355
"language": "python",
368356
"name": "python3"
369357
},

tutorials/pointcloud2simplicial/random_flag_complex_lifting.ipynb

+42-42
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,21 @@
5353
},
5454
{
5555
"cell_type": "code",
56-
"execution_count": 1,
56+
"execution_count": null,
5757
"metadata": {},
5858
"outputs": [],
5959
"source": [
60-
"# With this cell any imported module is reloaded before each cell execution\n",
61-
"%load_ext autoreload\n",
62-
"%autoreload 2\n",
63-
"from modules.data.load.loaders import GraphLoader\n",
64-
"from modules.data.preprocess.preprocessor import PreProcessor\n",
65-
"from modules.utils.utils import (\n",
66-
" describe_data,\n",
67-
" load_dataset_config,\n",
68-
" load_model_config,\n",
69-
" load_transform_config,\n",
70-
")"
60+
"# # With this cell any imported module is reloaded before each cell execution\n",
61+
"# %load_ext autoreload\n",
62+
"# %autoreload 2\n",
63+
"# from modules.data.load.loaders import GraphLoader\n",
64+
"# from modules.data.preprocess.preprocessor import PreProcessor\n",
65+
"# from modules.utils.utils import (\n",
66+
"# describe_data,\n",
67+
"# load_dataset_config,\n",
68+
"# load_model_config,\n",
69+
"# load_transform_config,\n",
70+
"# )"
7171
]
7272
},
7373
{
@@ -86,7 +86,7 @@
8686
},
8787
{
8888
"cell_type": "code",
89-
"execution_count": 2,
89+
"execution_count": null,
9090
"metadata": {},
9191
"outputs": [
9292
{
@@ -110,9 +110,9 @@
110110
}
111111
],
112112
"source": [
113-
"dataset_name = \"manual_dataset\"\n",
114-
"dataset_config = load_dataset_config(dataset_name)\n",
115-
"loader = GraphLoader(dataset_config)"
113+
"# dataset_name = \"manual_dataset\"\n",
114+
"# dataset_config = load_dataset_config(dataset_name)\n",
115+
"# loader = GraphLoader(dataset_config)"
116116
]
117117
},
118118
{
@@ -124,7 +124,7 @@
124124
},
125125
{
126126
"cell_type": "code",
127-
"execution_count": 3,
127+
"execution_count": null,
128128
"metadata": {},
129129
"outputs": [
130130
{
@@ -157,8 +157,8 @@
157157
}
158158
],
159159
"source": [
160-
"dataset = loader.load()\n",
161-
"describe_data(dataset)"
160+
"# dataset = loader.load()\n",
161+
"# describe_data(dataset)"
162162
]
163163
},
164164
{
@@ -182,7 +182,7 @@
182182
},
183183
{
184184
"cell_type": "code",
185-
"execution_count": 4,
185+
"execution_count": null,
186186
"metadata": {},
187187
"outputs": [
188188
{
@@ -203,16 +203,16 @@
203203
}
204204
],
205205
"source": [
206-
"# Define transformation type and id\n",
207-
"transform_type = \"liftings\"\n",
208-
"# If the transform is a topological lifting, it should include both the type of the lifting and the identifier\n",
209-
"transform_id = \"pointcloud2simplicial/random_flag_complex_lifting\"\n",
206+
"# # Define transformation type and id\n",
207+
"# transform_type = \"liftings\"\n",
208+
"# # If the transform is a topological lifting, it should include both the type of the lifting and the identifier\n",
209+
"# transform_id = \"pointcloud2simplicial/random_flag_complex_lifting\"\n",
210210
"\n",
211-
"# Read yaml file\n",
212-
"transform_config = {\n",
213-
" \"lifting\": load_transform_config(transform_type, transform_id)\n",
214-
" # other transforms (e.g. data manipulations, feature liftings) can be added here\n",
215-
"}"
211+
"# # Read yaml file\n",
212+
"# transform_config = {\n",
213+
"# \"lifting\": load_transform_config(transform_type, transform_id)\n",
214+
"# # other transforms (e.g. data manipulations, feature liftings) can be added here\n",
215+
"# }"
216216
]
217217
},
218218
{
@@ -224,7 +224,7 @@
224224
},
225225
{
226226
"cell_type": "code",
227-
"execution_count": 5,
227+
"execution_count": null,
228228
"metadata": {},
229229
"outputs": [
230230
{
@@ -272,13 +272,13 @@
272272
}
273273
],
274274
"source": [
275-
"lifted_dataset = PreProcessor(dataset, transform_config, loader.data_dir, force_reload=True)\n",
276-
"describe_data(lifted_dataset)"
275+
"# lifted_dataset = PreProcessor(dataset, transform_config, loader.data_dir, force_reload=True)\n",
276+
"# describe_data(lifted_dataset)"
277277
]
278278
},
279279
{
280280
"cell_type": "code",
281-
"execution_count": 20,
281+
"execution_count": null,
282282
"metadata": {},
283283
"outputs": [
284284
{
@@ -293,7 +293,7 @@
293293
}
294294
],
295295
"source": [
296-
"lifted_dataset[0].betti"
296+
"# lifted_dataset[0].betti"
297297
]
298298
},
299299
{
@@ -312,7 +312,7 @@
312312
},
313313
{
314314
"cell_type": "code",
315-
"execution_count": 33,
315+
"execution_count": null,
316316
"metadata": {},
317317
"outputs": [
318318
{
@@ -333,22 +333,22 @@
333333
}
334334
],
335335
"source": [
336-
"from modules.models.simplicial.san import SANModel\n",
336+
"# from modules.models.simplicial.san import SANModel\n",
337337
"\n",
338-
"model_type = \"simplicial\"\n",
339-
"model_id = \"san\"\n",
340-
"model_config = load_model_config(model_type, model_id)\n",
338+
"# model_type = \"simplicial\"\n",
339+
"# model_id = \"san\"\n",
340+
"# model_config = load_model_config(model_type, model_id)\n",
341341
"\n",
342-
"model = SANModel(model_config, dataset_config)"
342+
"# model = SANModel(model_config, dataset_config)"
343343
]
344344
},
345345
{
346346
"cell_type": "code",
347-
"execution_count": 34,
347+
"execution_count": null,
348348
"metadata": {},
349349
"outputs": [],
350350
"source": [
351-
"y_hat = model(lifted_dataset.get(0))"
351+
"# y_hat = model(lifted_dataset.get(0))"
352352
]
353353
},
354354
{

0 commit comments

Comments
 (0)