diff --git a/python/cudf/cudf/pandas/_wrappers/pandas.py b/python/cudf/cudf/pandas/_wrappers/pandas.py index ebd8d0d428b..698dd946022 100644 --- a/python/cudf/cudf/pandas/_wrappers/pandas.py +++ b/python/cudf/cudf/pandas/_wrappers/pandas.py @@ -130,7 +130,6 @@ def Timestamp_Timedelta__new__(cls, *args, **kwargs): # hence this method is needed. self, _ = _fast_slow_function_call( lambda cls, args, kwargs: cls(*args, **kwargs), - cudf.options._env_get_bool("CUDF_PANDAS_DEBUGGING", False), cls, args, kwargs, @@ -254,7 +253,6 @@ def Index__new__(cls, *args, **kwargs): # make_final_proxy_type provides. self, _ = _fast_slow_function_call( lambda cls, args, kwargs: cls(*args, **kwargs), - cudf.options._env_get_bool("CUDF_PANDAS_DEBUGGING", False), cls, args, kwargs, diff --git a/python/cudf/cudf/pandas/fast_slow_proxy.py b/python/cudf/cudf/pandas/fast_slow_proxy.py index f7706098023..5f4cf2e6cc6 100644 --- a/python/cudf/cudf/pandas/fast_slow_proxy.py +++ b/python/cudf/cudf/pandas/fast_slow_proxy.py @@ -168,7 +168,6 @@ def __init__(self, *args, **kwargs): lambda cls, args, kwargs: setattr( self, "_fsproxy_wrapped", cls(*args, **kwargs) ), - _env_get_bool("CUDF_PANDAS_DEBUGGING", False), type(self), args, kwargs, @@ -701,7 +700,6 @@ def __call__(self, *args, **kwargs) -> Any: # TODO: When Python 3.11 is the minimum supported Python version # this can use operator.call call_operator, - _env_get_bool("CUDF_PANDAS_DEBUGGING", False), self, args, kwargs, @@ -816,7 +814,6 @@ def __get__(self, instance, owner) -> Any: # for anything else, use a fast-slow attribute: self._attr, _ = _fast_slow_function_call( getattr, - _env_get_bool("CUDF_PANDAS_DEBUGGING", False), owner, self._name, ) @@ -841,7 +838,6 @@ def __get__(self, instance, owner) -> Any: ) return _fast_slow_function_call( getattr, - _env_get_bool("CUDF_PANDAS_DEBUGGING", False), instance, self._name, )[0] @@ -879,15 +875,14 @@ def __name__(self, value): setattr(self._fsproxy_slow, "__name__", value) -def _assert_fast_slow_eq(left, right, **kwargs): - assert_func = kwargs.get("assert_func", assert_eq) +def _assert_fast_slow_eq(left, right): if _is_final_type(type(left)) or type(left) in NUMPY_TYPES: - assert_func(left, right) + assert_eq(left, right) def _fast_slow_function_call( func: Callable, - cudf_pandas_debugging: bool | None = None, + /, *args, **kwargs, ) -> Any: @@ -914,7 +909,7 @@ def _fast_slow_function_call( # try slow path raise Exception() fast = True - if cudf_pandas_debugging: + if _env_get_bool("CUDF_PANDAS_DEBUGGING", False): try: with nvtx.annotate( "EXECUTE_SLOW_DEBUG", @@ -934,7 +929,7 @@ def _fast_slow_function_call( ) else: try: - _assert_fast_slow_eq(result, slow_result, **kwargs) + _assert_fast_slow_eq(result, slow_result) except AssertionError as e: warnings.warn( "The results from cudf and pandas were different. "