Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message for features that require ENABLE_POWER_USER_MODE set to True #1135

Open
sT0v opened this issue Sep 11, 2024 · 1 comment

Comments

@sT0v
Copy link
Contributor

sT0v commented Sep 11, 2024

Is your feature request related to a problem? Please describe.

When wanting to use @resolve/ other power user features, power user mode must be enabled.
It is easy to mistake .enable_dynamic_execution(allow_experimental_mode=True) as a way to enable this.

Error:

File "C:\codebase\venv\lib\site-packages\hamilton\function_modifiers\delayed.py", line 130, in resolve
    if not config[settings.ENABLE_POWER_USER_MODE]:
KeyError: 'hamilton.enable_power_user_mode'

Describe the solution you'd like

Error(
"@{power_user_feature} needs to be enabled via the driver config.\n"
"Try the following to enable it."
".with_config({settings.ENABLE_POWER_USER_MODE:True})"
)

Describe alternatives you've considered
I could have read the docs better to find this existing solution.

from hamilton import settings
.with_config({settings.ENABLE_POWER_USER_MODE:True})

Additional context
Add any other context or screenshots about the feature request here.

@sT0v sT0v changed the title Improve error message for Improve error message for features that require ENABLE_POWER_USER_MODE set to True Sep 11, 2024
@elijahbenizzy
Copy link
Collaborator

I think we may want to consider deprecating this requirement -- feels like people naturally self-select for resolve and we don't need as many guard-rails...

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

No branches or pull requests

2 participants