Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
log = common.getLogFlagFromKarmaFlags();
}
console.log(`Boolean flag log = ${log}`);
const taskType = 'model';
let environmentInfo: EnvironmentInfo;
if (isNodeJS) {
environmentInfo = common.getNodeEnvironmentInfo(tfn);
} else {
environmentInfo = common.getBrowserEnvironmentInfo();
}
const versionSet: VersionSet = isNodeJS ? {versions: tfn.version} : {
versions: {
'tfjs-converter': tfconverter.version_converter,
'tfjs-core': tfc.version_core,
'tfjs-data': tfd.version_data,
'tfjs-layers': tfl.version_layers
}
};
let suiteLog: common.SuiteLog;
if (isNodeJS) {
// tslint:disable-next-line:no-require-imports
const fs = require('fs');
suiteLog = JSON.parse(fs.readFileSync(BENCHMARKS_JSON_PATH, 'utf-8'));
} else {
suiteLog =
await (await fetch(BENCHMARKS_JSON_URL)).json() as common.SuiteLog;
}
const pyEnvironmentInfo = suiteLog.environmentInfo;
const pyEnvironmentId =
log ? await addEnvironmentInfoToFirestore(pyEnvironmentInfo) : null;