我尝试将通用句子编码器模型部署到 aws Sagemaker 端点,但出现错误 raise ValueError('no SavedModel bundles found!')
我在下面显示了我的代码,我觉得我的路径之一不正确
import tensorflow as tf
import tensorflow_hub as hub
import numpy as np
from sagemaker import get_execution_role
from sagemaker.tensorflow.serving import Model
def tfhub_to_savedmodel(model_name,uri):
tfhub_uri = uri
model_path = 'encoder_model/' + model_name
with tf.Session(graph=tf.Graph()) as sess:
module = hub.Module(tfhub_uri)
input_params = module.get_input_info_dict()
dtype = input_params['text'].dtype
shape = input_params['text'].get_shape()
# define the model inputs
inputs = {'text': tf.placeholder(dtype, shape, 'text')}
# define the model outputs
# we want the class ids and probabilities …Run Code Online (Sandbox Code Playgroud) amazon-web-services tensorflow amazon-sagemaker tensorflow-hub
我试图通过从我所属的松弛通道中提取消息/响应来创建一个小数据集。我想使用 python 从通道中提取数据,但是我无法找出我的 api 密钥。我在 slack 上创建了一个应用程序,但我不确定如何找到我的 api 密钥。我看到了我的客户端密码、签名密码和验证令牌,但找不到我的 api 密钥
这是我相信我正在努力完成的一个基本示例:
import slack
sc = slack.SlackClient("api key")
sc.api_call(
"channels.history",
channel="C0XXXXXX"
)
Run Code Online (Sandbox Code Playgroud)
如果可能的话,我也愿意手动下载数据。任何帮助是极大的赞赏。