Closed RajeshDM closed 7 months ago
Thanks. Could you print out what classes the correlation probabilities are for? It is possible that those two classes have never appeared together (or, for some similar semantic reasons).
I believe you can find out the classes by printing data
.
Hi,
ObjectState::(AlarmClock,{'loc': (8, 9), 'id': 'AlarmClock'}) ['DeskLamp'] ObjectState::(AlarmClock,{'loc': (7, 9), 'id': 'AlarmClock'}) ['DeskLamp'] ObjectState::(AlarmClock,{'loc': (7, 8), 'id': 'AlarmClock'}) ['DeskLamp']
This is a set of objects for which all probabilities are 0 - so it looks like alarm clock and desk lamp have correlation as 0 in some cases. Please let me know if any other information would be useful
It's possible that AlarmClock and DeskLamp never occured together in any of the scenes used to collect the correlations. Perhaps this is due to scene changes in newer Ai2thor versions, but I am not certain. For now, you could just skip loading these.
It's possible that AlarmClock and DeskLamp never occured together in any of the scenes used to collect the correlations. Perhaps this is due to scene changes in newer Ai2thor versions, but I am not certain. For now, you could just skip loading these.
This is happening in all versions of AI2Thor (I tried it with old and new). This issue doesn't have anything to do with AI2Thor or python.
(The final behaviour is different in a newer version of python because what happens in random.choices is different when everything is 0 is different in python 3.9 onwards. But otherwise - the fact that everything is 0 is consistent across AI2Thor and python versions)
I see. I hope skipping helps!
At this line - when all the correlation are being loaded, some of them all have 0 probabilities :
https://github.com/zkytony/cos-pomdp/blob/1e3c7fe940a2165b5c5c384ebf047e8139d437ec/cospomdp/models/correlation.py#L83
You can test this by running the following function :
This is basically happening right after the corelation probabilities being loaded - so it looks like the stored data has the 0s
This can easily be reproduced by running the default scene itself