MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / _percent_range_check

Method _percent_range_check

utils/pl_utils.py:1611–1618  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

1609 return callable(f_op)
1610
1611 def _percent_range_check(self, name):
1612 value = getattr(self, name)
1613 msg = f"`{name}` must lie in the range [0.0, 1.0], but got {value:.3f}."
1614 if name == "val_check_interval":
1615 msg += " If you want to disable validation set `val_percent_check` to 0.0 instead."
1616
1617 if not 0. <= value <= 1.:
1618 raise ValueError(msg)

Callers 1

init_train_dataloaderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected