Skip to content

Fixed package dependencies, some DisCoPy and Lambeq class, function dependencies#33

Open
IsaacFigNewton wants to merge 31 commits into
Quantinuum:mainfrom
IsaacFigNewton:main
Open

Fixed package dependencies, some DisCoPy and Lambeq class, function dependencies#33
IsaacFigNewton wants to merge 31 commits into
Quantinuum:mainfrom
IsaacFigNewton:main

Conversation

@IsaacFigNewton
Copy link
Copy Markdown

I've refactored and merged functional changes from the new_lambeq branch into main.

The project isn't fully functional yet, as I'm still familiarizing myself with the dependency libraries, but it should be compatible with Python 3.12 for testing now. In commits where I switched functions/classes, I've included links to the relevant documentation for reference.

I've also updated the README with instructions for integrating DisCoCirc with notebooks and environments outside the repo directory.

I'd love to use this for integration with knowledge graphs and knowledge bases. Any additional updates or fixes would be greatly appreciated.

Thanks for reviewing.

Thomas Hoffmann and others added 30 commits July 14, 2023 16:07
replaced InterchangeError with AxiomError
removed biclosed functionality
moved Ob import under discopy.rigid imports
added new version import code
loosened discopy version requirements
added pydantic version constraints
figured out dependency issues
added version back in
replacing coreferee pipe with fastcoref for coref disambiguation, since coreferee's dependencies are incompatible with other packages' libraries
replacing coreferee pipe with fastcoref for coref disambiguation, since coreferee's dependencies are incompatible with other packages' libraries
2nd-order dependencies should be compatible now
Replaced CCGAtomicType with AtomicType
changed biclosed to closed
based on [toumix's issue here](discopy/discopy#115)
updated discopy Swap class import.
[discopy.markov.Swap](https://docs.discopy.org/en/main/_api/discopy.markov.Swap.html#swap) is the only class with the same parameter type requirements
Added library import info
It looks like sentence2tree was replaced with sentences2trees.
To avoid issues when going through docs for updating other dependencies, possible future deprecation, and code refactoring, I replaced it and adjusted implementation appropriately.
See Lambeq docs: https://docs.quantinuum.com/lambeq/root-api.html#lambeq.BobcatParser.sentences2trees
Based on old BobcatParser's CCGTree metadata config: https://github.com/CQCL/lambeq/blob/6903c5a39a05f7f34054ec204ed8e6a6d0228cbc/lambeq/text2diagram/bobcat_parser.py
Compared with newer parser implementation and it looks like no significant changes:
https://github.com/CQCL/lambeq/blob/main/lambeq/text2diagram/model_based_reader/bobcat_parser.py

Maybe the issue is caused by Python syntax changes.
forgot to update .original.variable references
accidentally put expr_name instead of expr_type before
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.

1 participant