mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 21:29:53 +08:00
Remove some Python 2 compatibility code. (#6624)
This commit is contained in:
@@ -7,7 +7,6 @@ import time
|
||||
import inspect
|
||||
import threading
|
||||
import traceback
|
||||
import sys
|
||||
from six.moves import queue
|
||||
|
||||
from ray.tune import track
|
||||
@@ -249,10 +248,7 @@ def wrap_function(train_func):
|
||||
|
||||
use_track = False
|
||||
try:
|
||||
if sys.version_info >= (3, 3):
|
||||
func_args = inspect.getfullargspec(train_func).args
|
||||
else:
|
||||
func_args = inspect.getargspec(train_func).args
|
||||
func_args = inspect.getfullargspec(train_func).args
|
||||
use_track = ("reporter" not in func_args and len(func_args) == 1)
|
||||
if use_track:
|
||||
logger.info("tune.track signature detected.")
|
||||
|
||||
Reference in New Issue
Block a user