Unverified Commit 8238ddc6 authored by Yan Ni's avatar Yan Ni Committed by GitHub
Browse files

Fix it local windows (#2421)

parent bf7daa8f
......@@ -334,9 +334,11 @@ class LocalTrainingService implements TrainingService {
throw new Error(`Could not find stream in trial ${trialJob.id}`);
}
//Refer https://github.com/Juul/tail-stream/issues/20
setTimeout(() => {
stream.end(0);
stream.emit('end');
this.jobStreamMap.delete(trialJob.id);
}, 5000);
}
}
if (trialJob.gpuIndices !== undefined && trialJob.gpuIndices.length > 0 && this.gpuScheduler !== undefined) {
......
......@@ -85,6 +85,14 @@ testCases:
validator:
class: ExportValidator
- name: export-zero-trial
configFile: test/config/metrics_test/config_failure.yml
config:
maxTrialNum: 1
trialConcurrency: 1
validator:
class: ExportValidator
- name: metrics-dict
configFile: test/config/metrics_test/config_dict_metrics.yml
config:
......
authorName: nni
experimentName: default_test
maxExecDuration: 3m
maxTrialNum: 1
trialConcurrency: 1
searchSpacePath: ./search_space.json
tuner:
builtinTunerName: Random
trial:
codeDir: .
command: python3 not_exist.py
gpuNum: 0
useAnnotation: false
multiPhase: false
multiThread: false
trainingServicePlatform: local
......@@ -705,6 +705,9 @@ def export_trials_data(args):
else:
formated_record = {**record['parameter'], **{'reward': record_value, 'id': record['id']}}
trial_records.append(formated_record)
if not trial_records:
print_error('No trial results collected! Please check your trial log...')
exit(0)
with open(args.path, 'w', newline='') as file:
writer = csv.DictWriter(file, set.union(*[set(r.keys()) for r in trial_records]))
writer.writeheader()
......
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