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

Uninformative error when running a searchjob with valid.every>train.max_epochs #51

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

Nzteb
Copy link
Contributor

@Nzteb Nzteb commented Oct 9, 2019

When running some search job (e. g. toy-complex-ax.yaml) with valid.every > train.max.epochs (e. g. --valid.every=11) this raises

Traceback (most recent call last): File "/home/patrick/Desktop/kge/kge.py", line 234, in <module> job.run() File "/home/patrick/Desktop/kge/kge/job/auto_search.py", line 170, in run (self, trial_no, config, self.num_trials, list(parameters.keys())), File "/home/patrick/Desktop/kge/kge/job/search.py", line 72, in submit_task self.ready_task_results.append(task(task_arg, device=self.free_devices[0])) File "/home/patrick/Desktop/kge/kge/job/search.py", line 179, in _run_train_job best["job"], TypeError: 'NoneType' object does not support item deletion

The error is simply raised because best["job"] is still None. Obviously, this is induced by a nonsensical configuration but it could have some relevance: The user could set up a config and wants to try if it runs by simply setting max_epochs=1 without thinking about valid.every (This is what happened to me). The error might be confusing then. Additionally, in a pure training job the same nonsensical usage does not lead to an error.

Fixing this directly in the line where the error occurs leads to more exceptions in ManualSearch/AutoSearch. That's why I thought maybe an easy config check, as I propose, is the most efficient. Obviously, I'm open for no action should be taken at all. In case my fix idea is alright, I would want to know if it is valid in the constructor, as I do it.

@rgemulla rgemulla merged commit 02c834f into uma-pi1:master Oct 9, 2019
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

Successfully merging this pull request may close these issues.

2 participants