-
Notifications
You must be signed in to change notification settings - Fork 7.2k
[tune] All examples to use ConcurrencyLimiter #10662
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
b5e10c4
added `metric` and `mode` arguments to `tune.run()`
4143008
Updated search algorithms
5eadd6c
Merge branch 'master' into tune-mode-metric
6ba754a
Updated seacher base class
6a73824
lint
4bbe2df
Fix tests
6a73ae1
Trigger new build
e998ee0
Update experiment analysis
31567b5
Set default mode and metric for experiment analysis
82bbb1d
Merge branch 'tune-mode-metric' into tune-experiment-analysis
05a7e41
Added easy to use utility functions for experiment analysis
5b8ce91
Updated docs
b015fcb
Use tune sklearn master
30749c3
Update shim default args
33fbbba
Merge branch 'master' into tune-mode-metric
f978d89
Merge branch 'tune-mode-metric' into tune-experiment-analysis
c82f079
Fix dataframe tests
d909452
Fix dataframe tests
4f452f1
Fix errors
fec8d64
Updated docs and type hints
f8c4d5d
Merge branch 'master' into concurrency
richardliaw 21d47d4
fix-tune
richardliaw 602a28e
Merge branch 'master' into concurrency
richardliaw e76e06a
Merge branch 'master' into tune-experiment-analysis
richardliaw 193b784
Merge branch 'tune-experiment-analysis' into concurrency
richardliaw 72ebf45
Merge branch 'master' into concurrency
richardliaw e5e5a08
fix
richardliaw 945a35f
lint
richardliaw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -154,8 +154,8 @@ def train(epoch): | |
| with ag.record(): | ||
| outputs = [finetune_net(X) for X in data] | ||
| loss = [L(yhat, y) for yhat, y in zip(outputs, label)] | ||
| for l in loss: | ||
| l.backward() | ||
| for ls in loss: | ||
| ls.backward() | ||
|
|
||
| trainer.step(batch_size) | ||
| mx.nd.waitall() | ||
|
|
@@ -170,7 +170,7 @@ def test(): | |
| outputs = [finetune_net(X) for X in data] | ||
| loss = [L(yhat, y) for yhat, y in zip(outputs, label)] | ||
|
|
||
| test_loss += sum(l.mean().asscalar() for l in loss) / len(loss) | ||
| test_loss += sum(ls.mean().asscalar() for ls in loss) / len(loss) | ||
| metric.update(label, outputs) | ||
|
|
||
| _, test_acc = metric.get() | ||
|
|
@@ -194,11 +194,7 @@ def test(): | |
| sched = FIFOScheduler() | ||
| elif args.scheduler == "asynchyperband": | ||
| sched = AsyncHyperBandScheduler( | ||
| time_attr="training_iteration", | ||
| metric="mean_loss", | ||
| mode="min", | ||
| max_t=400, | ||
| grace_period=60) | ||
| metric="mean_loss", mode="min", max_t=400, grace_period=60) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could also pass metric/mode to tune.run here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will do this in followup! |
||
| else: | ||
| raise NotImplementedError | ||
| tune.run( | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this would be
randint(10, 100)Should we also remove mode/metric from the scheduler and pass it to tune.run here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do this in followup!