Skip to content

fix(config): use bittensor logging for neuron full path in check_config - #935

Merged
anderdc merged 1 commit into
entrius:testfrom
kyan9400:fix/replace-check-config-print-with-logging
May 8, 2026
Merged

fix(config): use bittensor logging for neuron full path in check_config#935
anderdc merged 1 commit into
entrius:testfrom
kyan9400:fix/replace-check-config-print-with-logging

Conversation

@kyan9400

@kyan9400 kyan9400 commented May 2, 2026

Copy link
Copy Markdown
Contributor

Problem

check_config printed the resolved neuron directory with print, which bypasses bt.logging and can pollute stdout for validator/miner processes.

Change

This PR replaces the raw print call with bt.logging.debug, using a clear Neuron full path: message while preserving the existing path setup behavior.

Tests

Added focused tests covering:

  • check_config no longer emits the legacy full path: message to stdout/stderr.
  • config.neuron.full_path is set correctly.
  • The expected neuron directory is created under the configured logging root.

Testing

uv sync --extra dev
uv run ruff check gittensor/utils/config.py tests/test_config_paths.py
uv run pytest tests/test_config_paths.py -q

@kyan9400

kyan9400 commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

Hi, just checking if there is anything I should adjust here. The branch is behind test now, but GitHub shows it can still be merged cleanly. I can rebase if preferred.

@anderdc anderdc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop all the tests, make this just the one-liner to move from print to bt.logging.

@kyan9400
kyan9400 force-pushed the fix/replace-check-config-print-with-logging branch from cf12e8e to ad08249 Compare May 6, 2026 22:30

@anderdc anderdc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop all the tests, make this just the one-liner to move from print to bt.logging.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kyan9400
kyan9400 force-pushed the fix/replace-check-config-print-with-logging branch from ad08249 to 3b3c90e Compare May 7, 2026 23:25
@anderdc
anderdc merged commit 638816f into entrius:test May 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants