Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Enable data prefetch for param tuner #262

Merged

Conversation

nlpng
Copy link
Contributor

@nlpng nlpng commented May 9, 2019

Motivation and Context

Description

Previously the processes would not terminate cleanly when the DATASET.ENABLE_PREFETCH is True, and cause the trial cue to halt. This is a quick fix to avoid the problem by only enable the data prefetch for the training of the parameter tuner.

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature / Optimization (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@nlpng nlpng changed the title [WIP] Enable data prefetch for param tuner Enable data prefetch for param tuner May 15, 2019
@@ -135,7 +135,7 @@ def setup_dataset(config, subset, rank):
dataset_class = config.DATASET_CLASS
dataset_kwargs = dict((key.lower(), val) for key, val in config.DATASET.items())
dataset = dataset_class(subset=subset, **dataset_kwargs)
enable_prefetch = dataset_kwargs.pop("enable_prefetch", False)
enable_prefetch = dataset_kwargs.pop("enable_prefetch", False) if subset == 'train' else False
Copy link
Member

@iizukak iizukak May 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why enable_prefetch enable for training set only?
Please add comment.

Copy link
Member

@iizukak iizukak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nlpng Thanks for adding a comment.

@iizukak iizukak merged commit d69f955 into blue-oil:master May 16, 2019
@iizukak iizukak added this to the v0.8.0 milestone May 16, 2019
@iizukak iizukak added the enhancement New feature or request label May 16, 2019
@ruimashita ruimashita modified the milestones: v0.8.0, v0.7.0 Jun 24, 2019
ruimashita pushed a commit that referenced this pull request Jun 26, 2019
* allow dataset prefetch only for training

* remove to-do flag

* add comments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants