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

rename pr tests #2208

Merged
merged 1 commit into from
Mar 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- script: |
cd test
python3 nni_test/nnitest/run_tests.py --config config/pr_tests.yml
displayName: 'nnicli test'
displayName: 'Simple test'
- script: |
cd docs/en_US/
sphinx-build -M html . _build -W
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- script: |
cd test
python3 nni_test/nnitest/run_tests.py --config config/pr_tests.yml
displayName: 'nnicli test'
displayName: 'Simple test'

- job: 'basic_test_pr_Windows'
pool:
Expand Down Expand Up @@ -130,4 +130,4 @@ jobs:
- script: |
cd test
python nni_test/nnitest/run_tests.py --config config/pr_tests.yml
displayName: 'nnicli test'
displayName: 'Simple test'
4 changes: 2 additions & 2 deletions test/nni_test/nnitest/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import ruamel.yaml as yaml

from utils import setup_experiment, get_experiment_status, get_yml_content, dump_yml_content, get_experiment_id, \
parse_max_duration_time, get_trial_stats, deep_update, print_trial_job_log, get_failed_trial_jobs
parse_max_duration_time, get_trial_stats, deep_update, print_trial_job_log, get_failed_trial_jobs, get_experiment_dir
from utils import GREEN, RED, CLEAR, STATUS_URL, TRIAL_JOBS_URL, EXPERIMENT_URL, REST_ENDPOINT, detect_port
import validators

Expand Down Expand Up @@ -87,7 +87,7 @@ def invoke_validator(test_case_config, nni_source_dir):
validator = validators.__dict__[validator_config.get('class')]()
kwargs = validator_config.get('kwargs', {})
print('kwargs:', kwargs)
validator(REST_ENDPOINT, None, nni_source_dir, **kwargs)
validator(REST_ENDPOINT, get_experiment_dir(EXPERIMENT_URL), nni_source_dir, **kwargs)

def get_max_values(config_file):
experiment_config = get_yml_content(config_file)
Expand Down
17 changes: 0 additions & 17 deletions test/nni_test/nnitest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,6 @@ def print_trial_job_log(training_service, trial_jobs_url):
print(log_file, flush=True)
print(log_content, flush=True)

def print_failed_job_log(training_service, trial_jobs_url):
'''Print job log of FAILED trial jobs'''
trial_jobs = get_failed_trial_jobs(trial_jobs_url)
for trial_job in trial_jobs:
if training_service == 'local':
if sys.platform == "win32":
p = trial_job['stderrPath'].split(':')
log_filename = ':'.join([p[-2], p[-1]])
else:
log_filename = trial_job['stderrPath'].split(':')[-1]
else:
log_filename = os.path.join(get_experiment_dir(EXPERIMENT_URL), 'trials', trial_job['id'], 'stdout_log_collection.log')
with open(log_filename, 'r') as f:
log_content = f.read()
print(log_filename, flush=True)
print(log_content, flush=True)

def parse_max_duration_time(max_exec_duration):
unit = max_exec_duration[-1]
time = max_exec_duration[:-1]
Expand Down