Commit 561a3106 authored by Mitar's avatar Mitar
Browse files

Suggest id(self).

parent c73099dd
......@@ -107,6 +107,9 @@ class SumPrimitive(base.SingletonOutputMixin[Inputs, Outputs, None, Hyperparams]
# Primitive knows the port the container is listening on.
connection = client.HTTPConnection(self.docker_containers[DOCKER_KEY], port=8000)
# This simple primitive does not keep any state in the Docker container.
# But if your primitive does have to associate requests with a primitive, consider
# using Python's "id(self)" call to get an identifier of a primitive's instance.
connection.request('POST', '/', data, {
'Content-Type': 'multipart/form-data',
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment