15 May 2022 |
| Amanjeet Sahu joined the room. | 08:38:19 |
16 May 2022 |
wenyang zhou | Download 截屏2022-05-16 上午11.04.47.png | 03:06:39 |
wenyang zhou | There seems to be a lock | 03:06:39 |
wenyang zhou | I have release several revision in a period of time. | 03:09:02 |
wenyang zhou | The old revision can not terminate before it finish pending . | 03:09:47 |
wenyang zhou | And the new revision can not allocate enough resource before the old revision release resource. | 03:10:33 |
wenyang zhou | Could we improve this problem ? | 03:10:54 |
wenyang zhou | Current revision is 15 with 100% traffic percent, and I have roll out the revision 16 with 100% this time. | 03:14:19 |
wenyang zhou | After a few minutes, the revision 16 has release resources. But 13 and 17 keep it. | 03:16:32 |
wenyang zhou | Is this a knative problem? | 03:23:19 |
wenyang zhou | Download 截屏2022-05-16 上午11.32.16.png | 03:32:32 |
wenyang zhou | So confused! | 03:32:58 |
wenyang zhou | Revision 13 can not terminate~ | 03:33:31 |
Saurabh Agarwal | Shri Javadekar host not found error | 06:27:47 |
Saurabh Agarwal | v0.7.0 this is the version | 07:36:59 |
| @idahotokens:matrix.org joined the room. | 11:11:19 |
| @idahotokens:matrix.org left the room. | 16:30:27 |
Cesar Flores | Hi everyone, is anyone using a way to define the output of the models for downstream applications? like for example having openAPI so the consumers of the models know what the ouutput of the response will be??? | 16:30:46 |
Cesar Flores | this is pretty annoying, but if it helps in any way, I solved my issue by using the Host: as the url that appears when you run kubectl get ksvc -n namespace | 16:31:53 |
Alexandre Brown | Saurabh Agarwal Make sure to add the host to the headers | 16:32:43 |
Cesar Flores | thanks! yes I meant that the host in the headers shoudl be the URL that appeas in the ksvc type in the cluster | 16:33:35 |
Alexandre Brown | I think you can even omit the http part, I have the host as this in my working sample :
host = f"{model_server_name}.{stage}.svc.cluster.local" | 16:34:37 |
Shri Javadekar | Also, are you calling this endpoint from inside the cluster?
These are my python code snippets for calling from inside the cluster. Alexandre Brown and Cesar Flores are correct that the HOST header needs to be set.
def set_header(hostname):
headers = {
'Host': hostname
}
return headers
class ProxyHTTPRequestHandler(BaseHTTPRequestHandler):
protocol_version = 'HTTP/1.1'
def req_send(self, url, hostname):
content_len = int(self.headers.get('content-length', 0))
post_body = self.rfile.read(content_len)
req_header = self.parse_headers()
resp = requests.post(url, data=post_body, headers=merge_two_dicts(req_header, set_header(hostname)), verify=False)
return resp
url = "http://my-model-a.kserve-test.svc.cluster.local/v1/models/my-model-a:predict"
resp = self.req_send(url, hostname)
print(resp.content) | 16:40:12 |