Skip to content
GitLab
Next
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
datadrivendiscovery
tests-data
Commits
561a3106
Commit
561a3106
authored
Dec 26, 2017
by
Mitar
Browse files
Suggest id(self).
parent
c73099dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
primitives/test_primitives/sum.py
primitives/test_primitives/sum.py
+3
-0
No files found.
primitives/test_primitives/sum.py
View file @
561a3106
...
...
@@ -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'
,
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment