-
Notifications
You must be signed in to change notification settings - Fork 11
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
--export-graphml-deps error despite PR request for this feature approved #113
Comments
I am not completely familiar with Rust and Cargo, please pardon me for this |
It appears you did not check out the The second line is also strange, why did you |
oh thank u |
oh but wait |
there's no A merge to the So shouldn't I just git clone https://github.com/tirix/metamath-knife.git Even when I did that, I still had the same error... |
The bottom of the page has "command line instructions" for checking out the PR:
|
I really apologise.. But I am utterly confused.. everything I tried is not working, including:
and there are so many confusing commands and concepts eg. branch, fork, checkout.. I am not a master in Git as well. I usually only clone repos, never worked with branches or forks.. Do u have a list of commands I can follow from start to end? |
Delete the metamath-knife repo you have cloned. From your documents folder or wherever you would like to put this project: # check out main repo to metamath-knife/ directory
git clone https://github.com/david-a-wheeler/metamath-knife.git
# enter metamath-knife/
cd metamath-knife
# create a new branch to track tirix's PR
git checkout -b tirix-export_graphml_deps main
# Pull the changes from the PR into your local branch
git pull https://github.com/tirix/metamath-knife.git export_graphml_deps
# Build and run
cargo run --release --features xml -- --export-graphml-deps out.gml path/to/set.mm |
@digama0 thanks for stepping in and providing support. |
greatly appreciate |
I was able to solve the problem, appreciated it. I have found that both on the web pages of MPE and on the GraphML output from running, metamath-knife set.mm --time --export-graphml-deps deps.xml, dependencies between definitions are missing. For example, df-grp is defined in terms of the following constants: Hence, each constant can be a node, and there can be an edge for each "used in the definition of" relation. Can this sort of graph be extracted from set.mm using metamath-knife, or be obtained by any other means? (And do I need to open a new issue for this, since this is a different although related issue?) |
this is also on https://groups.google.com/g/metamath/c/Pc2z1qz38XE |
Yes, this is not part of the export introduced in #112. I believe syntax axiom dependencies should be a completely separated graph. |
ok appreciate it, will wait for it then.. |
Rather than each constant to be a node, I believe each definitional axiom should be a node. I think this makes more sense (e.g. we have a constant This requires the ability to identify definitions, so there is a interaction with #103 . |
I think the most sensible version of this would involve not the constant symbols, or the definitions, but rather the syntax axioms, because you can take |
It was also my first thought to use syntax axioms, but then the graph obtained would only be one layer deep: I thought a graph of definitions would probably make more sense: Actually @humanitiesclinic it depends what you need this for. |
@tirix yes I think the graph of definitions as mentioned in "I thought a graph of definitions would probably make more sense: df-grp (Group) then depends of df-mnd (Monoid), which depends itself on df-sgrp (Semigroup), which depends on df-mgm (Magma), and so on. This is probably much more meaningful." is the closest to look what I need.. |
The idea would be to use |
on a separate but relevant note, @tirix @digama0, sorry to inform that I seem to have a problem with the current GraphML output. Pls see the attached output which is exactly what I got when I ran the commands in: On Gephi, I have a Invalid GML Parsing error. On GraPhP with PHP (https://github.com/graphp/graph), I am having the following error: It appears that the GraphML output is not well-formed, but I dun have enough knowledge now to check manually what is the exact problem. Hopefully, you can fix this problem while you add the feature for the definitions dependency graph.. |
Here's the screenshot of error on Gephi
Here's the non-zipped version of the graphML file if you need it: https://file.io/TEBU1HreQNUo |
looks like the file extension (which I guessed at) is |
oh ok |
may I know if the definitions graph have been added? I don't see any news yet.. |
regarding, #113 (comment), because I am not fully clear about the technicalities regarding the difference between syntax axioms and definitions, I cannot comment.. as long as it is something like "I thought a graph of definitions would probably make more sense: df-grp (Group) then depends of df-mnd (Monoid), which depends itself on df-sgrp (Semigroup), which depends on df-mgm (Magma), and so on. This is probably much more meaningful.", it should probably be alright for me.. |
hope that's ok.. |
erm sorry to ask, but will it take long? because I need it for work and teaching.. the definitions graph, when topologically sorted, can be used to learn all definitions of objects from the ground up.. |
Note that definitions are already topologically sorted in the MM file, since you can't introduce a notion until you have introduced all the things it relies on. |
oh no! thank you so much for pointing that out.. ;(;( |
but may I ask.. because there are 1000+ over definitions... and for some definition node X, not every node that comes before it in a topological sort is used to define node X.. it is therefore possible to isolate a subgraph of only those nodes that node X is dependent on... do u have a suggestion on how this can be done quickly, preferably on set.mm directly? |
the reason why this needs to be done, is to avoid having to go through all the definitions before the so-called "target" node one wants to learn. say I wish to learn the definition df-grp.. it is the 400+th definition in set.mm... so it makes sense to isolate the subgraph on which it is dependent only, to avoid having to learn 400+ definitions first before reaching df-grp... |
First of all, if you are only interested in the interdependencies between algebraic and topological structures, there is a dedicated page for that, I suggest you take a look at it. I've posted my in-progress work in #116 . That version is far from final and has flows, but it actually outputs a graph for definitions. These GraphML exports are probably most suitable for research, data mining kind of work, in order to build graphs like in @david-a-wheeler Gource video or Stephen Wolfram's book, and a lot of processing will be required to build teaching material out of it. It might help if you explained better what you are teaching, at what level, and how you intend to use the data. |
FYI here is the current output: def.graphml.gz. |
thank you very much.. I appreciate it very much... |
I'll have a look and get back |
@tirix sorry to inform that the def.graphml has this error: while out.graphml is now ok |
It looks like the file in my previous comment did not upload correctly. This version works: def.graphml.gz With Gephi's Force Atlas layout, nodes with a lot of edges are isolated, so we can see clearly how central |
@humanitiesclinic have you been able to use the data? I'll close this issue if there is no more problem with the graphs. |
Thank you for this. Is it me, or is there something not quite right with the new PR. I keep on getting the error:
error: Found argument '--export-graphml-deps' which wasn't expected, or isn't valid in this context
Did you mean --export?
USAGE:
metamath-knife --export ... --time
For more information try --help
I even tried downloading the specific fork/branch directly, and still have the same problem:
git clone https://github.com/tirix/metamath-knife.git export_graphml_deps
Cloning into 'export_graphml_deps'...
remote: Enumerating objects: 2377, done.
remote: Counting objects: 100% (645/645), done.
remote: Compressing objects: 100% (175/175), done.
remote: Total 2377 (delta 523), reused 526 (delta 466), pack-reused 1732
Receiving objects: 100% (2377/2377), 20.79 MiB | 6.67 MiB/s, done.
Resolving deltas: 100% (1704/1704), done.
Users-MacBook-Pro-5:checkouts user$ cd /Users/user/.cargo/git/checkouts/export_graphml_deps
Users-MacBook-Pro-5:export_graphml_deps user$ cargo build --release
The text was updated successfully, but these errors were encountered: