作者:心语忆录_288 | 来源:互联网 | 2023-09-16 19:11
Is flask supported within plugins inside TB v1.15? I'm getting 404 errors. If it is, can you give an example of an endpoint? I'm calling
1
| sAjaxSource: './tables/serverside_table', |
on the client side. I'm not sure if this is wrong, or if I'm not setting up TB side correctly.
Client code
1 2 3 4 5 6 7 8 9 10 11 12
| $('#selector').DataTable({
bProcessing: true,
bServerSide: true,
sPaginationType: 'full_numbers',
lengthMenu: [[10, 25, 50, 100], [10, 25, 50, 100]],
bjQueryUI: true,
sAjaxSource: './tables/serverside_table',
columns: [
{data: 'Column A'},
{data: 'Column B'},
{data: 'Column C'},
{data: 'Column D'}, |
Partial Server code that defines the endpoint
1 2 3 4 5 6 7 8 9 10
| from flask import Blueprint, jsonify, request
from tensorboard_plugin_dlprof import table_builder
from tensorboard_plugin_dlprof import dlprof_flask_name
tables = Blueprint('tables', 'dlprof', url_prefix='/tables')
.route("/serverside_table", methods=['GET'])
def serverside_table_content():
data = table_builder.collect_data_serverside(request)
return jsonify(data) |
Server console
1
| W0807 application.py:401] path /data/plugin/dlprof/tables/serverside_table not found, sending 404 |
Requesting help with endpoint designation/definition on TB server so that TB UI plugin can access.
Thanks.
该提问来源于开源项目:tensorflow/tensorboard
Thanks!