"src/vscode:/vscode.git/clone" did not exist on "5e25923900e8021116ceeab2775df2c494e23b0f"
Unverified Commit 07df1c9f authored by Lijiaoa's avatar Lijiaoa Committed by GitHub
Browse files

detail page empty with tensorflow tutorial code because of the "None" (#5011)

parent 9f65f12a
...@@ -245,7 +245,8 @@ function formatComplexTypeValue(value: any): string | number { ...@@ -245,7 +245,8 @@ function formatComplexTypeValue(value: any): string | number {
if (['number', 'string'].includes(typeof value)) { if (['number', 'string'].includes(typeof value)) {
return value; return value;
} else { } else {
return value.toString(); // for hpo experiment: search space choice value is None, and it shows null
return String(value);
} }
} }
......
...@@ -114,6 +114,12 @@ class Trial { ...@@ -114,6 +114,12 @@ class Trial {
if (typeof params === 'string') { if (typeof params === 'string') {
params = JSON.parse(params); params = JSON.parse(params);
} }
// for hpo experiment: search space choice value is None, and it shows null
for (const [key, value] of Object.entries(params)) {
if (Object.is(null, value)) {
params[key] = 'null';
}
}
const [updated, unexpectedEntries] = inferTrialParameters(params, axes); const [updated, unexpectedEntries] = inferTrialParameters(params, axes);
if (unexpectedEntries.size) { if (unexpectedEntries.size) {
throw unexpectedEntries; throw unexpectedEntries;
......
This diff is collapsed.
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