diff --git a/nni/tools/nnictl/nnictl_utils.py b/nni/tools/nnictl/nnictl_utils.py index 23a121e83f..6901ef95bb 100644 --- a/nni/tools/nnictl/nnictl_utils.py +++ b/nni/tools/nnictl/nnictl_utils.py @@ -345,9 +345,9 @@ def log_internal(args, filetype): '''internal function to call get_log_content''' file_name = get_config_filename(args) if filetype == 'stdout': - file_full_path = os.path.join(NNICTL_HOME_DIR, file_name, 'stdout') + file_full_path = os.path.join(NNICTL_HOME_DIR, file_name, 'log', 'nnictl_stdout.log') else: - file_full_path = os.path.join(NNICTL_HOME_DIR, file_name, 'stderr') + file_full_path = os.path.join(NNICTL_HOME_DIR, file_name, 'log', 'nnictl_stderr.log') print(check_output_command(file_full_path, head=args.head, tail=args.tail)) def log_stdout(args): @@ -854,8 +854,9 @@ def save_experiment(args): except IOError: print_error('Write file to %s failed!' % os.path.join(temp_nnictl_dir, '.experiment')) exit(1) - nnictl_config_dir = os.path.join(NNICTL_HOME_DIR, args.id) - shutil.copytree(nnictl_config_dir, os.path.join(temp_nnictl_dir, args.id)) + nnictl_log_dir = os.path.join(NNICTL_HOME_DIR, args.id, 'log') + shutil.copytree(nnictl_log_dir, os.path.join(temp_nnictl_dir, args.id, 'log')) + shutil.copy(os.path.join(NNICTL_HOME_DIR, args.id, '.config'), os.path.join(temp_nnictl_dir, args.id, '.config')) # Step3. Copy code dir if args.saveCodeDir: