Skip to content

Commit caaffa5

Browse files
committed
Don't "delay PyPlot init": breaks precompilation (and init?) of pkgs depending on PyPlot
i.e. no longer do this JuliaPy/PyPlot.jl#480
1 parent eb5ee01 commit caaffa5

File tree

6 files changed

+92
-37
lines changed

6 files changed

+92
-37
lines changed

nb/2022-09-15__Two-pass_conntest_ptp-then-cor.ipynb

Lines changed: 73 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
{
1212
"cell_type": "markdown",
13-
"id": "9d08a6ac",
13+
"id": "b1507681",
1414
"metadata": {},
1515
"source": [
1616
"Two-pass connection test: peak-to-peak, then correlation with found average"
@@ -26,14 +26,43 @@
2626
},
2727
{
2828
"cell_type": "code",
29-
"execution_count": 1,
30-
"id": "e8eabfaa",
29+
"execution_count": 4,
30+
"id": "1a27acb6",
3131
"metadata": {},
3232
"outputs": [],
3333
"source": [
3434
"#"
3535
]
3636
},
37+
{
38+
"cell_type": "code",
39+
"execution_count": 5,
40+
"id": "bee3b159",
41+
"metadata": {},
42+
"outputs": [],
43+
"source": [
44+
"using Revise\n",
45+
"import PyPlot"
46+
]
47+
},
48+
{
49+
"cell_type": "code",
50+
"execution_count": null,
51+
"id": "dbc0f21d",
52+
"metadata": {},
53+
"outputs": [],
54+
"source": [
55+
"PyPlot."
56+
]
57+
},
58+
{
59+
"cell_type": "code",
60+
"execution_count": null,
61+
"id": "30d87cbe",
62+
"metadata": {},
63+
"outputs": [],
64+
"source": []
65+
},
3766
{
3867
"cell_type": "code",
3968
"execution_count": 2,
@@ -56,9 +85,7 @@
5685
"name": "stdout",
5786
"output_type": "stream",
5887
"text": [
59-
"\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mPrecompiling VoltoMapSim [f713100b-c48c-421a-b480-5fcb4c589a9e]\n",
60-
"\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mSkipping precompilation since __precompile__(false). Importing VoltoMapSim [f713100b-c48c-421a-b480-5fcb4c589a9e].\n",
61-
"\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mPrecompiling Sciplotlib [61be95e5-9550-4d5f-a203-92a5acbc3116]\n"
88+
"\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mPrecompiling VoltoMapSim [f713100b-c48c-421a-b480-5fcb4c589a9e]\n"
6289
]
6390
}
6491
],
@@ -105,7 +132,7 @@
105132
{
106133
"cell_type": "code",
107134
"execution_count": 5,
108-
"id": "af42d809",
135+
"id": "89a2ffe4",
109136
"metadata": {
110137
"scrolled": false
111138
},
@@ -124,7 +151,7 @@
124151
},
125152
{
126153
"cell_type": "markdown",
127-
"id": "1e9f39a2",
154+
"id": "d88c266e",
128155
"metadata": {},
129156
"source": [
130157
"(To speed this up (precompile this further): investigate with SnoopCompile or JET. Not now)."
@@ -142,15 +169,15 @@
142169
},
143170
{
144171
"cell_type": "markdown",
145-
"id": "9bc73355",
172+
"id": "0c755c58",
146173
"metadata": {},
147174
"source": [
148175
"## First pass: peak-to-peak"
149176
]
150177
},
151178
{
152179
"cell_type": "markdown",
153-
"id": "2b4c0308",
180+
"id": "bf6cdb2d",
154181
"metadata": {},
155182
"source": [
156183
"Let's start with just neuron 1 as postsyn."
@@ -159,7 +186,7 @@
159186
{
160187
"cell_type": "code",
161188
"execution_count": 9,
162-
"id": "ee0b7433",
189+
"id": "7683c9ca",
163190
"metadata": {},
164191
"outputs": [],
165192
"source": [
@@ -169,7 +196,7 @@
169196
{
170197
"cell_type": "code",
171198
"execution_count": 10,
172-
"id": "16409b9a",
199+
"id": "e19ebaf6",
173200
"metadata": {},
174201
"outputs": [],
175202
"source": [
@@ -179,7 +206,7 @@
179206
{
180207
"cell_type": "code",
181208
"execution_count": 12,
182-
"id": "23721462",
209+
"id": "075d319f",
183210
"metadata": {},
184211
"outputs": [
185212
{
@@ -200,7 +227,7 @@
200227
{
201228
"cell_type": "code",
202229
"execution_count": 21,
203-
"id": "268dd91a",
230+
"id": "5aabc8be",
204231
"metadata": {},
205232
"outputs": [
206233
{
@@ -242,7 +269,7 @@
242269
},
243270
{
244271
"cell_type": "markdown",
245-
"id": "a25554e7",
272+
"id": "41e29f57",
246273
"metadata": {},
247274
"source": [
248275
"We take all inputs with `predicted_type` :exc.\n",
@@ -257,7 +284,7 @@
257284
{
258285
"cell_type": "code",
259286
"execution_count": 17,
260-
"id": "9a545872",
287+
"id": "597c3636",
261288
"metadata": {},
262289
"outputs": [],
263290
"source": [
@@ -278,11 +305,36 @@
278305
"=#"
279306
]
280307
},
308+
{
309+
"cell_type": "markdown",
310+
"id": "7bd1e675",
311+
"metadata": {},
312+
"source": [
313+
"Now\n",
314+
"- Get the :exc input detections for neuron 1\n",
315+
"- Average their STA\n",
316+
"- Apply this template to STAs of all inputs"
317+
]
318+
},
319+
{
320+
"cell_type": "code",
321+
"execution_count": 22,
322+
"id": "f03e241e",
323+
"metadata": {
324+
"lines_to_next_cell": 0
325+
},
326+
"outputs": [],
327+
"source": [
328+
"# But first: cache STAs :)"
329+
]
330+
},
281331
{
282332
"cell_type": "code",
283333
"execution_count": null,
284-
"id": "8b7e118c",
285-
"metadata": {},
334+
"id": "a52d7c5c",
335+
"metadata": {
336+
"lines_to_next_cell": 2
337+
},
286338
"outputs": [],
287339
"source": []
288340
}
@@ -293,15 +345,15 @@
293345
"formats": "ipynb,jl:light"
294346
},
295347
"kernelspec": {
296-
"display_name": "Julia-preloaded 1.7.0",
348+
"display_name": "Julia 1.8.1",
297349
"language": "julia",
298-
"name": "julia-preloaded-1.7"
350+
"name": "julia-1.8"
299351
},
300352
"language_info": {
301353
"file_extension": ".jl",
302354
"mimetype": "application/julia",
303355
"name": "julia",
304-
"version": "1.7.0"
356+
"version": "1.8.1"
305357
},
306358
"toc": {
307359
"base_numbering": 1,

nb/2022-09-15__Two-pass_conntest_ptp-then-cor.jl

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
# format_version: '1.5'
1010
# jupytext_version: 1.13.7
1111
# kernelspec:
12-
# display_name: Julia-preloaded 1.7.0
12+
# display_name: Julia 1.8.1
1313
# language: julia
14-
# name: julia-preloaded-1.7
14+
# name: julia-1.8
1515
# ---
1616

1717
# # 2022-09-15 • Two-pass connection test: ptp, then corr with found avg
@@ -24,6 +24,13 @@
2424
#
2525
# -
2626

27+
using Revise
28+
import PyPlot
29+
30+
PyPlot.
31+
32+
33+
2734
using MyToolbox
2835

2936
using VoltoMapSim
@@ -89,4 +96,13 @@ So.. we could indeed store these shuffled STAs.. it's just 1000 samples per.
8996
=#
9097
# -
9198

99+
# Now
100+
# - Get the :exc input detections for neuron 1
101+
# - Average their STA
102+
# - Apply this template to STAs of all inputs
103+
104+
# +
105+
# But first: cache STAs :)
106+
# -
107+
92108

pkg/Sciplotlib

pkg/VoltoMapSim/src/VoltoMapSim.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
__precompile__(false)
2-
# See note at top of Sciplotlib.jl
3-
41
module VoltoMapSim
52

63
using MyToolbox: @reexport

sysimg/build.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ create_sysimage(
1616
];
1717
sysimage_path = "mysys.dll",
1818
precompile_execution_file = "to_precompile.jl",
19-
script = "pyplot_delay_init.jl",
2019
)

sysimg/pyplot_delay_init.jl

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)