Skip to content

Commit

Permalink
Bug fix for REST calls from load script
Browse files Browse the repository at this point in the history
Bug fix for REST call to a model from the load script.
  • Loading branch information
Nabeel committed Jun 2, 2020
1 parent 4b2854f commit 6afd139
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def _get_rest_response(self, X):
payload_header = None if len(self.model['json'].keys()) == 0 else next(iter(self.model['json']))

# Make a REST call for each sample
for i in range(len(X)):
for i in X.index:
# Next the JSON payload if required
self.model['json'] = dict(X.loc[i,:].astype("str").T) if payload_header is None else {payload_header: dict(X.loc[i,:].astype("str").T)}

Expand Down
14 changes: 14 additions & 0 deletions docker/Dockerfile v.8.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Use the previous version of qlik-py-tools as a parent image
FROM nabeeloz/qlik-py-tools:8.0

# Set the working directory to /qlik-py-tools/core
WORKDIR /qlik-py-tools/core

# Copy all files from the core subdirectory into the container
COPY ./core/* /qlik-py-tools/core/

# Make ports 80 and 50055 available to the world outside this container
EXPOSE 80 50055

# Run __main__.py when the container launches
CMD ["python", "__main__.py"]

0 comments on commit 6afd139

Please sign in to comment.