Skip to content

add validation_every variable to torch trainer - #435

Draft
jarlsondre wants to merge 3 commits into
mainfrom
426-add-validation-every
Draft

add validation_every variable to torch trainer#435
jarlsondre wants to merge 3 commits into
mainfrom
426-add-validation-every

Conversation

@jarlsondre

@jarlsondre jarlsondre commented Jul 14, 2025

Copy link
Copy Markdown
Collaborator

We used to have a variable called validation_every, but this has since been removed as it was unused. We still have something called test_every, however.

Recently, however, we received a request from a use case to reimplement this behavior, so this PR adds it back to the project.

One of the potential problems with this is that now the user has to specifically set the validation_every variable to 1 for any validation to happen, as it defaults to None. This might be a bit annoying, since it kinda breaks the API. Not a huge change though, but worth considering if there is a better way to do it.

@matbun matbun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not change the suffix to *_interval

Comment thread src/itwinai/torch/trainer.py
Comment on lines +372 to +375
"Ray is activated, but 'validation_every' is not set to one. Keep in mind"
" that the validation metrics are used for tuning, so this could lead"
" to suboptimal results."
)

@matbun matbun Jul 14, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here I would emphasize more the fact that this flag influences the reporting frequency of ray, which has implications when tuning (and not only)

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.

2 participants