junrushao commented on code in PR #12866:
URL: https://github.com/apache/tvm/pull/12866#discussion_r979183312
##########
src/meta_schedule/task_scheduler/gradient_based.cc:
##########
@@ -61,22 +61,43 @@ class GradientBasedNode final : public TaskSchedulerNode {
int total_trials = 0;
double total_latency = 0.0;
support::TablePrinter p;
- p.Row() << "ID"
- << "Name"
- << "FLOP"
- << "Weight"
- << "Speed (GFLOPS)"
- << "Latency (us)"
- << "Weighted Latency (us)"
- << "Trials"
- << "Terminated";
+
+ if (using_ipython()) {
+ p.Row() << "ID"
+ << "Name"
+ << "FLOP"
+ << "Weight"
+ << "GFLOPS"
+ << "Latency (us)"
+ << "Wtd. Latency"
+ << "Trials"
+ << "Terminated";
+ } else {
+ p.Row() << "ID"
+ << "Name"
+ << "FLOP"
+ << "Weight"
+ << "Speed (GFLOPS)"
+ << "Latency (us)"
+ << "Weighted Latency (us)"
+ << "Trials"
+ << "Terminated";
+ }
+
p.Separator();
+
for (int i = 0; i < n_tasks; ++i) {
const TaskRecord& record = task_records_[i];
auto row = p.Row();
int trials = record.trials;
+ String task_name = record.task->task_name.value();
+ if (using_ipython() && task_name.length() > 23) {
+ std::string temp = task_name.c_str();
+ temp = temp.substr(0, 20) + "...";
+ task_name = String(temp);
+ }
Review Comment:
This is indeed not ideal. We may have an extra API that allows us to
assemble a pandas dataframe so that it’s more organically integrated with
jupyter. I have an idea and will communicate with Xiyou next week
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]