HLR / DomiKnowS

36 stars 5 forks source link

ifSatisfied has value 100 for constraints where first argument is False #358

Open AlexWan0 opened 1 year ago

AlexWan0 commented 1 year ago

In each iteration of testing, I expected for only 1 of the 19 ifL constraints should have an ifSatisfied value in the verifyResult dictionary as there is only a single summation value which is True at each iteration. Right now, all ifL constraints in verifyResult have an ifSatisfied value of 100 if the constraints are satisfied and 18/19 constraints in verifyResult have an ifSatisfied value of 100 if the constraints aren't satisfied as it is including ifL constraints where the first argument is False.

The command for running test.py is in the readme in mnist-arithmetic-2.

auszok commented 1 year ago

@AlexWan0 Thank you for preparing the Readme. However I work on Windows and your script is for the Unix environment. Can you please rewrite it in python so it can be executed on any operating system (there is wget package in python if you want to use it). Regarding the command line to run the test. Will it be possible that you prepare python program that will configure this parameter inside so I cam run it in my debugger without additional configuration. Thank you.

AlexWan0 commented 1 year ago

@auszok Hi, I've added a download_checkpoints.py file, and default arguments to the argparse statements in the beginning of test.py. python test.py should be able to be run directly without command line arguments now, but you may need to change the default for checkpoint_path.

auszok commented 1 year ago

@AlexWan0 Thank you for updated scripts. The reason for all ifSatisfied begin 100 has been that this has been the default value for situation when there was not lc with antecedent True. I change it to 0 and committed the change. This results in only single lc having 100 and the rest 18 0 for your example. Maybe the correct value should be nan in this case, thought?

AlexWan0 commented 1 year ago

Yes, I think we just need a way to only get the ifSatisified values with antecedent True.

hfaghihi15 commented 1 year ago

Thanks, @AlexWan0 and @auszok, I think any indication whether being an additional keyword showing the number of applicable constraints or NaN value showing that there is no applicable constraint.

auszok commented 1 year ago

Okay, so I return NaN when there is no if LC with antecedent True. The value means that there are if LCs with antecedent True but none is satisfied.

hfaghihi15 commented 1 year ago

Hi @auszok Could you please point to the document where we have discussed the output of the verifyresult from datanode,

@AdmiralDarius could you please add a link to your document about the verifyconstraint code in the program and a bit of description of what each output from that code represents?

It would be good to keep the issues conclusive so that people can later use this in case they have similar problems.