elif self.preproc == "server":
// TODO: here we allow vectorizers even for preproc=server to get `word_lengths`.
// vectorizers should not be available when preproc=server.
featurized_examples = self.vectorize(tokens_batch)
examples = {
"tokens": np.array([" ".join(x) for x in tokens_batch]),
self.model.lengths_key: featurized_examples[self.model.lengths_key]
}
After Change
if backend not in {"tf"}:
raise ValueError("only Tensorflow is currently supported for remote Services")
import_user_module("baseline.{}.remote".format(backend))
exp_type = kwargs.get("remote_type")
if exp_type is None:
exp_type = "http" if remote.startswith("http") else "grpc"
exp_type = "{}-preproc".format(exp_type) if preproc == "server" else exp_type
exp_type = f"{exp_type}-{task_name}"