Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove side-effects when running several proceses of n-fold cross-validation of the same model while sharing the same grobid-home directory #565

Merged
merged 2 commits into from Apr 21, 2020

Conversation

lfoppiano
Copy link
Collaborator

This PR allows to run the n-fold cross-validation of a specific model several times sharing the same grobid-home.

Currently the models are named model_name_nfold_x with model_name corresponding the name of the model and x the n-ith fold. However if the same model is evaluated at the same time, they will write/overwrite the models in the grobid-home/tmp directory.

This PR:

  • add a unique random string on the ith-fold model name
  • collect generated files paths and deleted them at the end of the process

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 38.001% when pulling 67bf75a on feature/randomise-model-name-during-nfold into 47c8978 on master.

@lfoppiano lfoppiano added this to the 0.6.0 milestone Apr 17, 2020
@kermitt2
Copy link
Owner

Thanks Luca, tested and it works fine.

@kermitt2 kermitt2 merged commit 7150502 into master Apr 21, 2020
@lfoppiano lfoppiano deleted the feature/randomise-model-name-during-nfold branch May 28, 2020 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants