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

Fix install error from latest version of repo #1617

Merged
merged 7 commits into from
Jun 1, 2023
Merged

Conversation

AndrewJGaut
Copy link
Contributor

@AndrewJGaut AndrewJGaut commented May 26, 2023

Fixes issue #1616.

This PR does the following:

  1. Fix an error that would prevent users from being able to correctly install new releases of crfm-helm
  2. Update Github Actions so that install errors are tested for.
  3. Update setup.cfg so that pip install -e . works again. (It was missing simple-slurm and an update to the tokenizers version.)

Note on 1): The issue found in #1616 is documented on spaCy's repo here. In short, they have a temporary workaround to use typing-extensions<4.6.0, which is what I use here.

@AndrewJGaut AndrewJGaut marked this pull request as draft May 26, 2023 21:27
@AndrewJGaut
Copy link
Contributor Author

Also, I see an Install test here, but it doesn't seem to me that it's actually doing the installation? (e.g. Codalab's test.yml includes a few lines to install the library and test that the command runs.)

@AndrewJGaut
Copy link
Contributor Author

AndrewJGaut commented May 26, 2023

I also noted that sometimes the setup.cfg isn't updated to reflect changes to requirements.txt (e.g., simple-slurm wasn't added and the tokenizer update was not reflected there).

@AndrewJGaut AndrewJGaut requested a review from yifanmai May 28, 2023 20:49
@AndrewJGaut AndrewJGaut marked this pull request as ready for review May 28, 2023 20:50
@yifanmai
Copy link
Collaborator

The upstream issue was updated with a note that we can instead pin pydantic~=v1.10.8; could you check if this works?

@AndrewJGaut
Copy link
Contributor Author

AndrewJGaut commented Jun 1, 2023

The upstream issue was updated with a note that we can instead pin pydantic~=v1.10.8; could you check if this works?

That does not work for spacy 3.2.4. It mentions in that issue that the fix is forspacy v3.4 and v3.5 and that For spacy v3.2 and v3.3, we have published patch releases with fixes for the typing_extension requirement, so the typing-extensions fix appears to be the correct here.

Moreover, when I try to fix pydantic~=1.10.8 locally and pip install -e ., it fails with:

ERROR: Cannot install crfm-helm, crfm-helm==0.2.2 and spacy==3.2.6 because these package versions have conflicting dependencies.

The conflict is caused by:
    crfm-helm 0.2.2 depends on pydantic~=1.10.8
    spacy 3.2.6 depends on pydantic!=1.8, !=1.8.1, <1.9.0 and >=1.7.4
    crfm-helm 0.2.2 depends on pydantic~=1.10.8
    spacy 3.2.5 depends on pydantic!=1.8, !=1.8.1, <1.9.0 and >=1.7.4
    crfm-helm 0.2.2 depends on pydantic~=1.10.8
    spacy 3.2.4 depends on pydantic!=1.8, !=1.8.1, <1.9.0 and >=1.7.4

So, spacy 3.2.4 depends on pydantic!=1.8, !=1.8.1, <1.9.0 and >=1.7.4. Thus, unless we want to upgrade spacy in addition to pydantic, I don't think that fix will work, sorry!

@yifanmai
Copy link
Collaborator

yifanmai commented Jun 1, 2023

Can we also upgrade Spacy to v3.4? Are there any breaking changes?

@AndrewJGaut
Copy link
Contributor Author

Can we also upgrade Spacy to v3.4? Are there any breaking changes?

Ah, yes, we can! That works. We don't even need to pin the pydantic version since those versions of spacy automatically install a high enough version. Sorry, I didn't know if updating spacy was an option.

@yifanmai
Copy link
Collaborator

yifanmai commented Jun 1, 2023

Looking at the upgrade notes, I think this should be safe.

@yifanmai yifanmai merged commit 2fde949 into main Jun 1, 2023
@yifanmai yifanmai deleted the fix/1616-install-broken branch June 1, 2023 17:38
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.

2 participants