NeuralNetworkVerification / Marabou

Other
253 stars 88 forks source link

Error during Marabou build #801

Closed phoenixbirdashes closed 5 months ago

phoenixbirdashes commented 5 months ago

After using the following commands:

mkdir build
cd build
cmake ../
cmake --build ./

the following error is received: . . . 11/76 Test #13: Test_InputQuery ............................ Passed 0.15 sec Start 15: Test_LeakyReluConstraint 12/76 Test #15: Test_LeakyReluConstraint ........... Passed 0.08 sec Start 16: Test_MaxConstraint Killed gmake[2]: [CMakeFiles/build-tests.dir/build.make:70: build-tests] Error 137 gmake[1]: [CMakeFiles/Makefile2:813: CMakeFiles/build-tests.dir/all] Error 2 gmake: *** [Makefile:101: all] Error 2

Screenshot 2024-04-18 220653

wu-haoze commented 5 months ago

@phoenixbirdashes , to understand the issue better, I have two questions:

  1. were the test "Killed" immediately or the process terminated after hanging for a while?
  2. It seems it failed at Test_MaxConstraint. Can you manually run the test (a binary called Test_MaxConstraint in I think the ./build/tests/engine/ folder) and let me know whether the test passed (i.e., With "OK" printed in the last line)?
wu-haoze commented 5 months ago

Just in case you're not aware, Marabou is available on pypi, pip3 install maraboupy. So it's worth trying that before building from scratch.

phoenixbirdashes commented 5 months ago

@wu-haoze,

  1. The test were "Killed" after hanging for a while.
  2. The test gets killed at different test cases each time when build, so I don't think a particular test case is the issue.

Screenshot 2024-04-19 210549

phoenixbirdashes commented 5 months ago

Just in case you're not aware, Marabou is available on pypi, pip3 install maraboupy. So it's worth trying that before building from scratch.

@wu-haoze As part of my project I am actually trying to extract the equations that gets generated for the DNN we give as Input from the Marabou Files, I am not sure if it can be done via the Python Interface.

wu-haoze commented 5 months ago

Hi, if the test hangs non-deterministically, but each individual test passes, my guess is that marabou is already successfully built. I’ve noticed that on resource constrained machines (not sure if your machine fits this description), ctest can hang for some reason. This is something we need to look into. To turn off automatically running unit test, replace “cmake ..” with “cmake .. -DRUN_UNIT_TEST=OFF”

Probably worth removing build/ and start from scratch (should be fairly quick since the downloaded/installed dependency won’t be removed).

With the pip package, yes I think if you’re passing in a network in onnx format and want to examine the encoding of the network, you could do it via the python API.

https://github.com/NeuralNetworkVerification/Marabou/blob/3c8e1054ff10d4371525ff1e7e15f18430a2b6d2/maraboupy/examples/2_ONNXExample.py#L37

The network object (which is a subclass ofMaraboupy/parser/InputQueryBuilder.py) generated by this command contains the information you need.

Andrew

phoenixbirdashes commented 5 months ago

Hi,

Thanks for your reply, The "cmake .. -DRUN_UNIT_TEST=OFF" worked.

I am actually trying to run Marabou in a VirtualBox Ubuntu Environment.

On Fri, 19 Apr, 2024, 10:37 pm Haoze(Andrew) Wu, @.***> wrote:

Hi, if the test hangs non-deterministically, but each individual test passes, my guess is that marabou is already successfully built. I’ve noticed that on resource constrained machines (not sure if your machine fits this description), ctest can hang for some reason. This is something we need to look into. To turn off automatically running unit test, replace “cmake ..” with “cmake .. -DRUN_UNIT_TEST=OFF”

Probably worth removing build/ and start from scratch (should be fairly quick since the downloaded/installed dependency won’t be removed).

With the pip package, yes I think if you’re passing in a network in onnx format and want to examine the encoding of the network, you could do it via the python API.

https://github.com/NeuralNetworkVerification/Marabou/blob/3c8e1054ff10d4371525ff1e7e15f18430a2b6d2/maraboupy/examples/2_ONNXExample.py#L37

The network object (which is a subclass ofMaraboupy/parser/InputQueryBuilder.py) generated by this command contains the information you need.

Andrew

在 2024年4月19日,08:40,

phoenixbirdashes @.***> 写道:



Just in case you're not aware, Marabou is available on pypi, pip3 install maraboupy. So it's worth trying that before building from scratch.

@wu-haozehttps://github.com/wu-haoze As part of my project I am actually trying to extract the equations that gets generated for the DNN we give as Input from the Marabou Files, I am not sure if it can be done via the Python Interface.

— Reply to this email directly, view it on GitHub< https://github.com/NeuralNetworkVerification/Marabou/issues/801#issuecomment-2066831062>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ACRZF26KWFSGS4R3DVGC3HLY6E3HNAVCNFSM6AAAAABGNUILN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRWHAZTCMBWGI>.

You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/NeuralNetworkVerification/Marabou/issues/801#issuecomment-2066963443, or unsubscribe https://github.com/notifications/unsubscribe-auth/BH5TGOFDWJA6POMDJIDWR4LY6FFOZAVCNFSM6AAAAABGNUILN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRWHE3DGNBUGM . You are receiving this because you were mentioned.Message ID: @.***>

wu-haoze commented 5 months ago

Closing the issue since it seems resolved. Feel free to re-open if needed.