pfnet / pfrl

PFRL: a PyTorch-based deep reinforcement learning library
MIT License
1.2k stars 157 forks source link

Remove deprecated SumTree #110

Closed muupan closed 3 years ago

muupan commented 3 years ago

SumTree is deprecated and no longer used except by itself and its test.

The result of git grep SumTree before this PR:

pfrl/collections/prioritized.py:        self.priority_sums = SumTreeQueue()
pfrl/collections/prioritized.py:# Implement operations on nodes of SumTreeQueue
pfrl/collections/prioritized.py:class SumTreeQueue(TreeQueue):
pfrl/collections/prioritized.py:class SumTree(object):
pfrl/collections/prioritized.py:        return "SumTree({})".format(self._dict())
pfrl/collections/prioritized.py:            self.left = SumTree(bd=(self.bd[0], c))._initdescendant()
pfrl/collections/prioritized.py:            self.right = SumTree(bd=(c, self.bd[1]))._initdescendant()
pfrl/collections/prioritized.py:            left = SumTree(self.bd, self.left, self.right, self.s)
pfrl/collections/prioritized.py:            right = SumTree(bd=r_bd)._initdescendant()
pfrl/collections/prioritized.py:            left = SumTree(bd=l_bd)._initdescendant()
pfrl/collections/prioritized.py:            right = SumTree(self.bd, self.left, self.right, self.s)
tests/collections_tests/test_prioritized.py:class TestSumTree(unittest.TestCase):
tests/collections_tests/test_prioritized.py:        t = prioritized.SumTree()

after this PR:

pfrl/collections/prioritized.py:        self.priority_sums = SumTreeQueue()
pfrl/collections/prioritized.py:# Implement operations on nodes of SumTreeQueue
pfrl/collections/prioritized.py:class SumTreeQueue(TreeQueue):
muupan commented 3 years ago

/test

pfn-ci-bot commented 3 years ago

Successfully created a job for commit 43f2b16: