"examples/nas/oneshot/vscode:/vscode.git/clone" did not exist on "5fe29b063f7877036e54e26d85c21e2d1d51a2c8"
Unverified Commit bf8be1e7 authored by Yuge Zhang's avatar Yuge Zhang Committed by GitHub
Browse files

Merge pull request #2837 from microsoft/v1.8

Merge v1.8 back to master
parents 320407b1 e06a9dda
......@@ -112,10 +112,10 @@ class Trial implements TableObj {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const duration = (endTime - this.info.startTime!) / 1000;
let accuracy;
if(this.acc !== undefined && this.acc.default !== undefined){
if(typeof this.acc.default === 'number'){
if (this.acc !== undefined && this.acc.default !== undefined) {
if (typeof this.acc.default === 'number') {
accuracy = JSON5.parse(this.acc.default);
}else {
} else {
accuracy = this.acc.default;
}
}
......@@ -245,7 +245,7 @@ class Trial implements TableObj {
}
public finalKeys(): string[] {
if(this.acc !== undefined){
if (this.acc !== undefined) {
return Object.keys(this.acc);
} else {
return [];
......@@ -304,11 +304,16 @@ class Trial implements TableObj {
}
private renderNumber(val: any): string {
if(typeof val === 'number'){
if (typeof val === 'number') {
if (isNaNorInfinity(val)) {
return `${val}`; // show 'NaN' or 'Infinity'
} else {
if (this.accuracy === undefined) {
return `${formatAccuracy(val)} (LATEST)`;
} else {
return `${formatAccuracy(val)} (FINAL)`;
}
}
} else {
// show other types, such as {tensor: {data: }}
......@@ -317,8 +322,8 @@ class Trial implements TableObj {
}
public formatLatestAccuracy(): string { // TODO: this should be private
if(this.status === 'SUCCEEDED'){
return (this.accuracy === undefined ? '--': this.renderNumber(this.accuracy));
if (this.status === 'SUCCEEDED') {
return (this.accuracy === undefined ? '--' : this.renderNumber(this.accuracy));
} else {
if (this.accuracy !== undefined) {
return this.renderNumber(this.accuracy);
......
......@@ -2,16 +2,21 @@
/* decide modal size */
.ms-Dialog-main{
width: 50%;
overflow: hidden;
min-width: 450px;
}
.ms-Modal-scrollableContent{
overflow-x: hidden;
}
/* compare-md: table style */
.flex{
display: flex;
}
&-table{
width: 92%;
margin: 0 auto;
margin-bottom: 20px;
border: 1px solid transparent;
overflow: auto;
overflow: auto hidden;
color: #333;
tr{
line-height: 30px;
......
......@@ -10,7 +10,7 @@ kubeflow:
kubeflowConfig:
operator: tf-operator
apiVersion: v1alpha2
apiVersion: v1
storage: azureStorage
keyVault:
vaultName:
......
......@@ -3,7 +3,9 @@
import os
import json
import shutil
from .constants import NNICTL_HOME_DIR
from .command_utils import print_error
class Config:
'''a util class to load and save config'''
......@@ -77,7 +79,13 @@ class Experiments:
def remove_experiment(self, expId):
'''remove an experiment by id'''
if expId in self.experiments:
self.experiments.pop(expId)
fileName = self.experiments.pop(expId).get('fileName')
if fileName:
logPath = os.path.join(NNICTL_HOME_DIR, fileName)
try:
shutil.rmtree(logPath)
except FileNotFoundError:
print_error('{0} does not exist.'.format(logPath))
self.write_file()
def get_all_experiments(self):
......
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