d1e9887be2fb48614afccb6210ce6b8f40d89e91,python/ray/serialization.py,SerializationContext,deserialize_objects,#SerializationContext#,294

Before Change


        results = []
        warning_sent = False
        i = 0
        while i < len(object_refs):
            object_ref = object_refs[i]
            data, metadata = data_metadata_pairs[i]
            assert self.get_outer_object_ref() is None
            self.set_outer_object_ref(object_ref)
            try:
                results.append(
                    self._deserialize_object(data, metadata, object_ref))
                i += 1
            except DeserializationError:
                // Wait a little bit for the import thread to import the class.
                // If we currently have the worker lock, we need to release it

After Change


                                                data_metadata_pairs):
            assert self.get_outer_object_ref() is None
            self.set_outer_object_ref(object_ref)
            results.append(
                self._deserialize_object(data, metadata, object_ref))
            // Must clear ObjectRef to not hold a reference.
            self.set_outer_object_ref(None)
        return results
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ray-project/ray
Commit Name: d1e9887be2fb48614afccb6210ce6b8f40d89e91
Time: 2021-01-14
Author: suquark@gmail.com
File Name: python/ray/serialization.py
Class Name: SerializationContext
Method Name: deserialize_objects


Project Name: d2l-ai/d2l-zh
Commit Name: 2814bcd1f43a1e6896917c69ea1805f97e39b5d9
Time: 2018-09-13
Author: muli@cs.cmu.edu
File Name: gluonbook/utils.py
Class Name:
Method Name: read_imdb


Project Name: hanxiao/bert-as-service
Commit Name: d973eef6473d7b3292cff3b1069e0da08bb401da
Time: 2018-11-13
Author: hanhxiao@tencent.com
File Name: service/server.py
Class Name: BertServer
Method Name: run