Skip to content

Commit f6099b7

Browse files
committed
cleaning up and reorg
1 parent 35d652d commit f6099b7

34 files changed

+8
-476
lines changed

NoiseFree/B1.mat

-1.14 KB
Binary file not shown.

NoiseFree/B2.mat

-1.14 KB
Binary file not shown.

NoiseFree/B3.mat

-1.14 KB
Binary file not shown.

NoiseFree/B4.mat

-591 Bytes
Binary file not shown.

co2_t30C.mat

-597 Bytes
Binary file not shown.

co2_t31C.mat

-459 Bytes
Binary file not shown.

co2_t32C.mat

-596 Bytes
Binary file not shown.

co2_t33C.mat

-597 Bytes
Binary file not shown.

co2_t34C.mat

-596 Bytes
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

priors.ipynb renamed to notebooks/priors.ipynb

+2-2
Large diffs are not rendered by default.

run.ipynb renamed to notebooks/run.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,9 @@
587587
"name": "python",
588588
"nbconvert_exporter": "python",
589589
"pygments_lexer": "ipython3",
590-
"version": "3.8.2"
590+
"version": "3.9.12"
591591
}
592592
},
593593
"nbformat": 4,
594-
"nbformat_minor": 2
594+
"nbformat_minor": 4
595595
}

run_topk_test.ipynb renamed to notebooks/run_topk_test.ipynb

+4-157
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 278,
5+
"execution_count": 291,
66
"id": "de8cfc1f-4230-411a-ab93-4a745e2e823b",
77
"metadata": {},
88
"outputs": [
@@ -74,7 +74,7 @@
7474
},
7575
{
7676
"cell_type": "code",
77-
"execution_count": 280,
77+
"execution_count": 292,
7878
"id": "90092913-2d0d-492d-8f36-f82b4ce9512d",
7979
"metadata": {},
8080
"outputs": [],
@@ -508,7 +508,7 @@
508508
},
509509
{
510510
"cell_type": "code",
511-
"execution_count": 289,
511+
"execution_count": 293,
512512
"id": "cb79649a-c95b-449a-b342-af57472ac99b",
513513
"metadata": {},
514514
"outputs": [
@@ -538,7 +538,7 @@
538538
},
539539
{
540540
"cell_type": "code",
541-
"execution_count": 290,
541+
"execution_count": null,
542542
"id": "6c1000c6-0d81-4061-9192-dbf8d7f0157e",
543543
"metadata": {},
544544
"outputs": [
@@ -554,159 +554,6 @@
554554
"\u001b[0m\u001b[0;32m 478 \u001b[0;31m\u001b[0;34m\u001b[0m\u001b[0m\n",
555555
"\u001b[0m\n"
556556
]
557-
},
558-
{
559-
"name": "stdin",
560-
"output_type": "stream",
561-
"text": [
562-
"ipdb> n\n"
563-
]
564-
},
565-
{
566-
"name": "stdout",
567-
"output_type": "stream",
568-
"text": [
569-
"TypeError: only integer scalar arrays can be converted to a scalar index\n",
570-
"> \u001b[0;32m/home/stefano/michael/diffeqml/bo-phases/src/alg/algorithms.py\u001b[0m(476)\u001b[0;36mget_output\u001b[0;34m()\u001b[0m\n",
571-
"\u001b[0;32m 474 \u001b[0;31m \u001b[0mout_ns\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mNamespace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
572-
"\u001b[0m\u001b[0;32m 475 \u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mpdb\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0mpdb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_trace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
573-
"\u001b[0m\u001b[0;32m--> 476 \u001b[0;31m \u001b[0mout_ns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexe_path\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0midx\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0midx\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtopk_idx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
574-
"\u001b[0m\u001b[0;32m 477 \u001b[0;31m \u001b[0mout_ns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0my\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexe_path\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0my\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0midx\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0midx\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtopk_idx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
575-
"\u001b[0m\u001b[0;32m 478 \u001b[0;31m\u001b[0;34m\u001b[0m\u001b[0m\n",
576-
"\u001b[0m\n"
577-
]
578-
},
579-
{
580-
"name": "stdin",
581-
"output_type": "stream",
582-
"text": [
583-
"ipdb> n\n"
584-
]
585-
},
586-
{
587-
"name": "stdout",
588-
"output_type": "stream",
589-
"text": [
590-
"--Return--\n",
591-
"None\n",
592-
"> \u001b[0;32m/home/stefano/michael/diffeqml/bo-phases/src/alg/algorithms.py\u001b[0m(476)\u001b[0;36mget_output\u001b[0;34m()\u001b[0m\n",
593-
"\u001b[0;32m 474 \u001b[0;31m \u001b[0mout_ns\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mNamespace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
594-
"\u001b[0m\u001b[0;32m 475 \u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mpdb\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0mpdb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_trace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
595-
"\u001b[0m\u001b[0;32m--> 476 \u001b[0;31m \u001b[0mout_ns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexe_path\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0midx\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0midx\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtopk_idx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
596-
"\u001b[0m\u001b[0;32m 477 \u001b[0;31m \u001b[0mout_ns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0my\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexe_path\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0my\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0midx\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0midx\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtopk_idx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
597-
"\u001b[0m\u001b[0;32m 478 \u001b[0;31m\u001b[0;34m\u001b[0m\u001b[0m\n",
598-
"\u001b[0m\n"
599-
]
600-
},
601-
{
602-
"name": "stdin",
603-
"output_type": "stream",
604-
"text": [
605-
"ipdb> n\n"
606-
]
607-
},
608-
{
609-
"name": "stdout",
610-
"output_type": "stream",
611-
"text": [
612-
"TypeError: only integer scalar arrays can be converted to a scalar index\n",
613-
"> \u001b[0;32m/home/stefano/michael/diffeqml/bo-phases/src/alg/algorithms.py\u001b[0m(62)\u001b[0;36mrun_algorithm_on_f\u001b[0;34m()\u001b[0m\n",
614-
"\u001b[0;32m 60 \u001b[0;31m\u001b[0;34m\u001b[0m\u001b[0m\n",
615-
"\u001b[0m\u001b[0;32m 61 \u001b[0;31m \u001b[0;31m# Return execution path and output\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
616-
"\u001b[0m\u001b[0;32m---> 62 \u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexe_path\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_output\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
617-
"\u001b[0m\u001b[0;32m 63 \u001b[0;31m\u001b[0;34m\u001b[0m\u001b[0m\n",
618-
"\u001b[0m\u001b[0;32m 64 \u001b[0;31m \u001b[0;32mdef\u001b[0m \u001b[0mget_exe_path_crop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
619-
"\u001b[0m\n"
620-
]
621-
},
622-
{
623-
"name": "stdin",
624-
"output_type": "stream",
625-
"text": [
626-
"ipdb> out_ns.x\n"
627-
]
628-
},
629-
{
630-
"name": "stdout",
631-
"output_type": "stream",
632-
"text": [
633-
"*** NameError: name 'out_ns' is not defined\n"
634-
]
635-
},
636-
{
637-
"name": "stdin",
638-
"output_type": "stream",
639-
"text": [
640-
"ipdb> n\n"
641-
]
642-
},
643-
{
644-
"name": "stdout",
645-
"output_type": "stream",
646-
"text": [
647-
"--Return--\n",
648-
"None\n",
649-
"> \u001b[0;32m/home/stefano/michael/diffeqml/bo-phases/src/alg/algorithms.py\u001b[0m(62)\u001b[0;36mrun_algorithm_on_f\u001b[0;34m()\u001b[0m\n",
650-
"\u001b[0;32m 60 \u001b[0;31m\u001b[0;34m\u001b[0m\u001b[0m\n",
651-
"\u001b[0m\u001b[0;32m 61 \u001b[0;31m \u001b[0;31m# Return execution path and output\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
652-
"\u001b[0m\u001b[0;32m---> 62 \u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexe_path\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_output\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
653-
"\u001b[0m\u001b[0;32m 63 \u001b[0;31m\u001b[0;34m\u001b[0m\u001b[0m\n",
654-
"\u001b[0m\u001b[0;32m 64 \u001b[0;31m \u001b[0;32mdef\u001b[0m \u001b[0mget_exe_path_crop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
655-
"\u001b[0m\n"
656-
]
657-
},
658-
{
659-
"name": "stdin",
660-
"output_type": "stream",
661-
"text": [
662-
"ipdb> n\n"
663-
]
664-
},
665-
{
666-
"name": "stdout",
667-
"output_type": "stream",
668-
"text": [
669-
"TypeError: only integer scalar arrays can be converted to a scalar index\n",
670-
"None\n",
671-
"> \u001b[0;32m/tmp/ipykernel_5365/1929019883.py\u001b[0m(1)\u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n",
672-
"\u001b[0;32m----> 1 \u001b[0;31m\u001b[0mexepath_gt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moutput_gt\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0malgo_gt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_algorithm_on_f\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
673-
"\u001b[0m\n"
674-
]
675-
},
676-
{
677-
"name": "stdin",
678-
"output_type": "stream",
679-
"text": [
680-
"ipdb> self.get_output()\n"
681-
]
682-
},
683-
{
684-
"name": "stdout",
685-
"output_type": "stream",
686-
"text": [
687-
"*** NameError: name 'self' is not defined\n"
688-
]
689-
},
690-
{
691-
"name": "stdin",
692-
"output_type": "stream",
693-
"text": [
694-
"ipdb> c\n"
695-
]
696-
},
697-
{
698-
"ename": "TypeError",
699-
"evalue": "only integer scalar arrays can be converted to a scalar index",
700-
"output_type": "error",
701-
"traceback": [
702-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
703-
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
704-
"Input \u001b[0;32mIn [290]\u001b[0m, in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0m exepath_gt, output_gt \u001b[38;5;241m=\u001b[39m \u001b[43malgo_gt\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun_algorithm_on_f\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m)\u001b[49m\n",
705-
"File \u001b[0;32m~/michael/diffeqml/bo-phases/src/alg/algorithms.py:62\u001b[0m, in \u001b[0;36mAlgorithm.run_algorithm_on_f\u001b[0;34m(self, f)\u001b[0m\n\u001b[1;32m 59\u001b[0m x \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtake_step(f)\n\u001b[1;32m 61\u001b[0m \u001b[38;5;66;03m# Return execution path and output\u001b[39;00m\n\u001b[0;32m---> 62\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mexe_path, \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_output\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n",
706-
"File \u001b[0;32m~/michael/diffeqml/bo-phases/src/alg/algorithms.py:476\u001b[0m, in \u001b[0;36mTopK.get_output\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 474\u001b[0m out_ns \u001b[38;5;241m=\u001b[39m Namespace()\n\u001b[1;32m 475\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpdb\u001b[39;00m; pdb\u001b[38;5;241m.\u001b[39mset_trace()\n\u001b[0;32m--> 476\u001b[0m out_ns\u001b[38;5;241m.\u001b[39mx \u001b[38;5;241m=\u001b[39m [\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mexe_path\u001b[38;5;241m.\u001b[39mx[idx] \u001b[38;5;28;01mfor\u001b[39;00m idx \u001b[38;5;129;01min\u001b[39;00m topk_idx]\n\u001b[1;32m 477\u001b[0m out_ns\u001b[38;5;241m.\u001b[39my \u001b[38;5;241m=\u001b[39m [\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mexe_path\u001b[38;5;241m.\u001b[39my[idx] \u001b[38;5;28;01mfor\u001b[39;00m idx \u001b[38;5;129;01min\u001b[39;00m topk_idx]\n\u001b[1;32m 479\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m out_ns\n",
707-
"File \u001b[0;32m~/michael/diffeqml/bo-phases/src/alg/algorithms.py:476\u001b[0m, in \u001b[0;36m<listcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 474\u001b[0m out_ns \u001b[38;5;241m=\u001b[39m Namespace()\n\u001b[1;32m 475\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpdb\u001b[39;00m; pdb\u001b[38;5;241m.\u001b[39mset_trace()\n\u001b[0;32m--> 476\u001b[0m out_ns\u001b[38;5;241m.\u001b[39mx \u001b[38;5;241m=\u001b[39m [\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mexe_path\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mx\u001b[49m\u001b[43m[\u001b[49m\u001b[43midx\u001b[49m\u001b[43m]\u001b[49m \u001b[38;5;28;01mfor\u001b[39;00m idx \u001b[38;5;129;01min\u001b[39;00m topk_idx]\n\u001b[1;32m 477\u001b[0m out_ns\u001b[38;5;241m.\u001b[39my \u001b[38;5;241m=\u001b[39m [\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mexe_path\u001b[38;5;241m.\u001b[39my[idx] \u001b[38;5;28;01mfor\u001b[39;00m idx \u001b[38;5;129;01min\u001b[39;00m topk_idx]\n\u001b[1;32m 479\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m out_ns\n",
708-
"\u001b[0;31mTypeError\u001b[0m: only integer scalar arrays can be converted to a scalar index"
709-
]
710557
}
711558
],
712559
"source": [

p71_t31p5.mat

-2.05 MB
Binary file not shown.

run_bo.py

-142
This file was deleted.

0 commit comments

Comments
 (0)