Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated SumTree #110

Merged
merged 1 commit into from
Dec 17, 2020
Merged

Remove deprecated SumTree #110

merged 1 commit into from
Dec 17, 2020

Conversation

muupan
Copy link
Member

@muupan muupan commented Dec 16, 2020

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):

@github-actions github-actions bot requested a review from ummavi December 16, 2020 14:12
@muupan
Copy link
Member Author

muupan commented Dec 16, 2020

/test

@pfn-ci-bot
Copy link

Successfully created a job for commit 43f2b16:

Copy link
Contributor

@marioyc marioyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@muupan muupan merged commit 556bbd3 into pfnet:master Dec 17, 2020
@muupan muupan deleted the remove-sumtree branch December 17, 2020 01:33
@muupan muupan added this to the v0.2.1 milestone Dec 17, 2020
@muupan muupan added the enhancement New feature or request label Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants