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

No autocomplete with YOLO results #5873

Closed
Ayad0net opened this issue May 9, 2024 · 2 comments
Closed

No autocomplete with YOLO results #5873

Ayad0net opened this issue May 9, 2024 · 2 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@Ayad0net
Copy link

Ayad0net commented May 9, 2024

Type: Bug

Behaviour

model = YOLO('yolov8n.pt') # load an official model
results = model.predict(source="aa.png")

results[0].
^
|
here the vscode not complete

image

Steps to reproduce:

  1. remove the python extension and reinstall it.
  2. remove vscode and reinstall it
  3. remove the YOLO package and reinstall it

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Extension version: 2024.7.11301009
VS Code version: Code 1.89.1 (Universal) (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:14:24.611Z)
OS version: Darwin x64 23.4.0
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.6
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
  • Value of the python.languageServer setting: Default
User Settings


languageServer: "Pylance"

Installed Extensions
Extension Name Extension Id Version
IntelliCode Completions VisualStudioExptTeam.vscodeintellicode-completions 2.0.0
JavaScript Debugger ms-vscode.js-debug 1.89.0
JavaScript Debugger Companion Extension ms-vscode.js-debug-companion 1.1.2
Jupyter ms-toolsai.jupyter 2024.4.0
Jupyter Cell Tags ms-toolsai.vscode-jupyter-cell-tags 0.1.9
Jupyter Keymap ms-toolsai.jupyter-keymap 1.1.2
Jupyter Notebook Renderers ms-toolsai.jupyter-renderers 1.0.17
Jupyter Slide Show ms-toolsai.vscode-jupyter-slideshow 0.1.6
Pylance ms-python.vscode-pylance 2024.5.1
Python ms-python.python 2024.7.11301009
Python Debugger ms-python.debugpy 2024.6.0
Table Visualizer for JavaScript Profiles ms-vscode.vscode-js-profile-table 1.0.9
System Info
Item Value
CPUs Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz (12 x 2900)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 3, 2, 3
Memory (System) 16.00GB (0.43GB free)
Process Argv --crash-reporter-id ecf8630d-a12f-4c5d-9e49-7def7ee35edf
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
tftest:31042121
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
jg8ic977:31013176
dwnewjupytercf:31039676

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python May 10, 2024
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label May 10, 2024
@heejaechang
Copy link
Contributor

heejaechang commented May 10, 2024

unfortunately, it is not something static analysis tool can figure out. all we know is the predict return list.

that said, this is doc string

Returns:
            (List[ultralytics.engine.results.Results]): A list of prediction results, encapsulated in the Results class.

so, you could ask ultralytics maintainer to change -> list to -> list[Results] so at least basic LS works.

or you could change your code to

results: list[Results] = model.predict ...

@Ayad0net
Copy link
Author

@heejaechang Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants