[tune] Remove py2.7-specific code (#6665)

* Remove backwards compatability py2.7 code.

* Use exists_ok=True in ray

* nit

* nit

Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
Ujval Misra
2020-01-03 01:03:13 -08:00
committed by Richard Liaw
co-authored by Richard Liaw
parent 970cd78701
commit 5b40408678
9 changed files with 18 additions and 52 deletions
-11
View File
@@ -6,11 +6,6 @@ from __future__ import print_function
import heapq
import logging
try:
FileNotFoundError
except NameError:
FileNotFoundError = IOError
logger = logging.getLogger(__name__)
@@ -44,12 +39,6 @@ class QueueItem:
self.priority = priority
self.value = value
def __cmp__(self, other):
# For python2.7 compatibility.
if self.priority == other.priority:
return 0
return -1 if self.priority < other.priority else 1
def __lt__(self, other):
return self.priority < other.priority