Commit 33a61290 authored by 赵威's avatar 赵威

try get result

parent cf190b0f
......@@ -93,7 +93,7 @@ def _bytes_feature(value):
@numba.jit(nopython=True, parallel=True)
def model_predict(inputs, predict_fn):
def _make_example(inputs):
time_1 = timeit.default_timer()
int_columns = [
"active_type", "active_days", "card_id", "is_pure_author", "is_have_reply", "is_have_pure_reply", "content_level",
......@@ -116,7 +116,11 @@ def model_predict(inputs, predict_fn):
examples.append(example.SerializeToString())
total_1 = (timeit.default_timer() - time_1)
print("make example cost {:.5f}s".format(total_1))
return examples
def model_predict(inputs, predict_fn):
examples = _make_example(inputs)
time_1 = timeit.default_timer()
predictions = predict_fn({"examples": examples})
total_1 = (timeit.default_timer() - time_1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment