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

Auto-import is limited by packageIndexDepth #4682

Open
davidgilbertson opened this issue Aug 3, 2023 · 10 comments
Open

Auto-import is limited by packageIndexDepth #4682

davidgilbertson opened this issue Aug 3, 2023 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@davidgilbertson
Copy link

Edit, I typed out this whole issue, then found the python.analysis.packageIndexDepths setting that fixes the issue.

I'm going to create the issue anyway for future travellers, and because I think the UX can be improved here for newcomers to VS code who haven't read through every single setting and just want auto-import to work (in my case, coming from PyCharm I almost gave up on VS Code because I thought it was buggy because auto-import only sometimes worked with no clue that it was actually designed to not index everything!).

Environment data

  • Language Server version: v2023.7.40 and v2023.8.10
  • OS and version: Windows 11 (happens in WSL and also plain Windows)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.8

Repro Steps

  1. create a new project
  2. create a venv environment
  3. run pip install numpy rich - one of these works with auto-import, the other doesn't
  4. create a file in VS Code
  5. attempt to reference something from numpy, e.g. x = ndarray<ctrl+space> - auto import works
  6. attempt to reference something from rich, e.g. t = Table<ctrl+space> - auto import works not

For numpy
image

But for rich:
image

But if I type it out, it can see that rich has a Table.
image

So, does it only work for packages with stubs? It seems to be the less common packages that don't work with auto import. E.g. sklearn works fine, sktime doesn't.

Expected behavior

Should find items from any package. Or if performance is a concern, any package that I import in my project, or any package in requirements.txt or pyproject.toml or something like that. Note that for the above, I both imported rich and created a requirements.txt with rich in it. And in another project I have the dependency listed in pyproject.toml, but still no luck.

Actual behavior

Doesn't work for lots of packages.

Logs

You can search the below for table.py, it finds the file and says it parses it. So it finds and parses the file but then chucks away the info because of the package depths setting?

2023-08-03 11:12:05.271 [info] [Info  - 11:12:05 AM] (6924) Pylance language server 2023.8.10 (pyright 932e542d) starting
2023-08-03 11:12:05.271 [info] [Info  - 11:12:05 AM] (6924) Server root directory: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist
2023-08-03 11:12:05.276 [info] [Info  - 11:12:05 AM] (6924) Starting service instance "test3"
2023-08-03 11:12:05.285 [info] [Info  - 11:12:05 AM] (6924) Auto format for strings enabled
2023-08-03 11:12:05.306 [info] (6924) No configuration file found.
2023-08-03 11:12:05.306 [info] (6924) No pyproject.toml file found.
2023-08-03 11:12:05.306 [info] [Info  - 11:12:05 AM] (6924) Setting pythonPath for service "test3": "c:\Users\david\py\test3\test3-win\Scripts\python.exe"
2023-08-03 11:12:05.309 [info] [Warn  - 11:12:05 AM] (6924) stubPath c:\Users\david\py\test3\typings is not a valid directory.
2023-08-03 11:12:05.352 [info] [Info  - 11:12:05 AM] (6924) Assuming Python version 3.10
2023-08-03 11:12:05.352 [info] (6924) Assuming Python platform Windows
2023-08-03 11:12:05.432 [info] [Info  - 11:12:05 AM] (6924) Search paths for c:\Users\david\py\test3
2023-08-03 11:12:05.432 [info] [Info  - 11:12:05 AM] (6924)   c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib
2023-08-03 11:12:05.432 [info] [Info  - 11:12:05 AM] (6924)   c:\Users\david\py\test3
2023-08-03 11:12:05.433 [info] [Info  - 11:12:05 AM] (6924)   c:\Users\david\py\test3\typings
2023-08-03 11:12:05.433 [info] [Info  - 11:12:05 AM] (6924)   c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stubs\...
2023-08-03 11:12:05.433 [info] [Info  - 11:12:05 AM] (6924)   c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\bundled\stubs
2023-08-03 11:12:05.433 [info] [Info  - 11:12:05 AM] (6924)   c:\Program Files\Python310\DLLs
2023-08-03 11:12:05.433 [info] [Info  - 11:12:05 AM] (6924)   c:\Program Files\Python310\Lib
2023-08-03 11:12:05.433 [info] [Info  - 11:12:05 AM] (6924)   c:\Program Files\Python310
2023-08-03 11:12:05.433 [info] [Info  - 11:12:05 AM] (6924)   c:\Users\david\py\test3\test3-win
2023-08-03 11:12:05.433 [info] [Info  - 11:12:05 AM] (6924)   c:\Users\david\py\test3\test3-win\Lib\site-packages
2023-08-03 11:12:05.433 [info] [Info  - 11:12:05 AM] (6924) Adding fs watcher for library directories:
 C:\Program Files\Python310\DLLs
C:\Program Files\Python310\lib
C:\Program Files\Python310
c:\Users\david\py\test3\test3-win
c:\Users\david\py\test3\test3-win\lib\site-packages
2023-08-03 11:12:05.434 [info] [Info  - 11:12:05 AM] (6924) Adding fs watcher for directories:
 c:\Users\david\py\test3
2023-08-03 11:12:05.434 [info] (6924) Searching for source files
2023-08-03 11:12:05.436 [info] [Info  - 11:12:05 AM] (6924) Auto-excluding c:\Users\david\py\test3\test3
2023-08-03 11:12:05.436 [info] [Info  - 11:12:05 AM] (6924) Auto-excluding c:\Users\david\py\test3\test3-win
2023-08-03 11:12:05.436 [info] [Info  - 11:12:05 AM] (6924) No source files found.
2023-08-03 11:12:05.585 [info] [Info  - 11:12:05 AM] (6924) Background analysis(1) root directory: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist
2023-08-03 11:12:05.586 [info] [Info  - 11:12:05 AM] (6924) Background analysis(1) started
2023-08-03 11:12:05.586 [info] (6924) Background analysis message: setConfigOptions
2023-08-03 11:12:05.586 [info] (6924) Background analysis message: setImportResolver
2023-08-03 11:12:05.586 [info] (6924) Background analysis message: ensurePartialStubPackages
2023-08-03 11:12:05.676 [info] (6924) [FG] parsing: c:\Users\david\py\test3\test3\test.py (41ms)
2023-08-03 11:12:05.725 [info] (6924) [FG] parsing: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\builtins.pyi [fs read 1ms] (48ms)
2023-08-03 11:12:05.748 [info] (6924) [FG] binding: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\builtins.pyi (22ms)
2023-08-03 11:12:05.748 [info] (6924) [FG] binding: c:\Users\david\py\test3\test3\test.py (0ms)
2023-08-03 11:12:05.758 [info] (6924) Background analysis message: setConfigOptions
2023-08-03 11:12:05.758 [info] (6924) Background analysis message: setTrackedFiles
2023-08-03 11:12:05.758 [info] (6924) Background analysis message: markAllFilesDirty
2023-08-03 11:12:05.759 [info] (6924) Background analysis message: setFileOpened
2023-08-03 11:12:05.759 [info] (6924) Background analysis message: getSemanticTokens full
2023-08-03 11:12:05.759 [info] (6924) [BG(1)] getSemanticTokens full at c:\Users\david\py\test3\test3\test.py ...
2023-08-03 11:12:05.759 [info] (6924) [BG(1)]   parsing: c:\Users\david\py\test3\test3\test.py (53ms)
2023-08-03 11:12:05.794 [info] [Info  - 11:12:05 AM] (6924) Indexer background runner(2) root directory: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist (index)
2023-08-03 11:12:05.794 [info] [Info  - 11:12:05 AM] (6924) Indexing(2) started
2023-08-03 11:12:05.807 [info] (6924) [BG(1)]   parsing: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\builtins.pyi [fs read 3ms] (64ms)
2023-08-03 11:12:05.831 [info] (6924) [BG(1)]   binding: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\builtins.pyi (26ms)
2023-08-03 11:12:05.832 [info] (6924) [BG(1)]   binding: c:\Users\david\py\test3\test3\test.py (0ms)
2023-08-03 11:12:05.860 [info] (6924) [BG(1)]   parsing: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\typing.pyi [fs read 0ms] (22ms)
2023-08-03 11:12:05.868 [info] (6924) [BG(1)]   binding: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\typing.pyi (7ms)
2023-08-03 11:12:05.872 [info] (6924) [IDX(2)] scan packages c:\Users\david\py\test3 ...
2023-08-03 11:12:05.872 [info] (6924) [IDX(2)]   read stdlib indices (92ms)
2023-08-03 11:12:05.875 [info] (6924) [BG(1)]   parsing: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\typing_extensions.pyi [fs read 0ms] (5ms)
2023-08-03 11:12:05.879 [info] (6924) [BG(1)]   binding: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\typing_extensions.pyi (3ms)
2023-08-03 11:12:05.902 [info] (6924) [BG(1)]   parsing: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\_typeshed\__init__.pyi [fs read 0ms] (5ms)
2023-08-03 11:12:05.904 [info] (6924) [BG(1)]   binding: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\_typeshed\__init__.pyi (1ms)
2023-08-03 11:12:05.909 [info] (6924) [BG(1)]   parsing: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\types.pyi [fs read 0ms] (5ms)
2023-08-03 11:12:05.912 [info] (6924) [BG(1)]   binding: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\types.pyi (2ms)
2023-08-03 11:12:05.919 [info] (6924) [BG(1)]   parsing: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\abc.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:05.922 [info] (6924) [BG(1)]   binding: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\abc.pyi (2ms)
2023-08-03 11:12:05.998 [info] (6924) [BG(1)]   parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\__init__.pyi [fs read 1ms] (73ms)
2023-08-03 11:12:06.010 [info] (6924) [BG(1)]   binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\__init__.pyi (14ms)
2023-08-03 11:12:06.019 [info] (6924) [BG(1)]   parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\rich\__init__.py [fs read 1ms] (8ms)
2023-08-03 11:12:06.022 [info] (6924) [BG(1)]   binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\rich\__init__.py (3ms)
2023-08-03 11:12:06.041 [info] (6924) [BG(1)]   parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\rich\table.py [fs read 0ms] (19ms)
2023-08-03 11:12:06.047 [info] (6924) [BG(1)]   binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\rich\table.py (5ms)
2023-08-03 11:12:06.048 [info] (6924) [BG(1)] getSemanticTokens full at c:\Users\david\py\test3\test3\test.py (362ms)
2023-08-03 11:12:06.050 [info] (6924) Background analysis message: getSemanticTokens range
2023-08-03 11:12:06.050 [info] (6924) [BG(1)] getSemanticTokens range 0:0 - 6:0 at c:\Users\david\py\test3\test3\test.py (1ms)
2023-08-03 11:12:06.050 [info] (6924) Background analysis message: analyze
2023-08-03 11:12:06.057 [info] (6924) [BG(1)] analyzing: c:\Users\david\py\test3\test3\test.py ...
2023-08-03 11:12:06.058 [info] (6924) [BG(1)]   checking: c:\Users\david\py\test3\test3\test.py (6ms)
2023-08-03 11:12:06.058 [info] (6924) [BG(1)] analyzing: c:\Users\david\py\test3\test3\test.py (7ms)
2023-08-03 11:12:06.059 [info] (6924) Background analysis message: resumeAnalysis
2023-08-03 11:12:06.176 [info] (6924) [IDX(2)] scan packages c:\Users\david\py\test3 (397ms)
2023-08-03 11:12:06.176 [info] [Info  - 11:12:06 AM] (6924) scanned(2) 19 files over 1 exec env
2023-08-03 11:12:06.202 [info] (6924) [IDX(2)] index packages c:\Users\david\py\test3 ...
2023-08-03 11:12:06.202 [info] (6924) [IDX(2)]   index execution environment c:\Users\david\py\test3 ...
2023-08-03 11:12:06.202 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\concurrent\__init__.py [skipped: no '__all__' defined] (1ms)
2023-08-03 11:12:06.202 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\distutils\__init__.py [skipped: no '__all__' defined] (0ms)
2023-08-03 11:12:06.202 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\idlelib\__init__.py [skipped: no '__all__' defined] (0ms)
2023-08-03 11:12:06.203 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\lib2to3\__init__.py [skipped: no '__all__' defined] (0ms)
2023-08-03 11:12:06.203 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\pydoc_data\__init__.py [skipped: no '__all__' defined] (0ms)
2023-08-03 11:12:06.203 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\test\__init__.py [skipped: no '__all__' defined] (1ms)
2023-08-03 11:12:06.203 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\turtledemo\__init__.py [skipped: no '__all__' defined] (0ms)
2023-08-03 11:12:06.203 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\urllib\__init__.py [skipped: no '__all__' defined] (0ms)
2023-08-03 11:12:06.203 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\wsgiref\__init__.py [skipped: no '__all__' defined] (0ms)
2023-08-03 11:12:06.236 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\xml\__init__.py ...
2023-08-03 11:12:06.236 [info] (6924) [IDX(2)]       parsing: c:\Program Files\Python310\Lib\xml\__init__.py [fs read 0ms] (31ms)
2023-08-03 11:12:06.273 [info] (6924) [IDX(2)]       parsing: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\builtins.pyi [fs read 4ms] (37ms)
2023-08-03 11:12:06.281 [info] (6924) [IDX(2)]       binding: c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib\builtins.pyi (8ms)
2023-08-03 11:12:06.281 [info] (6924) [IDX(2)]       binding: c:\Program Files\Python310\Lib\xml\__init__.py (0ms)
2023-08-03 11:12:06.281 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\xml\__init__.py [found 0] (78ms)
2023-08-03 11:12:06.282 [info] (6924) [IDX(2)]     indexing: c:\Program Files\Python310\Lib\xmlrpc\__init__.py [skipped: no '__all__' defined] (1ms)
2023-08-03 11:12:06.284 [info] (6924) [IDX(2)]     indexing: c:\Users\david\py\test3\test3-win\Lib\site-packages\markdown_it\__init__.py ...
2023-08-03 11:12:06.284 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\markdown_it\__init__.py [fs read 0ms] (2ms)
2023-08-03 11:12:06.284 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\markdown_it\__init__.py (0ms)
2023-08-03 11:12:06.293 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\markdown_it\main.py [fs read 0ms] (7ms)
2023-08-03 11:12:06.293 [info] [Info  - 11:12:06 AM] (6924) Could not import 'linkify_it' in file 'c:\Users\david\py\test3\test3-win\Lib\site-packages\markdown_it\main.py'
2023-08-03 11:12:06.293 [info] [Info  - 11:12:06 AM] (6924)   Looking in stubPath 'c:\Users\david\py\test3\typings'
2023-08-03 11:12:06.293 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve stub package using root path 'c:\Users\david\py\test3\typings'
2023-08-03 11:12:06.293 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve using root path 'c:\Users\david\py\test3\typings'
2023-08-03 11:12:06.293 [info] [Info  - 11:12:06 AM] (6924)   Looking in root directory of execution environment 'c:\Users\david\py\test3'
2023-08-03 11:12:06.293 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve stub package using root path 'c:\Users\david\py\test3'
2023-08-03 11:12:06.293 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve using root path 'c:\Users\david\py\test3'
2023-08-03 11:12:06.293 [info] [Info  - 11:12:06 AM] (6924)   Finding python search paths
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)   Executing interpreter: 'c:\Users\david\py\test3\test3-win\Scripts\python.exe'
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)   Skipping 'C:\Program Files\Python310\python310.zip' because it is not a valid directory
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)   Received 5 paths from interpreter
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)     C:\Program Files\Python310\DLLs
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)     C:\Program Files\Python310\lib
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)     C:\Program Files\Python310
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)     c:\Users\david\py\test3\test3-win
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)     c:\Users\david\py\test3\test3-win\lib\site-packages
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)   Looking in python search path 'c:\Program Files\Python310\DLLs'
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve stub package using root path 'c:\Program Files\Python310\DLLs'
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve using root path 'c:\Program Files\Python310\DLLs'
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)   Looking in python search path 'c:\Program Files\Python310\Lib'
2023-08-03 11:12:06.294 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve stub package using root path 'c:\Program Files\Python310\Lib'
2023-08-03 11:12:06.295 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve using root path 'c:\Program Files\Python310\Lib'
2023-08-03 11:12:06.295 [info] [Info  - 11:12:06 AM] (6924)   Looking in python search path 'c:\Program Files\Python310'
2023-08-03 11:12:06.295 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve stub package using root path 'c:\Program Files\Python310'
2023-08-03 11:12:06.295 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve using root path 'c:\Program Files\Python310'
2023-08-03 11:12:06.295 [info] [Info  - 11:12:06 AM] (6924)   Looking in python search path 'c:\Users\david\py\test3\test3-win'
2023-08-03 11:12:06.295 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve stub package using root path 'c:\Users\david\py\test3\test3-win'
2023-08-03 11:12:06.295 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve using root path 'c:\Users\david\py\test3\test3-win'
2023-08-03 11:12:06.295 [info] [Info  - 11:12:06 AM] (6924)   Looking in python search path 'c:\Users\david\py\test3\test3-win\Lib\site-packages'
2023-08-03 11:12:06.295 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve stub package using root path 'c:\Users\david\py\test3\test3-win\Lib\site-packages'
2023-08-03 11:12:06.296 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve using root path 'c:\Users\david\py\test3\test3-win\Lib\site-packages'
2023-08-03 11:12:06.296 [info] [Info  - 11:12:06 AM] (6924)   Looking in bundled stubs path 'c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\bundled\stubs'
2023-08-03 11:12:06.296 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve stub package using root path 'c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\bundled\stubs'
2023-08-03 11:12:06.296 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve using root path 'c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\bundled\stubs'
2023-08-03 11:12:06.296 [info] [Info  - 11:12:06 AM] (6924)   Looking for typeshed stdlib path
2023-08-03 11:12:06.296 [info] [Info  - 11:12:06 AM] (6924)   Looking for typeshed stdlib path
2023-08-03 11:12:06.296 [info] [Info  - 11:12:06 AM] (6924)   Attempting to resolve using root path 'c:\Users\david\.vscode\extensions\ms-python.vscode-pylance-2023.8.10\dist\typeshed-fallback\stdlib'
2023-08-03 11:12:06.297 [info] [Info  - 11:12:06 AM] (6924)   Typeshed path not found
2023-08-03 11:12:06.297 [info] [Info  - 11:12:06 AM] (6924)   Looking for typeshed third-party path
2023-08-03 11:12:06.297 [info] [Info  - 11:12:06 AM] (6924)   Looking for typeshed stubs path
2023-08-03 11:12:06.297 [info] [Info  - 11:12:06 AM] (6924)   Typeshed path not found
2023-08-03 11:12:06.298 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\markdown_it\main.py (1ms)
2023-08-03 11:12:06.298 [info] (6924) [IDX(2)]     indexing: c:\Users\david\py\test3\test3-win\Lib\site-packages\markdown_it\__init__.py [found 3] (12ms)
2023-08-03 11:12:06.299 [info] (6924) [IDX(2)]     indexing: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\__init__.py ...
2023-08-03 11:12:06.299 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\__init__.py [fs read 0ms] (4ms)
2023-08-03 11:12:06.299 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\__init__.py (1ms)
2023-08-03 11:12:06.314 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\_decode.py [fs read 0ms] (5ms)
2023-08-03 11:12:06.314 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\_decode.py (0ms)
2023-08-03 11:12:06.314 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\_encode.py [fs read 0ms] (2ms)
2023-08-03 11:12:06.314 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\_encode.py (0ms)
2023-08-03 11:12:06.314 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\_format.py [fs read 0ms] (1ms)
2023-08-03 11:12:06.315 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\_format.py (0ms)
2023-08-03 11:12:06.315 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\_parse.py [fs read 0ms] (3ms)
2023-08-03 11:12:06.315 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\_parse.py (0ms)
2023-08-03 11:12:06.315 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\_url.py [fs read 1ms] (1ms)
2023-08-03 11:12:06.315 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\_url.py (0ms)
2023-08-03 11:12:06.315 [info] (6924) [IDX(2)]     indexing: c:\Users\david\py\test3\test3-win\Lib\site-packages\mdurl\__init__.py [found 11] (17ms)
2023-08-03 11:12:06.376 [info] (6924) [IDX(2)]     indexing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\__init__.pyi ...
2023-08-03 11:12:06.377 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\__init__.pyi [fs read 1ms] (64ms)
2023-08-03 11:12:06.380 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\__init__.pyi (4ms)
2023-08-03 11:12:06.382 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\_typing\_extended_precision.py [fs read 0ms] (0ms)
2023-08-03 11:12:06.382 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\_typing\_extended_precision.py (1ms)
2023-08-03 11:12:06.384 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\function_base.pyi [fs read 0ms] (2ms)
2023-08-03 11:12:06.384 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\function_base.pyi (0ms)
2023-08-03 11:12:06.392 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\fromnumeric.pyi [fs read 1ms] (5ms)
2023-08-03 11:12:06.392 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\fromnumeric.pyi (1ms)
2023-08-03 11:12:06.392 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\_asarray.pyi [fs read 1ms] (1ms)
2023-08-03 11:12:06.393 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\_asarray.pyi (2ms)
2023-08-03 11:12:06.394 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\_type_aliases.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.394 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\_type_aliases.pyi (0ms)
2023-08-03 11:12:06.395 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\_ufunc_config.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.395 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\_ufunc_config.pyi (0ms)
2023-08-03 11:12:06.396 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\arrayprint.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.397 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\arrayprint.pyi (1ms)
2023-08-03 11:12:06.398 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\einsumfunc.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.398 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\einsumfunc.pyi (0ms)
2023-08-03 11:12:06.402 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\multiarray.pyi [fs read 0ms] (4ms)
2023-08-03 11:12:06.404 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\multiarray.pyi (1ms)
2023-08-03 11:12:06.408 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\numeric.pyi [fs read 0ms] (4ms)
2023-08-03 11:12:06.409 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\numeric.pyi (0ms)
2023-08-03 11:12:06.410 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\numerictypes.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.411 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\numerictypes.pyi (0ms)
2023-08-03 11:12:06.412 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\shape_base.pyi [fs read 0ms] (0ms)
2023-08-03 11:12:06.412 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\core\shape_base.pyi (1ms)
2023-08-03 11:12:06.412 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\exceptions.pyi [fs read 0ms] (0ms)
2023-08-03 11:12:06.413 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\exceptions.pyi (0ms)
2023-08-03 11:12:06.415 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\__init__.pyi [fs read 1ms] (3ms)
2023-08-03 11:12:06.415 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\__init__.pyi (0ms)
2023-08-03 11:12:06.416 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\arraypad.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.416 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\arraypad.pyi (0ms)
2023-08-03 11:12:06.418 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\arraysetops.pyi [fs read 0ms] (2ms)
2023-08-03 11:12:06.418 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\arraysetops.pyi (0ms)
2023-08-03 11:12:06.419 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\arrayterator.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.419 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\arrayterator.pyi (0ms)
2023-08-03 11:12:06.422 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\function_base.pyi [fs read 0ms] (3ms)
2023-08-03 11:12:06.423 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\function_base.pyi (1ms)
2023-08-03 11:12:06.424 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\histograms.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.424 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\histograms.pyi (0ms)
2023-08-03 11:12:06.429 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\index_tricks.pyi [fs read 0ms] (4ms)
2023-08-03 11:12:06.429 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\index_tricks.pyi (1ms)
2023-08-03 11:12:06.430 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\nanfunctions.pyi [fs read 0ms] (0ms)
2023-08-03 11:12:06.430 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\nanfunctions.pyi (1ms)
2023-08-03 11:12:06.432 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\npyio.pyi [fs read 0ms] (2ms)
2023-08-03 11:12:06.433 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\npyio.pyi (1ms)
2023-08-03 11:12:06.434 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\polynomial.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.434 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\polynomial.pyi (0ms)
2023-08-03 11:12:06.436 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\shape_base.pyi [fs read 1ms] (1ms)
2023-08-03 11:12:06.436 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\shape_base.pyi (1ms)
2023-08-03 11:12:06.437 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\stride_tricks.pyi [fs read 0ms] (0ms)
2023-08-03 11:12:06.437 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\stride_tricks.pyi (1ms)
2023-08-03 11:12:06.438 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\twodim_base.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.439 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\twodim_base.pyi (1ms)
2023-08-03 11:12:06.440 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\type_check.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.440 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\type_check.pyi (0ms)
2023-08-03 11:12:06.441 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\ufunclike.pyi [fs read 0ms] (0ms)
2023-08-03 11:12:06.441 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\ufunclike.pyi (0ms)
2023-08-03 11:12:06.442 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\utils.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.443 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\lib\utils.pyi (0ms)
2023-08-03 11:12:06.444 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\matrixlib\__init__.pyi [fs read 0ms] (1ms)
2023-08-03 11:12:06.444 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\matrixlib\__init__.pyi (0ms)
2023-08-03 11:12:06.445 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\matrixlib\defmatrix.pyi [fs read 0ms] (0ms)
2023-08-03 11:12:06.445 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\matrixlib\defmatrix.pyi (1ms)
2023-08-03 11:12:06.457 [info] (6924) [IDX(2)]     indexing: c:\Users\david\py\test3\test3-win\Lib\site-packages\numpy\__init__.pyi [found 614] (135ms)
2023-08-03 11:12:06.458 [info] (6924) [IDX(2)]     indexing: c:\Users\david\py\test3\test3-win\Lib\site-packages\pip\__init__.py ...
2023-08-03 11:12:06.458 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\pip\__init__.py [fs read 0ms] (0ms)
2023-08-03 11:12:06.458 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\pip\__init__.py (0ms)
2023-08-03 11:12:06.458 [info] (6924) [IDX(2)]     indexing: c:\Users\david\py\test3\test3-win\Lib\site-packages\pip\__init__.py [found 2] (1ms)
2023-08-03 11:12:06.458 [info] (6924) [IDX(2)]     indexing: c:\Users\david\py\test3\test3-win\Lib\site-packages\rich\__init__.py ...
2023-08-03 11:12:06.458 [info] (6924) [IDX(2)]       parsing: c:\Users\david\py\test3\test3-win\Lib\site-packages\rich\__init__.py [fs read 1ms] (2ms)
2023-08-03 11:12:06.458 [info] (6924) [IDX(2)]       binding: c:\Users\david\py\test3\test3-win\Lib\site-packages\rich\__init__.py (1ms)
2023-08-03 11:12:06.459 [info] (6924) [IDX(2)]     indexing: c:\Users\david\py\test3\test3-win\Lib\site-packages\rich\__init__.py [found 8] (3ms)
2023-08-03 11:12:06.459 [info] (6924) [IDX(2)]   index execution environment c:\Users\david\py\test3 [found 740 in 9 files] (253ms)
2023-08-03 11:12:06.459 [info] (6924) [IDX(2)] index packages c:\Users\david\py\test3 [found 740 in 1 exec envs] (255ms)
2023-08-03 11:12:06.459 [info] [Info  - 11:12:06 AM] (6924) indexed(2) 9 files over 1 exec env
2023-08-03 11:12:06.460 [info] [Info  - 11:12:06 AM] (6924) Indexing finished(2).
2023-08-03 11:12:06.592 [info] (6924) Loading ONNX runtime...
2023-08-03 11:12:06.593 [info] (6924) Loaded ONNX runtime. Creating IntelliCode session...
2023-08-03 11:12:06.831 [info] 2023-08-03 11:12:06.829042 [I:onnxruntime:, inference_session.cc:263 operator()] Flush-to-zero and denormal-as-zero are off
2023-08-03 11:12:06.829727 [I:onnxruntime:, inference_session.cc:271 ConstructorCommon] Creating and using per session threadpools since use_per_session_threads_ is true

2023-08-03 11:12:06.831 [info] 2023-08-03 11:12:06.829870 [I:onnxruntime:, inference_session.cc:292 ConstructorCommon] Dynamic block base set to 0

2023-08-03 11:12:06.846 [info] 2023-08-03 11:12:06.844118 [I:onnxruntime:, inference_session.cc:1222 Initialize] Initializing session.
2023-08-03 11:12:06.844300 [I:onnxruntime:, inference_session.cc:1259 Initialize] Adding default CPU execution provider.

2023-08-03 11:12:06.848 [info] 2023-08-03 11:12:06.846264 [I:onnxruntime:, reshape_fusion.cc:42 ApplyImpl] Total fused reshape node count: 0

2023-08-03 11:12:06.849 [info] 2023-08-03 11:12:06.847349 [I:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing NodeArg 'rnn/transpose'. It is no longer used by any node.

2023-08-03 11:12:06.849 [info] 2023-08-03 11:12:06.847536 [I:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing NodeArg 'Gather_out0'. It is no longer used by any node.
2023-08-03 11:12:06.847617 [I:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing NodeArg 'Transpose_out0'. It is no longer used by any node.

2023-08-03 11:12:06.849 [info] 2023-08-03 11:12:06.848040 [I:onnxruntime:, reshape_fusion.cc:42 ApplyImpl] Total fused reshape node count: 0

2023-08-03 11:12:06.854 [info] 2023-08-03 11:12:06.852857 [V:onnxruntime:, session_state.cc:1010 VerifyEachNodeIsAssignedToAnEp] Node placements
2023-08-03 11:12:06.853004 [V:onnxruntime:, session_state.cc:1013 VerifyEachNodeIsAssignedToAnEp]  All nodes placed on [CPUExecutionProvider]. Number of nodes: 59

2023-08-03 11:12:06.854 [info] 2023-08-03 11:12:06.853275 [V:onnxruntime:, session_state.cc:66 CreateGraphInfo] SaveMLValueNameIndexMapping
2023-08-03 11:12:06.853376 [V:onnxruntime:, session_state.cc:112 CreateGraphInfo] Done saving OrtValue mappings.

2023-08-03 11:12:06.855 [info] 2023-08-03 11:12:06.853621 [I:onnxruntime:, session_state_utils.cc:199 SaveInitializedTensors] Saving initialized tensors.

2023-08-03 11:12:06.872 [info] 2023-08-03 11:12:06.870240 [I:onnxruntime:, session_state_utils.cc:342 SaveInitializedTensors] Done saving initialized tensors

2023-08-03 11:12:06.872 [info] 2023-08-03 11:12:06.871304 [I:onnxruntime:, inference_session.cc:1488 Initialize] Session successfully initialized.

2023-08-03 11:12:06.878 [info] 2023-08-03 11:12:06.876560 [I:onnxruntime:, inference_session.cc:271 ConstructorCommon] Creating and using per session threadpools since use_per_session_threads_ is true
2023-08-03 11:12:06.876731 [I:onnxruntime:, inference_session.cc:292 ConstructorCommon] Dynamic block base set to 0

2023-08-03 11:12:06.927 [info] 2023-08-03 11:12:06.925788 [I:onnxruntime:, inference_session.cc:1222 Initialize] Initializing session.
2023-08-03 11:12:06.925909 [I:onnxruntime:, inference_session.cc:1259 Initialize] Adding default CPU execution provider.

2023-08-03 11:12:06.927 [info] 2023-08-03 11:12:06.926217 [I:onnxruntime:, reshape_fusion.cc:42 ApplyImpl] Total fused reshape node count: 0

2023-08-03 11:12:06.928 [info] 2023-08-03 11:12:06.926803 [I:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing NodeArg 'rnn/transpose'. It is no longer used by any node.
2023-08-03 11:12:06.926859 [I:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing NodeArg 'Gather_out0'. It is no longer used by any node.

2023-08-03 11:12:06.928 [info] 2023-08-03 11:12:06.926890 [I:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing NodeArg 'Transpose_out0'. It is no longer used by any node.

2023-08-03 11:12:06.928 [info] 2023-08-03 11:12:06.927090 [I:onnxruntime:, reshape_fusion.cc:42 ApplyImpl] Total fused reshape node count: 0

2023-08-03 11:12:06.933 [info] 2023-08-03 11:12:06.931350 [V:onnxruntime:, session_state.cc:1010 VerifyEachNodeIsAssignedToAnEp] Node placements
2023-08-03 11:12:06.931470 [V:onnxruntime:, session_state.cc:1013 VerifyEachNodeIsAssignedToAnEp]  All nodes placed on [CPUExecutionProvider]. Number of nodes: 59

2023-08-03 11:12:06.933 [info] 2023-08-03 11:12:06.931738 [V:onnxruntime:, session_state.cc:66 CreateGraphInfo] SaveMLValueNameIndexMapping
2023-08-03 11:12:06.931817 [V:onnxruntime:, session_state.cc:112 CreateGraphInfo] Done saving OrtValue mappings.

2023-08-03 11:12:06.933 [info] 2023-08-03 11:12:06.932087 [I:onnxruntime:, session_state_utils.cc:199 SaveInitializedTensors] Saving initialized tensors.

2023-08-03 11:12:06.946 [info] 2023-08-03 11:12:06.944802 [I:onnxruntime:, session_state_utils.cc:342 SaveInitializedTensors] Done saving initialized tensors

2023-08-03 11:12:06.946 [info] 2023-08-03 11:12:06.945281 [I:onnxruntime:, inference_session.cc:1488 Initialize] Session successfully initialized.

2023-08-03 11:12:06.951 [info] 2023-08-03 11:12:06.949403 [I:onnxruntime:, inference_session.cc:271 ConstructorCommon] Creating and using per session threadpools since use_per_session_threads_ is true
2023-08-03 11:12:06.949506 [I:onnxruntime:, inference_session.cc:292 ConstructorCommon] Dynamic block base set to 0

2023-08-03 11:12:06.955 [info] 2023-08-03 11:12:06.953940 [I:onnxruntime:, inference_session.cc:1222 Initialize] Initializing session.
2023-08-03 11:12:06.954056 [I:onnxruntime:, inference_session.cc:1259 Initialize] Adding default CPU execution provider.

2023-08-03 11:12:06.956 [info] 2023-08-03 11:12:06.954391 [I:onnxruntime:, reshape_fusion.cc:42 ApplyImpl] Total fused reshape node count: 0

2023-08-03 11:12:06.956 [info] 2023-08-03 11:12:06.955059 [I:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing NodeArg 'rnn/transpose'. It is no longer used by any node.

2023-08-03 11:12:06.956 [info] 2023-08-03 11:12:06.955109 [I:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing NodeArg 'Gather_out0'. It is no longer used by any node.

2023-08-03 11:12:06.956 [info] 2023-08-03 11:12:06.955325 [I:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing NodeArg 'Transpose_out0'. It is no longer used by any node.

2023-08-03 11:12:06.957 [info] 2023-08-03 11:12:06.955573 [I:onnxruntime:, reshape_fusion.cc:42 ApplyImpl] Total fused reshape node count: 0

2023-08-03 11:12:06.962 [info] 2023-08-03 11:12:06.959592 [V:onnxruntime:, session_state.cc:1010 VerifyEachNodeIsAssignedToAnEp] Node placements
2023-08-03 11:12:06.960398 [V:onnxruntime:, session_state.cc:1013 VerifyEachNodeIsAssignedToAnEp]  All nodes placed on [CPUExecutionProvider]. Number of nodes: 59

2023-08-03 11:12:06.962 [info] 2023-08-03 11:12:06.960679 [V:onnxruntime:, session_state.cc:66 CreateGraphInfo] SaveMLValueNameIndexMapping
2023-08-03 11:12:06.960769 [V:onnxruntime:, session_state.cc:112 CreateGraphInfo] Done saving OrtValue mappings.

2023-08-03 11:12:06.962 [info] 2023-08-03 11:12:06.961048 [I:onnxruntime:, session_state_utils.cc:199 SaveInitializedTensors] Saving initialized tensors.

2023-08-03 11:12:06.978 [info] 2023-08-03 11:12:06.976701 [I:onnxruntime:, session_state_utils.cc:342 SaveInitializedTensors] Done saving initialized tensors

2023-08-03 11:12:06.978 [info] 2023-08-03 11:12:06.977116 [I:onnxruntime:, inference_session.cc:1488 Initialize] Session successfully initialized.

2023-08-03 11:12:06.979 [info] (6924) Created IntelliCode session.
2023-08-03 11:12:06.979 [info] (6924) Created IntelliCode session.
2023-08-03 11:12:06.979 [info] (6924) Created IntelliCode session.
2023-08-03 11:12:06.979 [info] (6924) Initialize deeplearning succeeded
2023-08-03 11:12:06.979 [info] (6924) Initialize deeplearning succeeded
2023-08-03 11:12:06.979 [info] (6924) Initialize deeplearning succeeded

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Aug 3, 2023
@rchiodo rchiodo changed the title Auto-import only works for some packages Auto-import is limited by packageIndexDepth Aug 3, 2023
@rchiodo
Copy link
Contributor

rchiodo commented Aug 3, 2023

Thanks for the issue. Using requirements.txt or pyproject.toml sounds like a good way to default index depths higher. Persisted indices also makes the index depth less of a problem too. Maybe our default should be more than 2.

@rchiodo rchiodo added enhancement New feature or request and removed needs repro Issue has not been reproduced yet labels Aug 3, 2023
@davidgilbertson
Copy link
Author

Yes I was surprised to find "persist to disk" as an option that defaulted to off.

My setup was taking 10 minutes to index on every start (on a i7 12700K with fast SSDs). It took hours to go and find all the directories that I needed to manually exclude to make start up time reasonable. But this only was noticeable with WSL, if I recall correctly.

Is there a reason the default wouldn't just be no depth limit? The assumption seems to be that more deeply nested packages are less likely to be imported.

In my opinion (as someone not very knowledgeable with VS Code!), sensible defaults would be:

  • persist to disk
  • no depth limit
  • UI feedback in the status bar when indexing is happening (on first launch ever)

At least that's what PyCharm does and it 'just works' without having to go hunting through settings to coerce the IDE into making everything available.

@rchiodo
Copy link
Contributor

rchiodo commented Aug 3, 2023

Persist to disk will likely be the default soon. It's still in the experimental stages to make sure it doesn't break anything.

No depth limit sounds unlikely unless we can determine the actual requirements. Some people have 1000s of packages installed. Indexing all of that to an infinite depth would not be tractable in my opinion. Not unless we significantly change the architecture of Pylance.

UI feedback seems like a good thing too. I'm surprised we don't do this already. How is a user supposed to know when Pylance is 'ready'?

@davidgilbertson
Copy link
Author

It might be interesting to get some numbers. For a project with lots of packages, how many symbols are found at depth limits of 1, 2, 3, Infinity etc.

Comparing no limit vs a limit of, say, 3 might only be 10% more symbols, but means a user goes from having 90% of their symbols indexed to 100%, which is much better. I've no idea what the actual values are of course.

Question: is there a way for the user to set the depth for all packages? If not, perhaps python.analysis.packageIndexDepths could accept a special entry with "name": "__DEFAULT__" or similar to allow control of this?

Another question: is the primary concern index time, or lookup time?

@rchiodo
Copy link
Contributor

rchiodo commented Aug 3, 2023

Setting all of the index depths can be done like so:

    "python.analysis.packageIndexDepths": [
        {
            "name": "",
            "depth": 20
        }
    ]

There's also a limit to how many files we will index. So, changing the depth probably means that value needs to be set too:

    "python.analysis.userFileIndexingLimit": 2000

The depth is there because indexing can be really slow. We have to open every file, parse it, look for all public symbols, and then write that to disk (or a table in memory).

The index is there to make lookup time a lot faster later.

The other problem is the index (in the current design) just gets loaded into memory (either by creating it or reading it from disk). If the depth is too deep, this can blow out most of the memory for the server process. Maybe it will get more complicated in the future with a indexed database or something.

@SubigyaPanta
Copy link

For vscode version: 1.84.2 on macOS Sonoma, this problem still persists with Django despite mentioning everything in packageIndexDepth. My settings look like this:

    {
        "name": "django",
        "depth": 5,
        "includeAllSymbols": true
    },
    {
        "name": "",
        "depth": 3,
        "includeAllSymbols": true
    }

I still cannot auto import TestCase and other classes from django.

@davidgilbertson you said that you fixed this issue with this option. What settings did you use to fix it? It would be really helpful if you could share it. Thanks.

@davidgilbertson
Copy link
Author

I wouldn't set 5 unless you're 100% certain that nothing is deeper than that. If you want everything, go with 99 or some big number.

All my python.analysis settings were this:

    "python.analysis.completeFunctionParens": true,
    "python.analysis.autoImportCompletions": true,
    "python.analysis.autoFormatStrings": true,
    "python.analysis.packageIndexDepths": [
        {
            "name": "sktime",
            "depth": 99,
            "includeAllSymbols": true
        },
        {
            "name": "rich",
            "depth": 99
        },
        {
            "name": "statsmodels",
            "depth": 99
        },
        {
            "name": "sklearn",
            "depth": 99
        },
        {
            "name": "matplotlib",
            "depth": 99
        },
        {
            "name": "scipy",
            "depth": 2
        }
    ],
    "python.analysis.persistAllIndices": true,

I don't recall if this continued to work, I gave up on VS Code and went back to PyCharm which is much better at indexing and auto importing.

@rchiodo rchiodo removed their assignment Feb 5, 2024
@rchiodo rchiodo self-assigned this Feb 15, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Feb 15, 2024

We're attempting to make auto imports work better this month and this issue is on the short list of enhancements. I'm going to attempt to outline a mini spec on what it would look like:

Mini Spec

  • requirements.txt (or some pattern match of requirements*.txt) in the root of a workspace will be used to set the index depth for specific packages to basically infinity (maybe 99 to be realistic)
  • pyproject.toml in the root of a workspace would also be used to do so.
  • persistAllIndices will default to true (it already does but that may not be obvious)
  • settings.json can of course override any of these index depths

Hopefully all of that will be transparent and auto imports for packages in your requirements.txt will just work like expected.

@heejaechang
Copy link
Contributor

we have related issues - #5434

@rchiodo
Copy link
Contributor

rchiodo commented Feb 15, 2024

Okay so after discussing this, we believe the idea I outlined above would be too slow for most people. We're instead going to try the idea outlined in the issue Heejae just linked: #5434.

Where the idea of using requirements.txt to set index depth would be part of the 'full' mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants