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

max_trials variable in Tunner Class is set to None #1037

Open
OmarIsmailAbdelrahman opened this issue Jan 8, 2025 · 0 comments
Open

max_trials variable in Tunner Class is set to None #1037

OmarIsmailAbdelrahman opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@OmarIsmailAbdelrahman
Copy link

OmarIsmailAbdelrahman commented Jan 8, 2025

Describe the bug
When running the tuner component, it produces the following error: TypeError: '<' not supported between instances of 'int' and 'NoneType'. This issue is caused by the max_trials variable in the Oracle class inside the tuner. Upon tracing the code, I found that when Hyperband is initialized, it uses the HyperbandOracle class, which is a subclass of Engine.Oracle class. The problem appears to occur because max_trials is not set in the Oracle class. This results in an error when comparing len(sorted_trials) with max_trials in the Oracle file at line 677. Additionally, upon checking the super constructor of the Oracle class, it doesn't initialize a value for max_trials, which might be contributing to the issue.

To Reproduce
Provide steps to reproduce the bug: 1. Link: Colab Notebook that reproduces the issue.

Expected behavior
The tuner component should work without producing the error and handle the max_trials variable appropriately.

Additional context

i remember seeing it as a deprecated argument, and it happens on the latest release of keras

Would you like to help us fix it?
Yes

@OmarIsmailAbdelrahman OmarIsmailAbdelrahman added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant