-
Notifications
You must be signed in to change notification settings - Fork 3k
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
having a way resolver outputs a "number of ticks", and being able to limit that number #12039
Comments
What version of pip are you using? |
This doesn't sound substantially different from most of the previous proposals. While an opaque "number of steps" might be harder for people to guess at, there's no obvious way to force people to only supply a value that they got from the report of a previous run, and I'm pretty sure we'd end up with misguided advice on the internet to "add |
The last one |
Given my number of package and my iterative approach, that I suppose is also the typical use case of many, that number, while meaningless between each different use case, may be statistically significant for each independent repetitive use case |
A simpler approach you may prefer is to limit the number of "taking more time than usual" existing --verbose message when things are going wrong. That would be even less invasive. I have this message twice in my fail build, and it's still way later to me, but it would be an improvement from existing. looking where the code is for that message |
I see there is this hard-coded |
This has been discussed endlessly in previous issues. Please review the previous discussions to understand why we're not going to expose that limit to the user. |
would you accept that in pip reporter the messages_at_reject_count for '8:' is slightly different from '1:' ? |
I don't personally see the point (if there's 2 messages, you've hit 8 - it's basically just a "still working..." message, after all) but I'd be fine with it saying "pip is still looking at..." (rest of message stays the same) if it bothers you. |
I think this is basically a duplicate of #10417, although this has been discussed in other threads. I would argue that since Pip 23.1+ some of the previous arguments about user supportability are less meaningful as a user is far less likely to get stuck backtracking for a long period of time and therefore far fewer users would go looking for this option. A max backtracking option could be added with the text:
@stonebig As for the long backtracking problem itself, can you please provide a set of reproducible requirements that causes long backtracking times on Pip 23.1+. In general I'd be interested to see what causes long backtracking times, and in particular I want a few examples to see when PyPi backfills PEP 658 metadata to see if it's possible to use that as a preference for backtracking #12035. and if it helps. |
I will point out is pre-23.1 when I investigated backtracking issues I do manually edit the Pip source code to print out the number of backtracking steps (usually once every 100 or 1000 steps for long backtracking issues), and also what packages Pip is currently trying to resolve on if it's changed from the previous time it printed that message (I keep a set of the last print out). This, and a general understanding of the backtracking algorithm, often allowed me to figure out where the actual "knot" causing the long backtracking times were, where often in these cases Pip was getting caught looking at the wrong place. It was not easy to find the "knot" without editing source code. I am not sure this specific technique will apply to post-23.1 long backtracking time issues where there is a resolution but the information would still be useful. I have only come across the one so far in #12028 and it gave me the idea for #12035, but I think also in that example it wasn't useful is Pip's lack of telling the user why it's backtracking on that requirement (i.e. a conflict between awscli and pylint over colorama). I'm not sure how this would be added but similar to the same information that is given from I think getting access to this message early of why backtracking is taking so long and/or failing was my original motivation for writing #10417, this information is still useful today and it would be good for a way to access it without editing the source code of Pip. |
@notatallshaw my current requirements. I commented out
|
I managed to largely install these requirements without getting stuck backtracking. The problematic packages I had seem to be related to non-Python package prerequisites:
For those projects which work with Steps to reproduce:
I believe if I better understood the non-Python package prerequisites I would be able to include the packages that are failing. Feel free to give me any tips if you think you need further help. Here is the output of running
accelerate==0.19.0
adodbapi==2.6.2.0 affine==2.4.0 aiofiles==22.1.0 aiohttp==3.8.4 aiosignal==1.3.1 aiosqlite==0.19.0 alabaster==0.7.13 alembic==1.11.1 altair==4.2.2 altair-data-server==0.4.1 altair-transform==0.2.0 aniso8601==9.0.1 ansiwrap==0.8.4 anyio==3.6.2 appdirs==1.4.4 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 arviz==0.15.1 asciitree==0.3.3 asgi-csrf==0.9 asgiref==3.6.0 asn1crypto==1.5.1 asteval==0.9.29 astroid==2.15.5 astroML==1.0.2.post1 astropy==5.2.2 asttokens==2.2.1 async-generator==1.10 async-timeout==4.0.2 atomicwrites==1.4.1 attrs==23.1.0 autopep8==2.0.2 azure-core==1.26.4 azure-cosmos==4.3.1 azure-identity==1.13.0 Babel==2.12.1 backcall==0.2.0 backports-abc==0.5 baresql==0.7.4 bcrypt==4.0.1 beautifulsoup4==4.12.2 binaryornot==0.4.4 black==23.3.0 bleach==6.0.0 blinker==1.6.2 blis==0.7.9 blosc==1.11.1 blosc2==2.0.0 bokeh==3.1.1 botorch==0.8.5 Bottleneck==1.3.7 bqplot==0.12.39 branca==0.6.0 brewer2mpl==1.4.1 Brotli==1.0.9 build==0.10.0 cachelib==0.10.2 cachetools==5.3.0 catalogue==2.0.8 certifi==2023.5.7 cffi==1.15.1 cftime==1.6.2 chardet==5.1.0 charset-normalizer==3.1.0 click==8.1.3 click-default-group-wheel==1.2.2 click-plugins==1.1.1 cligj==0.7.2 cloudpickle==2.2.1 clr-loader==0.2.5 clrmagic==0.0.1a2 colorama==0.4.6 colorcet==3.0.1 comm==0.1.3 confection==0.0.4 cons==0.4.5 contourpy==1.0.7 cookiecutter==2.1.1 coverage==7.2.5 cramjam==2.6.2 cryptography==40.0.2 csvs-to-sqlite==0.9.1 cvxopt==1.3.1 cvxpy==1.3.1 cycler==0.11.0 cymem==2.0.7 Cython==0.29.34 cytoolz==0.12.1 daqp==0.5.1 dash==2.9.3 dash-core-components==2.0.0 dash-html-components==2.0.0 dash-table==5.0.0 dask==2023.5.0 dask-glm==0.2.0 dask-image==2023.3.0 dask-labextension==6.1.0 dask-ml==2023.3.24 dask-searchcv==0.2.0 databases==0.4.2 datasette==0.64.3 datasette-graphql==2.2 datashader==0.14.4 datashape==0.5.2 dateparser==1.1.8 db.py==0.5.3 deap==1.3.3 debugpy==1.6.7 decorator==4.4.2 defusedxml==0.7.1 deprecation==2.1.0 diff-match-patch==20230430 dill==0.3.6 dirty-cat==0.4.1 distlib==0.3.6 distributed==2023.5.0 Django==4.2.1 dnspython==2.3.0 docopt==0.6.2 docrepr==0.2.0 docstring-to-markdown==0.12 docutils==0.18.1 duckdb==0.8.0 ecos==2.0.12 emcee==3.1.4 entrypoints==0.4 et-xmlfile==1.1.0 etuples==0.3.9 exceptiongroup==1.1.1 executing==1.2.0 fast-histogram==0.11 fastai==2.7.12 fastapi==0.95.2 fastcore==1.5.29 fastdownload==0.0.7 fasteners==0.18 fastjsonschema==2.16.3 fastparquet==2023.4.0 fastprogress==1.0.3 feather-format==0.4.1 filelock==3.12.0 filterpy==1.4.5 Fiona==1.9.4 flake8==6.0.0 Flask==2.3.2 flask-accepts==0.18.4 Flask-Mail==0.9.1 flask-restx==1.1.0 Flask-Session==0.5.0 Flask-SQLAlchemy==3.0.3 flaskerize==0.14.0 flit==3.9.0 flit_core==3.9.0 folium==0.14.0 fonttools==4.39.4 formlayout==1.2.0 fqdn==1.5.1 freetype-py==2.3.0 frozenlist==1.3.3 fs==2.4.16 fsspec==2023.5.0 future==0.18.3 fuzzywuzzy==0.18.0 gast==0.4.0 geographiclib==2.0 geopandas==0.13.0 geopy==2.3.0 gitdb==4.0.10 GitPython==3.1.31 gmpy2==2.1.5 gpytorch==1.10 graphene==3.2.2 graphql-core==3.2.3 graphql-relay==3.2.0 great-expectations==0.16.13 greenlet==2.0.2 guidata==2.3.1 guiqwt==4.3.3 h11==0.14.0 h2==4.1.0 h5netcdf==1.1.0 h5py==3.8.0 holoviews==1.16.0 hpack==4.0.0 html5lib==1.1 httpcore==0.17.1 httpie==3.2.2 httpx==0.24.1 huggingface-hub==0.14.1 hupper==1.12 husl==4.0.3 hvplot==0.8.3 hypercorn==0.14.3 hyperframe==6.0.1 hypothesis==6.75.3 idlex==1.22 idna==3.4 imageio==2.28.1 imageio-ffmpeg==0.4.8 imagesize==1.4.1 imbalanced-learn==0.10.1 importlib-metadata==6.6.0 importlib-resources==5.12.0 inflection==0.5.1 iniconfig==2.0.0 intake==0.6.8 intervaltree==3.1.0 ipycanvas==0.13.1 ipydatagrid==1.1.15 ipykernel==6.23.1 ipyleaflet==0.17.2 ipympl==0.9.3 ipython==8.13.2 ipython-genutils==0.2.0 ipython-sql==0.5.0 ipywidgets==8.0.6 isoduration==20.11.0 isort==5.12.0 itsdangerous==2.1.2 janus==1.0.0 jaraco.classes==3.2.3 jedi==0.18.2 jellyfish==0.11.2 Jinja2==3.1.2 jinja2-time==0.2.0 joblib==1.2.0 json5==0.9.14 jsonpatch==1.32 jsonpointer==2.3 jsonschema==4.17.3 julia==0.6.1 jupyter==1.0.0 jupyter-bokeh==3.0.7 jupyter-console==6.6.3 jupyter-events==0.6.3 jupyter-server-mathjax==0.2.6 jupyter-sphinx==0.4.0 jupyter-ydoc==0.2.4 jupyter_client==8.2.0 jupyter_core==5.3.0 jupyter_packaging==0.12.3 jupyter_server==2.5.0 jupyter_server_fileid==0.9.0 jupyter_server_proxy==4.0.0 jupyter_server_terminals==0.4.4 jupyter_server_ydoc==0.8.0 jupyterlab==3.6.3 jupyterlab-launcher==0.13.1 jupyterlab-pygments==0.2.2 jupyterlab-widgets==3.0.7 jupyterlab_rise==0.2.0 jupyterlab_server==2.22.1 keyring==23.13.1 kiwisolver==1.4.4 langcodes==3.3.0 lazy-object-proxy==1.9.0 lazy_loader==0.2 linear-operator==0.4.0 linkify-it-py==2.0.2 llvmlite==0.40.0 lmfit==1.2.1 locket==1.0.0 logical-unification==0.4.6 loky==3.4.0 lxml==4.9.2 lz4==4.3.2 makefun==1.15.1 Mako==1.2.4 Markdown==3.4.3 markdown-it-py==2.2.0 MarkupSafe==2.1.2 marshmallow==3.19.0 matplotlib==3.7.1 matplotlib-inline==0.1.6 maturin==0.15.3 mccabe==0.7.0 mdit-py-plugins==0.3.5 mdurl==0.1.2 mercantile==1.2.1 mergedeep==1.3.4 metakernel==0.29.4 miniKanren==1.0.3 missingno==0.5.2 mistune==2.0.5 mizani==0.9.1 mlxtend==0.22.0 more-itertools==9.1.0 moviepy==1.0.3 mpl-scatter-density==0.7 mpld3==0.5.9 mpldatacursor==0.7.1 mpmath==1.3.0 msal==1.22.0 msal-extensions==1.0.0 msgpack==1.0.5 multidict==6.0.4 multipledispatch==0.6.0 murmurhash==1.0.9 mypy==1.3.0 mypy-extensions==1.0.0 mysql-connector-python==8.0.33 nbclassic==1.0.0 nbclient==0.7.4 nbconvert==7.4.0 nbconvert_reportlab==0.2 nbdime==3.2.1 nbformat==5.8.0 nbval==0.10.0 nest-asyncio==1.5.6 netCDF4==1.6.3 networkx==3.1 nlopt==2.7.1 nltk==3.8.1 notebook==6.5.4 notebook_shim==0.2.3 numba==0.57.0 numcodecs==0.11.0 numexpr==2.8.4 numpy==1.22.4 numpydoc==1.5.0 oct2py==5.6.0 octave_kernel==0.35.1 openai==0.27.7 openpyxl==3.1.2 opt-einsum==3.3.0 orjson==3.8.12 osqp==0.6.2.post9 outcome==1.2.0 packaging==23.1 pandas==1.5.3 pandas-datareader==0.10.0 pandocfilters==1.5.0 panel==1.0.2 papermill==2.4.0 param==1.13.0 parambokeh==0.2.3 paramiko==3.1.0 paramnb==2.0.4 parso==0.8.3 partd==1.4.0 pathspec==0.11.1 pathy==0.10.1 patsy==0.5.3 pdfrw==0.4 pep8==1.7.1 pexpect==4.8.0 pg8000==1.29.5 pickleshare==0.7.5 Pillow==9.5.0 PIMS==0.6.1 Pint==0.21 pkginfo==1.9.6 platformdirs==3.5.1 plotly==5.14.1 plotnine==0.12.1 pluggy==1.0.0 ply==3.11 pmdarima==2.0.3 polars==0.17.14 portalocker==2.7.0 portpicker==1.5.2 ppci==0.5.8 preshed==3.0.8 prettytable==0.7.2 priority==2.0.0 proglog==0.1.10 prometheus-client==0.16.0 prompt-toolkit==3.0.38 protobuf==3.20.3 psutil==5.9.5 ptpython==3.0.23 ptyprocess==0.7.0 PuLP==2.7.0 pure-eval==0.2.2 py-cpuinfo==9.0.0 py-lru-cache==0.1.4 py2vega==0.6.1 pyaml==23.5.9 pyarrow==12.0.0 PyAudio==0.2.13 pybars3==0.9.7 pybind11==2.10.4 pycairo==1.23.0 pycodestyle==2.10.0 pycosat==0.6.3 pycparser==2.21 pyct==0.5.0 pydantic==1.10.7 pydeck==0.8.0 pydocstyle==6.3.0 pyepsg==0.4.0 pyerfa==2.0.0.3 pyflakes==3.0.1 pygad==3.0.1 pygame==2.4.0 pygbm==0.1.0 Pygments==2.15.1 PyJWT==2.7.0 pylint==2.17.4 pylint-venv==3.0.1 pyls-spyder==0.4.0 pymc==5.3.1 PyMeta3==0.5.1 pymongo==4.3.3 Pympler==1.0.1 PyNaCl==1.5.0 pynndescent==0.5.10 pyodbc==4.0.39 PyOpenGL==3.1.6 pypandoc==1.11 pyparsing==3.0.9 pyproj==3.5.0 pyproject_hooks==1.0.0 PyQt5==5.15.9 PyQt5-Qt5==5.15.2 PyQt5-sip==12.12.1 pyqtgraph==0.13.3 PyQtWebEngine==5.15.6 PyQtWebEngine-Qt5==5.15.2 pyro-api==0.1.2 pyro-ppl==1.8.4 pyrsistent==0.19.3 pyserial==3.5 PySocks==1.7.1 pyspnego==0.9.0 pystache==0.6.0 pytensor==2.11.3 pytest==7.3.1 python-dateutil==2.8.2 python-dotenv==1.0.0 python-json-logger==2.0.7 python-lsp-black==1.3.0 python-lsp-jsonrpc==1.0.0 python-lsp-server==1.7.3 python-multipart==0.0.6 python-picard==0.7 python-slugify==8.0.1 python-snappy==0.6.1 pythonnet==3.0.1 PythonQwt==0.10.2 pytoolconfig==1.2.5 pytz==2023.3 pyviz-comms==2.2.1 PyWavelets==1.4.1 pywin32==306 pywin32-ctypes==0.2.0 pywinpty==2.0.10 pywinusb==0.4.2 PyYAML==6.0 pyzmq==25.0.2 pyzo==4.12.7 pyzstd==0.15.7 QDarkStyle==3.1 qdldl==0.1.7 qpsolvers==3.4.0 qstylizer==0.2.2 QtAwesome==1.2.3 qtconsole==5.4.3 QtPy==2.3.1 quadprog==0.1.11 quantecon==0.7.0 quart==0.18.3 rasterio==1.3.6 readme-renderer==37.3 redis==4.5.5 regex==2023.5.5 reportlab==4.0.0 requests==2.30.0 requests-ntlm==1.2.0 requests-toolbelt==1.0.0 retrying==1.3.4 rfc3339-validator==0.1.4 rfc3986==2.0.0 rfc3986-validator==0.1.1 rich==13.3.5 rlPyCairo==0.2.0 rope==1.8.0 Rtree==1.0.1 ruamel.yaml==0.17.17 ruamel.yaml.clib==0.2.7 Rx==3.2.0 scikit-fuzzy==0.4.2 scikit-image==0.20.0 scikit-learn==1.2.2 scikit-optimize==0.9.0 scilab2py==0.6.2 scipy==1.9.1 scramp==1.4.4 scs==3.2.3 seaborn==0.12.2 Send2Trash==1.8.2 shapely==2.0.1 simpervisor==1.0.0 simplegeneric==0.8.1 simplejson==3.19.1 simpy==4.0.1 six==1.16.0 sklearn-contrib-lightning==0.6.2.post0 slicerator==1.1.0 smart-open==6.3.0 smmap==5.0.0 snakeviz==2.2.0 sniffio==1.3.0 snowballstemmer==2.2.0 snuggs==1.4.7 sortedcontainers==2.4.0 sounddevice==0.4.6 soupsieve==2.4.1 spacy==3.5.3 spacy-legacy==3.0.12 spacy-loggers==1.0.4 spatialpandas==0.4.7 Sphinx==6.2.1 sphinx-rtd-theme==1.2.0 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jquery==4.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 spyder==5.4.3 spyder-kernels==2.4.3 SQLAlchemy==2.0.15 sqlite-bro==0.12.2 sqlite-fts4==1.0.3 sqlite-utils==3.31 sqlparse==0.4.4 srsly==2.4.6 sspyrs==0.3 stack-data==0.6.2 starlette==0.27.0 statsmodels==0.14.0 streamlit==1.22.0 streamz==0.6.4 supersmoother==0.4 swifter==1.3.4 sympy==1.12 tables==3.8.0 tabulate==0.9.0 tbats==1.1.3 tblib==1.7.0 tenacity==8.2.2 termcolor==2.3.0 terminado==0.17.1 text-unidecode==1.3 textdistance==4.5.0 textwrap3==0.9.2 thinc==8.1.10 threadpoolctl==3.1.0 three-merge==0.1.1 tifffile==2023.4.12 tinycss2==1.2.1 tokenizers==0.13.3 toml==0.10.2 tomli==2.0.1 tomli_w==1.0.0 tomlkit==0.11.8 toolz==0.12.0 torch==2.0.1 torchaudio==2.0.2 torchvision==0.15.2 tornado==6.3.2 tqdm==4.65.0 traitlets==5.9.0 traittypes==0.2.1 transformers==4.29.2 trio==0.22.0 trio-asyncio==0.12.0 twine==4.0.2 twitter==1.19.6 typer==0.7.0 typing_extensions==4.5.0 tzdata==2023.3 tzlocal==5.0.1 uc-micro-py==1.0.2 ujson==5.7.0 umap-learn==0.5.3 uncertainties==3.1.7 uri-template==1.2.0 urllib3==2.0.2 uvicorn==0.22.0 validators==0.20.0 vega-datasets==0.9.0 virtualenv==20.23.0 ViTables==3.0.2 waitress==2.1.2 wasabi==1.1.1 wasmer==1.1.0 wasmer_compiler_cranelift==1.1.0 wasmer_compiler_singlepass==1.1.0 watchdog==3.0.0 wcwidth==0.2.6 webcolors==1.13 webencodings==0.5.1 websocket-client==1.5.1 Werkzeug==2.3.4 whatthepatch==1.0.5 widgetsnbextension==4.0.7 wordcloud==1.9.2 wrapt==1.15.0 wsproto==1.2.0 xarray==2023.5.0 xarray-einstats==0.5.1 xgboost==1.7.5 XlsxWriter==3.1.0 xlwings==0.30.7 xmltodict==0.13.0 xyzservices==2023.5.0 y-py==0.5.9 yapf==0.33.0 yarl==1.9.2 ypy-websocket==0.8.2 zarr==2.14.2 zict==3.0.0 zipp==3.15.0 zstandard==0.21.0 |
What's the problem this feature will solve?
give the builder a way to "stop" the resolver when things are obviously not going the usual way versus previous builds
Describe the solution you'd like
I'm building from a local drive a huge list of requirement.
When all goes well, the resolver is "expectedly" behaving about the same each time,
When not, the resolver takes way more time, maybe would take a day but I kill it before, and I loose that "way more" time.
nota: after that initial big and long try, implementing a constraint.txt file and retrying, and nothing else, allows to pin-point the issue. (as 'pip check' can't see it comes from a dask[complete] constraint)
What would avoid this at minimal initial time cost is:
so, request is to have pip install --verbose :
Advantage vs a time limit or depth limit:
Alternative Solutions
this is an alternative to #10932
Additional context
I can try to experiment a counter if pip devs gives have an idea of how what/where could be counted.
It must be in a place where the "never ending resolution" is increasing it continously.
the "number of steps" displaying and the "breakage" could be done at the current --verbose output line writing moment.
Code of Conduct
The text was updated successfully, but these errors were encountered: