While looking into some performance bottlenecks in Catalyst, I stumbled onto this line of code: https://github.com/enigmampc/catalyst/blob/90d9e4e2def79b49c32607ce7da349598a117021/catalyst/utils/run_algo.py#L151
which seemed unnecessary.
Cf #283 , and PR #421
However after digging, I found the commit that introduces it (55d1fee), and it does make sense. I understand, and fully agree with, the rationale of warning users that this is in alpha state.
I have a suggestion that would tick all the boxes IMO:
- satisfies maintainers, who want to warn users of the alpha status of the project;
- satisfies "power users", who would like to dismiss/disable the warning, which they are obviously OK with;
- doesn't require users manually patching their local copy of Catalyst;
- doesn't change the current default behaviour;
- really simple to implement.
The solution is to have the ability to disable the warning and sleep delay with an environment variable (e.g. $CATALYST_DISABLE_ALPHA_WARNING).
This means the following check:
log.info('Catalyst version {}'.format(catalyst.__version__))
if not os.environ.get('CATALYST_DISABLE_ALPHA_WARNING'):
log.warn(ALPHA_WARNING_MESSAGE)
sleep(3)
This option doesn't even need to be documented, if you feel it might have bad consequences, but at least people stumbling on that code/issue can set the env variable themselves and call it a day!
If you're interested in this approach, I'll gladly submit a pull request!