curtisbright / PhysicsCheck

Other
0 stars 2 forks source link

Using the embeddable checking script #18

Closed curtisbright closed 1 year ago

curtisbright commented 1 year ago

I still think we have different approaches to using the pipeline so I will spell out exactly the steps took when I tried to run the embeddability check on the order 10 squarefree graphs.

$ python3 main_c.py Traceback (most recent call last): File "/home/cbright/PhysicsCheck_cbright/embedability/main_c.py", line 322, in main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7]=="True") IndexError: list index out of range

I had to open the script to see what the script was expecting as all its parameters.

$ python3 main_c.py squarefree_mindegree2_10.exhaust 10 0 False unsatout satout True Traceback (most recent call last): File "/home/cbright/PhysicsCheck_cbright/embedability/main_c.py", line 322, in main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7]=="True") File "/home/cbright/PhysicsCheck_cbright/embedability/main_c.py", line 319, in main main_single_graph(line, order, index, using_subgraph, output_unsat_f, output_sat_f, verify) File "/home/cbright/PhysicsCheck_cbright/embedability/main_c.py", line 288, in main_single_graph my_file = open(file_path, "r") FileNotFoundError: [Errno 2] No such file or directory: '/home/cbright/PhysicsCheck_cbright/embedability/embedability/min_nonembed_graph_10-12-c.txt'

The error is not very helpful, but I remembered you said you cannot call the script from its directory so I changed the call.

$ cd .. $ python3 embedability/main_c.py embedability/squarefree_mindegree2_10.exhaust 10 0 False embedability/unsatout embedability/satout True Traceback (most recent call last): File "/home/cbright/PhysicsCheck_cbright/embedability/main_c.py", line 322, in main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7]=="True") File "/home/cbright/PhysicsCheck_cbright/embedability/main_c.py", line 319, in main main_single_graph(line, order, index, using_subgraph, output_unsat_f, output_sat_f, verify) File "/home/cbright/PhysicsCheck_cbright/embedability/main_c.py", line 293, in main_single_graph min_g = nx.from_graph6_bytes(bytes(string, encoding='utf-8')) File "/usr/lib/python3/dist-packages/networkx/readwrite/graph6.py", line 128, in from_graph6_bytes n, data = data_to_n(data) File "/usr/lib/python3/dist-packages/networkx/readwrite/graph6.py", line 389, in data_to_n if data[0] <= 62: IndexError: list index out of range

I didn't see what the error was, but line 293 is part of the subgraph check and shouldn't even be running. I looked at the code, and this is because the string "False" evaluates to True in Python. This is why it is inconvenient and error-prone to pass a Boolean as a string (the typical thing is to use a flag). But I persisted and changed the argument to the empty string.

$ python3 embedability/main_c.py embedability/squarefree_mindegree2_10.exhaust 10 0 "" embedability/unsatout embedability/satout True all adjacent vertices has corresponding orthogonal vectors every pair of non-adjacent vertices has corresponding noncolinear vectors every pair of non-adjacent vertices has corresponding noncolinear vectors verification failed

So the vector system of the second candidate failed the verification. The verification should on by default, so have the complex embeddings of the small embeddable graphs actually been verified?

BrianLi009 commented 1 year ago

Fix 1: subgraph error Error message: "IndexError: list index out of range" Fix: there is an empty line in min_nonembed_graph_10-12-c, causing the error when networkx read in the subgraphs. The bug is fixed by removing the empty line.

Fix 2: passing Boolean as a string Error message: the string "False" evaluates to True Fix: As discussed in the meeting, I added sys.argv[4]=="True" when passing in the parameter.

Fix 3: verification failure Error: complex verification failure in the current pipeline Fix: The verification were verified previously, before the last couple commits. I was able to reproduce the error you described and locate the cause. In short, the bug is that main_c.py is assigning the second base vector (0,1,0) to the corresponding variables. The bug has been fixed and pushed, I'm running the verification now. So far the candidates are passing the verification.

After pushing the changes, I tried running the command you provided, and it is working now: python3 embedability/main_c.py embedability/squarefree_mindegree2_10.exhaust 10 0 False embedability/unsatout embedability/satout True