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

CKY CRF example #586

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

CKY CRF example #586

wants to merge 2 commits into from

Conversation

srush
Copy link
Contributor

@srush srush commented Jun 30, 2021

Preliminary implementation of CKY CRF with constraints for @duvenaud

Wrote this code a while ago, now trying to clean it up to run under the state effect and use helpers to abstract some of the nasty indexing functions.

Would really like to make this a monoid, but that will require some List acrobatics. Not sure if that is worth it.

@google-cla google-cla bot added the cla: yes label Jun 30, 2021
Copy link
Collaborator

@apaszke apaszke left a comment

Choose a reason for hiding this comment

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

The Add instance for indices is questionable, but I'll allow it 😛 Would you rather merge it now or once the grad stuff is fixed?

@axch
Copy link
Collaborator

axch commented May 19, 2022

I don't know whether this is still under active development, but while trying to reproduce #587 I ported the code to current Dex syntax. The main difference is that function arguments are now "required" as far as the function definition is concerned, but one can pass _ for an argument that can be inferred at the call site. Here is that port, in case it's helpful.
cky.dx.txt

@apaszke
Copy link
Collaborator

apaszke commented May 19, 2022

@axch does the example complete without errors now? If so, we should submit it!

@srush
Copy link
Contributor Author

srush commented May 19, 2022

Neat. I can do a review if that is helpful. I am hoping to finish some of these up this summer. Got a bit busy during the term and haven't caught up on language changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants