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

Method Error in Notebook example #34

Open
jmatsushita opened this issue Dec 23, 2022 · 3 comments · May be fixed by #35
Open

Method Error in Notebook example #34

jmatsushita opened this issue Dec 23, 2022 · 3 comments · May be fixed by #35

Comments

@jmatsushita
Copy link

Hi there,

I'm trying to run this example notebook in VS Code. I'm using the Julia 1.8.3 kernel and I've just did add AlgebraicRelations in the package manager.

When I run the second cell (the using first cell runs) I get the following error:

MethodError: no method matching present_to_schema(::Presentation{Catlab.Theories.ThSymmetricMonoidalCategory, Symbol})
Closest candidates are:
  present_to_schema(!Matched::Symbol, !Matched::Symbol) at ~/.julia/packages/AlgebraicRelations/VrfVu/src/Presentations.jl:48

Stacktrace:
 [1] top-level scope
   @ ~/dev/workshop/julia/AlgebraicRelations.jl/examples/ml_workflow_demo/ml_demo.ipynb:18

I'm new to both Julia and the Catlab ecosystem, so apologies if I've missed something obvious!

Cheers,

Jun

@jmatsushita
Copy link
Author

jmatsushita commented Dec 23, 2022

I think I found the problem.

  • Looking at this test it seems that the way to call present_to_schema is to use the macro
  • If I replace
    TrainDB = present_to_schema(present);
    with
    @present_to_schema TrainDB(present);
    the cell runs correctly and draws the schema.

I'll submit a PR to fix the notebook.

@epatters
Copy link
Member

epatters commented Jan 4, 2023

Hi, thanks for tracking down this problem and suggesting a fix. This package has been without a maintainer for a little while, but @TheCedarPrince is going to start working on it, beginning with the big refactor in #31. It may take awhile to triage these issues. Thanks for your interest and your patience!

@TheCedarPrince
Copy link

Yup! I am ramping up on this and will come back to this error @jmatsushita -- sorry you ran into problems! Like @epatters , I'll be picking up with a major refactor and then can revisit not only this issue but others that are outstanding. Thanks for coming through! If you have any more questions, feel free to also follow-up with us in Zulip

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 a pull request may close this issue.

3 participants