Skip to content

Make the test fixture non-square - #51

Open
rcannood wants to merge 1 commit into
mainfrom
chore/unequal-width-test-fixture
Open

Make the test fixture non-square#51
rcannood wants to merge 1 commit into
mainfrom
chore/unequal-width-test-fixture

Conversation

@rcannood

Copy link
Copy Markdown
Member

Describe your changes

Needs an aws s3 sync to take effect -- see below. Happy to hold this until the rest of the series has landed.

Three of the bugs in this review series were invisible to CI for the same reason: in resources_test the two modalities have identical widths.

bmmc_cite      134 x 134
bmmc_multiome 1500 x 1500

No real dataset looks like that -- bmmc_cite is 13953 GEX features against 134 ADT proteins. So a component can use n_vars(mod1) where it means n_vars(mod2) and viash test goes green, then it dies on the first full run. That's exactly what #24 was.

Adding a trim_mod1_features.py step to test_resources.sh that drops a quarter of mod1's features after process_datasets and before the models are pre-trained (the ordering matters -- the stored novel and simple_mlp checkpoints are sized from mod1, so they have to be trained against the trimmed version).

widths after trimming:
  bmmc_cite/normal       train   100 x 134    test   100 x 134    distinguishable
  bmmc_cite/swap         train   100 x 134    test   100 x 134    distinguishable
  bmmc_multiome/normal   train  1125 x 1500   test  1125 x 1500   distinguishable
  bmmc_multiome/swap     train  1125 x 1500   test  1125 x 1500   distinguishable

Trimmed files still satisfy file_train_mod1.yaml -- subsetting on var keeps every required slot:

  layers['counts']         ok
  layers['normalized']     ok
  obs['batch']             ok
  var['hvg']               ok
  var['hvg_score']         ok
  uns['dataset_id']        ok
  uns['normalization_id']  ok

I did look at fixing this in the common fixture instead, which would be the more principled place -- but resources_test/common/openproblems_neurips2021 is shared with other tasks, so making it asymmetric for our benefit isn't ours to do. Doing it task-side keeps the blast radius here.

To take effect

This PR only changes the generation script; the resources on S3 are still square. Regenerating and syncing writes to the shared bucket, so I've left that to you:

bash scripts/create_datasets/test_resources.sh   # regenerates + prints a dryrun sync
aws s3 sync --profile op \
  resources_test/task_predict_modality \
  s3://openproblems-data/resources_test/task_predict_modality \
  --delete

(the script's own sync still has --dryrun on it, deliberately.)

Part of a series of PRs coming out of a pre-run review of the benchmark.

Checklist before requesting a review

  • I have performed a self-review of my code

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Bug fixes
  • Proposed changes are described in the CHANGELOG.md

  • CI Tests succeed and look good!

The common test datasets are 134 x 134 and 1500 x 1500, so a component
can confuse n_vars(mod1) with n_vars(mod2) and viash test still passes.
No real dataset looks like that. Trim mod1 after processing, before the
models get pre-trained.
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