error in convert_graph_int_to_adj_mat
See original GitHub issueHello,
I am trying to use Causal Disocvery RL on bnlearn benchmarks. I encounter the error in convert_graph_int_to_adj_mat function.
The input to this function is
[-1903318164 235405414 101482606 495790951 201853294 378349935
-1634426101 -1718146065 134742090 64 134742086 134742084
446475107 470616428 -1785775892 -1768316434 201884524 134217728
201949548 -1903613075 470286702 101187694 -1734505621 503843118
-2070074547 134217838 513518542 503875886 235405386 445754223
0 524358 236432367 134742086 134217792 134217792
503908622]
And the error message follows:
Traceback (most recent call last):
File "main.py", line 337, in <module>
main()
File "main.py", line 285, in main
graph_batch = convert_graph_int_to_adj_mat(graph_int)
File "/home/user/Causal_Discovery_RL/src/helpers/analyze_utils.py", line 156, in convert_graph_int_to_adj_mat
for curr_int in graph_int], dtype=int)
File "/home/user/Causal_Discovery_RL/src/helpers/analyze_utils.py", line 156, in <listcomp>
for curr_int in graph_int], dtype=int)
ValueError: invalid literal for int() with base 10: '-'
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the issue is fixed by changing
np.int32
toint
in several places of the codebase. the error is due to the overflow of int32.Sorry for a late reply. A quick fix is to use string, instead of int type, as key. E.g., 000111 is converted to ‘000111‘. We have change this part in internal codes but seemed not to update the github …
Again, sorry for this.