Open mKabouri opened 3 months ago
Did test_vision_detector_search.py
in the README work for you?
It doesn't work. I had the following error:
Traceback (most recent call last):
File "/home/mykabouri/Reinforcement_Learning/ai2thor-yolo/cos-pomdp/tests/thor/test_vision_detector_search.py", line 41, in <module>
_test_method(Methods.V_HIERARCHICAL_CORR_CRT, "bedroom", "AlarmClock", scene="FloorPlan321")
File "/home/mykabouri/Reinforcement_Learning/ai2thor-yolo/cos-pomdp/tests/thor/test_vision_detector_search.py", line 37, in _test_method
trial.run()
File "/home/mykabouri/Reinforcement_Learning/ai2thor-yolo/cos-pomdp/cospomdp_apps/thor/trial.py", line 159, in run
action = agent.act()
File "/home/mykabouri/Reinforcement_Learning/ai2thor-yolo/cos-pomdp/cospomdp_apps/thor/agent/cospomdp_complete.py", line 357, in act
goal = self.solver.plan(self.cos_agent)
File "pomdp_py/algorithms/po_uct.pyx", line 225, in pomdp_py.algorithms.po_uct.POUCT.plan
File "pomdp_py/algorithms/po_uct.pyx", line 233, in pomdp_py.algorithms.po_uct.POUCT.plan
File "pomdp_py/algorithms/po_uct.pyx", line 313, in pomdp_py.algorithms.po_uct.POUCT._search
File "pomdp_py/algorithms/po_uct.pyx", line 361, in pomdp_py.algorithms.po_uct.POUCT._simulate
File "pomdp_py/framework/basics.pyx", line 640, in pomdp_py.framework.basics.sample_generative_model
File "pomdp_py/framework/basics.pyx", line 693, in pomdp_py.framework.basics.sample_explict_models
File "/home/mykabouri/Reinforcement_Learning/ai2thor-yolo/cos-pomdp/cospomdp/models/observation_model.py", line 573, in sample
objobzs = {objid : self.zi_models[objid].sample(next_state)
File "/home/mykabouri/Reinforcement_Learning/ai2thor-yolo/cos-pomdp/cospomdp/models/observation_model.py", line 573, in <dictcomp>
objobzs = {objid : self.zi_models[objid].sample(next_state)
File "/home/mykabouri/Reinforcement_Learning/ai2thor-yolo/cos-pomdp/cospomdp/models/observation_model.py", line 107, in sample
si = dist_si.sample()[self.corr_object_id]
File "/home/mykabouri/Reinforcement_Learning/ai2thor-yolo/cos-pomdp/cospomdp/probability/tabular_dist.py", line 227, in sample
return self.random(rnd=rnd)
File "pomdp_py/representations/distribution/histogram.pyx", line 76, in pomdp_py.representations.distribution.histogram.Histogram.random
File "/usr/lib/python3.10/random.py", line 535, in choices
raise ValueError('Total of weights must be greater than zero')
ValueError: Total of weights must be greater than zero
It's been quite a while since I last run this, so I am no longer familiar with the traceback :( Could you provide more details about your system and your steps?
According to https://github.com/zkytony/cos-pomdp/issues/5 and https://github.com/zkytony/cos-pomdp/issues/7, people have been able to get the example working. Perhaps @RajeshDM has some insight?
Also, please investigate if necessary.
It's been quite a while since I last run this, so I am no longer familiar with the traceback :( Could you provide more details about your system and your steps?
According to #5 and #7, people have been able to get the example working. Perhaps @RajeshDM has some insight?
Also, please investigate if necessary.
Hi,
This is the error that occurs when using python 3.9 and above - https://github.com/zkytony/cos-pomdp/issues/8
What is happening is, in the files, there are some correlations that are all 0 and the newer version of python's random function needs something to be non-zero. So one can either use a lower version of python (anything lower than 3.9 will work) or update the random function in histogram (in pomdp-py)
Thank you
Hello, I tried to run tests for thor, but I had some errors:
For
_test_optimal_search_agent
, I have the following error (the same with_test_mjolnir_agent
):For
_test_basic_search
, I have the following (the same with_test_basic_informed_search
and_test_analyze_cosagent_basic_search_tree
):