Repository navigation
Conversation
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A run that scores no latents ends with a traceback instead of the "No data found" message:
This is reachable with the defaults.
process_cachecreates eachscores/<scorer>folder before scoring, the constructor skips latents with fewer thanmin_examples(default 200) examples, andverbosedefaults toTrue, solog_resultsruns at the end. A small cache, or a narrowmax_latentsover sparse latents, leaves the scorer folders empty, andload_datacallspd.concaton an empty list. The same happens when the folders only hold score files for hookpoints that were not requested.log_resultsalready handles an empty frame (if latent_df.empty: print("No data found")), butload_datacould never return one.test_logging_empty_scores_returns_before_plottingcovers that branch withload_datareplaced by a stub, so the real path was not exercised.load_datanow returns an empty frame when it finds no score files.I found this while reading
result_analysis.pyand did not find an existing issue or PR for it.Tests
test_load_data_without_score_files_returns_empty_frameandtest_logging_without_score_files_reports_no_data. Both use a real, emptyscores/detectionfolder and fail onmainwith theValueErrorabove.pytest tests/test_log/test_result_analysis.py: 9 passed.ruff check .andblack --checkare clean.Not changed: if
scores/itself does not exist,scores_path.iterdir()still raisesFileNotFoundError. That needs an emptyscorerslist and is the same onmain.