當(dāng)使用推理架構(gòu)為我的 AzureML 端點(diǎn)自動(dòng)生成 swagger 文檔(如此處和此處詳細(xì)介紹)時(shí),我發(fā)現(xiàn)它在我的 input_sample 周?chē)鷦?chuàng)建了一個(gè)包裝器。有沒(méi)有辦法不將輸入包裝在這個(gè)“數(shù)據(jù)”包裝器中?這是我的 Score.py 的樣子:input_sample = { "id": 123, "language": "en" "items": [{ "item": 1, "desc": "desc" }] }output_sample = [{'prediction': 'true', 'predictionConfidence': 0.8279970776764844}]@input_schema('data', StandardPythonParameterType(input_sample))@output_schema(StandardPythonParameterType(output_sample))def run(data):""" { data: { --> DON'T WANT this "data" wrapper "id": 123, "language": "en" "items": [{ "item": 1, "desc": "desc" }] } } """ try: id = data['id'] ...
使用推理模式時(shí)如何刪除輸入周?chē)陌b
料青山看我應(yīng)如是
2023-09-05 20:20:31