Skip to content

Commit

Permalink
FEAT-modin-project#4527: Add Modin logging to AxisPartition and Block…
Browse files Browse the repository at this point in the history
…Partition classes (modin-project#7079)

Signed-off-by: arunjose696 <[email protected]>
  • Loading branch information
arunjose696 authored Mar 14, 2024
1 parent 93b4e2a commit a9bdcbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion modin/core/dataframe/base/partitioning/axis_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
from abc import ABC, abstractmethod
from typing import Any, Callable, Iterable, Optional, Tuple, Union

from modin.logging import ClassLogger

class BaseDataframeAxisPartition(ABC): # pragma: no cover

class BaseDataframeAxisPartition(ABC, ClassLogger): # pragma: no cover
"""
An abstract class that represents the parent class for any axis partition class.
Expand Down
4 changes: 2 additions & 2 deletions modin/core/dataframe/pandas/partitioning/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
from pandas.util import cache_readonly

from modin.core.storage_formats.pandas.utils import length_fn_pandas, width_fn_pandas
from modin.logging import get_logger
from modin.logging import ClassLogger, get_logger
from modin.pandas.indexing import compute_sliced_len


class PandasDataframePartition(ABC): # pragma: no cover
class PandasDataframePartition(ABC, ClassLogger): # pragma: no cover
"""
An abstract class that is base for any partition class of ``pandas`` storage format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
MetaListHook,
)
from modin.core.execution.ray.common.utils import ObjectIDType
from modin.logging import get_logger
from modin.logging import disable_logging, get_logger
from modin.pandas.indexing import compute_sliced_len
from modin.utils import _inherit_docstrings

Expand Down Expand Up @@ -93,6 +93,7 @@ def __init__(
)
)

@disable_logging
def __del__(self):
"""Unsubscribe from DeferredExecution."""
if isinstance(self._data_ref, DeferredExecution):
Expand Down

0 comments on commit a9bdcbe

Please sign in to comment.