Repository navigation
I25: one lean io package; drop the legacy IOHprofiler reader - #25
Merged
Merged
Conversation
…rofiler reader The golden fixture tests/golden/fixtures/extdata was converted once with the legacy reader and is committed as a dataset; generate.R reads IOHanalyzer's own inst/extdata. The legacy reader, its scanner kinds, docs and tests are removed. A legacy source now fails with 'legacy IOHprofiler format is not supported'. The split-file-family verify test uses the COCO coco_old fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n convert, streaming readers READERS holds every reader (ioh, coco, nevergrad-csv, custom-csv) with one interface; CONVERTERS is gone. base.Tables collects runs, descriptors, sources and warnings and spills each file's trace to a temporary Arrow file, so readers hold one source file at a time; base.split_lines splits ioh and COCO data files. archive.staged opens archives for every reader in convert. The CSV reader reads its file once. Convert outputs of 53 inputs are byte-identical to before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ests Split ioh and CSV functions below the pylint and lizard limits, share input_root, extract archive members without open handles, and fold the reader defect tests that repeated test_ioh and test_coco into them. COCO archive tests move to one convert test of unsafe and broken archives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…counts Convert outputs of all 53 inputs are byte-identical to main. io/ goes from 5,023 to 3,251 lines, tests/io from 3,199 to 2,309. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | -35 |
| Duplication | -21 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
WP I25: Reader consolidation: one lean io package
Branch: wp/I25-io-consolidation
Status: ready for review
Done
input_root;duplicate tests merged (ioh/COCO defect tests that repeated test_ioh/test_coco; COCO archive tests moved
to one convert test of unsafe and broken archives)
Line counts (step 5)
src/iohinspector/iotests/iosrc/iohinspector/convert.pysrc/iohinspector/verify/_scan.pytests/test_convert.py+tests/test_verify.pyNet against main:
src+1,393 / -3,304 lines,tests(without fixtures) +130 / -893,docs+11 / -119.Next step
Controller: push, open the PR, wait for CI and Codacy. Then delete this file.
Inventory (step 1)
Before: io/ had 5,023 lines in 14 modules. Duplicated jobs, now one implementation each:
archive.open_tree(COCO's own archive reading) andconvert.staged_input(extract, then re-link by source path) ->
archive.staged, used byconvertfor every reader.ioh._split_lines,_coco_dat._split->base.split_lines/DataLines.base.read_text,base.first_line.base.NUMBER,_csv._FLOAT/_INT,convert._typed/_BOOLS,_csv.parse_*->
base.NUMBER/INTEGER+_csv.parse_token(tags use it too).ioh._Builder/_result/_RUNS_INPUT,coco._Builder/_result/_RUNS_INPUT,_csv.runs_frame/_run_dtypes->
base.Tables(runs useRUNS_SCHEMA).base.Renamerand_csv._rename->Renamer.rename._csv._unknown,custom_csv._suggest->_csv.suggest.convert._csv_file,_csv._dataset_id_from->_csv._csv_file(dataset id is required by every reader;
convertdefaults it).READERS+CONVERTERS->READERSonly; every reader isread(path, dataset_id, **options) -> ReadResult.is_coco_infoand_is_coco-> one_is_coco.cast to float64 at the end when numeric in every file.
Decisions
tests/golden/fixtures/extdatais now a format v1 dataset (converted before the reader was removed).generate.Rreads IOHanalyzer's owninst/extdata(identical to the old fixture) viasystem.file.tests/golden/test_extdata_dataset.py(wastests/io/test_legacy_golden.py) ties the dataset to the goldens..infosource fails with "legacy IOHprofiler format is not supported" (raised by the COCOdata-file check, so detection and
read_cocoboth say it).coco_old(.dat+.tdat, two dimensions).convertonly (archive.staged), for every reader.read_cocono longer opensarchives itself, so the COCO-only
archivedescriptor (outermost archive, originpath) is gone. Throughconvertit never appeared (convert staged archives before the reader), so convert outputs are unchanged.base.Tableswrites each file's trace/positions frame to a temporary Arrow file;ReadResult.lazy_trace/lazy_positionsscan them and the writer streams them.ReadResult.traceand.positionscollect for in-memory use. The CSV reader reads its file once (was three passes).convert_nevergrad/convert_custom_csv(write a dataset) becameread_nevergrad(source, dataset_id)/read_custom_csv(source, dataset_id, mapping)(return aReadResult), likeread_iohand
read_coco;iohinspector.convert.convertwrites. A CSV reader given a folder reads its only CSVfile (was in
convert). Unreleased API (I08/I09), so no deprecation shims.--tagvalues use the format's number rules (parse_token, shared with CSV):1_000orinfinityare no longer accepted as int/float tags.
archiveis no longer renamed toarchive_experiment(the key was reserved for theremoved descriptor).
ReaderError(wasFormatError); one message changed in precedence: a badbudgettoken in Nevergrad files is reported as the run field (
budget: '10.5' is not an integer).bbobpart of the COCO archive sample, 15 archives, 2.6 M trace rows, 2.4 M position rows):reading peaks at 438 MB (was 1,008 MB); the whole convert still peaks at about 1.55 GB, old and new,
because
format.writerdominates (memory_limit 256 MB per table, positions with up to 40 columns).The writer is outside this package; follow-up if convert must use less.
archives, tags, and a 24-archive sample of the COCO data archive) before and after.
Open questions / Blocked
Work package from the IOHanalyzer rebuild plan (
plan/in IOHprofiler/ioh-web). Review and merge are done by a person.🤖 Generated with Claude Code