Art version: 0.4.4
Python: 3.12.11
the function art.rewards.ruler.ruler() and the module itself art.rewards.ruler have the same name.
Since in the art.rewards.__init__ you import the function art.rewards.ruler.ruler() as "ruler", a collision occurs between the module name and the function.
To demonstrate:
(1)
import art.rewards.ruler as art_ruler
print(art_ruler.DEFAULT_RUBRIC)
(2)
from art.rewards import ruler as art_ruler
print(art_ruler.DEFAULT_RUBRIC)
(3)
import art.rewards.ruler
print(art.rewards.ruler.DEFAULT_RUBRIC)
All Resulting in the error:
AttributeError: 'function' object has no attribute 'DEFAULT_RUBRIC'
Basically, I dont even think it's possible to somehow import DEFAULT_RUBRIC, or anything which is defined inside the
art.rewards.ruler module while not being imported in art.rewards.__init__.
fixing it will be a breaking change either way I believe, so I would suggest renaming the function art.rewards.ruler.ruler() to something else, as most likely those who use RULER probably use it from the ruler_score_group() function.
the function
art.rewards.ruler.ruler()and the module itselfart.rewards.rulerhave the same name.Since in the
art.rewards.__init__you import the functionart.rewards.ruler.ruler()as"ruler", a collision occurs between the module name and the function.To demonstrate:
(1)
(2)
(3)
All Resulting in the error:
Basically, I dont even think it's possible to somehow import
DEFAULT_RUBRIC, or anything which is defined inside theart.rewards.rulermodule while not being imported inart.rewards.__init__.fixing it will be a breaking change either way I believe, so I would suggest renaming the function
art.rewards.ruler.ruler()to something else, as most likely those who use RULER probably use it from theruler_score_group()function.