@score.setter defscore(self, value): ifnotisinstance(value, int): raise ValueError('score must be an integer!') if value < 0or value > 100: raise ValueError('score must between 0 ~ 100!') self._score = value
@property deflocal_path(self): warnings.warn( "The 'local_path' attribute is deprecated " "and will be removed in a future version. " "Please use 'path' instead.", DeprecationWarning, stacklevel=2) returnself.lora_path
@local_path.setter deflocal_path(self, value): warnings.warn( "The 'local_path' attribute is deprecated " "and will be removed in a future version. " "Please use 'path' instead.", DeprecationWarning, stacklevel=2) self.lora_path = value