00be4ae634832d8c39a2468c66349df964585a2c,grid/websocket_client.py,WebsocketGridClient,download_model,#WebsocketGridClient#Any#,294

Before Change


            return sy.hook.local_worker.fetch_plan(model_id, self, copy=True)
        except AttributeError:
            // Try download model by websocket channel
            self.ws.send(json.dumps({"type": "download-model", "model_id": model_id}))
            response = json.loads(self.ws.recv())

            // If we can download model (small models) by sockets
            if response.get("serialized_model", None):
                serialized_model = result["serialized_model"].encode(self._encoding)

After Change


            return sy.hook.local_worker.fetch_plan(model_id, self, copy=True)
        except AttributeError:
            // Try download model by websocket channel
            message = {
                REQUEST_MSG.TYPE_FIELD: REQUEST_MSG.DOWNLOAD_MODEL,
                "model_id": model_id,
            }
            response = self._forward_json_to_websocket_server_worker(message)

            // If we can download model (small models) by sockets
            if response.get("serialized_model", None):
                serialized_model = result["serialized_model"].encode(self._encoding)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: OpenMined/Grid
Commit Name: 00be4ae634832d8c39a2468c66349df964585a2c
Time: 2019-10-21
Author: ionesiojr@gmail.com
File Name: grid/websocket_client.py
Class Name: WebsocketGridClient
Method Name: download_model


Project Name: OpenMined/Grid
Commit Name: 00be4ae634832d8c39a2468c66349df964585a2c
Time: 2019-10-21
Author: ionesiojr@gmail.com
File Name: grid/websocket_client.py
Class Name: WebsocketGridClient
Method Name: serve_model


Project Name: OpenMined/Grid
Commit Name: 00be4ae634832d8c39a2468c66349df964585a2c
Time: 2019-10-21
Author: ionesiojr@gmail.com
File Name: grid/websocket_client.py
Class Name: WebsocketGridClient
Method Name: download_model


Project Name: OpenMined/Grid
Commit Name: 00be4ae634832d8c39a2468c66349df964585a2c
Time: 2019-10-21
Author: ionesiojr@gmail.com
File Name: grid/websocket_client.py
Class Name: WebsocketGridClient
Method Name: get_node_id