Skip to content

chore: Replace debug print() statements with logging in metric modules #71

Description

@Aman-Cool

Description

Several metric modules use bare print() statements for debug output instead of Python’s standard logging module, which is already configured in the project.

Affected files

  • aidrin/structured_data_metrics/privacy_measure.py

    • lines 77, 253
    • print(rows_after_dropna)
    • print("DEBUG: About to raise ValueError ...")
  • aidrin/structured_data_metrics/correlation_score.py

    • line 39
    • print(categorical_correlation["corr"])
  • aidrin/structured_data_metrics/feature_relevance.py

    • multiple print() calls throughout the data_cleaning task

Expected fix

Replace each print() with the appropriate logging call such as logger.debug() or logger.info() using the standard module-level logger pattern:

import logging

logger = logging.getLogger(__name__)

This pattern is already used in privacy_measure.py and should be followed consistently.

Why this matters

Using print() for debugging can pollute application output and server logs, making it harder to diagnose real issues. The logging framework provides:

  • log levels
  • configurable formatting
  • filtering and routing of logs

Skills needed

Basic Python knowledge. No domain-specific expertise required.

/good first issue
/code quality

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions