1. Error Description:
After installing CUDA, when using jupyter notebook in Visual Studio code, whether using TensorFlow or PyTorch, an error will be reported when the model-related code is involved:
info 10:44:12.758: kill daemon
error 10:44:12.758: Raw kernel process exited code: 3221226505
error 10:44:12.768: Error in waiting for cell to complete [Error: Canceled future for execute_request message before replies were done
at t.KernelShellFutureHandler.dispose (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:32353)
at c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:51405
at Map.forEach (<anonymous>)
at y._clearKernelState (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:51390)
at y.dispose (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:44872)
at c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:251157
at t.swallowExceptions (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:29:120529)
at dispose (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:251135)
at t.RawSession.dispose (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:256072)
at processTicksAndRejections (node:internal/process/task_queues:96:5)]
warn 10:44:12.771: Cell completed with errors {
message: 'Canceled future for execute_request message before replies were done'
}
(1) Remind
Looking at the previous text of error in the log, CUDA and cuDNN can be adjusted.
warn 10:44:12.276: StdErr from Kernel Process 2022-07-27 10:44:12.27561
warn 10:44:12.276: StdErr from Kernel Process 7: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384]
warn 10:44:12.277: StdErr from Kernel Process Loaded cuDNN version 8401
error 10:44:12.756: Disposing session as kernel process died ExitCode: 3221226505, Reason: c:\Users\Eddie\AppData\Local\Programs\Python\Python39\lib\site-packages\traitlets\traitlets.py:2392: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
c:\Users\Eddie\AppData\Local\Programs\Python\Python39\lib\site-packages\traitlets\traitlets.py:2346: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '59483b09-e83e-4bf0-a9b6-82301995d744' instead of 'b"59483b09-e83e-4bf0-a9b6-82301995d744"'.
warn(
2022-07-27 10:44:06.428210: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-07-27 10:44:07.682221: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1335 MB memory: -> device: 0, name: NVIDIA GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1
2022-07-27 10:44:12.275617: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384] Loaded cuDNN version 8401
Look carefully at the contents of error. It seems that the error is in jupyter, but it is not.
error 10:44:12.768: Error in waiting for cell to complete [Error: Canceled future for execute_request message before replies were done
at t.KernelShellFutureHandler.dispose (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:32353)
at c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:51405
2. Solution:
(1) Use the browser to run jupyter to check the errors (it is recommended to skip)
It is recommended to skip this step! The explanation here is only to record the complete error resolution steps.
Use the command to install jupyter,
pip install jupyter
Open the .ipynb file in the browser and run it again. The error is different from that in Visual Studio Code:
Could not locate zlibwapi.dll
(2) Install Zlib
Install Zlib as this tutorial. the error will be solved!
Read More:
- [Solved] Job for mysqld.service failed because the control process exited with error code.
- [Solved] Postgres Start Error: Job for postgresql.service failed because the control process exited with error code.
- Docker service startup error: Job for docker.service failed because the control process exited with error code.
- [Solved] Job for docker.service failed because the control process exited with error
- [Solved] Jupyter Kernel error: kernel Cannot Connect—-import win32api; ImportError: DLL load failed…
- Jenkins Error: code=exited, status=127 [How to Solve]
- [Solved] Arcgis Pro2.8 Error: kernel error, failed open to kernel
- [Solved] mongodb Startup Error: ERROR: child process failed, exited with error number 14
- JSON parse error: raw timestamp (1595952000000) not allowed for
- After SpringBoot starts, exit the console directly and display Process finished with exit code 1
- [Solved] RuntimeError: An attempt has been made to start a new process before the current process…
- [Solved] MindSpore Error: Select GPU kernel op * fail! Incompatible data type
- Docker run Error: container_linux.go:235: starting container process caused “process_linux.go:258: appl
- [Solved] kernel: nvme nvme0: I/O xxx QID xxx timeout, aborting
- Error: an error occurred while performing the step: “building kernel modules”. See/var/log/NV
- Axios request failed, get the status code and error information, how to encapsulate the function dealing with the public error code
- There is no error when compiling and packaging the IDEA code, but the code displays an error
- PIP Fatal error in launcher: Unable to create process using
- Kill Tomcat process in windows and Linux environment (solve the problem of other ports being occupied)
- SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. Error code 0xC020801C,0xC02…