Skip to content

Route binders, static_funcs, data_struct and search diagnostics through logging - #661

Merged
Demirrr merged 1 commit into
developfrom
refactor/misc-logging
Oct 23, 2026
Merged

Demirrr merged 1 commit into
developfrom
refactor/misc-logging

Conversation

@Demirrr

@Demirrr Demirrr commented Oct 23, 2026

Copy link
Copy Markdown
Member

Fifth and last of the straightforward print to logger cleanup PRs (Improvements.md §3), after #656-#659.

  • binders.py: 'No prediction found' is a warning; the DL-Learner output dump (type/first/len, #### banners) becomes one debug message; the 'no solution found' banner becomes a warning.
  • utils/static_funcs.py: verbalize messages (missing deeponto/graphviz, no complex classes, images generated) use error/warning/info.
  • data_struct.py: error prints in except handlers become logger.error/warning; the two 'invalid input ... batching' messages are now carried by the ValueError they preceded.
  • search.py: only the two diagnostic spots (_get_top_n_nodes wrong key, get_most_promising missing node). The tree-display methods print on purpose and are untouched.
  • Behaviour change: save_owl_class_expressions called exit(1) after dumping debug output, killing the interpreter from library code. It now logs the details and re-raises the original AttributeError.
  • Deliberately left as print: executor.py, experiments.py, scripts/run.py (experiment runners / CLI output), the tree-display methods, and spell_kit DOT output. Improvements.md now says so and lists the few files still worth reviewing individually (95 real print calls remain, most intentional); CHANGELOG updated.

Local: test_static_funcs, test_search, test_data_struct, test_verbalizer, test_drill, test_nces_trainer, test_clip_dataset_inference pass (47); ruff --select F shows no undefined names.

🤖 Generated with Claude Code

…gh logging

save_owl_class_expressions re-raises instead of calling exit(1).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Demirrr
Demirrr merged commit b018c7c into develop Oct 23, 2026
4 checks passed
@Demirrr
Demirrr deleted the refactor/misc-logging branch October 23, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant