-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: support custom reducers for estimators Custom metrics for estimators are supported via the context.experimental.make_metric() method, which can either accept a single function reducer or a det.estimator.MetricReducer class to do hierarchical metric reduction. The resulting custom metric is returned as a tuple of (value_op, update_op) in accordance with the tf.metrics API, where the value_op will allgather results from all workers during distributed evaluation.
- Loading branch information
1 parent
27be82a
commit b75442a
Showing
11 changed files
with
498 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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 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 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
18 changes: 18 additions & 0 deletions
18
e2e_tests/tests/fixtures/estimator_dataset/distributed.yaml
This file contains 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
description: dataset-experiment-distributed | ||
hyperparameters: | ||
global_batch_size: 8 | ||
dataset_size: 100 | ||
print: true | ||
validation_size: 16 | ||
lr: 0.001 | ||
searcher: | ||
name: single | ||
metric: loss | ||
smaller_is_better: true | ||
max_steps: 1 | ||
max_restarts: 0 | ||
batches_per_step: 1 | ||
entrypoint: model:EstimatorDatasetTrial | ||
min_validation_period: 1 | ||
resources: | ||
slots_per_trial: 8 |
This file contains 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 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 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 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
Oops, something went wrong.