Skip to content

Conversation

@ArneBinder
Copy link
Owner

@ArneBinder ArneBinder commented Jul 19, 2025

This is the last non-breaking piece of the pie-core refactor. See this for context.

requires:

@ArneBinder
Copy link
Owner Author

ArneBinder commented Jul 21, 2025

Strangely, the tests succeed for me locally. May this be because of different PyTorch versions? Locally, I used the setup from poetry.lock (poetry sync --with dev), but I think the tests install just from the pyproject.toml? But if this is really the case, why are the scores different?

EDIT: I was able to reproduce the behavior locally. I deleted the poetry.lock file and re-created one from the pyproject.toml (poetry lock) and installed from that (poetry sync --with dev). Important for the poetry commands: I'm using poetry version 2.1.3!

@RainbowRivey
Copy link
Collaborator

RainbowRivey commented Jul 21, 2025

I cannot reproduce this environment from scratch.
I do:

conda create -n pie python=3.9 poetry=2.1.3 pip 
conda activate pie   
poetry install --with dev

->

[expand for full log]

Path /home/conda/feedstock_root/build_artifacts/pysocks_1733217236728/work for pysocks does not exist

[🔴] × poetry install --with dev                                                                                                                                                                                              (pie) 
Removing the project's plugin cache because it is outdated
Ensuring that the Poetry plugins required by the project are available...
The following Poetry plugins are required by the project but are not installed in Poetry's environment:
  - poetry-plugin-export (>=1.8)
Installing Poetry plugins only for the current project...
Path /home/conda/feedstock_root/build_artifacts/pysocks_1733217236728/work for pysocks does not exist
Path /home/conda/feedstock_root/build_artifacts/secretstorage_1725915609225/work for secretstorage does not exist
Path /home/conda/feedstock_root/build_artifacts/bld/rattler-build_anyio_1742243108/work for anyio does not exist
Path /home/conda/feedstock_root/build_artifacts/backports.tarfile_1733325779670/work for backports-tarfile does not exist
Path /home/conda/feedstock_root/build_artifacts/brotli-split_1749229842835/work for brotli does not exist
Path /home/conda/feedstock_root/build_artifacts/python-build_1733230610871/work for build does not exist
Path /home/conda/feedstock_root/build_artifacts/cachecontrol-split_1746102850263/work for cachecontrol does not exist
Path /home/conda/feedstock_root/build_artifacts/certifi_1752493286596/work/certifi for certifi does not exist
Path /home/conda/feedstock_root/build_artifacts/cffi_1725571112467/work for cffi does not exist
Path /home/conda/feedstock_root/build_artifacts/charset-normalizer_1746214863626/work for charset-normalizer does not exist
Path /home/conda/feedstock_root/build_artifacts/cleo_1734693717670/work for cleo does not exist
Path /home/conda/feedstock_root/build_artifacts/colorama_1733218098505/work for colorama does not exist
Path /home/conda/feedstock_root/build_artifacts/crashtest_1733564795535/work for crashtest does not exist
Path /home/conda/feedstock_root/build_artifacts/cryptography-split_1751491068086/work for cryptography does not exist
Path /home/conda/feedstock_root/build_artifacts/distlib_1752822973799/work for distlib does not exist
Path /home/conda/feedstock_root/build_artifacts/dulwich_1740965108287/work for dulwich does not exist
Path /home/conda/feedstock_root/build_artifacts/exceptiongroup_1746947292760/work for exceptiongroup does not exist
Path /home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1733235979760/work/dist for fastjsonschema does not exist
Path /home/conda/feedstock_root/build_artifacts/filelock_1741969488311/work for filelock does not exist
Path /home/conda/feedstock_root/build_artifacts/findpython_1741582825328/work for findpython does not exist
Path /home/conda/feedstock_root/build_artifacts/h11_1745526374115/work for h11 does not exist
Path /home/conda/feedstock_root/build_artifacts/h2_1738578511449/work for h2 does not exist
Path /home/conda/feedstock_root/build_artifacts/hpack_1737618293087/work for hpack does not exist
Path /home/conda/feedstock_root/build_artifacts/bld/rattler-build_httpcore_1745602916/work for httpcore does not exist
Path /home/conda/feedstock_root/build_artifacts/httpx_1733663348460/work for httpx does not exist
Path /home/conda/feedstock_root/build_artifacts/hyperframe_1737618333194/work for hyperframe does not exist
Path /home/conda/feedstock_root/build_artifacts/idna_1733211830134/work for idna does not exist
Path /home/conda/feedstock_root/build_artifacts/importlib-metadata_1737420181517/work for importlib-metadata does not exist
Path /home/conda/feedstock_root/build_artifacts/importlib_resources_1736252299705/work for importlib-resources does not exist
Path /home/conda/feedstock_root/build_artifacts/python-installer_1733237321392/work for installer does not exist
Path /home/conda/feedstock_root/build_artifacts/jaraco.classes_1733325873251/work for jaraco-classes does not exist
Path /home/conda/feedstock_root/build_artifacts/jaraco.context_1733382590553/work for jaraco-context does not exist
Path /home/conda/feedstock_root/build_artifacts/jaraco.functools_1751918752492/work for jaraco-functools does not exist
Path /home/conda/feedstock_root/build_artifacts/jeepney_1740828240267/work for jeepney does not exist
Path /home/conda/feedstock_root/build_artifacts/keyring_1735210185992/work for keyring does not exist
Path /home/conda/feedstock_root/build_artifacts/more-itertools_1745349462661/work for more-itertools does not exist
Path /home/conda/feedstock_root/build_artifacts/msgpack-python_1749813188733/work for msgpack does not exist
Path /home/conda/feedstock_root/build_artifacts/numpy_1732314280888/work/dist/numpy-2.0.2-cp39-cp39-linux_x86_64.whl for numpy does not exist
Path /home/conda/feedstock_root/build_artifacts/bld/rattler-build_packaging_1745345660/work for packaging does not exist
Path /home/conda/feedstock_root/build_artifacts/pbs-installer_1752365288979/work for pbs-installer does not exist
Path /home/conda/feedstock_root/build_artifacts/pip_1746249878903/work for pip does not exist
Path /home/conda/feedstock_root/build_artifacts/pkginfo_1739984581450/work for pkginfo does not exist
Path /home/conda/feedstock_root/build_artifacts/bld/rattler-build_platformdirs_1746710438/work for platformdirs does not exist
Path /home/conda/feedstock_root/build_artifacts/poetry_1746442140747/work for poetry does not exist
Path /home/conda/feedstock_root/build_artifacts/poetry-core_1746390087282/work for poetry-core does not exist
Path /home/conda/feedstock_root/build_artifacts/bld/rattler-build_pycparser_1733195786/work for pycparser does not exist
Path /home/conda/feedstock_root/build_artifacts/pyproject_hooks_1733710025763/work for pyproject-hooks does not exist
Path /home/conda/feedstock_root/build_artifacts/rapidfuzz_1743733972206/work for rapidfuzz does not exist
Path /home/conda/feedstock_root/build_artifacts/requests_1749498106507/work for requests does not exist
Path /home/conda/feedstock_root/build_artifacts/requests-toolbelt_1733734787568/work for requests-toolbelt does not exist
Path /home/conda/feedstock_root/build_artifacts/shellingham_1733300899265/work for shellingham does not exist
Path /home/conda/feedstock_root/build_artifacts/sniffio_1733244044561/work for sniffio does not exist
Path /home/conda/feedstock_root/build_artifacts/tomli_1733256695513/work for tomli does not exist
Path /home/conda/feedstock_root/build_artifacts/tomlkit_1749127122469/work for tomlkit does not exist
Path /home/conda/feedstock_root/build_artifacts/trove-classifiers_1746816921116/work for trove-classifiers does not exist
Path /home/conda/feedstock_root/build_artifacts/bld/rattler-build_typing_extensions_1751643513/work for typing-extensions does not exist
Path /home/conda/feedstock_root/build_artifacts/urllib3_1750271362675/work for urllib3 does not exist
Path /home/conda/feedstock_root/build_artifacts/virtualenv_1753096232982/work for virtualenv does not exist
Path /home/conda/feedstock_root/build_artifacts/zipp_1749421620841/work for zipp does not exist
Updating dependencies
Resolving dependencies... (0.0s)

Path /home/conda/feedstock_root/build_artifacts/pysocks_1733217236728/work for pysocks does not exist

UPD: Seems to be a Conda issue
UPD2: FIXED, poetry-plugin-export manually installed seems to solve the issue, poetry install works now 🤷

@RainbowRivey
Copy link
Collaborator

From what I've noticed:
All tests failing are half-precision-model=True
They also fail right on the edge of tolerance:

  comparison failed
  Obtained: 0.408203125
  Expected: 0.398 ± 1.0e-02

-> (0.398 + 0.01 = 0.408) != 0.408203125

Where does the expected precision come from?
Also, shouldn't these tests be deterministic, e.g. via pytorch_lightning.seed_everything() or something similar?

@ArneBinder
Copy link
Owner Author

ArneBinder commented Jul 21, 2025

Where does the expected precision come from?

You mean the 1.0e-02? I think that was just for convenience to not write very long score numbers (I think Chris wrote these tests very long ago). Thinking about it now,1.0e-02 seems to be very much too relaxed...

shouldn't these tests be deterministic?

But they are deterministic, aren't they? And what does determinism have to do with the issue at all? I thought you already identified switching half-precision-model as the culprit? The question is, imo, why does this occur only now? Btw how was the behavior when we did the experiments on drugprot?

@ArneBinder ArneBinder force-pushed the use_annotation_pipeline branch from 65ad249 to 002832d Compare August 4, 2025 16:17
@codecov
Copy link

codecov bot commented Aug 4, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@ArneBinder ArneBinder marked this pull request as ready for review August 4, 2025 16:52
@ArneBinder ArneBinder requested a review from RainbowRivey August 4, 2025 16:53
Copy link
Collaborator

@RainbowRivey RainbowRivey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor typo: pie-core 0.2.1 in description
Else good 👍

@ArneBinder ArneBinder merged commit f99c96f into main Aug 4, 2025
3 of 4 checks passed
@ArneBinder ArneBinder deleted the use_annotation_pipeline branch August 4, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use pie_core.AnnotationPipeline

3 participants