You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/04/22 19:47:07 UTC

[GitHub] [incubator-tvm] areusch opened a new pull request #5414: Don't remove() TemporaryFile in __del__.

areusch opened a new pull request #5414:
URL: https://github.com/apache/incubator-tvm/pull/5414


    * Not needed due at atexit mechanism at top of file.
    * Can't rely on complex functions from __del__ anyway.
    * Fixes warning message on my box:
          Exception ignored in: <function TempDirectory.__del__ at 0x12be10680>
          Traceback (most recent call last):
           File ".../tvm/python/tvm/contrib/util.py", line 55, in __del__
           File ".../tvm/python/tvm/contrib/util.py", line 51, in remove
           File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shutil.py", line 509, in rmtree
           AttributeError: 'NoneType' object has no attribute 'path'
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on a change in pull request #5414: Don't remove() TemporaryFile in __del__.

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #5414:
URL: https://github.com/apache/incubator-tvm/pull/5414#discussion_r413330805



##########
File path: python/tvm/contrib/util.py
##########
@@ -43,9 +51,6 @@ def remove(self):
             self._rmtree(self.temp_dir, ignore_errors=True)
             self.temp_dir = None
 
-    def __del__(self):
-        self.remove()

Review comment:
       let us still keep the remove here, so we can delete immediately, but also removes from the TEMPDIRs, checks if TEMPDIR still exists and run the remove in the del 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] areusch commented on a change in pull request #5414: Don't remove() TemporaryFile in __del__.

Posted by GitBox <gi...@apache.org>.
areusch commented on a change in pull request #5414:
URL: https://github.com/apache/incubator-tvm/pull/5414#discussion_r413342171



##########
File path: python/tvm/contrib/util.py
##########
@@ -43,9 +51,6 @@ def remove(self):
             self._rmtree(self.temp_dir, ignore_errors=True)
             self.temp_dir = None
 
-    def __del__(self):
-        self.remove()

Review comment:
       done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org