7b27ce2b236e29d82e33c5e07645f845d433973c,python/ray/util/sgd/torch/torch_runner.py,TorchRunner,__init__,#TorchRunner#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,43

Before Change


        self.validation_loader = None
        self.use_fp16 = use_fp16
        self.apex_args = apex_args or {}
        if use_fp16 and not amp:
            raise ImportError(
                "Please install apex from "
                "https://www.github.com/nvidia/apex to use fp16 training.")
        self.scheduler_step_freq = scheduler_step_freq

    def _validate_loaders(self, loaders):
        assert loaders, "Loaders need to be returned in data_creator."

After Change


        // When creating loaders, a filelock will be used to ensure no
        // race conditions in data downloading among different workers.
        with FileLock(os.path.join(tempfile.gettempdir(), ".ray_data.lock")):
            loaders = self.data_creator(self.config)
            train_loader, val_loader = self._validate_loaders(loaders)
            if not isinstance(train_loader, torch.utils.data.DataLoader):
                logger.warning(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ray-project/ray
Commit Name: 7b27ce2b236e29d82e33c5e07645f845d433973c
Time: 2020-03-27
Author: maximsmol@gmail.com
File Name: python/ray/util/sgd/torch/torch_runner.py
Class Name: TorchRunner
Method Name: __init__


Project Name: automl/SMAC3
Commit Name: f49ed6710d38c99be0a734727ae7519ac7125844
Time: 2019-01-03
Author: eggenspk@informatik.uni-freiburg.de
File Name: setup.py
Class Name:
Method Name:


Project Name: GPflow/GPflow
Commit Name: 7560936f09755b3fafe03ae1c5ccebb3c93984b6
Time: 2020-05-12
Author: st--@users.noreply.github.com
File Name: setup.py
Class Name:
Method Name: