terrier-org / pyterrier

A Python framework for performing information retrieval experiments, building on http://terrier.org/
https://pyterrier.readthedocs.io/
Mozilla Public License 2.0
412 stars 65 forks source link

add save_mode='warn' and save_mode='error' to pt.Experiment (warn as default) #408

Closed cmacdonald closed 1 month ago

cmacdonald commented 11 months ago

fixes: #304

cmacdonald commented 11 months ago

An alternative default would be a save_mode='warn' method, which behaves identically to the current configuration, but warns instead of giving a ValueError

JackMcKechnie commented 10 months ago

I think that a warning would be nicer than a ValueError as getting to the failure may not be quick. A warning would allow the experiment to continue if reusing was the intended behaviour.

cmacdonald commented 10 months ago

thanks jack, food for thought

seanmacavaney commented 1 month ago
save_mode : SAVEMODE_TYPE = 'error',

but the docstring says:

Default is "warn".

(as does the name of this PR)

cmacdonald commented 1 month ago
save_mode : SAVEMODE_TYPE = 'error',

but the docstring says:

Default is "warn".

(as does the name of this PR)

Fixed

cmacdonald commented 1 month ago

Thanks @albertoueda @JackMcKechnie and @seanmacavaney for all the suggestions and comments. This is now merged.