-
Notifications
You must be signed in to change notification settings - Fork 1.8k
refactor experiment summary file(to fix componentWillReceiveProps waring) and click other areas to close panel #2734
Conversation
// add intermediate result message | ||
trialMessagesArr[item].intermediate = []; | ||
Object.keys(interResultList).map(key => { | ||
const interId = `${interResultList[key].trialJobId}-${interResultList[key].parameterId}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the id format has changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had updated.
.then(data => this.doUpdateMetrics(data as any, false)) | ||
.then(data => { | ||
this.metricsList = data; | ||
this.doUpdateMetrics(data as any, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return this.doUpdateMetrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why return this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. will return this function
@@ -252,7 +262,8 @@ class TrialManager { | |||
return updated; | |||
} | |||
|
|||
private async updateMetrics(lastTime?: boolean): Promise<boolean> { | |||
private async updateMetrics(lastTime?: boolean): Promise<boolean | void> { | |||
// private async updateMetrics(lastTime?: boolean): Promise<boolean> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused code. Why should it be boolean | void
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finally, use line 265. Thanks.
@@ -58,7 +67,7 @@ class TrialManager { | |||
} | |||
} | |||
|
|||
public async update(lastTime?: boolean): Promise<boolean> { | |||
public async update(lastTime?: boolean): Promise<boolean | void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had fixed.
{isvisibleLogDrawer && <LogDrawer closeDrawer={this.closeLogDrawer} />} | ||
<ExperimentDrawer isVisble={isvisibleExperimentDrawer} closeExpDrawer={this.closeExpDrawer} /> | ||
{isvisibleLogDrawer && <LogPanel closeDrawer={this.closeLogDrawer} />} | ||
{isvisibleExperimentDrawer && <ExperimentPanel closeExpDrawer={this.closeExpDrawer} experimentProfile={EXPERIMENT.profile} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it's proper to pass EXPERIMENT.profile
(a getter function) as property. This will likely to cause ExperimentPanel
get re-rendered every time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had tested this status. ExperimentPanel will refresh as interval not every time.
public getMetricsList(): Array<any> { | ||
return this.metricsList; | ||
} | ||
public getTrialJobList(): Array<any> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trial job should have a type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had fixed. add type MetricDataRecord TrialJobInfo
.
componentWillUnmount(): void { | ||
this._isCompareMount = false; | ||
this._isExperimentMount = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space before =
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
…ing) and click other areas to close panel (microsoft#2734) (cherry picked from commit 2488aa6)
No description provided.