volodya-lombrozo / jtcop

Maven Plugin for checking tests in Java projects
MIT License
18 stars 2 forks source link

feat(#101): CachedModelSource.java for faster ml tests #428

Closed h1alexbel closed 2 months ago

h1alexbel commented 2 months ago

In this pull I've implemented CachedModelSource.java to cache model download in ModelSourceInternet.java. Enabled all unit tests related to ml.

closes #101


PR-Codex overview

The focus of this PR is to update exception handling and introduce caching for model sources in the ML module.

Detailed summary

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

h1alexbel commented 2 months ago

@volodya-lombrozo take a look, please

h1alexbel commented 2 months ago

@volodya-lombrozo yes, definitely. I didn't check the speed of code in @BeforeAll section that loads a model. 16-19ms for tests execution, and ~3seconds for model loading. I will implement some sort of caching to speed up it a bit. Is 1.5 second of model load will be considered as acceptable? WDYT?

volodya-lombrozo commented 2 months ago

@h1alexbel Yes, it would be great. 1.5 seconds is acceptable. Please, go ahead.

h1alexbel commented 2 months ago

@volodya-lombrozo updated pull request, take a look again, please

h1alexbel commented 2 months ago

First run should take ~3 seconds, model will be cached in src/test/resources/ml/cached.bin. Next test executions should take no longer than 1.5 seconds

h1alexbel commented 2 months ago

@volodya-lombrozo updated pull request. Take a look again, please

h1alexbel commented 2 months ago

@volodya-lombrozo updated pull request. Take a look again, please

volodya-lombrozo commented 2 months ago

@rultor merge

rultor commented 2 months ago

@rultor merge

@volodya-lombrozo OK, I'll try to merge now. You can check the progress of the merge here

rultor commented 2 months ago

@rultor merge

@volodya-lombrozo Done! FYI, the full log is here (took me 16min)