0ccf4f2f66300f495675012bed97c5ddaab68353,optuna/integration/pytorch_distributed.py,TorchDistributedTrial,set_user_attr,#TorchDistributedTrial#Any#Any#,145

Before Change


        if dist.get_rank() == 0:
            assert self._delegate is not None
            self._delegate.set_user_attr(key, value)
        dist.barrier()

    def set_system_attr(self, key: str, value: Any) -> None:

        if dist.get_rank() == 0:

After Change


        return self._call_and_communicate(func, torch.uint8)

    def set_user_attr(self, key: str, value: Any) -> None:
        err = None
        if dist.get_rank() == 0:
            try:
                assert self._delegate is not None
                self._delegate.set_user_attr(key, value)
            except Exception as e:
                err = e
            err = self._broadcast(err)
        else:
            err = self._broadcast(err)

        if err is not None:
            raise err

    def set_system_attr(self, key: str, value: Any) -> None:
        err = None

        if dist.get_rank() == 0:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: pfnet/optuna
Commit Name: 0ccf4f2f66300f495675012bed97c5ddaab68353
Time: 2021-02-17
Author: toshihiko.yanase@gmail.com
File Name: optuna/integration/pytorch_distributed.py
Class Name: TorchDistributedTrial
Method Name: set_user_attr


Project Name: pfnet/optuna
Commit Name: 0ccf4f2f66300f495675012bed97c5ddaab68353
Time: 2021-02-17
Author: toshihiko.yanase@gmail.com
File Name: optuna/integration/pytorch_distributed.py
Class Name: TorchDistributedTrial
Method Name: set_user_attr


Project Name: pfnet/optuna
Commit Name: 0ccf4f2f66300f495675012bed97c5ddaab68353
Time: 2021-02-17
Author: toshihiko.yanase@gmail.com
File Name: optuna/integration/pytorch_distributed.py
Class Name: TorchDistributedTrial
Method Name: set_system_attr


Project Name: pfnet/optuna
Commit Name: 0ccf4f2f66300f495675012bed97c5ddaab68353
Time: 2021-02-17
Author: toshihiko.yanase@gmail.com
File Name: optuna/integration/pytorch_distributed.py
Class Name: TorchDistributedTrial
Method Name: report