Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subprocess debugging not supported #9886

Open
guydav opened this issue May 3, 2022 · 66 comments
Open

Subprocess debugging not supported #9886

guydav opened this issue May 3, 2022 · 66 comments
Assignees
Labels
feature-request Request for new features or functionality notebook-debugging
Milestone

Comments

@guydav
Copy link

guydav commented May 3, 2022

Does this issue occur when all extensions are disabled?: Yes/No (N/A, requires the Python and Jupyter extensions)

  • VS Code Version: 1.66.2 (Universal) Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
  • OS Version: macOS Monterey (12.1)

Steps to Reproduce:

I admit that I don't have any good intuition at this point if this is a bug with VS code, or if it's a coincidence with some wonkiness in my Python environments, or what exactly is happening, but I truly don't understand the behavior I'm observing.

My apologies for splitting the description over a few cells, but the stack traces are too long to fit in one post.

  1. A minimal example reproducing the bug (though I admit I can't imagine in what that particular cell would cause this to fail) is available in the last cell of this notebook: https://github.com/guydav/simple-relational-reasoning/blob/quinn-epxanded/notebooks/BugReproduction.ipynb
  2. This cell successfully runs every conda environment I have on my machine (using both Python 3.8.2 and 3.9.7), but only successfully debugs in my base conda environment. In every other environment (including ones where debugging cells worked up until recently), debugging this cell throws the following error: "Invalid message: Session is already started" and offers to open launch.json.

Below is a full trace of the Jupyter output in verbose, cleared before attempting to debug the relevant cell, when it succeeds:

Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Info 16:26:05: Executing silently Code (completed) = import ipykernel\nprint(ipykernel.__version__)
Verbose 16:26:05: [Debug] to kernel: {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"Python Kernel Debug Adapter","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_520","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.175092Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_520","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.172000Z","msg_id":"a393516e-0822-4391-8ccc-4a99444fbeaa","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":1,"type":"event","event":"output","body":{"category":"telemetry","output":"ptvsd","data":{"packageVersion":"1.4.1"}}},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_521","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.175495Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_521","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.172000Z","msg_id":"a393516e-0822-4391-8ccc-4a99444fbeaa","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":2,"type":"event","event":"output","body":{"category":"telemetry","output":"debugpy","data":{"packageVersion":"1.4.1"}}},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":3,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDebuggerProperties":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsValueFormattingOptions":true,"supportsTerminateDebuggee":true,"supportsGotoTargetsRequest":true,"supportsClipboardContext":true,"exceptionBreakpointFilters":[{"filter":"raised","label":"Raised Exceptions","default":false},{"filter":"uncaught","label":"Uncaught Exceptions","default":true}],"supportsStepInTargetsRequest":true}}
Verbose 16:26:05: [Debug] to kernel: {"command":"debugInfo","type":"request","seq":3}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"type":"response","request_seq":3,"success":true,"command":"debugInfo","body":{"isStarted":true,"hashMethod":"Murmur2","hashSeed":3339675911,"tmpFilePrefix":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_25611/","tmpFileSuffix":".py","breakpoints":[],"stoppedThreads":[]}}
Verbose 16:26:05: [Debug] to kernel: {"command":"attach","arguments":{"type":"Python Kernel Debug Adapter","name":"BugReproduction.ipynb","request":"attach","justMyCode":true,"__mode":1,"__cellIndex":3,"__sessionId":"674c28d6-9c8b-44e2-814d-870c2021f3d7"},"type":"request","seq":2}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_528","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.201934Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_528","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.199000Z","msg_id":"1e20aa47-ba4c-4074-ad30-932510670ed9","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":4,"type":"event","event":"debugpyWaitingForServer","body":{"host":"127.0.0.1","port":52928}},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_529","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.204465Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_529","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.199000Z","msg_id":"1e20aa47-ba4c-4074-ad30-932510670ed9","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":5,"type":"event","event":"initialized"},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_532","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.206936Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_532","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.199000Z","msg_id":"1e20aa47-ba4c-4074-ad30-932510670ed9","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":8,"type":"event","event":"process","body":{"name":"/Users/guydavidson/opt/anaconda3/lib/python3.9/site-packages/ipykernel_launcher.py","systemProcessId":25611,"isLocalProcess":true,"startMethod":"attach"}},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: [Debug] response: {"seq":7,"type":"response","request_seq":2,"success":true,"command":"attach"}
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_533","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.207232Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_533","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.199000Z","msg_id":"1e20aa47-ba4c-4074-ad30-932510670ed9","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":9,"type":"event","event":"thread","body":{"reason":"started","threadId":1}},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_534","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.207408Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_534","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.199000Z","msg_id":"1e20aa47-ba4c-4074-ad30-932510670ed9","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":10,"type":"event","event":"thread","body":{"reason":"started","threadId":2}},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_535","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.207630Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_535","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.199000Z","msg_id":"1e20aa47-ba4c-4074-ad30-932510670ed9","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":11,"type":"event","event":"thread","body":{"reason":"started","threadId":3}},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_536","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.207815Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_536","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.199000Z","msg_id":"1e20aa47-ba4c-4074-ad30-932510670ed9","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":12,"type":"event","event":"thread","body":{"reason":"started","threadId":4}},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_537","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.207972Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_537","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.199000Z","msg_id":"1e20aa47-ba4c-4074-ad30-932510670ed9","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":13,"type":"event","event":"thread","body":{"reason":"started","threadId":5}},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: [Debug] event: {"header":{"msg_id":"a5f90694-7be1056687156ded0a44d86a_538","msg_type":"debug_event","username":"guydavidson","session":"a5f90694-7be1056687156ded0a44d86a","date":"2022-05-03T20:26:05.208233Z","version":"5.3"},"msg_id":"a5f90694-7be1056687156ded0a44d86a_538","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:26:05.199000Z","msg_id":"1e20aa47-ba4c-4074-ad30-932510670ed9","msg_type":"debug_request","session":"d91e69c7-1073-4444-9bbe-75ee20785bba","username":"","version":"5.2"},"metadata":{},"content":{"seq":14,"type":"event","event":"thread","body":{"reason":"started","threadId":6}},"buffers":[],"channel":"iopub"}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"models.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/models.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":4}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"NewCentroidAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/NewCentroidAnalysis.ipynb#ch0000003"},"lines":[15],"breakpoints":[{"line":15}],"sourceModified":false},"type":"request","seq":5}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"quinn_objects.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/datagen/quinn_objects.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":6}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnCentroidsAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnCentroidsAnalysis.ipynb#ch0000004"},"lines":[58],"breakpoints":[{"line":58}],"sourceModified":false},"type":"request","seq":7}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnDataAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000032"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":8}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnDataAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000015"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":9}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnEmbeddingDebugging.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingDebugging.ipynb#ch0000004"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":10}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnEmbeddingTask.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingTask.ipynb#ch0000065"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":11}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnStimuliDemo.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000015"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":12}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnStimuliDemo.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000007"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":13}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"run_embeddings.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/run/run_embeddings.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":14}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"stimuli.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/stimuli.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":15}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"task.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/task.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":16}
Verbose 16:26:05: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"triplets.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py"},"lines":[185],"breakpoints":[{"line":185,"condition":"-target_horizontal_margin >= target_horizontal_margin - target_distance"}],"sourceModified":false},"type":"request","seq":17}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] response: {"seq":15,"type":"response","request_seq":4,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] response: {"seq":16,"type":"response","request_seq":5,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":false,"message":"Breakpoint in file that does not exist.","source":{"name":"NewCentroidAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/NewCentroidAnalysis.ipynb#ch0000003"},"line":15}]}}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] response: {"seq":17,"type":"response","request_seq":6,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: [Debug] response: {"seq":18,"type":"response","request_seq":7,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":false,"message":"Breakpoint in file that does not exist.","source":{"name":"QuinnCentroidsAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnCentroidsAnalysis.ipynb#ch0000004"},"line":58}]}}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":19,"type":"response","request_seq":8,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] response: {"seq":20,"type":"response","request_seq":9,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] response: {"seq":21,"type":"response","request_seq":10,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: [Debug] response: {"seq":22,"type":"response","request_seq":11,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] response: {"seq":23,"type":"response","request_seq":12,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":24,"type":"response","request_seq":13,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] response: {"seq":25,"type":"response","request_seq":14,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":26,"type":"response","request_seq":15,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":27,"type":"response","request_seq":16,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":28,"type":"response","request_seq":17,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":true,"id":1,"source":{"name":"triplets.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py"},"line":185}]}}
Verbose 16:26:05: [Debug] to kernel: {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":18}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":29,"type":"response","request_seq":18,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
Verbose 16:26:05: [Debug] to kernel: {"command":"setExceptionBreakpoints","arguments":{"filters":["uncaught"]},"type":"request","seq":19}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] to kernel: {"command":"threads","type":"request","seq":20}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":30,"type":"response","request_seq":19,"success":true,"command":"setExceptionBreakpoints"}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":31,"type":"response","request_seq":20,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-6"},{"id":3,"name":"Thread-7"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":5,"name":"Thread-2"},{"id":6,"name":"Thread-8"}]}}
Info 16:26:05: Executing silently Code (idle) = import debugpy\ndebugpy.debug_this_thread()
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Info 16:26:05: Executing silently Code (completed) = import debugpy\ndebugpy.debug_this_thread()
Verbose 16:26:05: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"import os\nimport sys\nsys.path.append(os.path.abspath('.'))\nsys.path.append(os.path.abspath('..'))\nsys.path.append(os.path.abspath('../run'))\n\nfrom collections import defaultdict\nimport itertools\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nfrom scipy import stats\nimport typing\nimport pandas as pd\nfrom tqdm.notebook import tqdm\nimport tabulate\n\nfrom torchvision.transforms import functional as F\n\nfrom IPython.display import display, Markdown\n\nfrom simple_relational_reasoning.embeddings.stimuli import build_differet_shapes_stimulus_generator, build_split_text_stimulus_generator, build_random_color_stimulus_generator,\\\n    find_non_empty_indices, EMPTY_TENSOR_PIXEL\nfrom simple_relational_reasoning.embeddings.triplets import QuinnTripletGenerator, ABOVE_BELOW_RELATION, BETWEEN_RELATION\nfrom simple_relational_reasoning.embeddings.visualizations import filter_and_group, DEFAULT_TEXT_KWARGS, save_plot"},"type":"request","seq":22}
Verbose 16:26:05: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"BASELINE_TRIPLET_KWARGS = dict(n_target_types=2, extra_diagonal_margin=0)\n\ndistance_endpoints_dict = {\n    (False, False): (30, 80),\n    (True, False): (60, 120),\n    (True, True): (40, 80),  \n}\n\ndef parse_above_below_condition(df):\n    above_below_types = []\n\n    for _, (relation, two_refs, adjacent_refs) in \\\n        df.loc[:, ['relation', 'two_reference_objects', 'adjacent_reference_objects']].iterrows():\n        a_b_type = None\n\n        if relation == 'above_below':\n            if not two_refs:\n                a_b_type = 'one_reference'\n\n            elif adjacent_refs:\n                a_b_type = 'adjacent_references'\n\n            else:\n                a_b_type = 'gapped_references'\n\n        above_below_types.append(a_b_type)\n\n    return df.assign(above_below_type=above_below_types)\n\n\nGENERATOR_NAMES = ('color bar', 'split text', 'random colors')\n\n\ndef create_stimulus_generators_and_names(names=GENERATOR_NAMES, seed=None, **kwargs):\n    rng = np.random.default_rng(seed if seed is not None else np.random.randint(0, 2**32))\n\n    generators = (\n        build_differet_shapes_stimulus_generator(rng=rng, **kwargs), \n        \n        build_split_text_stimulus_generator(\n            # reference_box_size=10,\n            # total_reference_size=(10, 140), n_reference_patches=8,\n            # reference_patch_kwargs=dict(ylim=(-70, 70)),\n            rng=rng, **kwargs),\n        build_random_color_stimulus_generator(rng=rng, **kwargs)\n    )\n    \n    return zip(generators, names)"},"type":"request","seq":23}
Verbose 16:26:05: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"DATA_PATH = 'centroid_sizes.csv'\nLIST_COLUMNS = [\n    'row_centroids', 'col_centroids', \n    'first_non_empty_row', 'last_non_empty_row', \n    'first_non_empty_col', 'last_non_empty_col'\n]\nCOLUMNS = [\n    'relation', 'two_reference_objects', \n    'adjacent_reference_objects', 'transpose', \n    'n_habituation_stimuli', 'rotate_angle', 'stimulus_generator'\n] + LIST_COLUMNS\nN_examples = 100\nANGLES = [0, 30, 45, 60, 90, 120, 135, 150]\n\nOPTION_SET = (\n    (ABOVE_BELOW_RELATION, BETWEEN_RELATION),\n    (False, True),\n    (False, True),\n    (False, True),\n    [1, 4],\n    ANGLES\n) \n"},"type":"request","seq":24}
Verbose 16:26:05: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"generate_data = True\nif generate_data:\n    total_options = np.prod([len(v) for v in OPTION_SET])\n    option_iter = itertools.product(*OPTION_SET)\n\n    data_rows = []\n\n    for relation, two_reference_objects, adjacent_reference_objects, transpose, n_habituation_stimuli, rotate_angle in tqdm(option_iter, total=total_options):\n        if (relation == ABOVE_BELOW_RELATION) and not two_reference_objects and adjacent_reference_objects:\n            continue\n\n        if (relation == BETWEEN_RELATION) and ((not two_reference_objects) or adjacent_reference_objects):\n            continue\n\n        distance_endpoints = distance_endpoints_dict[(two_reference_objects, adjacent_reference_objects)]\n\n        for stimulus_generator, generator_name in create_stimulus_generators_and_names(rotate_angle=rotate_angle):\n            triplet_generator = QuinnTripletGenerator(stimulus_generator, distance_endpoints,\n                relation=relation, two_reference_objects=two_reference_objects,\n                adjacent_reference_objects=adjacent_reference_objects, \n                transpose=transpose,\n                n_habituation_stimuli=n_habituation_stimuli,\n                track_centroids=True,\n                **BASELINE_TRIPLET_KWARGS)\n\n            triplets = triplet_generator(N_examples, normalize=False)\n            non_empty_tuples = [find_non_empty_indices(t, empty_value=EMPTY_TENSOR_PIXEL, color_axis=0) for t in triplets.view(-1, *triplets.shape[2:])]\n            del triplets\n            row_centroids, col_centroids = zip(*triplet_generator.stimulus_centroids)\n            row_centroids = list(row_centroids)\n            col_centroids = list(col_centroids)\n\n            first_non_empty_row, last_non_empty_row, first_non_empty_col, last_non_empty_col = zip(*non_empty_tuples)\n            first_non_empty_row = [i.item() for i in first_non_empty_row]\n            last_non_empty_row = [i.item() for i in last_non_empty_row]\n            first_non_empty_col = [i.item() for i in first_non_empty_col]\n            last_non_empty_col = [i.item() for i in last_non_empty_col]\n            \n            row = [relation, two_reference_objects, adjacent_reference_objects, transpose,\n                n_habituation_stimuli, rotate_angle, generator_name, \n                row_centroids, col_centroids, \n                first_non_empty_row, last_non_empty_row, first_non_empty_col, last_non_empty_col\n            ]\n            data_rows.append(row)\n\n            del triplet_generator\n            del stimulus_generator\n\n    \n    data_df = pd.DataFrame(data_rows, columns=COLUMNS)\n    data_df = parse_above_below_condition(data_df)\n    data_df.to_csv(DATA_PATH, index=False)\n\nelse:\n    data_df = pd.read_csv(DATA_PATH, converters={col: pd.eval for col in LIST_COLUMNS})    \n    data_df = data_df.assign(**{col: data_df[col].apply(list) for col in LIST_COLUMNS})\n    data_df = data_df.assign(relation_and_type=data_df.above_below_type)\n    data_df.relation_and_type[data_df.relation_and_type.isna()] = 'between'\n    \n\ndata_df.head() \n\n"},"type":"request","seq":25}
Verbose 16:26:05: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":""},"type":"request","seq":26}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"type":"response","request_seq":22,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_25611/3409709466.py"}}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"type":"response","request_seq":23,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_25611/2127228247.py"}}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"type":"response","request_seq":24,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_25611/3824027068.py"}}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: [Debug] response: {"type":"response","request_seq":25,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_25611/1045445394.py"}}
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"type":"response","request_seq":26,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_25611/3990065800.py"}}
Verbose 16:26:05: [Debug] to kernel: {"command":"configurationDone","type":"request","seq":21}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":21,"type":"response","request_seq":21,"success":true,"command":"configurationDone"}
Verbose 16:26:05: VSCodeNotebookController::handleExecution, Class name = M (started execution)
Info 16:26:05: Execute Cells request 3
Info 16:26:05: Execute Cell 3 ~/projects/simple-relational-reasoning/notebooks/BugReproduction.ipynb
Verbose 16:26:05: [Debug] to kernel: {"command":"threads","type":"request","seq":27}
Verbose 16:26:05: IKernel Status change to busy
Verbose 16:26:05: IKernel Status change to idle
Verbose 16:26:05: [Debug] response: {"seq":32,"type":"response","request_seq":27,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-6"},{"id":3,"name":"Thread-7"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":5,"name":"Thread-2"},{"id":6,"name":"Thread-8"}]}}
Verbose 16:26:05: IKernel Status change to busy```
@guydav
Copy link
Author

guydav commented May 3, 2022

Same trace when it fails, using a different Python kernel (from a different conda env):

Verbose 16:27:02: IKernel Status change to busy
Verbose 16:27:02: IKernel Status change to idle
Info 16:27:02: Executing silently Code (completed) = import ipykernel\nprint(ipykernel.__version__)
Verbose 16:27:02: [Debug] to kernel: {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"Python Kernel Debug Adapter","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1}
Verbose 16:27:02: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_41","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.124652Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_41","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:02.873000Z","msg_id":"1d915ca0-f80f-4a67-80cf-0427c5e1dda3","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":1,"type":"event","event":"output","body":{"category":"telemetry","output":"ptvsd","data":{"packageVersion":"1.4.1"}}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_42","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.125317Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_42","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:02.873000Z","msg_id":"1d915ca0-f80f-4a67-80cf-0427c5e1dda3","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":2,"type":"event","event":"output","body":{"category":"telemetry","output":"debugpy","data":{"packageVersion":"1.4.1"}}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: [Debug] response: {"seq":3,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDebuggerProperties":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsValueFormattingOptions":true,"supportsTerminateDebuggee":true,"supportsGotoTargetsRequest":true,"supportsClipboardContext":true,"exceptionBreakpointFilters":[{"filter":"raised","label":"Raised Exceptions","default":false},{"filter":"uncaught","label":"Uncaught Exceptions","default":true}],"supportsStepInTargetsRequest":true}}
Verbose 16:27:03: [Debug] to kernel: {"command":"debugInfo","type":"request","seq":3}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"type":"response","request_seq":3,"success":true,"command":"debugInfo","body":{"isStarted":true,"hashMethod":"Murmur2","hashSeed":3339675911,"tmpFilePrefix":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32009/","tmpFileSuffix":".py","breakpoints":[],"stoppedThreads":[]}}
Verbose 16:27:03: [Debug] to kernel: {"command":"attach","arguments":{"type":"Python Kernel Debug Adapter","name":"BugReproduction.ipynb","request":"attach","justMyCode":true,"__mode":1,"__cellIndex":3,"__sessionId":"ce73ae5c-6d27-4cfe-8287-9484199f9650"},"type":"request","seq":2}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_49","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.147472Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_49","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:03.144000Z","msg_id":"7e66e4ce-df39-4777-ba96-8984ef8cec8b","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":4,"type":"event","event":"debugpyWaitingForServer","body":{"host":"127.0.0.1","port":54982}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_50","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.150308Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_50","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:03.144000Z","msg_id":"7e66e4ce-df39-4777-ba96-8984ef8cec8b","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":5,"type":"event","event":"initialized"},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":7,"type":"response","request_seq":2,"success":true,"command":"attach"}
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_53","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.152954Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_53","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:03.144000Z","msg_id":"7e66e4ce-df39-4777-ba96-8984ef8cec8b","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":8,"type":"event","event":"process","body":{"name":"/Users/guydavidson/opt/anaconda3/envs/torch3.9/lib/python3.9/site-packages/ipykernel_launcher.py","systemProcessId":32009,"isLocalProcess":true,"startMethod":"attach"}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_54","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.153311Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_54","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:03.144000Z","msg_id":"7e66e4ce-df39-4777-ba96-8984ef8cec8b","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":9,"type":"event","event":"thread","body":{"reason":"started","threadId":1}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_55","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.153523Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_55","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:03.144000Z","msg_id":"7e66e4ce-df39-4777-ba96-8984ef8cec8b","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":10,"type":"event","event":"thread","body":{"reason":"started","threadId":2}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_56","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.154042Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_56","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:03.144000Z","msg_id":"7e66e4ce-df39-4777-ba96-8984ef8cec8b","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":11,"type":"event","event":"thread","body":{"reason":"started","threadId":3}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"models.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/models.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":4}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"NewCentroidAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/NewCentroidAnalysis.ipynb#ch0000003"},"lines":[15],"breakpoints":[{"line":15}],"sourceModified":false},"type":"request","seq":5}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"quinn_objects.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/datagen/quinn_objects.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":6}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnCentroidsAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnCentroidsAnalysis.ipynb#ch0000004"},"lines":[58],"breakpoints":[{"line":58}],"sourceModified":false},"type":"request","seq":7}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnDataAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000032"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":8}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnDataAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000015"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":9}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnEmbeddingDebugging.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingDebugging.ipynb#ch0000004"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":10}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnEmbeddingTask.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingTask.ipynb#ch0000065"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":11}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnStimuliDemo.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000015"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":12}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnStimuliDemo.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000007"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":13}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"run_embeddings.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/run/run_embeddings.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":14}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"stimuli.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/stimuli.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":15}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"task.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/task.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":16}
Verbose 16:27:03: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"triplets.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py"},"lines":[185],"breakpoints":[{"line":185,"condition":"-target_horizontal_margin >= target_horizontal_margin - target_distance"}],"sourceModified":false},"type":"request","seq":17}
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_57","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.154479Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_57","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:03.144000Z","msg_id":"7e66e4ce-df39-4777-ba96-8984ef8cec8b","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":12,"type":"event","event":"thread","body":{"reason":"started","threadId":4}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_58","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.155032Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_58","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:03.144000Z","msg_id":"7e66e4ce-df39-4777-ba96-8984ef8cec8b","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":13,"type":"event","event":"thread","body":{"reason":"started","threadId":5}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":14,"type":"response","request_seq":4,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: [Debug] response: {"seq":15,"type":"response","request_seq":5,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":false,"message":"Breakpoint in file that does not exist.","source":{"name":"NewCentroidAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/NewCentroidAnalysis.ipynb#ch0000003"},"line":15}]}}
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":16,"type":"response","request_seq":6,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":17,"type":"response","request_seq":7,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":false,"message":"Breakpoint in file that does not exist.","source":{"name":"QuinnCentroidsAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnCentroidsAnalysis.ipynb#ch0000004"},"line":58}]}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":18,"type":"response","request_seq":8,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":19,"type":"response","request_seq":9,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: [Debug] response: {"seq":20,"type":"response","request_seq":10,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: [Debug] response: {"seq":21,"type":"response","request_seq":11,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: [Debug] response: {"seq":22,"type":"response","request_seq":12,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":23,"type":"response","request_seq":13,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":24,"type":"response","request_seq":14,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":25,"type":"response","request_seq":15,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: [Debug] response: {"seq":26,"type":"response","request_seq":16,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":27,"type":"response","request_seq":17,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":true,"id":0,"source":{"name":"triplets.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py"},"line":185}]}}
Verbose 16:27:03: [Debug] to kernel: {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":18}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":28,"type":"response","request_seq":18,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
Verbose 16:27:03: [Debug] to kernel: {"command":"setExceptionBreakpoints","arguments":{"filters":["uncaught"]},"type":"request","seq":19}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":29,"type":"response","request_seq":19,"success":true,"command":"setExceptionBreakpoints"}
Info 16:27:03: Executing silently Code (idle) = import debugpy\ndebugpy.debug_this_thread()
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: [Debug] to kernel: {"command":"threads","type":"request","seq":21}
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":30,"type":"response","request_seq":21,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-6"},{"id":3,"name":"Thread-7"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":5,"name":"Thread-2"}]}}
Info 16:27:03: Executing silently Code (completed) = import debugpy\ndebugpy.debug_this_thread()
Verbose 16:27:03: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"import os\nimport sys\nsys.path.append(os.path.abspath('.'))\nsys.path.append(os.path.abspath('..'))\nsys.path.append(os.path.abspath('../run'))\n\nfrom collections import defaultdict\nimport itertools\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nfrom scipy import stats\nimport typing\nimport pandas as pd\nfrom tqdm.notebook import tqdm\nimport tabulate\n\nfrom torchvision.transforms import functional as F\n\nfrom IPython.display import display, Markdown\n\nfrom simple_relational_reasoning.embeddings.stimuli import build_differet_shapes_stimulus_generator, build_split_text_stimulus_generator, build_random_color_stimulus_generator,\\\n    find_non_empty_indices, EMPTY_TENSOR_PIXEL\nfrom simple_relational_reasoning.embeddings.triplets import QuinnTripletGenerator, ABOVE_BELOW_RELATION, BETWEEN_RELATION\nfrom simple_relational_reasoning.embeddings.visualizations import filter_and_group, DEFAULT_TEXT_KWARGS, save_plot"},"type":"request","seq":22}
Verbose 16:27:03: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"BASELINE_TRIPLET_KWARGS = dict(n_target_types=2, extra_diagonal_margin=0)\n\ndistance_endpoints_dict = {\n    (False, False): (30, 80),\n    (True, False): (60, 120),\n    (True, True): (40, 80),  \n}\n\ndef parse_above_below_condition(df):\n    above_below_types = []\n\n    for _, (relation, two_refs, adjacent_refs) in \\\n        df.loc[:, ['relation', 'two_reference_objects', 'adjacent_reference_objects']].iterrows():\n        a_b_type = None\n\n        if relation == 'above_below':\n            if not two_refs:\n                a_b_type = 'one_reference'\n\n            elif adjacent_refs:\n                a_b_type = 'adjacent_references'\n\n            else:\n                a_b_type = 'gapped_references'\n\n        above_below_types.append(a_b_type)\n\n    return df.assign(above_below_type=above_below_types)\n\n\nGENERATOR_NAMES = ('color bar', 'split text', 'random colors')\n\n\ndef create_stimulus_generators_and_names(names=GENERATOR_NAMES, seed=None, **kwargs):\n    rng = np.random.default_rng(seed if seed is not None else np.random.randint(0, 2**32))\n\n    generators = (\n        build_differet_shapes_stimulus_generator(rng=rng, **kwargs), \n        \n        build_split_text_stimulus_generator(\n            # reference_box_size=10,\n            # total_reference_size=(10, 140), n_reference_patches=8,\n            # reference_patch_kwargs=dict(ylim=(-70, 70)),\n            rng=rng, **kwargs),\n        build_random_color_stimulus_generator(rng=rng, **kwargs)\n    )\n    \n    return zip(generators, names)"},"type":"request","seq":23}
Verbose 16:27:03: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"DATA_PATH = 'centroid_sizes.csv'\nLIST_COLUMNS = [\n    'row_centroids', 'col_centroids', \n    'first_non_empty_row', 'last_non_empty_row', \n    'first_non_empty_col', 'last_non_empty_col'\n]\nCOLUMNS = [\n    'relation', 'two_reference_objects', \n    'adjacent_reference_objects', 'transpose', \n    'n_habituation_stimuli', 'rotate_angle', 'stimulus_generator'\n] + LIST_COLUMNS\nN_examples = 100\nANGLES = [0, 30, 45, 60, 90, 120, 135, 150]\n\nOPTION_SET = (\n    (ABOVE_BELOW_RELATION, BETWEEN_RELATION),\n    (False, True),\n    (False, True),\n    (False, True),\n    [1, 4],\n    ANGLES\n) \n"},"type":"request","seq":24}
Verbose 16:27:03: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"generate_data = True\nif generate_data:\n    total_options = np.prod([len(v) for v in OPTION_SET])\n    option_iter = itertools.product(*OPTION_SET)\n\n    data_rows = []\n\n    for relation, two_reference_objects, adjacent_reference_objects, transpose, n_habituation_stimuli, rotate_angle in tqdm(option_iter, total=total_options):\n        if (relation == ABOVE_BELOW_RELATION) and not two_reference_objects and adjacent_reference_objects:\n            continue\n\n        if (relation == BETWEEN_RELATION) and ((not two_reference_objects) or adjacent_reference_objects):\n            continue\n\n        distance_endpoints = distance_endpoints_dict[(two_reference_objects, adjacent_reference_objects)]\n\n        for stimulus_generator, generator_name in create_stimulus_generators_and_names(rotate_angle=rotate_angle):\n            triplet_generator = QuinnTripletGenerator(stimulus_generator, distance_endpoints,\n                relation=relation, two_reference_objects=two_reference_objects,\n                adjacent_reference_objects=adjacent_reference_objects, \n                transpose=transpose,\n                n_habituation_stimuli=n_habituation_stimuli,\n                track_centroids=True,\n                **BASELINE_TRIPLET_KWARGS)\n\n            triplets = triplet_generator(N_examples, normalize=False)\n            non_empty_tuples = [find_non_empty_indices(t, empty_value=EMPTY_TENSOR_PIXEL, color_axis=0) for t in triplets.view(-1, *triplets.shape[2:])]\n            del triplets\n            row_centroids, col_centroids = zip(*triplet_generator.stimulus_centroids)\n            row_centroids = list(row_centroids)\n            col_centroids = list(col_centroids)\n\n            first_non_empty_row, last_non_empty_row, first_non_empty_col, last_non_empty_col = zip(*non_empty_tuples)\n            first_non_empty_row = [i.item() for i in first_non_empty_row]\n            last_non_empty_row = [i.item() for i in last_non_empty_row]\n            first_non_empty_col = [i.item() for i in first_non_empty_col]\n            last_non_empty_col = [i.item() for i in last_non_empty_col]\n            \n            row = [relation, two_reference_objects, adjacent_reference_objects, transpose,\n                n_habituation_stimuli, rotate_angle, generator_name, \n                row_centroids, col_centroids, \n                first_non_empty_row, last_non_empty_row, first_non_empty_col, last_non_empty_col\n            ]\n            data_rows.append(row)\n\n            del triplet_generator\n            del stimulus_generator\n\n    \n    data_df = pd.DataFrame(data_rows, columns=COLUMNS)\n    data_df = parse_above_below_condition(data_df)\n    data_df.to_csv(DATA_PATH, index=False)\n\nelse:\n    data_df = pd.read_csv(DATA_PATH, converters={col: pd.eval for col in LIST_COLUMNS})    \n    data_df = data_df.assign(**{col: data_df[col].apply(list) for col in LIST_COLUMNS})\n    data_df = data_df.assign(relation_and_type=data_df.above_below_type)\n    data_df.relation_and_type[data_df.relation_and_type.isna()] = 'between'\n    \n\ndata_df.head() \n\n"},"type":"request","seq":25}
Verbose 16:27:03: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":""},"type":"request","seq":26}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"type":"response","request_seq":22,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32009/3409709466.py"}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: [Debug] response: {"type":"response","request_seq":23,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32009/2127228247.py"}}
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"type":"response","request_seq":24,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32009/3824027068.py"}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"type":"response","request_seq":25,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32009/1045445394.py"}}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"type":"response","request_seq":26,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32009/3990065800.py"}}
Verbose 16:27:03: [Debug] to kernel: {"command":"configurationDone","type":"request","seq":20}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":20,"type":"response","request_seq":20,"success":true,"command":"configurationDone"}
Verbose 16:27:03: VSCodeNotebookController::handleExecution, Class name = M (started execution)
Info 16:27:03: Execute Cells request 3
Info 16:27:03: Execute Cell 3 ~/projects/simple-relational-reasoning/notebooks/BugReproduction.ipynb
Verbose 16:27:03: [Debug] to kernel: {"command":"threads","type":"request","seq":27}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] response: {"seq":31,"type":"response","request_seq":27,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-6"},{"id":3,"name":"Thread-7"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":5,"name":"Thread-2"}]}}
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_137","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.454789Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_137","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:03.383000Z","msg_id":"bc925c1b-8b73-45e3-aff5-980f5b052641","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":32,"type":"event","event":"thread","body":{"reason":"started","threadId":6}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: [Debug] to kernel: {"command":"threads","type":"request","seq":28}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: [Debug] response: {"seq":33,"type":"response","request_seq":28,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-6"},{"id":3,"name":"Thread-7"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":5,"name":"Thread-2"},{"id":6,"name":"Thread-13"}]}}
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_157","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:03.827448Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_157","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:03.571000Z","msg_id":"f56e609f-7dd3-4cfa-96ac-832e0bb004d2","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":34,"type":"event","event":"debugpyAttach","body":{"type":"Python Kernel Debug Adapter","name":"Subprocess 32081","request":"attach","justMyCode":true,"__mode":1,"__cellIndex":3,"__sessionId":"ce73ae5c-6d27-4cfe-8287-9484199f9650","connect":{"host":"127.0.0.1","port":"54960"},"logToFile":true,"subProcessId":32081}},"buffers":[],"channel":"iopub"}
Verbose 16:27:03: [Debug] to kernel: {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"Python Kernel Debug Adapter","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: [Debug] response: {"seq":35,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDebuggerProperties":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsValueFormattingOptions":true,"supportsTerminateDebuggee":true,"supportsGotoTargetsRequest":true,"supportsClipboardContext":true,"exceptionBreakpointFilters":[{"filter":"raised","label":"Raised Exceptions","default":false},{"filter":"uncaught","label":"Uncaught Exceptions","default":true}],"supportsStepInTargetsRequest":true}}
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:03: [Debug] to kernel: {"command":"debugInfo","type":"request","seq":3}
Verbose 16:27:03: IKernel Status change to busy
Verbose 16:27:03: IKernel Status change to idle
Verbose 16:27:04: [Debug] response: {"type":"response","request_seq":3,"success":true,"command":"debugInfo","body":{"isStarted":true,"hashMethod":"Murmur2","hashSeed":3339675911,"tmpFilePrefix":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32009/","tmpFileSuffix":".py","breakpoints":[{"source":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/models.py","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/NewCentroidAnalysis.ipynb#ch0000003","breakpoints":[{"line":15}]},{"source":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/datagen/quinn_objects.py","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnCentroidsAnalysis.ipynb#ch0000004","breakpoints":[{"line":58}]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000032","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000015","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingDebugging.ipynb#ch0000004","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingTask.ipynb#ch0000065","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000015","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000007","breakpoints":[]},{"source":"/Users/guydavidson/projects/simple-relational-reasoning/run/run_embeddings.py","breakpoints":[]},{"source":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/stimuli.py","breakpoints":[]},{"source":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/task.py","breakpoints":[]},{"source":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py","breakpoints":[{"line":185,"condition":"-target_horizontal_margin >= target_horizontal_margin - target_distance"}]}],"stoppedThreads":[]}}
Verbose 16:27:04: [Debug] to kernel: {"command":"attach","arguments":{"type":"Python Kernel Debug Adapter","name":"Subprocess 32081","request":"attach","justMyCode":true,"__mode":1,"__cellIndex":3,"__sessionId":"c41b5862-8ca9-4612-a190-04c4a7079322","connect":{"host":"127.0.0.1","port":"54960"},"logToFile":true,"subProcessId":32081},"type":"request","seq":2}
Verbose 16:27:04: IKernel Status change to busy
Verbose 16:27:04: IKernel Status change to idle
Verbose 16:27:04: [Debug] response: {"seq":36,"type":"response","request_seq":2,"success":false,"command":"attach","message":"Invalid message: Session is already started"}
Verbose 16:27:04: [Debug] to kernel: {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":4}
Verbose 16:27:04: IKernel Status change to busy
Verbose 16:27:04: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_168","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:04.162233Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_168","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:04.133000Z","msg_id":"49ece2bb-90a7-4c59-83b2-cea307362dfe","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":37,"type":"event","event":"terminated"},"buffers":[],"channel":"iopub"}
Verbose 16:27:04: [Debug] event: {"header":{"msg_id":"ca152967-5a190631adb0459c232f29c3_168","msg_type":"debug_event","username":"guydavidson","session":"ca152967-5a190631adb0459c232f29c3","date":"2022-05-03T20:27:04.162233Z","version":"5.3"},"msg_id":"ca152967-5a190631adb0459c232f29c3_168","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:27:04.133000Z","msg_id":"49ece2bb-90a7-4c59-83b2-cea307362dfe","msg_type":"debug_request","session":"0cb8ee95-a85d-4163-b825-9c2a26925f5a","username":"","version":"5.2"},"metadata":{},"content":{"seq":37,"type":"event","event":"terminated"},"buffers":[],"channel":"iopub"}
Verbose 16:27:04: IKernel Status change to idle
Verbose 16:27:04: [Debug] response: {"seq":38,"type":"response","request_seq":4,"success":true,"command":"disconnect"}
Verbose 16:27:04: [Debug] to kernel: {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":29}
Verbose 16:27:04: IKernel Status change to busy
Verbose 16:27:04: IKernel Status change to idle
Warn 16:27:14: Kernel Error Error: No debugger available, can not send 'disconnect'
    at x.customRequest (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2130:16719)
    at C.$customDebugAdapterRequest (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1696:7574)
    at d._doInvokeHandler (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1705:13100)
    at d._invokeHandler (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1705:12784)
    at d._receiveRequest (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1705:11446)
    at d._receiveOneMessage (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1705:10124)
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1705:8233
    at S.invoke (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:67:145)
    at s.fire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:67:1856)
    at u.fire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:83:19607)
    at g._receiveMessage (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:83:24188)
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:83:21722
    at S.invoke (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:67:145)
    at s.fire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:67:1856)
    at s.acceptChunk (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:83:16438)
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:83:15568
    at Socket.O (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3102:9329)
    at Socket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)
Verbose 16:27:14: Are Dependencies Installed, Class name = T (started execution), Arg 1: "~/opt/anaconda3/envs/torch3.9/python./Users/guydavidson/opt/anaconda3/envs/torch3.9/python.-m#ipykernel_launcher", Arg 2: undefined, Arg 3: true
Verbose 16:27:14: Checking if product is installed, Class name = x (started execution), Arg 1: 19, Arg 2: "~/opt/anaconda3/envs/torch3.9/bin/python"
Verbose 16:27:14: Create activated Env, Class name = k (started execution), Arg 1: ""
Verbose 16:27:14: Getting activated env variables, Class name = r (started execution), Arg 1: undefined, Arg 2: "~/opt/anaconda3/envs/torch3.9/bin/python", Arg 3: true
Verbose 16:27:14: Getting activated env variables impl, Class name = r (started execution), Arg 1: undefined, Arg 2: "~/opt/anaconda3/envs/torch3.9/bin/python"
Verbose 16:27:14: Getting activated env variables ourselves, Class name = r (started execution), Arg 1: undefined, Arg 2: "~/opt/anaconda3/envs/torch3.9/bin/python"
Verbose 16:27:14: Getting activated env variables from Python, Class name = r (started execution), Arg 1: undefined, Arg 2: "~/opt/anaconda3/envs/torch3.9/bin/python"
Verbose 16:27:14: Get Custom Env Variables, Class name = m (started execution), Arg 1: undefined
Verbose 16:27:14: Cached data exists getEnvironmentVariables, <No Resource>
Verbose 16:27:14: Get Custom Env Variables, Class name = m, completed in 0ms, has a truthy return value, Arg 1: undefined
Verbose 16:27:14: Got activation Env Vars from cache
Verbose 16:27:14: Getting activated env variables ourselves, Class name = r, completed in 5ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/opt/anaconda3/envs/torch3.9/bin/python"
Verbose 16:27:14: Getting activated env variables from Python, Class name = r, completed in 6ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/opt/anaconda3/envs/torch3.9/bin/python"
Verbose 16:27:14: Got env vars ourselves faster ~/opt/anaconda3/envs/torch3.9/bin/python
Verbose 16:27:14: Got env vars with python ~/opt/anaconda3/envs/torch3.9/bin/python in 6ms
Verbose 16:27:14: Got env vars ourselves ~/opt/anaconda3/envs/torch3.9/bin/python in 6ms
Verbose 16:27:14: Getting activated env variables impl, Class name = r, completed in 6ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/opt/anaconda3/envs/torch3.9/bin/python"
Verbose 16:27:14: Getting activated env variables, Class name = r, completed in 6ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/opt/anaconda3/envs/torch3.9/bin/python", Arg 3: true
Verbose 16:27:14: Create activated Env, Class name = k, completed in 7ms, has a truthy return value, Arg 1: ""
Info 16:27:14: Process Execution: > ~/opt/anaconda3/envs/torch3.9/bin/python -c "import ipykernel"
> ~/opt/anaconda3/envs/torch3.9/bin/python -c "import ipykernel"
Verbose 16:27:14: Checking if product is installed, Class name = x, completed in 134ms, has a truthy return value, Arg 1: 19, Arg 2: "~/opt/anaconda3/envs/torch3.9/bin/python", Return Value: true
Verbose 16:27:14: Are Dependencies Installed, Class name = T, completed in 135ms, has a truthy return value, Arg 1: "~/opt/anaconda3/envs/torch3.9/python./Users/guydavidson/opt/anaconda3/envs/torch3.9/python.-m#ipykernel_launcher", Arg 2: undefined, Arg 3: true, Return Value: true
Info 16:27:14: Dispose kernel file:///Users/guydavidson/projects/simple-relational-reasoning/notebooks/BugReproduction.ipynb
Info 16:27:14: Cancel pending cells
Verbose 16:27:14: Shutdown session - current session
Verbose 16:27:14: shutdownSession b94415d3-e66b-459d-a0f3-d9ed0056e1e1, .jvsc74a57bd060a9ba6dec9f9743de137779a4216acc28f697a659d14917f10d71c25580d314./Users/guydavidson/opt/anaconda3/envs/torch3.9/python./Users/guydavidson/opt/anaconda3/envs/torch3.9/python.-m#ipykernel_launcher - start
Verbose 16:27:14: Session can be shutdown .jvsc74a57bd060a9ba6dec9f9743de137779a4216acc28f697a659d14917f10d71c25580d314./Users/guydavidson/opt/anaconda3/envs/torch3.9/python./Users/guydavidson/opt/anaconda3/envs/torch3.9/python.-m#ipykernel_launcher
Verbose 16:27:14: Kernel got disposed, hence there is no longer a kernel associated with ~/projects/simple-relational-reasoning/notebooks/BugReproduction.ipynb ~/projects/simple-relational-reasoning/notebooks/BugReproduction.ipynb
Info 16:27:14: Cancel all remaining cells true || Idle || undefined
Info 16:27:14: Cancel pending cells
Info 16:27:14: Cell 3 executed with state Idle
Verbose 16:27:14: VSCodeNotebookController::handleExecution, Class name = M, completed in 11528ms, has a falsy return value
Verbose 16:27:14: Python Daemon (pid: 24855): write to stderr: [I 16:27:14.896 NotebookApp] Kernel shutdown: b94415d3-e66b-459d-a0f3-d9ed0056e1e1

@guydav
Copy link
Author

guydav commented May 3, 2022

  1. It seems that if I comment enough of the cell out (commenting out everything after line 17 in the cell linked above), so it returns sufficiently quickly, the debugging exception doesn't get thrown, but otherwise, it does. Here's the Jupyter trace when I do that:
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Info 16:29:21: Executing silently Code (completed) = import ipykernel\nprint(ipykernel.__version__)
Verbose 16:29:21: [Debug] to kernel: {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"Python Kernel Debug Adapter","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_41","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.637457Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_41","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.385000Z","msg_id":"cde7479d-39ca-42f6-8f83-f0c3e670e246","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":1,"type":"event","event":"output","body":{"category":"telemetry","output":"ptvsd","data":{"packageVersion":"1.4.1"}}},"buffers":[],"channel":"iopub"}
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_42","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.638063Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_42","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.385000Z","msg_id":"cde7479d-39ca-42f6-8f83-f0c3e670e246","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":2,"type":"event","event":"output","body":{"category":"telemetry","output":"debugpy","data":{"packageVersion":"1.4.1"}}},"buffers":[],"channel":"iopub"}
Verbose 16:29:21: [Debug] response: {"seq":3,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDebuggerProperties":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsValueFormattingOptions":true,"supportsTerminateDebuggee":true,"supportsGotoTargetsRequest":true,"supportsClipboardContext":true,"exceptionBreakpointFilters":[{"filter":"raised","label":"Raised Exceptions","default":false},{"filter":"uncaught","label":"Uncaught Exceptions","default":true}],"supportsStepInTargetsRequest":true}}
Verbose 16:29:21: [Debug] to kernel: {"command":"debugInfo","type":"request","seq":3}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] response: {"type":"response","request_seq":3,"success":true,"command":"debugInfo","body":{"isStarted":true,"hashMethod":"Murmur2","hashSeed":3339675911,"tmpFilePrefix":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32191/","tmpFileSuffix":".py","breakpoints":[],"stoppedThreads":[]}}
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] to kernel: {"command":"attach","arguments":{"type":"Python Kernel Debug Adapter","name":"BugReproduction.ipynb","request":"attach","justMyCode":true,"__mode":1,"__cellIndex":3,"__sessionId":"e2cb52a3-790f-489c-922c-e1e85fb7f0e3"},"type":"request","seq":2}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_49","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.658453Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_49","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.655000Z","msg_id":"a425d55c-5e7b-4792-80ae-888e37cda992","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":4,"type":"event","event":"debugpyWaitingForServer","body":{"host":"127.0.0.1","port":49557}},"buffers":[],"channel":"iopub"}
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_50","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.661203Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_50","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.655000Z","msg_id":"a425d55c-5e7b-4792-80ae-888e37cda992","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":5,"type":"event","event":"initialized"},"buffers":[],"channel":"iopub"}
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":7,"type":"response","request_seq":2,"success":true,"command":"attach"}
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_53","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.663676Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_53","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.655000Z","msg_id":"a425d55c-5e7b-4792-80ae-888e37cda992","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":8,"type":"event","event":"process","body":{"name":"/Users/guydavidson/opt/anaconda3/envs/torch3.9/lib/python3.9/site-packages/ipykernel_launcher.py","systemProcessId":32191,"isLocalProcess":true,"startMethod":"attach"}},"buffers":[],"channel":"iopub"}
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_54","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.663944Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_54","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.655000Z","msg_id":"a425d55c-5e7b-4792-80ae-888e37cda992","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":9,"type":"event","event":"thread","body":{"reason":"started","threadId":1}},"buffers":[],"channel":"iopub"}
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_55","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.664117Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_55","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.655000Z","msg_id":"a425d55c-5e7b-4792-80ae-888e37cda992","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":10,"type":"event","event":"thread","body":{"reason":"started","threadId":2}},"buffers":[],"channel":"iopub"}
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_56","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.664298Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_56","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.655000Z","msg_id":"a425d55c-5e7b-4792-80ae-888e37cda992","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":11,"type":"event","event":"thread","body":{"reason":"started","threadId":3}},"buffers":[],"channel":"iopub"}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"models.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/models.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":4}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"NewCentroidAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/NewCentroidAnalysis.ipynb#ch0000003"},"lines":[15],"breakpoints":[{"line":15}],"sourceModified":false},"type":"request","seq":5}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"quinn_objects.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/datagen/quinn_objects.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":6}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnCentroidsAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnCentroidsAnalysis.ipynb#ch0000004"},"lines":[58],"breakpoints":[{"line":58}],"sourceModified":false},"type":"request","seq":7}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnDataAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000032"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":8}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnDataAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000015"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":9}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnEmbeddingDebugging.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingDebugging.ipynb#ch0000004"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":10}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnEmbeddingTask.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingTask.ipynb#ch0000065"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":11}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnStimuliDemo.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000015"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":12}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnStimuliDemo.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000007"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":13}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"run_embeddings.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/run/run_embeddings.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":14}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"stimuli.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/stimuli.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":15}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"task.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/task.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":16}
Verbose 16:29:21: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"triplets.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py"},"lines":[185],"breakpoints":[{"line":185,"condition":"-target_horizontal_margin >= target_horizontal_margin - target_distance"}],"sourceModified":false},"type":"request","seq":17}
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_57","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.664577Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_57","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.655000Z","msg_id":"a425d55c-5e7b-4792-80ae-888e37cda992","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":12,"type":"event","event":"thread","body":{"reason":"started","threadId":4}},"buffers":[],"channel":"iopub"}
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_58","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.664951Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_58","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.655000Z","msg_id":"a425d55c-5e7b-4792-80ae-888e37cda992","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":13,"type":"event","event":"thread","body":{"reason":"started","threadId":5}},"buffers":[],"channel":"iopub"}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":14,"type":"response","request_seq":4,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":15,"type":"response","request_seq":5,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":false,"message":"Breakpoint in file that does not exist.","source":{"name":"NewCentroidAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/NewCentroidAnalysis.ipynb#ch0000003"},"line":15}]}}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":16,"type":"response","request_seq":6,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":17,"type":"response","request_seq":7,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":false,"message":"Breakpoint in file that does not exist.","source":{"name":"QuinnCentroidsAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnCentroidsAnalysis.ipynb#ch0000004"},"line":58}]}}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":18,"type":"response","request_seq":8,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":19,"type":"response","request_seq":9,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] response: {"seq":20,"type":"response","request_seq":10,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] response: {"seq":21,"type":"response","request_seq":11,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: [Debug] response: {"seq":22,"type":"response","request_seq":12,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":23,"type":"response","request_seq":13,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] response: {"seq":24,"type":"response","request_seq":14,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":25,"type":"response","request_seq":15,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] response: {"seq":26,"type":"response","request_seq":16,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":27,"type":"response","request_seq":17,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":true,"id":0,"source":{"name":"triplets.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py"},"line":185}]}}
Verbose 16:29:21: [Debug] to kernel: {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":18}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":28,"type":"response","request_seq":18,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
Verbose 16:29:21: [Debug] to kernel: {"command":"setExceptionBreakpoints","arguments":{"filters":["uncaught"]},"type":"request","seq":19}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":29,"type":"response","request_seq":19,"success":true,"command":"setExceptionBreakpoints"}
Info 16:29:21: Executing silently Code (idle) = import debugpy\ndebugpy.debug_this_thread()
Verbose 16:29:21: [Debug] to kernel: {"command":"threads","type":"request","seq":21}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] response: {"seq":30,"type":"response","request_seq":21,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-6"},{"id":3,"name":"Thread-7"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":5,"name":"Thread-2"}]}}
Verbose 16:29:21: IKernel Status change to idle
Info 16:29:21: Executing silently Code (completed) = import debugpy\ndebugpy.debug_this_thread()
Verbose 16:29:21: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"import os\nimport sys\nsys.path.append(os.path.abspath('.'))\nsys.path.append(os.path.abspath('..'))\nsys.path.append(os.path.abspath('../run'))\n\nfrom collections import defaultdict\nimport itertools\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nfrom scipy import stats\nimport typing\nimport pandas as pd\nfrom tqdm.notebook import tqdm\nimport tabulate\n\nfrom torchvision.transforms import functional as F\n\nfrom IPython.display import display, Markdown\n\nfrom simple_relational_reasoning.embeddings.stimuli import build_differet_shapes_stimulus_generator, build_split_text_stimulus_generator, build_random_color_stimulus_generator,\\\n    find_non_empty_indices, EMPTY_TENSOR_PIXEL\nfrom simple_relational_reasoning.embeddings.triplets import QuinnTripletGenerator, ABOVE_BELOW_RELATION, BETWEEN_RELATION\nfrom simple_relational_reasoning.embeddings.visualizations import filter_and_group, DEFAULT_TEXT_KWARGS, save_plot"},"type":"request","seq":22}
Verbose 16:29:21: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"BASELINE_TRIPLET_KWARGS = dict(n_target_types=2, extra_diagonal_margin=0)\n\ndistance_endpoints_dict = {\n    (False, False): (30, 80),\n    (True, False): (60, 120),\n    (True, True): (40, 80),  \n}\n\ndef parse_above_below_condition(df):\n    above_below_types = []\n\n    for _, (relation, two_refs, adjacent_refs) in \\\n        df.loc[:, ['relation', 'two_reference_objects', 'adjacent_reference_objects']].iterrows():\n        a_b_type = None\n\n        if relation == 'above_below':\n            if not two_refs:\n                a_b_type = 'one_reference'\n\n            elif adjacent_refs:\n                a_b_type = 'adjacent_references'\n\n            else:\n                a_b_type = 'gapped_references'\n\n        above_below_types.append(a_b_type)\n\n    return df.assign(above_below_type=above_below_types)\n\n\nGENERATOR_NAMES = ('color bar', 'split text', 'random colors')\n\n\ndef create_stimulus_generators_and_names(names=GENERATOR_NAMES, seed=None, **kwargs):\n    rng = np.random.default_rng(seed if seed is not None else np.random.randint(0, 2**32))\n\n    generators = (\n        build_differet_shapes_stimulus_generator(rng=rng, **kwargs), \n        \n        build_split_text_stimulus_generator(\n            # reference_box_size=10,\n            # total_reference_size=(10, 140), n_reference_patches=8,\n            # reference_patch_kwargs=dict(ylim=(-70, 70)),\n            rng=rng, **kwargs),\n        build_random_color_stimulus_generator(rng=rng, **kwargs)\n    )\n    \n    return zip(generators, names)"},"type":"request","seq":23}
Verbose 16:29:21: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"DATA_PATH = 'centroid_sizes.csv'\nLIST_COLUMNS = [\n    'row_centroids', 'col_centroids', \n    'first_non_empty_row', 'last_non_empty_row', \n    'first_non_empty_col', 'last_non_empty_col'\n]\nCOLUMNS = [\n    'relation', 'two_reference_objects', \n    'adjacent_reference_objects', 'transpose', \n    'n_habituation_stimuli', 'rotate_angle', 'stimulus_generator'\n] + LIST_COLUMNS\nN_examples = 100\nANGLES = [0, 30, 45, 60, 90, 120, 135, 150]\n\nOPTION_SET = (\n    (ABOVE_BELOW_RELATION, BETWEEN_RELATION),\n    (False, True),\n    (False, True),\n    (False, True),\n    [1, 4],\n    ANGLES\n) \n"},"type":"request","seq":24}
Verbose 16:29:21: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"generate_data = True\nif generate_data:\n    total_options = np.prod([len(v) for v in OPTION_SET])\n    option_iter = itertools.product(*OPTION_SET)\n\n    data_rows = []\n\n    for relation, two_reference_objects, adjacent_reference_objects, transpose, n_habituation_stimuli, rotate_angle in tqdm(option_iter, total=total_options):\n        if (relation == ABOVE_BELOW_RELATION) and not two_reference_objects and adjacent_reference_objects:\n            continue\n\n        if (relation == BETWEEN_RELATION) and ((not two_reference_objects) or adjacent_reference_objects):\n            continue\n\n        distance_endpoints = distance_endpoints_dict[(two_reference_objects, adjacent_reference_objects)]\n\n    #     for stimulus_generator, generator_name in create_stimulus_generators_and_names(rotate_angle=rotate_angle):\n    #         triplet_generator = QuinnTripletGenerator(stimulus_generator, distance_endpoints,\n    #             relation=relation, two_reference_objects=two_reference_objects,\n    #             adjacent_reference_objects=adjacent_reference_objects, \n    #             transpose=transpose,\n    #             n_habituation_stimuli=n_habituation_stimuli,\n    #             track_centroids=True,\n    #             **BASELINE_TRIPLET_KWARGS)\n\n    #         triplets = triplet_generator(N_examples, normalize=False)\n    #         non_empty_tuples = [find_non_empty_indices(t, empty_value=EMPTY_TENSOR_PIXEL, color_axis=0) for t in triplets.view(-1, *triplets.shape[2:])]\n    #         del triplets\n    #         row_centroids, col_centroids = zip(*triplet_generator.stimulus_centroids)\n    #         row_centroids = list(row_centroids)\n    #         col_centroids = list(col_centroids)\n\n    #         first_non_empty_row, last_non_empty_row, first_non_empty_col, last_non_empty_col = zip(*non_empty_tuples)\n    #         first_non_empty_row = [i.item() for i in first_non_empty_row]\n    #         last_non_empty_row = [i.item() for i in last_non_empty_row]\n    #         first_non_empty_col = [i.item() for i in first_non_empty_col]\n    #         last_non_empty_col = [i.item() for i in last_non_empty_col]\n            \n    #         row = [relation, two_reference_objects, adjacent_reference_objects, transpose,\n    #             n_habituation_stimuli, rotate_angle, generator_name, \n    #             row_centroids, col_centroids, \n    #             first_non_empty_row, last_non_empty_row, first_non_empty_col, last_non_empty_col\n    #         ]\n    #         data_rows.append(row)\n\n    #         del triplet_generator\n    #         del stimulus_generator\n\n    \n    # data_df = pd.DataFrame(data_rows, columns=COLUMNS)\n    # data_df = parse_above_below_condition(data_df)\n    # data_df.to_csv(DATA_PATH, index=False)\n\nelse:\n    data_df = pd.read_csv(DATA_PATH, converters={col: pd.eval for col in LIST_COLUMNS})    \n    data_df = data_df.assign(**{col: data_df[col].apply(list) for col in LIST_COLUMNS})\n    data_df = data_df.assign(relation_and_type=data_df.above_below_type)\n    data_df.relation_and_type[data_df.relation_and_type.isna()] = 'between'\n    \n\ndata_df.head() \n\n"},"type":"request","seq":25}
Verbose 16:29:21: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":""},"type":"request","seq":26}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"type":"response","request_seq":22,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32191/3409709466.py"}}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] response: {"type":"response","request_seq":23,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32191/2127228247.py"}}
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] response: {"type":"response","request_seq":24,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32191/3824027068.py"}}
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] response: {"type":"response","request_seq":25,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32191/802607458.py"}}
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"type":"response","request_seq":26,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_32191/3990065800.py"}}
Verbose 16:29:21: [Debug] to kernel: {"command":"configurationDone","type":"request","seq":20}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] response: {"seq":20,"type":"response","request_seq":20,"success":true,"command":"configurationDone"}
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: VSCodeNotebookController::handleExecution, Class name = M (started execution)
Info 16:29:21: Execute Cells request 3
Info 16:29:21: Execute Cell 3 ~/projects/simple-relational-reasoning/notebooks/BugReproduction.ipynb
Verbose 16:29:21: [Debug] to kernel: {"command":"threads","type":"request","seq":27}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: IKernel Status change to idle
Verbose 16:29:21: [Debug] response: {"seq":31,"type":"response","request_seq":27,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-6"},{"id":3,"name":"Thread-7"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":5,"name":"Thread-2"}]}}
Verbose 16:29:21: IKernel Status change to busy
Verbose 16:29:21: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_137","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:21.955730Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_137","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:21.889000Z","msg_id":"3faa7b1c-4a9a-41dd-97b0-3acdcb1ec175","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":32,"type":"event","event":"thread","body":{"reason":"started","threadId":6}},"buffers":[],"channel":"iopub"}
Verbose 16:29:22: IKernel Status change to idle
Info 16:29:22: Cancel all remaining cells true || Error || undefined
Info 16:29:22: Cancel pending cells
Info 16:29:22: Cell 3 executed with state Error
Verbose 16:29:22: VSCodeNotebookController::handleExecution, Class name = M, completed in 132ms, has a falsy return value
Verbose 16:29:22: [Debug] to kernel: {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":28}
Verbose 16:29:22: IKernel Status change to busy
Verbose 16:29:22: [Debug] event: {"header":{"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_160","msg_type":"debug_event","username":"guydavidson","session":"810bffdd-80c6da231c26b8e52be9efa8","date":"2022-05-03T20:29:22.051881Z","version":"5.3"},"msg_id":"810bffdd-80c6da231c26b8e52be9efa8_160","msg_type":"debug_event","parent_header":{"date":"2022-05-03T20:29:22.033000Z","msg_id":"5f1d3d50-6103-46a5-84d0-dcb7d293a6fb","msg_type":"debug_request","session":"0238b5d7-aae4-4888-bf69-95ffeff5ed8f","username":"","version":"5.2"},"metadata":{},"content":{"seq":33,"type":"event","event":"terminated"},"buffers":[],"channel":"iopub"}
Verbose 16:29:22: IKernel Status change to idle
Verbose 16:29:22: [Debug] response: {"seq":34,"type":"response","request_seq":28,"success":true,"command":"disconnect"}
Verbose 16:29:22: [Debug] to kernel: {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":29}
Verbose 16:29:22: IKernel Status change to busy
Verbose 16:29:22: IKernel Status change to idle```


The kernel chosen for the particular notebook seems to matter more than the setting of which interpreter to use under "Jupyter: Select interpreter to start Jupyter server", which is currently still set to a Python 3.8.2 env in which I cannot debug this cell (same exception as above).

@guydav
Copy link
Author

guydav commented May 3, 2022

I created several conda environments in attempt to isolate the issue. My base environment currently has the following packages (output using conda list -n base --export):

# $ conda create --name <env> --file <this file>
# platform: osx-64
_ipyw_jlab_nb_ext_conf=0.1.0=py39hecd8cb5_0
academic=0.8.1=pypi_0
alabaster=0.7.12=pyhd3eb1b0_0
anaconda=2021.11=py39_0
anaconda-client=1.9.0=py39hecd8cb5_0
anaconda-navigator=2.1.1=py39_0
anaconda-project=0.10.1=pyhd3eb1b0_0
anyio=2.2.0=py39hecd8cb5_1
appdirs=1.4.4=pyhd3eb1b0_0
applaunchservices=0.2.1=pyhd3eb1b0_0
appnope=0.1.2=py39hecd8cb5_1001
appscript=1.1.2=py39h9ed2024_0
argh=0.26.2=py39hecd8cb5_0
argon2-cffi=20.1.0=py39h9ed2024_1
arrow=0.13.1=py39hecd8cb5_0
asn1crypto=1.4.0=py_0
astroid=2.6.6=py39hecd8cb5_0
astropy=4.3.1=py39hf9932de_0
async_generator=1.10=pyhd3eb1b0_0
atomicwrites=1.4.0=py_0
attrs=21.2.0=pyhd3eb1b0_0
autopep8=1.5.7=pyhd3eb1b0_0
babel=2.9.1=pyhd3eb1b0_0
backcall=0.2.0=pyhd3eb1b0_0
backports=1.0=pyhd3eb1b0_2
backports.functools_lru_cache=1.6.4=pyhd3eb1b0_0
backports.shutil_get_terminal_size=1.0.0=pyhd3eb1b0_3
backports.tempfile=1.0=pyhd3eb1b0_1
backports.weakref=1.0.post1=py_1
beautifulsoup4=4.10.0=pyh06a4308_0
bibtexparser=1.1.0=pypi_0
binaryornot=0.4.4=pyhd3eb1b0_1
bitarray=2.3.0=py39h9ed2024_1
bkcharts=0.2=py39hecd8cb5_0
black=19.10b0=py_0
blas=1.0=mkl
bleach=4.0.0=pyhd3eb1b0_0
blosc=1.21.0=h2842e9f_0
bokeh=2.4.1=py39hecd8cb5_0
boto=2.49.0=py39hecd8cb5_0
bottleneck=1.3.2=py39he3068b8_1
brotli=1.0.9=hb1e8313_2
brotlipy=0.7.0=py39h9ed2024_1003
brunsli=0.1=h23ab428_0
bzip2=1.0.8=h1de35cc_0
c-ares=1.17.1=h9ed2024_0
ca-certificates=2021.10.26=hecd8cb5_2
cached-property=1.5.2=py_0
certifi=2021.10.8=py39hecd8cb5_0
cffi=1.14.6=py39h2125817_0
cfitsio=3.470=hee0f690_6
chardet=4.0.0=py39hecd8cb5_1003
charls=2.2.0=h23ab428_0
charset-normalizer=2.0.4=pyhd3eb1b0_0
click=8.0.3=pyhd3eb1b0_0
cloudpickle=2.0.0=pyhd3eb1b0_0
clyent=1.2.2=py39hecd8cb5_1
colorama=0.4.4=pyhd3eb1b0_0
colorcet=3.0.0=pypi_0
conda=4.12.0=py39hecd8cb5_0
conda-build=3.21.5=py39hecd8cb5_0
conda-content-trust=0.1.1=pyhd3eb1b0_0
conda-env=2.6.0=1
conda-pack=0.6.0=pyhd3eb1b0_0
conda-package-handling=1.8.1=py39hca72f7f_0
conda-repo-cli=1.0.4=pyhd3eb1b0_0
conda-token=0.3.0=pyhd3eb1b0_0
conda-verify=3.4.2=py_1
contextlib2=0.6.0.post1=pyhd3eb1b0_0
cookiecutter=1.7.2=pyhd3eb1b0_0
cryptography=3.4.8=py39h2fd3fbb_0
curl=7.78.0=h7bc2e8c_0
cycler=0.10.0=py39hecd8cb5_0
cython=0.29.24=py39he9d5cce_0
cytoolz=0.11.0=py39h9ed2024_0
daal4py=2021.3.0=py39h01d92e1_0
dal=2021.3.0=hecd8cb5_555
dask=2021.10.0=pyhd3eb1b0_0
dask-core=2021.10.0=pyhd3eb1b0_0
dataclasses=0.8=pyh6d0b6a4_7
debugpy=1.4.1=py39h23ab428_0
decorator=5.1.0=pyhd3eb1b0_0
defusedxml=0.7.1=pyhd3eb1b0_0
diff-match-patch=20200713=pyhd3eb1b0_0
distributed=2021.10.0=py39hecd8cb5_0
docker-pycreds=0.4.0=pypi_0
docutils=0.17.1=py39hecd8cb5_1
entrypoints=0.3=py39hecd8cb5_0
et_xmlfile=1.1.0=py39hecd8cb5_0
fastcache=1.1.0=py39h9ed2024_0
filelock=3.3.1=pyhd3eb1b0_1
flake8=3.9.2=pyhd3eb1b0_0
flask=1.1.2=pyhd3eb1b0_0
fonttools=4.25.0=pyhd3eb1b0_0
freetype=2.10.4=ha233b18_0
fsspec=2021.8.1=pyhd3eb1b0_0
future=0.18.2=py39hecd8cb5_1
get_terminal_size=1.0.0=h7520d66_0
gevent=21.8.0=py39h9ed2024_1
giflib=5.2.1=haf1e3a3_0
gitdb=4.0.9=pypi_0
gitpython=3.1.27=pypi_0
glob2=0.7=pyhd3eb1b0_0
gmp=6.2.1=h23ab428_2
gmpy2=2.0.8=py39h4b98818_3
greenlet=1.1.1=py39h23ab428_0
h5py=3.2.1=py39h90fc2a2_0
hdf5=1.10.6=hdbbcd12_0
heapdict=1.0.1=pyhd3eb1b0_0
html5lib=1.1=pyhd3eb1b0_0
icu=58.2=h0a44026_3
idna=3.2=pyhd3eb1b0_0
imagecodecs=2021.8.26=py39ha952a84_0
imageio=2.9.0=pyhd3eb1b0_0
imagesize=1.2.0=pyhd3eb1b0_0
importlib-metadata=4.8.1=py39hecd8cb5_0
importlib_metadata=4.8.1=hd3eb1b0_0
inflection=0.5.1=py39hecd8cb5_0
iniconfig=1.1.1=pyhd3eb1b0_0
intel-openmp=2021.4.0=hecd8cb5_3538
intervaltree=3.1.0=pyhd3eb1b0_0
ipykernel=6.4.1=py39hecd8cb5_1
ipython=7.29.0=py39h01d92e1_0
ipython_genutils=0.2.0=pyhd3eb1b0_1
ipywidgets=7.6.5=pyhd3eb1b0_1
isort=5.9.3=pyhd3eb1b0_0
itsdangerous=2.0.1=pyhd3eb1b0_0
jbig=2.1=h4d881f8_0
jdcal=1.4.1=pyhd3eb1b0_0
jedi=0.18.0=py39hecd8cb5_1
jinja2=2.11.3=pyhd3eb1b0_0
jinja2-time=0.2.0=pyhd3eb1b0_2
joblib=1.1.0=pyhd3eb1b0_0
jpeg=9d=h9ed2024_0
json5=0.9.6=pyhd3eb1b0_0
jsonschema=3.2.0=pyhd3eb1b0_2
jupyter=1.0.0=py39hecd8cb5_7
jupyter_client=6.1.12=pyhd3eb1b0_0
jupyter_console=6.4.0=pyhd3eb1b0_0
jupyter_core=4.8.1=py39hecd8cb5_0
jupyter_server=1.4.1=py39hecd8cb5_0
jupyterlab=3.2.1=pyhd3eb1b0_1
jupyterlab_pygments=0.1.2=py_0
jupyterlab_server=2.8.2=pyhd3eb1b0_0
jupyterlab_widgets=1.0.0=pyhd3eb1b0_1
jxrlib=1.1=haf1e3a3_2
keyring=23.1.0=py39hecd8cb5_0
kiwisolver=1.3.1=py39h23ab428_0
krb5=1.19.2=hcd88c3b_0
lazy-object-proxy=1.6.0=py39h9ed2024_0
lcms2=2.12=hf1fd2bf_0
lerc=3.0=he9d5cce_0
libaec=1.0.4=hb1e8313_1
libarchive=3.4.2=haa3ed63_0
libcurl=7.78.0=hb8e4fae_0
libcxx=12.0.0=h2f01273_0
libdeflate=1.8=h9ed2024_5
libedit=3.1.20210910=hca72f7f_0
libev=4.33=h9ed2024_1
libffi=3.3=hb1e8313_2
libgfortran=3.0.1=h93005f0_2
libiconv=1.16=h1de35cc_0
liblief=0.10.1=h23ab428_1
libllvm11=11.1.0=h9b2ccf5_0
libnghttp2=1.41.0=h7580e61_2
libpng=1.6.37=ha441bb4_0
libsodium=1.0.18=h1de35cc_0
libspatialindex=1.9.3=h23ab428_0
libssh2=1.9.0=ha12b0ac_1
libtiff=4.2.0=h87d7836_0
libuv=1.40.0=haf1e3a3_0
libwebp=1.2.0=hacca55c_0
libwebp-base=1.2.0=h9ed2024_0
libxml2=2.9.12=hcdb78fc_0
libxslt=1.1.34=h83b36ba_0
libzopfli=1.0.3=hb1e8313_0
llvm-openmp=12.0.0=h0dcd299_1
llvmlite=0.37.0=py39he4411ff_1
locket=0.2.1=py39hecd8cb5_1
lxml=4.6.3=py39h26b266a_0
lz4-c=1.9.3=h23ab428_1
lzo=2.10=haf1e3a3_2
markupsafe=1.1.1=py39h9ed2024_0
matplotlib=3.4.3=py39hecd8cb5_0
matplotlib-base=3.4.3=py39h0a11d32_0
matplotlib-inline=0.1.2=pyhd3eb1b0_2
mccabe=0.6.1=py39hecd8cb5_1
mistune=0.8.4=py39h9ed2024_1000
mkl=2021.4.0=hecd8cb5_637
mkl-service=2.4.0=py39h9ed2024_0
mkl_fft=1.3.1=py39h4ab4a9b_0
mkl_random=1.2.2=py39hb2f4e1b_0
mock=4.0.3=pyhd3eb1b0_0
more-itertools=8.10.0=pyhd3eb1b0_0
mpc=1.1.0=h6ef4df4_1
mpfr=4.0.2=h9066e36_1
mpi=1.0=mpich
mpich=3.3.2=hc856adb_0
mpmath=1.2.1=py39hecd8cb5_0
msgpack-python=1.0.2=py39hf7b0b51_1
multipledispatch=0.6.0=py39hecd8cb5_0
munkres=1.1.4=py_0
mypy_extensions=0.4.3=py39hecd8cb5_0
navigator-updater=0.2.1=py39hecd8cb5_0
nbclassic=0.2.6=pyhd3eb1b0_0
nbclient=0.5.3=pyhd3eb1b0_0
nbconvert=6.1.0=py39hecd8cb5_0
nbformat=5.1.3=pyhd3eb1b0_0
ncurses=6.3=hca72f7f_1
nest-asyncio=1.5.1=pyhd3eb1b0_0
networkx=2.6.3=pyhd3eb1b0_0
nltk=3.6.5=pyhd3eb1b0_0
nose=1.3.7=pyhd3eb1b0_1006
notebook=6.4.5=py39hecd8cb5_0
numba=0.54.1=py39hae1ba45_0
numexpr=2.7.3=py39h5873af2_1
numpy=1.20.3=py39h4b4dc7a_0
numpy-base=1.20.3=py39he0bd621_0
numpydoc=1.1.0=pyhd3eb1b0_1
olefile=0.46=pyhd3eb1b0_0
opencv-python=4.5.5.64=pypi_0
openjpeg=2.4.0=h66ea3da_0
openpyxl=3.0.9=pyhd3eb1b0_0
openssl=1.1.1l=h9ed2024_0
packaging=21.0=pyhd3eb1b0_0
pandas=1.3.4=py39h743cdd8_0
pandocfilters=1.4.3=py39hecd8cb5_1
param=1.12.1=pypi_0
parso=0.8.2=pyhd3eb1b0_0
partd=1.2.0=pyhd3eb1b0_0
path=16.0.0=py39hecd8cb5_0
path.py=12.5.0=hd3eb1b0_0
pathlib2=2.3.6=py39hecd8cb5_2
pathspec=0.7.0=py_0
pathtools=0.1.2=pypi_0
patsy=0.5.2=py39hecd8cb5_0
pep8=1.7.1=py39hecd8cb5_0
pexpect=4.8.0=pyhd3eb1b0_3
pickleshare=0.7.5=pyhd3eb1b0_1003
pillow=8.4.0=py39h98e4679_0
pip=21.2.4=py39hecd8cb5_0
pkginfo=1.7.1=py39hecd8cb5_0
pluggy=0.13.1=py39hecd8cb5_0
ply=3.11=py39hecd8cb5_0
poyo=0.5.0=pyhd3eb1b0_0
prometheus_client=0.11.0=pyhd3eb1b0_0
promise=2.3=pypi_0
prompt-toolkit=3.0.20=pyhd3eb1b0_0
prompt_toolkit=3.0.20=hd3eb1b0_0
protobuf=3.19.4=pypi_0
psutil=5.8.0=py39h9ed2024_1
ptyprocess=0.7.0=pyhd3eb1b0_2
py=1.10.0=pyhd3eb1b0_0
py-lief=0.10.1=py39h23ab428_1
pycodestyle=2.7.0=pyhd3eb1b0_0
pycosat=0.6.3=py39h9ed2024_0
pycparser=2.20=py_2
pyct=0.4.8=pypi_0
pycurl=7.44.1=py39hbcfaee0_1
pydocstyle=6.1.1=pyhd3eb1b0_0
pyerfa=2.0.0=py39h9ed2024_0
pyflakes=2.3.1=pyhd3eb1b0_0
pygments=2.10.0=pyhd3eb1b0_0
pyjwt=2.1.0=py39hecd8cb5_0
pylint=2.9.6=py39hecd8cb5_1
pyls-spyder=0.4.0=pyhd3eb1b0_0
pyodbc=4.0.31=py39h23ab428_0
pyopenssl=21.0.0=pyhd3eb1b0_1
pyparsing=3.0.4=pyhd3eb1b0_0
pyqt=5.9.2=py39h23ab428_6
pyrsistent=0.18.0=py39hca72f7f_0
pysocks=1.7.1=py39hecd8cb5_0
pytables=3.6.1=py39h648f197_1
pytest=6.2.4=py39hecd8cb5_2
python=3.9.7=h88f2d9e_1
python-dateutil=2.8.2=pyhd3eb1b0_0
python-libarchive-c=2.9=pyhd3eb1b0_1
python-lsp-black=1.0.0=pyhd3eb1b0_0
python-lsp-jsonrpc=1.0.0=pyhd3eb1b0_0
python-lsp-server=1.2.4=pyhd3eb1b0_0
python-slugify=5.0.2=pyhd3eb1b0_0
python.app=3=py39hca72f7f_0
pytz=2021.3=pyhd3eb1b0_0
pywavelets=1.1.1=py39he3068b8_4
pyyaml=6.0=py39hca72f7f_1
pyzmq=22.2.1=py39h23ab428_1
qdarkstyle=3.0.2=pyhd3eb1b0_0
qstylizer=0.1.10=pyhd3eb1b0_0
qt=5.9.7=h468cd18_1
qtawesome=1.0.2=pyhd3eb1b0_0
qtconsole=5.1.1=pyhd3eb1b0_0
qtpy=1.10.0=pyhd3eb1b0_0
readline=8.1=h9ed2024_0
regex=2021.8.3=py39h9ed2024_0
requests=2.26.0=pyhd3eb1b0_0
ripgrep=12.1.1=0
rope=0.19.0=pyhd3eb1b0_0
rtree=0.9.7=py39hecd8cb5_1
ruamel-yaml=0.16.10=pypi_0
ruamel_yaml=0.15.100=py39h9ed2024_0
scikit-image=0.18.3=py39hae1ba45_0
scikit-learn=0.24.2=py39hb2f4e1b_0
scikit-learn-intelex=2021.3.0=py39hecd8cb5_0
scipy=1.7.1=py39h88652d9_2
seaborn=0.11.2=pyhd3eb1b0_0
send2trash=1.8.0=pyhd3eb1b0_1
sentry-sdk=1.5.6=pypi_0
setproctitle=1.2.2=pypi_0
setuptools=58.0.4=py39hecd8cb5_0
shortuuid=1.0.8=pypi_0
simplegeneric=0.8.1=py39hecd8cb5_2
singledispatch=3.7.0=pyhd3eb1b0_1001
sip=4.19.13=py39h23ab428_0
six=1.16.0=pyhd3eb1b0_0
smmap=5.0.0=pypi_0
snappy=1.1.8=hb1e8313_0
sniffio=1.2.0=py39hecd8cb5_1
snowballstemmer=2.1.0=pyhd3eb1b0_0
sortedcollections=2.1.0=pyhd3eb1b0_0
sortedcontainers=2.4.0=pyhd3eb1b0_0
soupsieve=2.2.1=pyhd3eb1b0_0
sphinx=4.2.0=pyhd3eb1b0_1
sphinxcontrib=1.0=py39hecd8cb5_1
sphinxcontrib-applehelp=1.0.2=pyhd3eb1b0_0
sphinxcontrib-devhelp=1.0.2=pyhd3eb1b0_0
sphinxcontrib-htmlhelp=2.0.0=pyhd3eb1b0_0
sphinxcontrib-jsmath=1.0.1=pyhd3eb1b0_0
sphinxcontrib-qthelp=1.0.3=pyhd3eb1b0_0
sphinxcontrib-serializinghtml=1.1.5=pyhd3eb1b0_0
sphinxcontrib-websupport=1.2.4=py_0
spyder=5.1.5=py39hecd8cb5_1
spyder-kernels=2.1.3=py39hecd8cb5_0
sqlalchemy=1.4.22=py39h9ed2024_0
sqlite=3.36.0=hce871da_0
statsmodels=0.12.2=py39h9ed2024_0
sympy=1.9=py39hecd8cb5_0
tabulate=0.8.9=pypi_0
tbb=2021.4.0=haf03e11_0
tbb4py=2021.4.0=py39haf03e11_0
tblib=1.7.0=pyhd3eb1b0_0
termcolor=1.1.0=pypi_0
terminado=0.9.4=py39hecd8cb5_0
testpath=0.5.0=pyhd3eb1b0_0
text-unidecode=1.3=pyhd3eb1b0_0
textdistance=4.2.1=pyhd3eb1b0_0
threadpoolctl=2.2.0=pyh0d69192_0
three-merge=0.1.1=pyhd3eb1b0_0
tifffile=2021.7.2=pyhd3eb1b0_2
tinycss=0.4=pyhd3eb1b0_1002
tk=8.6.11=h7bc2e8c_0
toml=0.10.2=pyhd3eb1b0_0
toolz=0.11.1=pyhd3eb1b0_0
torch=1.11.0=pypi_0
torchvision=0.12.0=pypi_0
tornado=6.1=py39h9ed2024_0
tqdm=4.62.3=pyhd3eb1b0_1
traitlets=5.1.0=pyhd3eb1b0_0
typed-ast=1.4.3=py39h9ed2024_1
typing_extensions=3.10.0.2=pyh06a4308_0
tzdata=2021e=hda174b7_0
ujson=4.0.2=py39h23ab428_0
unicodecsv=0.14.1=py39hecd8cb5_0
unidecode=1.2.0=pyhd3eb1b0_0
unixodbc=2.3.9=haf1e3a3_0
urllib3=1.26.7=pyhd3eb1b0_0
wandb=0.12.11=pypi_0
watchdog=2.1.3=py39hd5f6b7e_0
wcwidth=0.2.5=pyhd3eb1b0_0
webencodings=0.5.1=py39hecd8cb5_1
werkzeug=2.0.2=pyhd3eb1b0_0
wheel=0.37.0=pyhd3eb1b0_1
whichcraft=0.6.1=pyhd3eb1b0_0
widgetsnbextension=3.5.1=py39hecd8cb5_0
wrapt=1.12.1=py39h9ed2024_1
wurlitzer=2.1.1=py39hecd8cb5_0
xlrd=2.0.1=pyhd3eb1b0_0
xlsxwriter=3.0.1=pyhd3eb1b0_0
xlwings=0.24.9=py39hecd8cb5_0
xlwt=1.3.0=py39hecd8cb5_0
xmltodict=0.12.0=pyhd3eb1b0_0
xz=5.2.5=h1de35cc_0
yaml=0.2.5=haf1e3a3_0
yapf=0.31.0=pyhd3eb1b0_0
yaspin=2.1.0=pypi_0
zeromq=4.3.4=h23ab428_0
zfp=0.5.5=h23ab428_6
zict=2.0.0=pyhd3eb1b0_0
zipp=3.6.0=pyhd3eb1b0_0
zlib=1.2.11=h1de35cc_3
zope=1.0=py39hecd8cb5_1
zope.event=4.5.0=py39hecd8cb5_0
zope.interface=5.4.0=py39h9ed2024_0
zstd=1.4.9=h322a384_0```

My miminal test environment which reproduces the issue has the following packages:

```# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: osx-64
alabaster=0.7.12=pyhd3eb1b0_0
anaconda=2021.11=py39_0
anaconda-client=1.9.0=py39hecd8cb5_0
anaconda-project=0.10.1=pyhd3eb1b0_0
anyio=2.2.0=py39hecd8cb5_1
appdirs=1.4.4=pyhd3eb1b0_0
applaunchservices=0.2.1=pyhd3eb1b0_0
appnope=0.1.2=py39hecd8cb5_1001
appscript=1.1.2=py39h9ed2024_0
argh=0.26.2=py39hecd8cb5_0
argon2-cffi=20.1.0=py39h9ed2024_1
arrow=0.13.1=py39hecd8cb5_0
asn1crypto=1.4.0=py_0
astroid=2.6.6=py39hecd8cb5_0
astropy=4.3.1=py39hf9932de_0
async_generator=1.10=pyhd3eb1b0_0
atomicwrites=1.4.0=py_0
attrs=21.2.0=pyhd3eb1b0_0
autopep8=1.5.7=pyhd3eb1b0_0
babel=2.9.1=pyhd3eb1b0_0
backcall=0.2.0=pyhd3eb1b0_0
backports=1.0=pyhd3eb1b0_2
backports.shutil_get_terminal_size=1.0.0=pyhd3eb1b0_3
beautifulsoup4=4.10.0=pyh06a4308_0
binaryornot=0.4.4=pyhd3eb1b0_1
bitarray=2.3.0=py39h9ed2024_1
bkcharts=0.2=py39hecd8cb5_0
black=19.10b0=py_0
blas=1.0=mkl
bleach=4.0.0=pyhd3eb1b0_0
blosc=1.21.0=h2842e9f_0
bokeh=2.4.1=py39hecd8cb5_0
boto=2.49.0=py39hecd8cb5_0
bottleneck=1.3.2=py39he3068b8_1
brotli=1.0.9=hb1e8313_2
brotlipy=0.7.0=py39h9ed2024_1003
brunsli=0.1=h23ab428_0
bzip2=1.0.8=h1de35cc_0
c-ares=1.17.1=h9ed2024_0
ca-certificates=2021.10.26=hecd8cb5_2
cached-property=1.5.2=py_0
certifi=2021.10.8=py39hecd8cb5_0
cffi=1.14.6=py39h2125817_0
cfitsio=3.470=hee0f690_6
chardet=4.0.0=py39hecd8cb5_1003
charls=2.2.0=h23ab428_0
charset-normalizer=2.0.4=pyhd3eb1b0_0
click=8.0.3=pyhd3eb1b0_0
cloudpickle=2.0.0=pyhd3eb1b0_0
clyent=1.2.2=py39hecd8cb5_1
colorama=0.4.4=pyhd3eb1b0_0
colorcet=3.0.0=pypi_0
conda=4.12.0=py39hecd8cb5_0
conda-content-trust=0.1.1=pyhd3eb1b0_0
conda-pack=0.6.0=pyhd3eb1b0_0
conda-package-handling=1.8.1=py39hca72f7f_0
conda-token=0.3.0=pyhd3eb1b0_0
contextlib2=0.6.0.post1=pyhd3eb1b0_0
cookiecutter=1.7.2=pyhd3eb1b0_0
cryptography=3.4.8=py39h2fd3fbb_0
curl=7.78.0=h7bc2e8c_0
cycler=0.10.0=py39hecd8cb5_0
cython=0.29.24=py39he9d5cce_0
cytoolz=0.11.0=py39h9ed2024_0
daal4py=2021.3.0=py39h01d92e1_0
dal=2021.3.0=hecd8cb5_555
dask=2021.10.0=pyhd3eb1b0_0
dask-core=2021.10.0=pyhd3eb1b0_0
dataclasses=0.8=pyh6d0b6a4_7
debugpy=1.4.1=py39h23ab428_0
decorator=5.1.0=pyhd3eb1b0_0
defusedxml=0.7.1=pyhd3eb1b0_0
diff-match-patch=20200713=pyhd3eb1b0_0
distributed=2021.10.0=py39hecd8cb5_0
docutils=0.17.1=py39hecd8cb5_1
entrypoints=0.3=py39hecd8cb5_0
et_xmlfile=1.1.0=py39hecd8cb5_0
fastcache=1.1.0=py39h9ed2024_0
filelock=3.3.1=pyhd3eb1b0_1
flake8=3.9.2=pyhd3eb1b0_0
flask=1.1.2=pyhd3eb1b0_0
fonttools=4.25.0=pyhd3eb1b0_0
freetype=2.10.4=ha233b18_0
fsspec=2021.8.1=pyhd3eb1b0_0
get_terminal_size=1.0.0=h7520d66_0
gevent=21.8.0=py39h9ed2024_1
giflib=5.2.1=haf1e3a3_0
glob2=0.7=pyhd3eb1b0_0
gmp=6.2.1=h23ab428_2
gmpy2=2.0.8=py39h4b98818_3
greenlet=1.1.1=py39h23ab428_0
h5py=3.2.1=py39h90fc2a2_0
hdf5=1.10.6=hdbbcd12_0
heapdict=1.0.1=pyhd3eb1b0_0
html5lib=1.1=pyhd3eb1b0_0
icu=58.2=h0a44026_3
idna=3.2=pyhd3eb1b0_0
imagecodecs=2021.8.26=py39ha952a84_0
imageio=2.9.0=pyhd3eb1b0_0
imagesize=1.2.0=pyhd3eb1b0_0
importlib-metadata=4.8.1=py39hecd8cb5_0
importlib_metadata=4.8.1=hd3eb1b0_0
inflection=0.5.1=py39hecd8cb5_0
iniconfig=1.1.1=pyhd3eb1b0_0
intel-openmp=2021.4.0=hecd8cb5_3538
intervaltree=3.1.0=pyhd3eb1b0_0
ipykernel=6.4.1=py39hecd8cb5_1
ipython=7.29.0=py39h01d92e1_0
ipython_genutils=0.2.0=pyhd3eb1b0_1
ipywidgets=7.6.5=pyhd3eb1b0_1
isort=5.9.3=pyhd3eb1b0_0
itsdangerous=2.0.1=pyhd3eb1b0_0
jbig=2.1=h4d881f8_0
jdcal=1.4.1=pyhd3eb1b0_0
jedi=0.18.0=py39hecd8cb5_1
jinja2=2.11.3=pyhd3eb1b0_0
jinja2-time=0.2.0=pyhd3eb1b0_2
joblib=1.1.0=pyhd3eb1b0_0
jpeg=9d=h9ed2024_0
json5=0.9.6=pyhd3eb1b0_0
jsonschema=3.2.0=pyhd3eb1b0_2
jupyter=1.0.0=py39hecd8cb5_7
jupyter_client=6.1.12=pyhd3eb1b0_0
jupyter_console=6.4.0=pyhd3eb1b0_0
jupyter_core=4.8.1=py39hecd8cb5_0
jupyter_server=1.4.1=py39hecd8cb5_0
jupyterlab=3.2.1=pyhd3eb1b0_1
jupyterlab_pygments=0.1.2=py_0
jupyterlab_server=2.8.2=pyhd3eb1b0_0
jupyterlab_widgets=1.0.0=pyhd3eb1b0_1
jxrlib=1.1=haf1e3a3_2
keyring=23.1.0=py39hecd8cb5_0
kiwisolver=1.3.1=py39h23ab428_0
krb5=1.19.2=hcd88c3b_0
lazy-object-proxy=1.6.0=py39h9ed2024_0
lcms2=2.12=hf1fd2bf_0
lerc=3.0=he9d5cce_0
libaec=1.0.4=hb1e8313_1
libarchive=3.4.2=haa3ed63_0
libcurl=7.78.0=hb8e4fae_0
libcxx=12.0.0=h2f01273_0
libdeflate=1.8=h9ed2024_5
libedit=3.1.20210910=hca72f7f_0
libev=4.33=h9ed2024_1
libffi=3.3=hb1e8313_2
libgfortran=3.0.1=h93005f0_2
libiconv=1.16=h1de35cc_0
liblief=0.10.1=h23ab428_1
libllvm11=11.1.0=h9b2ccf5_0
libnghttp2=1.41.0=h7580e61_2
libpng=1.6.37=ha441bb4_0
libsodium=1.0.18=h1de35cc_0
libspatialindex=1.9.3=h23ab428_0
libssh2=1.9.0=ha12b0ac_1
libtiff=4.2.0=h87d7836_0
libuv=1.40.0=haf1e3a3_0
libwebp=1.2.0=hacca55c_0
libwebp-base=1.2.0=h9ed2024_0
libxml2=2.9.12=hcdb78fc_0
libxslt=1.1.34=h83b36ba_0
libzopfli=1.0.3=hb1e8313_0
llvm-openmp=12.0.0=h0dcd299_1
llvmlite=0.37.0=py39he4411ff_1
locket=0.2.1=py39hecd8cb5_1
lxml=4.6.3=py39h26b266a_0
lz4-c=1.9.3=h23ab428_1
lzo=2.10=haf1e3a3_2
markupsafe=1.1.1=py39h9ed2024_0
matplotlib=3.4.3=py39hecd8cb5_0
matplotlib-base=3.4.3=py39h0a11d32_0
matplotlib-inline=0.1.2=pyhd3eb1b0_2
mccabe=0.6.1=py39hecd8cb5_1
mistune=0.8.4=py39h9ed2024_1000
mkl=2021.4.0=hecd8cb5_637
mkl-service=2.4.0=py39h9ed2024_0
mkl_fft=1.3.1=py39h4ab4a9b_0
mkl_random=1.2.2=py39hb2f4e1b_0
mock=4.0.3=pyhd3eb1b0_0
more-itertools=8.10.0=pyhd3eb1b0_0
mpc=1.1.0=h6ef4df4_1
mpfr=4.0.2=h9066e36_1
mpi=1.0=mpich
mpich=3.3.2=hc856adb_0
mpmath=1.2.1=py39hecd8cb5_0
msgpack-python=1.0.2=py39hf7b0b51_1
multipledispatch=0.6.0=py39hecd8cb5_0
munkres=1.1.4=py_0
mypy_extensions=0.4.3=py39hecd8cb5_0
nbclassic=0.2.6=pyhd3eb1b0_0
nbclient=0.5.3=pyhd3eb1b0_0
nbconvert=6.1.0=py39hecd8cb5_0
nbformat=5.1.3=pyhd3eb1b0_0
ncurses=6.3=hca72f7f_1
nest-asyncio=1.5.1=pyhd3eb1b0_0
networkx=2.6.3=pyhd3eb1b0_0
nltk=3.6.5=pyhd3eb1b0_0
nose=1.3.7=pyhd3eb1b0_1006
notebook=6.4.5=py39hecd8cb5_0
numba=0.54.1=py39hae1ba45_0
numexpr=2.7.3=py39h5873af2_1
numpy=1.20.3=py39h4b4dc7a_0
numpy-base=1.20.3=py39he0bd621_0
numpydoc=1.1.0=pyhd3eb1b0_1
olefile=0.46=pyhd3eb1b0_0
opencv-python=4.5.5.64=pypi_0
openjpeg=2.4.0=h66ea3da_0
openpyxl=3.0.9=pyhd3eb1b0_0
openssl=1.1.1l=h9ed2024_0
packaging=21.0=pyhd3eb1b0_0
pandas=1.3.4=py39h743cdd8_0
pandocfilters=1.4.3=py39hecd8cb5_1
param=1.12.1=pypi_0
parso=0.8.2=pyhd3eb1b0_0
partd=1.2.0=pyhd3eb1b0_0
path=16.0.0=py39hecd8cb5_0
path.py=12.5.0=hd3eb1b0_0
pathlib2=2.3.6=py39hecd8cb5_2
pathspec=0.7.0=py_0
patsy=0.5.2=py39hecd8cb5_0
pep8=1.7.1=py39hecd8cb5_0
pexpect=4.8.0=pyhd3eb1b0_3
pickleshare=0.7.5=pyhd3eb1b0_1003
pillow=8.4.0=py39h98e4679_0
pip=21.2.4=py39hecd8cb5_0
pkginfo=1.7.1=py39hecd8cb5_0
pluggy=0.13.1=py39hecd8cb5_0
ply=3.11=py39hecd8cb5_0
poyo=0.5.0=pyhd3eb1b0_0
prometheus_client=0.11.0=pyhd3eb1b0_0
prompt-toolkit=3.0.20=pyhd3eb1b0_0
prompt_toolkit=3.0.20=hd3eb1b0_0
psutil=5.8.0=py39h9ed2024_1
ptyprocess=0.7.0=pyhd3eb1b0_2
py=1.10.0=pyhd3eb1b0_0
py-lief=0.10.1=py39h23ab428_1
pycodestyle=2.7.0=pyhd3eb1b0_0
pycosat=0.6.3=py39h9ed2024_0
pycparser=2.20=py_2
pyct=0.4.8=pypi_0
pycurl=7.44.1=py39hbcfaee0_1
pydocstyle=6.1.1=pyhd3eb1b0_0
pyerfa=2.0.0=py39h9ed2024_0
pyflakes=2.3.1=pyhd3eb1b0_0
pygments=2.10.0=pyhd3eb1b0_0
pylint=2.9.6=py39hecd8cb5_1
pyls-spyder=0.4.0=pyhd3eb1b0_0
pyodbc=4.0.31=py39h23ab428_0
pyopenssl=21.0.0=pyhd3eb1b0_1
pyparsing=3.0.4=pyhd3eb1b0_0
pyqt=5.9.2=py39h23ab428_6
pyrsistent=0.18.0=py39hca72f7f_0
pysocks=1.7.1=py39hecd8cb5_0
pytables=3.6.1=py39h648f197_1
pytest=6.2.4=py39hecd8cb5_2
python=3.9.7=h88f2d9e_1
python-dateutil=2.8.2=pyhd3eb1b0_0
python-libarchive-c=2.9=pyhd3eb1b0_1
python-lsp-black=1.0.0=pyhd3eb1b0_0
python-lsp-jsonrpc=1.0.0=pyhd3eb1b0_0
python-lsp-server=1.2.4=pyhd3eb1b0_0
python-slugify=5.0.2=pyhd3eb1b0_0
python.app=3=py39hca72f7f_0
pytz=2021.3=pyhd3eb1b0_0
pywavelets=1.1.1=py39he3068b8_4
pyyaml=6.0=py39hca72f7f_1
pyzmq=22.2.1=py39h23ab428_1
qdarkstyle=3.0.2=pyhd3eb1b0_0
qstylizer=0.1.10=pyhd3eb1b0_0
qt=5.9.7=h468cd18_1
qtawesome=1.0.2=pyhd3eb1b0_0
qtconsole=5.1.1=pyhd3eb1b0_0
qtpy=1.10.0=pyhd3eb1b0_0
readline=8.1=h9ed2024_0
regex=2021.8.3=py39h9ed2024_0
requests=2.26.0=pyhd3eb1b0_0
ripgrep=12.1.1=0
rope=0.19.0=pyhd3eb1b0_0
rtree=0.9.7=py39hecd8cb5_1
ruamel_yaml=0.15.100=py39h9ed2024_0
scikit-image=0.18.3=py39hae1ba45_0
scikit-learn=0.24.2=py39hb2f4e1b_0
scikit-learn-intelex=2021.3.0=py39hecd8cb5_0
scipy=1.7.1=py39h88652d9_2
seaborn=0.11.2=pyhd3eb1b0_0
send2trash=1.8.0=pyhd3eb1b0_1
setuptools=58.0.4=py39hecd8cb5_0
simplegeneric=0.8.1=py39hecd8cb5_2
singledispatch=3.7.0=pyhd3eb1b0_1001
sip=4.19.13=py39h23ab428_0
six=1.16.0=pyhd3eb1b0_0
snappy=1.1.8=hb1e8313_0
sniffio=1.2.0=py39hecd8cb5_1
snowballstemmer=2.1.0=pyhd3eb1b0_0
sortedcollections=2.1.0=pyhd3eb1b0_0
sortedcontainers=2.4.0=pyhd3eb1b0_0
soupsieve=2.2.1=pyhd3eb1b0_0
sphinx=4.2.0=pyhd3eb1b0_1
sphinxcontrib=1.0=py39hecd8cb5_1
sphinxcontrib-applehelp=1.0.2=pyhd3eb1b0_0
sphinxcontrib-devhelp=1.0.2=pyhd3eb1b0_0
sphinxcontrib-htmlhelp=2.0.0=pyhd3eb1b0_0
sphinxcontrib-jsmath=1.0.1=pyhd3eb1b0_0
sphinxcontrib-qthelp=1.0.3=pyhd3eb1b0_0
sphinxcontrib-serializinghtml=1.1.5=pyhd3eb1b0_0
sphinxcontrib-websupport=1.2.4=py_0
spyder=5.1.5=py39hecd8cb5_1
spyder-kernels=2.1.3=py39hecd8cb5_0
sqlalchemy=1.4.22=py39h9ed2024_0
sqlite=3.36.0=hce871da_0
statsmodels=0.12.2=py39h9ed2024_0
sympy=1.9=py39hecd8cb5_0
tabulate=0.8.9=pypi_0
tbb=2021.4.0=haf03e11_0
tbb4py=2021.4.0=py39haf03e11_0
tblib=1.7.0=pyhd3eb1b0_0
terminado=0.9.4=py39hecd8cb5_0
testpath=0.5.0=pyhd3eb1b0_0
text-unidecode=1.3=pyhd3eb1b0_0
textdistance=4.2.1=pyhd3eb1b0_0
threadpoolctl=2.2.0=pyh0d69192_0
three-merge=0.1.1=pyhd3eb1b0_0
tifffile=2021.7.2=pyhd3eb1b0_2
tinycss=0.4=pyhd3eb1b0_1002
tk=8.6.11=h7bc2e8c_0
toml=0.10.2=pyhd3eb1b0_0
toolz=0.11.1=pyhd3eb1b0_0
torch=1.11.0=pypi_0
torchvision=0.12.0=pypi_0
tornado=6.1=py39h9ed2024_0
tqdm=4.62.3=pyhd3eb1b0_1
traitlets=5.1.0=pyhd3eb1b0_0
typed-ast=1.4.3=py39h9ed2024_1
typing_extensions=3.10.0.2=pyh06a4308_0
tzdata=2021e=hda174b7_0
ujson=4.0.2=py39h23ab428_0
unicodecsv=0.14.1=py39hecd8cb5_0
unidecode=1.2.0=pyhd3eb1b0_0
unixodbc=2.3.9=haf1e3a3_0
urllib3=1.26.7=pyhd3eb1b0_0
watchdog=2.1.3=py39hd5f6b7e_0
wcwidth=0.2.5=pyhd3eb1b0_0
webencodings=0.5.1=py39hecd8cb5_1
werkzeug=2.0.2=pyhd3eb1b0_0
wheel=0.37.0=pyhd3eb1b0_1
whichcraft=0.6.1=pyhd3eb1b0_0
widgetsnbextension=3.5.1=py39hecd8cb5_0
wrapt=1.12.1=py39h9ed2024_1
wurlitzer=2.1.1=py39hecd8cb5_0
xlrd=2.0.1=pyhd3eb1b0_0
xlsxwriter=3.0.1=pyhd3eb1b0_0
xlwings=0.24.9=py39hecd8cb5_0
xlwt=1.3.0=py39hecd8cb5_0
xz=5.2.5=h1de35cc_0
yaml=0.2.5=haf1e3a3_0
yapf=0.31.0=pyhd3eb1b0_0
zeromq=4.3.4=h23ab428_0
zfp=0.5.5=h23ab428_6
zict=2.0.0=pyhd3eb1b0_0
zipp=3.6.0=pyhd3eb1b0_0
zlib=1.2.11=h1de35cc_3
zope=1.0=py39hecd8cb5_1
zope.event=4.5.0=py39hecd8cb5_0
zope.interface=5.4.0=py39h9ed2024_0
zstd=1.4.9=h322a384_0```

This is the diff between them:
```< _ipyw_jlab_nb_ext_conf=0.1.0=py39hecd8cb5_0
< academic=0.8.1=pypi_0
9d6
< anaconda-navigator=2.1.1=py39_0
29d25
< backports.functools_lru_cache=1.6.4=pyhd3eb1b0_0
31,32d26
< backports.tempfile=1.0=pyhd3eb1b0_1
< backports.weakref=1.0.post1=py_1
34d27
< bibtexparser=1.1.0=pypi_0
64d56
< conda-build=3.21.5=py39hecd8cb5_0
66d57
< conda-env=2.6.0=1
69d59
< conda-repo-cli=1.0.4=pyhd3eb1b0_0
71d60
< conda-verify=3.4.2=py_1
89d77
< docker-pycreds=0.4.0=pypi_0
100d87
< future=0.18.2=py39hecd8cb5_1
104,105d90
< gitdb=4.0.9=pypi_0
< gitpython=3.1.27=pypi_0
207d191
< navigator-updater=0.2.1=py39hecd8cb5_0
238d221
< pathtools=0.1.2=pypi_0
250d232
< promise=2.3=pypi_0
253d234
< protobuf=3.19.4=pypi_0
267d247
< pyjwt=2.1.0=py39hecd8cb5_0
302d281
< ruamel-yaml=0.16.10=pypi_0
310,311d288
< sentry-sdk=1.5.6=pypi_0
< setproctitle=1.2.2=pypi_0
313d289
< shortuuid=1.0.8=pypi_0
318d293
< smmap=5.0.0=pypi_0
344d318
< termcolor=1.1.0=pypi_0
369d342
< wandb=0.12.11=pypi_0
383d355
< xmltodict=0.12.0=pyhd3eb1b0_0
387d358
< yaspin=2.1.0=pypi_0```

@guydav
Copy link
Author

guydav commented May 3, 2022

Updating with one more thought I had: since it complained about the session already being started, I searched for all running processes with Python in their name (after closing Code), and killed them using killall -9 -f "...". It still failed with one env and succeeded with the other one -- that is, it failed with my original env even when I verified there are no open Python processes.

@rebornix rebornix transferred this issue from microsoft/vscode May 3, 2022
@rchiodo
Copy link
Contributor

rchiodo commented May 4, 2022

Thanks for the issue.

Your ipython and debugpy are rather out of date.

Can you try creating a conda environment like so?

conda create -c conda-forge -n debugPyLatest python=3.10 debugpy=1.6 ipython=8.3 ipykernel=6.13

As far as I can tell your two environments are identical so not sure how one could work but the other fails. But both IPython and debugpy have fixed issues in the last year related to debugging.

If I try the conda environment listed above, I can continually debug a cell.

@rchiodo rchiodo added bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster labels May 4, 2022
@guydav
Copy link
Author

guydav commented May 4, 2022

Thanks for the prompt reply, @rchiodo . It's odd that my versions are so out of date -- perhaps it's that I wasn't explicitly using the conda-forge channel?

Back to the issue at hand. I managed to get the same behavior to replicate with my base environment as well, by:

  1. Trying to debug that cell in my torch environment, failing and receiving the error message, after which the cell continues to run, but without a debugger.
  2. Restarting the notebook.
  3. Changing kernel to my base environment
  4. Trying to debug it using that kernel.

I wondered if it might be an orphan process / port reuse issue -- after quitting Code, I still have a couple of debugpy process running in the background (found using ps -fade | grep debugpy). However, killing all open python processes (while Code is closed) and restarting Code isn't sufficient -- it still fails.

I created an environment using the specification you provide, other than using python 3.9.12, since there's no official pytorch release for 3.10 as far as I know. I installed some other dependencies using pip, and let code install the dependencies for running notebooks using this environment. To test it, I:

  1. Quit Code.
  2. Verified there are no orphan python processes.
  3. Opened Code.
  4. Set it as the "Jupyter: Select interpreter to start Jupyter server" and as the kernel for this notebook.
  5. Tried to debug the cell, and I receive the same error: "Invalid message: Session is already started".

Here's the output I get for Jupyer in code (in verbose mode). Could it be that something in my Code installation has gotten wonky, and that I should delete and reinstall? I can also try to disable most non-necessary extensions (the bisect didn't work because it disabled the Jupyter extension).

Verbose 18:25:21: IKernel Status change to busy
Verbose 18:25:21: IKernel Status change to idle
Info 18:25:21: Executing silently Code (completed) = import ipykernel\nprint(ipykernel.__version__)
Verbose 18:25:21: [Debug] to kernel: {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"Python Kernel Debug Adapter","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1}
Verbose 18:25:21: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_49","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.168420Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_49","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:21.921000Z","msg_id":"2c830255-ef42-4f30-a4a9-3797edc78551","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":1,"type":"event","event":"output","body":{"category":"telemetry","output":"ptvsd","data":{"packageVersion":"1.6.0"}}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_50","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.169071Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_50","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:21.921000Z","msg_id":"2c830255-ef42-4f30-a4a9-3797edc78551","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":2,"type":"event","event":"output","body":{"category":"telemetry","output":"debugpy","data":{"packageVersion":"1.6.0"}}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: [Debug] response: {"seq":3,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDebuggerProperties":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsValueFormattingOptions":true,"supportsTerminateDebuggee":true,"supportsGotoTargetsRequest":true,"supportsClipboardContext":true,"exceptionBreakpointFilters":[{"filter":"raised","label":"Raised Exceptions","default":false,"description":"Break whenever any exception is raised."},{"filter":"uncaught","label":"Uncaught Exceptions","default":true,"description":"Break when the process is exiting due to unhandled exception."},{"filter":"userUnhandled","label":"User Uncaught Exceptions","default":false,"description":"Break when exception escapes into library code."}],"supportsStepInTargetsRequest":true}}
Verbose 18:25:22: [Debug] to kernel: {"command":"debugInfo","type":"request","seq":3}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"type":"response","request_seq":3,"success":true,"command":"debugInfo","body":{"isStarted":true,"hashMethod":"Murmur2","hashSeed":3339675911,"tmpFilePrefix":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_55153/","tmpFileSuffix":".py","breakpoints":[],"stoppedThreads":[],"richRendering":true,"exceptionPaths":["Python Exceptions"]}}
Verbose 18:25:22: [Debug] to kernel: {"command":"attach","arguments":{"type":"Python Kernel Debug Adapter","name":"BugReproduction.ipynb","request":"attach","justMyCode":true,"__mode":1,"__cellIndex":3,"__sessionId":"a37016c4-69d0-4f64-b1b8-c45188abb756"},"type":"request","seq":2}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_57","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.199693Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_57","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:22.197000Z","msg_id":"8190aad0-8133-470f-982e-5af3ecbb140a","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":4,"type":"event","event":"debugpyWaitingForServer","body":{"host":"127.0.0.1","port":53783}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_58","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.202619Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_58","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:22.197000Z","msg_id":"8190aad0-8133-470f-982e-5af3ecbb140a","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":5,"type":"event","event":"initialized"},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_59","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.204460Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_59","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:22.197000Z","msg_id":"8190aad0-8133-470f-982e-5af3ecbb140a","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":8,"type":"event","event":"process","body":{"name":"/Users/guydavidson/opt/anaconda3/envs/debugPyLatest/lib/python3.9/site-packages/ipykernel_launcher.py","systemProcessId":55153,"isLocalProcess":true,"startMethod":"attach"}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":7,"type":"response","request_seq":2,"success":true,"command":"attach"}
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_62","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.205831Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_62","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:22.197000Z","msg_id":"8190aad0-8133-470f-982e-5af3ecbb140a","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":9,"type":"event","event":"thread","body":{"reason":"started","threadId":1}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_63","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.206148Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_63","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:22.197000Z","msg_id":"8190aad0-8133-470f-982e-5af3ecbb140a","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":10,"type":"event","event":"thread","body":{"reason":"started","threadId":2}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_64","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.206699Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_64","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:22.197000Z","msg_id":"8190aad0-8133-470f-982e-5af3ecbb140a","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":11,"type":"event","event":"thread","body":{"reason":"started","threadId":3}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"models.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/models.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":4}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"NewCentroidAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/NewCentroidAnalysis.ipynb#ch0000003"},"lines":[15],"breakpoints":[{"line":15}],"sourceModified":false},"type":"request","seq":5}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"quinn_objects.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/datagen/quinn_objects.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":6}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnCentroidsAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnCentroidsAnalysis.ipynb#ch0000004"},"lines":[59],"breakpoints":[{"line":59}],"sourceModified":false},"type":"request","seq":7}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnDataAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000032"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":8}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnDataAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000015"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":9}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnEmbeddingDebugging.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingDebugging.ipynb#ch0000004"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":10}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnEmbeddingTask.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingTask.ipynb#ch0000065"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":11}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnStimuliDemo.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000015"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":12}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"QuinnStimuliDemo.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000007"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":13}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"run_embeddings.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/run/run_embeddings.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":14}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"stimuli.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/stimuli.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":15}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"task.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/task.py"},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":16}
Verbose 18:25:22: [Debug] to kernel: {"command":"setBreakpoints","arguments":{"source":{"name":"triplets.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py"},"lines":[156,157,185],"breakpoints":[{"line":156,"condition":"vertical_margin >= 112"},{"line":157,"condition":"horizontal_margin >= 112"},{"line":185,"condition":"-target_horizontal_margin >= target_horizontal_margin - target_distance"}],"sourceModified":false},"type":"request","seq":17}
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_65","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.207109Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_65","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:22.197000Z","msg_id":"8190aad0-8133-470f-982e-5af3ecbb140a","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":12,"type":"event","event":"thread","body":{"reason":"started","threadId":4}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_66","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.207425Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_66","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:22.197000Z","msg_id":"8190aad0-8133-470f-982e-5af3ecbb140a","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":13,"type":"event","event":"thread","body":{"reason":"started","threadId":5}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] response: {"seq":14,"type":"response","request_seq":4,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] response: {"seq":15,"type":"response","request_seq":5,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":false,"id":0,"message":"Breakpoint in file that does not exist.","source":{"name":"NewCentroidAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/NewCentroidAnalysis.ipynb#ch0000003"},"line":15}]}}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":16,"type":"response","request_seq":6,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] response: {"seq":17,"type":"response","request_seq":7,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":false,"id":1,"message":"Breakpoint in file that does not exist.","source":{"name":"QuinnCentroidsAnalysis.ipynb","path":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnCentroidsAnalysis.ipynb#ch0000004"},"line":59}]}}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":18,"type":"response","request_seq":8,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] response: {"seq":19,"type":"response","request_seq":9,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":20,"type":"response","request_seq":10,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] response: {"seq":21,"type":"response","request_seq":11,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] response: {"seq":22,"type":"response","request_seq":12,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":23,"type":"response","request_seq":13,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] response: {"seq":24,"type":"response","request_seq":14,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":25,"type":"response","request_seq":15,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] response: {"seq":26,"type":"response","request_seq":16,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":27,"type":"response","request_seq":17,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":true,"id":2,"source":{"name":"triplets.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py"},"line":156},{"verified":true,"id":3,"source":{"name":"triplets.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py"},"line":157},{"verified":true,"id":4,"source":{"name":"triplets.py","path":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py"},"line":185}]}}
Verbose 18:25:22: [Debug] to kernel: {"command":"threads","type":"request","seq":18}
Verbose 18:25:22: [Debug] to kernel: {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":19}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] response: {"seq":28,"type":"response","request_seq":18,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-3"},{"id":3,"name":"Thread-4"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":5,"name":"Thread-2"}]}}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":29,"type":"response","request_seq":19,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
Verbose 18:25:22: [Debug] to kernel: {"command":"setExceptionBreakpoints","arguments":{"filters":["uncaught"]},"type":"request","seq":20}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":30,"type":"response","request_seq":20,"success":true,"command":"setExceptionBreakpoints"}
Info 18:25:22: Executing silently Code (idle) = import debugpy\ndebugpy.debug_this_thread()
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Info 18:25:22: Executing silently Code (completed) = import debugpy\ndebugpy.debug_this_thread()
Verbose 18:25:22: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"import os\nimport sys\nsys.path.append(os.path.abspath('.'))\nsys.path.append(os.path.abspath('..'))\nsys.path.append(os.path.abspath('../run'))\n\nfrom collections import defaultdict\nimport itertools\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nfrom scipy import stats\nimport typing\nimport pandas as pd\nfrom tqdm.notebook import tqdm\n\nfrom torchvision.transforms import functional as F\n\nfrom IPython.display import display, Markdown\n\nfrom simple_relational_reasoning.embeddings.stimuli import build_differet_shapes_stimulus_generator, build_split_text_stimulus_generator, build_random_color_stimulus_generator,\\\n    find_non_empty_indices, EMPTY_TENSOR_PIXEL\nfrom simple_relational_reasoning.embeddings.triplets import QuinnTripletGenerator, ABOVE_BELOW_RELATION, BETWEEN_RELATION\nfrom simple_relational_reasoning.embeddings.visualizations import filter_and_group, DEFAULT_TEXT_KWARGS, save_plot"},"type":"request","seq":22}
Verbose 18:25:22: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"BASELINE_TRIPLET_KWARGS = dict(n_target_types=2, extra_diagonal_margin=0)\n\ndef parse_above_below_condition(df):\n    above_below_types = []\n\n    for _, (relation, two_refs, adjacent_refs) in \\\n        df.loc[:, ['relation', 'two_reference_objects', 'adjacent_reference_objects']].iterrows():\n        a_b_type = None\n\n        if relation == 'above_below':\n            if not two_refs:\n                a_b_type = 'one_reference'\n\n            elif adjacent_refs:\n                a_b_type = 'adjacent_references'\n\n            else:\n                a_b_type = 'gapped_references'\n\n        above_below_types.append(a_b_type)\n\n    return df.assign(above_below_type=above_below_types)\n\n\nGENERATOR_NAMES = ('color bar', 'split text', 'random colors')\n\n\ndef create_stimulus_generators_and_names(names=GENERATOR_NAMES, seed=None, **kwargs):\n    rng = np.random.default_rng(seed if seed is not None else np.random.randint(0, 2**32))\n\n    generators = (\n        build_differet_shapes_stimulus_generator(rng=rng, **kwargs), \n        \n        build_split_text_stimulus_generator(\n            # reference_box_size=10,\n            # total_reference_size=(10, 140), n_reference_patches=8,\n            # reference_patch_kwargs=dict(ylim=(-70, 70)),\n            rng=rng, **kwargs),\n        build_random_color_stimulus_generator(rng=rng, **kwargs)\n    )\n    \n    return zip(generators, names)"},"type":"request","seq":23}
Verbose 18:25:22: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"DATA_PATH = 'centroid_sizes.csv'\nLIST_COLUMNS = [\n    'row_centroids', 'col_centroids', \n    'first_non_empty_row', 'last_non_empty_row', \n    'first_non_empty_col', 'last_non_empty_col'\n]\nCOLUMNS = [\n    'relation', 'two_reference_objects', \n    'adjacent_reference_objects', 'transpose', \n    'n_habituation_stimuli', 'rotate_angle', 'stimulus_generator'\n] + LIST_COLUMNS\nN_examples = 100\nANGLES = [0, 30, 45, 60, 90, 120, 135, 150]\n\nOPTION_SET = (\n    (ABOVE_BELOW_RELATION, BETWEEN_RELATION),\n    (False, True),\n    (False, True),\n    (False, True),\n    [1, 4],\n    ANGLES\n) \n\nDISTANCE_ENDPOINTS_DICT = {\n    (ABOVE_BELOW_RELATION, False, False): (30, 80),\n    (ABOVE_BELOW_RELATION, True, False): (60, 115),\n    (ABOVE_BELOW_RELATION, True, True): (40, 80),\n    (BETWEEN_RELATION, True, False): (50, 80),\n}\n"},"type":"request","seq":24}
Verbose 18:25:22: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":"generate_data = True\nif generate_data:\n    total_options = np.prod([len(v) for v in OPTION_SET])\n    option_iter = itertools.product(*OPTION_SET)\n\n    data_rows = []\n\n    for relation, two_reference_objects, adjacent_reference_objects, transpose, n_habituation_stimuli, rotate_angle in tqdm(option_iter, total=total_options):\n        if (relation == ABOVE_BELOW_RELATION) and not two_reference_objects and adjacent_reference_objects:\n            continue\n\n        if (relation == BETWEEN_RELATION) and ((not two_reference_objects) or adjacent_reference_objects):\n            continue\n\n        distance_endpoints = DISTANCE_ENDPOINTS_DICT[(relation, two_reference_objects, adjacent_reference_objects)]\n\n        print(f'relation={relation} two_refs={two_reference_objects} adj_refs={adjacent_reference_objects} transpose={transpose} n_hs={n_habituation_stimuli} angle={rotate_angle} endpoints={distance_endpoints}')\n\n        for stimulus_generator, generator_name in create_stimulus_generators_and_names(rotate_angle=rotate_angle):\n            triplet_generator = QuinnTripletGenerator(stimulus_generator, distance_endpoints,\n                relation=relation, two_reference_objects=two_reference_objects,\n                adjacent_reference_objects=adjacent_reference_objects, \n                transpose=transpose,\n                n_habituation_stimuli=n_habituation_stimuli,\n                track_centroids=True,\n                **BASELINE_TRIPLET_KWARGS)\n\n            triplets = triplet_generator(N_examples, normalize=False)\n            non_empty_tuples = [find_non_empty_indices(t, empty_value=EMPTY_TENSOR_PIXEL, color_axis=0) for t in triplets.view(-1, *triplets.shape[2:])]\n            del triplets\n            row_centroids, col_centroids = zip(*triplet_generator.stimulus_centroids)\n            row_centroids = list(row_centroids)\n            col_centroids = list(col_centroids)\n\n            first_non_empty_row, last_non_empty_row, first_non_empty_col, last_non_empty_col = zip(*non_empty_tuples)\n            first_non_empty_row = [i.item() for i in first_non_empty_row]\n            last_non_empty_row = [i.item() for i in last_non_empty_row]\n            first_non_empty_col = [i.item() for i in first_non_empty_col]\n            last_non_empty_col = [i.item() for i in last_non_empty_col]\n            \n            row = [relation, two_reference_objects, adjacent_reference_objects, transpose,\n                n_habituation_stimuli, rotate_angle, generator_name, \n                row_centroids, col_centroids, \n                first_non_empty_row, last_non_empty_row, first_non_empty_col, last_non_empty_col\n            ]\n            data_rows.append(row)\n\n            del triplet_generator\n            del stimulus_generator\n\n    \n    data_df = pd.DataFrame(data_rows, columns=COLUMNS)\n    data_df = parse_above_below_condition(data_df)\n    data_df.to_csv(DATA_PATH, index=False)\n\nelse:\n    data_df = pd.read_csv(DATA_PATH, converters={col: pd.eval for col in LIST_COLUMNS})    \n    data_df = data_df.assign(**{col: data_df[col].apply(list) for col in LIST_COLUMNS})\n    data_df = data_df.assign(relation_and_type=data_df.above_below_type)\n    data_df.relation_and_type[data_df.relation_and_type.isna()] = 'between'\n    \n\ndata_df.head() \n\n"},"type":"request","seq":25}
Verbose 18:25:22: [Debug] to kernel: {"command":"dumpCell","arguments":{"code":""},"type":"request","seq":26}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"type":"response","request_seq":22,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_55153/3455272455.py"}}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] response: {"type":"response","request_seq":23,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_55153/2824124433.py"}}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"type":"response","request_seq":24,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_55153/3147086266.py"}}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"type":"response","request_seq":25,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_55153/364348433.py"}}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"type":"response","request_seq":26,"success":true,"command":"dumpCell","body":{"sourcePath":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_55153/3990065800.py"}}
Verbose 18:25:22: [Debug] to kernel: {"command":"configurationDone","type":"request","seq":21}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":21,"type":"response","request_seq":21,"success":true,"command":"configurationDone"}
Verbose 18:25:22: VSCodeNotebookController::handleExecution, Class name = M (started execution)
Info 18:25:22: Execute Cells request 3
Info 18:25:22: Execute Cell 3 ~/projects/simple-relational-reasoning/notebooks/BugReproduction.ipynb
Verbose 18:25:22: [Debug] to kernel: {"command":"threads","type":"request","seq":27}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":31,"type":"response","request_seq":27,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-3"},{"id":3,"name":"Thread-4"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":5,"name":"Thread-2"}]}}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_145","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.568737Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_145","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:22.487000Z","msg_id":"dc921c09-341d-4ebc-ab9f-aa20109daa14","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":32,"type":"event","event":"thread","body":{"reason":"started","threadId":6}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: [Debug] to kernel: {"command":"threads","type":"request","seq":28}
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":33,"type":"response","request_seq":28,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-3"},{"id":3,"name":"Thread-4"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":5,"name":"Thread-2"},{"id":6,"name":"Thread-10"}]}}
Verbose 18:25:22: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_149","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:22.857033Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_149","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:22.684000Z","msg_id":"555ebc29-6f02-43c5-8f8a-6be422f773b0","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":34,"type":"event","event":"debugpyAttach","body":{"type":"Python Kernel Debug Adapter","name":"Subprocess 55286","request":"attach","justMyCode":true,"__mode":1,"__cellIndex":3,"__sessionId":"a37016c4-69d0-4f64-b1b8-c45188abb756","connect":{"host":"127.0.0.1","port":"53777"},"logToFile":true,"subProcessId":55286}},"buffers":[],"channel":"iopub"}
Verbose 18:25:22: [Debug] to kernel: {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"Python Kernel Debug Adapter","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1}
Verbose 18:25:22: IKernel Status change to busy
Verbose 18:25:22: IKernel Status change to idle
Verbose 18:25:22: [Debug] response: {"seq":35,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDebuggerProperties":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsValueFormattingOptions":true,"supportsTerminateDebuggee":true,"supportsGotoTargetsRequest":true,"supportsClipboardContext":true,"exceptionBreakpointFilters":[{"filter":"raised","label":"Raised Exceptions","default":false,"description":"Break whenever any exception is raised."},{"filter":"uncaught","label":"Uncaught Exceptions","default":true,"description":"Break when the process is exiting due to unhandled exception."},{"filter":"userUnhandled","label":"User Uncaught Exceptions","default":false,"description":"Break when exception escapes into library code."}],"supportsStepInTargetsRequest":true}}
Verbose 18:25:22: [Debug] to kernel: {"command":"debugInfo","type":"request","seq":3}
Verbose 18:25:23: IKernel Status change to busy
Verbose 18:25:23: IKernel Status change to idle
Verbose 18:25:23: [Debug] response: {"type":"response","request_seq":3,"success":true,"command":"debugInfo","body":{"isStarted":true,"hashMethod":"Murmur2","hashSeed":3339675911,"tmpFilePrefix":"/var/folders/h9/kzpqpksx6fq00v9d73x5j51c0000gn/T/ipykernel_55153/","tmpFileSuffix":".py","breakpoints":[{"source":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/models.py","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/NewCentroidAnalysis.ipynb#ch0000003","breakpoints":[{"line":15}]},{"source":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/datagen/quinn_objects.py","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnCentroidsAnalysis.ipynb#ch0000004","breakpoints":[{"line":59}]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000032","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnDataAnalysis.ipynb#ch0000015","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingDebugging.ipynb#ch0000004","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnEmbeddingTask.ipynb#ch0000065","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000015","breakpoints":[]},{"source":"vscode-notebook-cell:/Users/guydavidson/projects/simple-relational-reasoning/notebooks/QuinnStimuliDemo.ipynb#ch0000007","breakpoints":[]},{"source":"/Users/guydavidson/projects/simple-relational-reasoning/run/run_embeddings.py","breakpoints":[]},{"source":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/stimuli.py","breakpoints":[]},{"source":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/task.py","breakpoints":[]},{"source":"/Users/guydavidson/projects/simple-relational-reasoning/simple_relational_reasoning/embeddings/triplets.py","breakpoints":[{"line":156,"condition":"vertical_margin >= 112"},{"line":157,"condition":"horizontal_margin >= 112"},{"line":185,"condition":"-target_horizontal_margin >= target_horizontal_margin - target_distance"}]}],"stoppedThreads":[],"richRendering":true,"exceptionPaths":["Python Exceptions"]}}
Verbose 18:25:23: [Debug] to kernel: {"command":"attach","arguments":{"type":"Python Kernel Debug Adapter","name":"Subprocess 55286","request":"attach","justMyCode":true,"__mode":1,"__cellIndex":3,"__sessionId":"65a8e804-45de-4bf7-be8f-d2f7aa2542db","connect":{"host":"127.0.0.1","port":"53777"},"logToFile":true,"subProcessId":55286},"type":"request","seq":2}
Verbose 18:25:23: IKernel Status change to busy
Verbose 18:25:23: [Debug] response: {"seq":36,"type":"response","request_seq":2,"success":false,"command":"attach","message":"Invalid message: Session is already started"}
Verbose 18:25:23: [Debug] to kernel: {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":4}
Verbose 18:25:23: IKernel Status change to idle
Verbose 18:25:23: IKernel Status change to busy
Verbose 18:25:23: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_160","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:23.296896Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_160","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:23.221000Z","msg_id":"92a94e50-2c3e-469a-88a2-74ce76b721ef","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":37,"type":"event","event":"terminated"},"buffers":[],"channel":"iopub"}
Verbose 18:25:23: [Debug] event: {"header":{"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_160","msg_type":"debug_event","username":"guydavidson","session":"1bec8475-7dda41c451fc1d6144519d06","date":"2022-05-04T22:25:23.296896Z","version":"5.3"},"msg_id":"1bec8475-7dda41c451fc1d6144519d06_55153_160","msg_type":"debug_event","parent_header":{"date":"2022-05-04T22:25:23.221000Z","msg_id":"92a94e50-2c3e-469a-88a2-74ce76b721ef","msg_type":"debug_request","session":"9773e74a-fa3d-4a08-853f-e3e1c4a1900b","username":"","version":"5.2"},"metadata":{},"content":{"seq":37,"type":"event","event":"terminated"},"buffers":[],"channel":"iopub"}
Verbose 18:25:23: [Debug] to kernel: {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":29}
Verbose 18:25:23: IKernel Status change to idle
Verbose 18:25:23: [Debug] response: {"seq":38,"type":"response","request_seq":4,"success":true,"command":"disconnect"}
Verbose 18:25:23: IKernel Status change to busy
Verbose 18:25:23: IKernel Status change to idle
Info 18:25:23: Cancel all remaining cells true || Error || undefined
Info 18:25:23: Cancel pending cells
Info 18:25:23: Cell 3 executed with state Error
Verbose 18:25:23: VSCodeNotebookController::handleExecution, Class name = M, completed in 1237ms, has a falsy return value
Info 18:25:28: Loading webview. View is notset
Info 18:25:28: Loading web view...
Info 18:25:28: Webview panel created.
Info 18:25:28: Web view react rendered
Info 18:25:28: Executing silently Code (idle) = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 18:25:28: Executing silently Code (idle) = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Verbose 18:25:28: IKernel Status change to busy
Verbose 18:25:28: IKernel Status change to idle
Info 18:25:28: Executing silently Code (completed) = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 18:25:28: Executing silently Code (idle) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Verbose 18:25:28: IKernel Status change to busy
Verbose 18:25:28: IKernel Status change to idle
Info 18:25:28: Executing silently Code (completed) = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 18:25:28: Executing silently Code (idle) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (completed) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (completed) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (idle) = import builtins\nbuiltins.print(_VSCODE_getVariableInfo(BASELINE_TRIPLET_KWARGS))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (idle) = import builtins\nbuiltins.print(_VSCODE_getVariableInfo(BASELINE_TRIPLET_KWARGS))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (completed) = import builtins\nbuiltins.print(_VSCODE_getVariableInfo(BASELINE_TRIPLET_KWARGS))
Verbose 18:25:29: IKernel Status change to busy
Info 18:25:29: Searching for token colors ...
Info 18:25:29: Attempting search for colors ...
Info 18:25:29: Loading colors from /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/theme-defaults/themes/dark_plus.json ...
Info 18:25:29: Attempting search for colors ...
Info 18:25:29: Loading base colors from /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/theme-defaults/themes/dark_plus.json ...
Info 18:25:29: Using colors to generate CSS ...
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (completed) = import builtins\nbuiltins.print(_VSCODE_getVariableInfo(BASELINE_TRIPLET_KWARGS))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (idle) = import builtins\nbuiltins.print(_VSCODE_getVariableInfo(DEFAULT_TEXT_KWARGS))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (completed) = import builtins\nbuiltins.print(_VSCODE_getVariableInfo(DEFAULT_TEXT_KWARGS))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (idle) = import builtins\nbuiltins.print(_VSCODE_getVariableInfo(DISTANCE_ENDPOINTS_DICT))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (completed) = import builtins\nbuiltins.print(_VSCODE_getVariableInfo(DISTANCE_ENDPOINTS_DICT))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (idle) = import builtins\nbuiltins.print(_VSCODE_getVariableInfo(EMPTY_TENSOR_PIXEL))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Info 18:25:29: Executing silently Code (completed) = import builtins\nbuiltins.print(_VSCODE_getVariableInfo(EMPTY_TENSOR_PIXEL))
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle
Verbose 18:25:29: IKernel Status change to busy
Verbose 18:25:29: IKernel Status change to idle```

@greazer greazer added triage-needed Issue needs to be triaged and removed needs-triage labels May 4, 2022
@rchiodo
Copy link
Contributor

rchiodo commented May 4, 2022

That gives me some more questions to ask:

Can you include the first 20 lines or so of your jupyter log? I want to see the version and whether or not ZMQ is working or not (should be the first thing we check).

I think your error is coming from here:
https://github.com/microsoft/debugpy/blob/d1e5db7d8eb3cc4a05947fbbce0df8847f4b7c70/src/debugpy/adapter/clients.py#L197

Which looks to me like we're attaching twice. Perhaps there's a timing issue in how we attach.

Can you try this same thing with a simpler cell? Like maybe just a bunch of prints?

Additionally are you running this directly on your machine or over remote SSH/WSL?

@guydav
Copy link
Author

guydav commented May 4, 2022

To clarify, do you mean the first 20 lines after starting to debug this cell, or after restarting the notebook, or running the first cell in the notebook? I thought I had included the entire execution of the cell, but I might have missed the beginning.

A timing issue would be consistent with one of the things I found at some point -- if I comment out enough of the cell, it doesn't happen. If I restart Code, run the previous cells, and then try to debug (with no breakpoints) a very minimal version of the cell (that terminates almost immediately), it succeeds. If I add a breakpoint, it fails. If I try to debug the same cell twice in a row (without adding breakpoints), it succeeds the first time and fails the second time.

Running directly on my machine.

@rchiodo
Copy link
Contributor

rchiodo commented May 4, 2022

First twenty lines of the log from when VS code opens.

@guydav
Copy link
Author

guydav commented May 4, 2022

Looks like something goes awry:

Jupyter Extension Version: 2022.3.1000901801.
Python Extension Version: 2022.4.1.
Workspace folder ~/projects/simple-relational-reasoning
Error 19:38:37: Exception while attempting zmq : [Error: No native build was found for platform=darwin arch=arm64 runtime=electron abi=101 uv=1 armv=8 libc=glibc node=16.13.0 electron=17.2.0
    loaded from: /Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/zeromq

	at Function.load.path (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/node-gyp-build/index.js:1:3073)
	at load (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/node-gyp-build/index.js:1:625)
	at Object.<anonymous> (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/zeromq/lib/native.js:1:198)
	at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1313)
	at Object.Module._extensions..js (node:internal/modules/cjs/loader:1216:10)
	at Module.load (node:internal/modules/cjs/loader:1035:32)
	at Module._load (node:internal/modules/cjs/loader:876:12)
	at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
	at Function.i._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104:32156)
	at Function.E._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104:28749)
	at Function.g._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:61429)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:699)
	at Object.<anonymous> (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/zeromq/lib/index.js:1:144)
	at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1313)
	at Object.Module._extensions..js (node:internal/modules/cjs/loader:1216:10)
	at Module.load (node:internal/modules/cjs/loader:1035:32)
	at Module._load (node:internal/modules/cjs/loader:876:12)
	at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
	at Function.i._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104:32156)
	at Function.E._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104:28749)
	at Function.g._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:61429)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:699)
	at Object.92747 (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:3851668)
	at __webpack_require__ (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:4533298)
	at u.zmqSupported (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:535364)
	at u.isSupportedForLocalLaunch (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:535107)
	at u.get isSupported [as isSupported] (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:535017)
	at t.registerTypes (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:545810)
	at /Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:4537617
	at /Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:4538435
	at /Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:4538443
	at e.activate (/Users/guydavidson/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:4538565)
	at Function._callActivateOptional (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:16070)
	at Function._callActivate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:15731)
	at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:13549
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async g._activate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:8154)
	at async g._waitForDepsThenActivate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:8096)
	at async g._initialize (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:7460)]
User belongs to experiment group 'jupyterTestcf'
User belongs to experiment group 'jupyterEnhancedDataViewer'
Info 19:38:37: Old kernelspecs (created by Jupyter extension) stored in directory /Users/guydavidson/Library/Jupyter/kernels/__old_vscode_kernelspecs
Verbose 19:38:37: Get Active Interpreter, Class name = x (started execution), Arg 1: undefined
Verbose 19:38:37: Get Kernelspec root path, Class name = v (started execution), Arg 1: {"_isCancelled":false,"_emitter":null}
Verbose 19:38:37: Get Jupyter Paths, Class name = v (started execution), Arg 1: {"_isCancelled":false,"_emitter":null}
Verbose 19:38:37: Get Custom Env Variables, Class name = m (started execution), 
Verbose 19:38:37: Getting Jupyter KernelSpec Root Path, Class name = v (started execution), 
Verbose 19:38:37: Get Interpreters, Class name = x (started execution), Arg 1: undefined
Verbose 19:38:37: Get Interpreters, Class name = x (started execution), Arg 1: undefined
Verbose 19:38:37: Find kernel spec, Class name = I (started execution), Arg 1: "~/projects/simple-relational-reasoning/notebooks/BugReproduction.ipynb", Arg 2: {"interpreter":{"hash":"c7f8e00f851a7185e5345342178c14041451eaa6562c62790473e641b6de40ed"},"kernelspec":{"display_name":"Python 3.8.2 ('torch')","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.12"},"orig_nbformat":4}, Arg 3: ""
Verbose 19:38:37: Get Interpreters, Class name = x (started execution), Arg 1: "~/projects/simple-relational-reasoning/notebooks/BugReproduction.ipynb"
Verbose 19:38:37: Getting Jupyter KernelSpec Root Path, Class name = v, completed in 4ms, has a truthy return value, , Return Value: "/Users/guydavidson/Library/Jupyter/kernels"
Verbose 19:38:37: Get Interpreters, Class name = x (started execution), 
Verbose 19:38:37: Get Interpreter details, Class name = x (started execution), Arg 1: "~/opt/anaconda3/envs/debugPyLatest/bin/python", Arg 2: undefined
Verbose 19:38:37: Get Custom Env Variables, Class name = m (started execution), Arg 1: undefined
Verbose 19:38:37: Get Custom Env Variables, Class name = m (started execution), Arg 1: "~/projects/simple-relational-reasoning"
Verbose 19:38:37: getCondaFile, Class name = b (started execution)
Verbose 19:38:37: getCondaVersion, Class name = b (started execution)
Verbose 19:38:37: getCondaVersionFromPython, Class name = b (started execution)
Info 19:38:37: Attempting to start a server because of preload conditions ...```

@rchiodo
Copy link
Contributor

rchiodo commented May 4, 2022

No that's expected on Mac M1. No ZMQ support. That's the message it generates.

The new version of VS code is about to ship (like tomorrow), which may fix some things. If not we can try your original notebook here to see if we can repro in house.

@guydav
Copy link
Author

guydav commented May 5, 2022

Thanks -- once I get the prompt to update, I will, and I'll report back what happens after.

@greazer greazer added notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) info-needed Issue requires more information from poster and removed info-needed Issue requires more information from poster triage-needed Issue needs to be triaged labels May 5, 2022
@waltergallegog
Copy link

waltergallegog commented May 6, 2022

I'm getting the same error "invalid message "session is already started" when attempting to debug cell number 5 in the lava notebook https://github.com/lava-nc/lava/blob/main/tutorials/in_depth/tutorial03_process_models.ipynb.
Running the cell works without problems.

I'm running on it on a Linux machine, with a conda env required to run lava, python version 3.10.4 ipykernel Version: 6.13.0

VsCode:

Version: 1.66.2
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:49:24.808Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Linux x64 5.13.0-40-generic

The output when i try to debug the cell:

Info 19:19:16: Executing silently Code (idle) = import ipykernel\nprint(ipykernel.__version__)
Info 19:19:16: Executing silently Code (completed) = import ipykernel\nprint(ipykernel.__version__)
Info 19:19:16: Executing silently Code (idle) = import debugpy\ndebugpy.debug_this_thread()
Info 19:19:16: Executing silently Code (completed) = import debugpy\ndebugpy.debug_this_thread()
Info 19:19:16: Execute Cells request 18
Info 19:19:16: Execute Cell 18 /media/walter/data/documents/research/tasks/neuro/lava/tutorials/in_depth/tutorial03_process_models.ipynb
Warn 19:19:17: StdErr from Kernel Process [IPKernelApp] ERROR | Exception in control handler:
Traceback (most recent call last):
  File "/home/walter/miniconda3/envs/lava/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 328, in process_control
    await result
  File "/home/walter/miniconda3/envs/lava/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 947, in debug_request
    reply_content = await reply_content
  File "/home/walter/miniconda3/envs/lava/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 466, in do_debug_request
    return await self.debugger.process_request(msg)
  File "/home/walter/miniconda3/envs/lava/lib/python3.10/site-packages/ipykernel/debugger.py", line 657, in process_request
    self.stop()
  File "/home/walter/miniconda3/envs/lava/lib/python3.10/site-packages/ipykernel/debugger.py", line 400, in stop
    self.debugpy_client.disconnect_tcp_socket()
  File "/home/walter/miniconda3/envs/lava/lib/python3.10/site-packages/ipykernel/debugger.py", line 246, in disconnect_tcp_socket
    self.debugpy_stream.socket.disconnect(self._get_endpoint())
  File "zmq/backend/cython/socket.pyx", line 640, in zmq.backend.cython.socket.Socket.disconnect
zmq.error.ZMQError: No such file or directory

Let me know if / which other logs can be useful to debug the problem.
I'll also try the new vscode version and check if that changes the behavior.

@rchiodo
Copy link
Contributor

rchiodo commented May 6, 2022

@waltergallegog the version of ipykernel, ipython, debugpy and python itself have an impact on debugging. Can you post those version numbers or try with the latest of all 4?

@waltergallegog
Copy link

Hi @rchiodo, here are the versions. I believe they are the latest available. I created the env just yesterday.

$ pip show ipython
Name: ipython
Version: 8.3.0

$ pip show debugpy
Name: debugpy
Version: 1.6.0

$ pip show ipykernel
Name: ipykernel
Version: 6.13.0

$ python --version
Python 3.10.4

@rchiodo
Copy link
Contributor

rchiodo commented May 6, 2022

Thanks, yeah those are the latest. Do you have a repro you can share too? I haven't gotten around to recreating @guydav's environment yet, was hoping something simpler would repro.

@waltergallegog
Copy link

waltergallegog commented May 6, 2022

The env I created was just to test the Lava framework tutorials.
Here is how I created that env, following the recommendations in the lava README to use poetry.

conda create -n lava python=3
conda activate lava
git clone https://github.com/lava-nc/lava
cd lava/
pip install poetry
poetry config virtualenvs.in-project true
poetry install
pip install ipykernel

Then you can try to debug one of the notebooks in the tutorials folder.
In my case, I was attempting to debug cell 5 of the tutorials/in_depth/tutorial03_process_models.ipynb notebook

roblourens added a commit that referenced this issue Jan 7, 2023
for unsupported subprocess debugging
For #9886
@PeterM18
Copy link

PeterM18 commented Jan 7, 2023

I'm from the -- 'debug adapter' error in jupyter notebook -- issue int19h mentioned above. I tried adding "subProcess": false to the launch.json for the current project. I continue to get the 'debug adapter' error.

Jupyter sessions don't use the launch.json unfortunately. They generate their own configuration in memory. Example:

const config: INotebookDebugConfig = {

Thanks for the explanation!

@roblourens
Copy link
Member

Done microsoft/debugpy#1168

@r3m0t
Copy link
Contributor

r3m0t commented Mar 23, 2023

Now the subprocess hangs because the debugpyAttach message doesn't pass from vscode-jupyter to vscode-python extensions. In my case that hangs the parent process as well (as it's waiting on the subprocess)

I think you need to call debugpy.configure(subProcess=False) before starting debugging now.

Here's the code in ipykernel that starts debugging- it doesn't take arguments to configure debugpy- https://github.com/ipython/ipykernel/blob/aa53dcef1a282cba7dbd06d0715252ad10a9987c/ipykernel/debugger.py#L422

I also found this but I can't find which context it's used- https://github.com/microsoft/vscode-jupyter/blob/2023.02.100/src/interactive-window/debugger/interactiveWindowDebugger.node.ts#L47

@roblourens roblourens modified the milestones: April 2023, May 2023 Apr 26, 2023
@roblourens roblourens modified the milestones: May 2023, On Deck May 31, 2023
@PaleNeutron
Copy link

Try to debug cell with multiprocess will make current notebook idle forever, really need a quick fix.

@zaheeruddinfaiz
Copy link

I am also facing this issue. After trying to debug my code for several hours. I ended in this thread and realised the root cause is with the Jupyter debugging extension breaks when multiprocessing is involved.
We really need to fix this ASAP.

@HennerM
Copy link

HennerM commented Oct 27, 2023

I get the same issue - is there a plan to get this fixed? This makes debugging something with e.g PyTorch data loaders impossible through VSCode Jupyter. Could we at least have a fix for the hanging debugger?

@gitgud5000
Copy link

Same issue...

@awf
Copy link

awf commented Mar 19, 2024

This makes debugging something with e.g PyTorch data loaders impossible through VSCode Jupyter.

This is a pretty significant use case - and it is hard to find this issue as it doesn't include the common "couldn't find a debug adapter for debug type python kernel" message, which is a common stackoverflow question.

@milosacimovic
Copy link

This is so useful

@MaksimovDania
Copy link

issue is still there

@ringohoffman
Copy link

ringohoffman commented Jul 31, 2024

I'm getting:

Couldn't find a debug adapter descriptor for debug type 'Python Kernel Debug Adapter' (extension might have failed to activate)

Just by running Debug Cell on the following:

import multiprocessing

def worker_fn(arg: list[int]) -> None:
    pass

pool = multiprocessing.Pool(1).map(worker_fn, [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]])

My debugger then becomes unresponsive for some time and as I hit disconnect & try to restart the kernel.

PyTorch flavored:

import torch.utils.data

dataloader = torch.utils.data.DataLoader(
    dataset=[[1., 2., 3.], [4., 5., 6.], [7., 8., 9.], [10., 11., 12.]],
    collate_fn=lambda batch: torch.tensor(batch),
    batch_size=2,
    num_workers=1,
)

next(iter(dataloader))

Notably, these examples are not expected to raise errors. They just spawn child processes.

@edervishaj
Copy link

I have the same issue with Tensorflow.

@edervishaj
Copy link

edervishaj commented Sep 17, 2024

@DonJayamanne any chance this is being investigated? After the July update of VS Code, I have not been able to use anymore debugging of Jupyter cells.

@edervishaj
Copy link

edervishaj commented Sep 17, 2024

I attempted the solution proposed in (microsoft/debugpy#1168 (comment), microsoft/debugpy#1166 (comment)) and it seems to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality notebook-debugging
Projects
None yet
Development

No branches or pull requests