Closed bschnurr closed 1 year ago
I'm not able to repro slow performance given the steps above. Is there other steps? Do I need to uncomment something? I don't see any calls to get_data
in the code. Can you repro the problem with a more minimal code sample?
Oh sorry, you probably need to enable useLibraryCodeForTypes
and from the code example. its the line related to lgb_model.predict_proba(
I belive then indirectly it will go to lightGBM's get_data(
This is a duplicate of https://github.com/microsoft/pyright/issues/4787. I've already spent a bunch of time looking into this one and optimizing it. I don't think there's much more I can do here. The code uses very deep call chains across multiple libraries (lightgbm, sklearn, scipy, numpy), and most of these are untyped libraries, so type inference needs to be used in all of these cases.
Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues.
Describe the bug A clear and concise description of what the bug is.
40 seconds to analyze
def get_data(self):
in basic.py in the lightGBM packagehttps://github.com/microsoft/LightGBM/blob/ca035b2ee0c2be85832435917b1e0c8301d2e0e0/python-package/lightgbm/basic.py#L2307
To Reproduce Steps to reproduce the behavior.
open the code below after pip installing requirements.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots or Code If applicable, add screenshots or the text of the code (surrounded by triple back ticks) to help explain your problem. code here too.
requirements.txt
If your code relies on symbols that are imported from a third-party library, include the associated import statements and specify which versions of those libraries you have installed.
VS Code extension or command-line Are you running pyright as a VS Code extension or a command-line tool? Which version? You can find the version of the VS Code extension by clicking on the Pyright icon in the extensions panel.
Additional context Add any other context about the problem here.
slow at line
Re ["self.data.iloc[self.used_indic <shortened> " (lightgbm.basic) [2323:33]] (10856ms) [f:0, t:1, p:0, i:0, b:0]