Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Support show customized tuner/assessor name and get optimize_mode from tuner/advisor/assessor #3317

Merged
merged 2 commits into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions ts/webui/src/components/overview/command/Command1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,17 @@ export const Command1 = (): any => {
const builtinName: string[] = [];
if (tuner !== undefined) {
title.push('Tuner');
if (tuner.builtinTunerName !== undefined) {
builtinName.push(tuner.builtinTunerName);
}
builtinName.push(tuner.builtinTunerName || tuner.className || 'unknown');
}

if (advisor !== undefined) {
title.push('Advisor');
if (advisor.builtinAdvisorName !== undefined) {
builtinName.push(advisor.builtinAdvisorName);
}
if (advisor.className !== undefined) {
builtinName.push(advisor.className);
}
builtinName.push(advisor.builtinAdvisorName || advisor.className || 'unknown');
}

if (assessor !== undefined) {
title.push('Assessor');
if (assessor.builtinAssessorName !== undefined) {
builtinName.push(assessor.builtinAssessorName);
}
builtinName.push(assessor.builtinAssessorName || assessor.className || 'unknown');
}

return (
Expand Down
14 changes: 13 additions & 1 deletion ts/webui/src/static/model/experiment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,19 @@ class Experiment {

get optimizeMode(): string {
const tuner = this.profile.params.tuner;
return tuner && tuner.classArgs && tuner.classArgs.optimize_mode ? tuner.classArgs.optimize_mode : 'unknown';
const advisor = this.profile.params.advisor;
const assessor = this.profile.params.assessor;
const resultTuner =
tuner && tuner.classArgs && tuner.classArgs.optimize_mode ? tuner.classArgs.optimize_mode : undefined;
const resultAdvisor =
advisor && advisor.classArgs && advisor.classArgs.optimize_mode
? advisor.classArgs.optimize_mode
: undefined;
const resultAssessor =
assessor && assessor.classArgs && assessor.classArgs.optimize_mode
? assessor.classArgs.optimize_mode
: undefined;
return resultTuner || resultAdvisor || resultAssessor || 'unknown';
}

get trainingServicePlatform(): string {
Expand Down