model_selection.py:90 uses test environment numbers in test_in_acc_key = 'env{}_in_acc'.format(test_env) but if we have two environments: env0 and env1, the error KeyError: 'env3_in_acc' is produced.
Replication steps
Pick a dataset with two domains
Run sweep with as few trials as possible like the following
Summary
model_selection.py:90 uses test environment numbers in
test_in_acc_key = 'env{}_in_acc'.format(test_env)
but if we have two environments: env0 and env1, the errorKeyError: 'env3_in_acc'
is produced.Replication steps
python -m domainbed.scripts.sweep launch\ --data_dir=./domainbed/data/\ --output_dir=./my/sweep/\
--algorithms CORAL\
--datasets \
--n_hparams 1\
--n_trials 1\
--seed 0\
--holdout_fraction 0.1\
--command_launcher local\
--skip_confirmation
--single_test_envs
./my/sweep/<two_domain_dataset>
env0_in_acc env0_out_acc env1_in_acc env1_out_acc
test_in_acc_key = 'env{}_in_acc'.format(test_env)
but we only have env0 and env1Hence the error
KeyError: 'env3_in_acc'
is produced.