Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Fix remote windows (#2191)
Browse files Browse the repository at this point in the history
  • Loading branch information
chicm-ms authored Mar 19, 2020
1 parent e9865b1 commit cdf78f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions test/nni_test/nnitest/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def prepare_config_file(test_case_config, it_config, args):
deep_update(test_yml_config, test_case_config['config'])

# hack for windows
if sys.platform == 'win32':
if sys.platform == 'win32' and args.ts == 'local':
test_yml_config['trial']['command'] = test_yml_config['trial']['command'].replace('python3', 'python')

# apply training service config
Expand All @@ -58,7 +58,7 @@ def prepare_config_file(test_case_config, it_config, args):
# generate temporary config yml file to launch experiment
new_config_file = config_path + '.tmp'
dump_yml_content(new_config_file, test_yml_config)
print(yaml.dump(test_yml_config, default_flow_style=False))
print(yaml.dump(test_yml_config, default_flow_style=False), flush=True)

return new_config_file

Expand Down Expand Up @@ -130,15 +130,15 @@ def launch_test(config_file, training_service, test_case_config):
return

bg_time = time.time()
print(str(datetime.datetime.now()), ' waiting ...')
print(str(datetime.datetime.now()), ' waiting ...', flush=True)
while True:
time.sleep(3)
if time.time() - bg_time > max_duration+10:
break
status = get_experiment_status(STATUS_URL)
if status in ['DONE', 'ERROR'] or get_failed_trial_jobs(TRIAL_JOBS_URL):
break
print(str(datetime.datetime.now()), ' waiting done')
print(str(datetime.datetime.now()), ' waiting done', flush=True)

trial_stats = get_trial_stats(TRIAL_JOBS_URL)
print(json.dumps(trial_stats, indent=4), flush=True)
Expand Down
14 changes: 7 additions & 7 deletions test/scripts/model_compression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ done

echo ""
echo "===========================Testing: quantizers==========================="
# to be enabled
#echo "testing QAT quantizer..."
#python3 QAT_torch_quantizer.py

echo "testing QAT quantizer..."
python3 QAT_torch_quantizer.py
#echo "testing DoReFa quantizer..."
#python3 DoReFaQuantizer_torch_mnist.py

echo "testing DoReFa quantizer..."
python3 DoReFaQuantizer_torch_mnist.py

echo "testing BNN quantizer..."
python3 BNN_quantizer_cifar10.py
#echo "testing BNN quantizer..."
#python3 BNN_quantizer_cifar10.py

0 comments on commit cdf78f4

Please sign in to comment.