@@ -26,11 +26,10 @@ def run_training(python_version: str, csharp_version: str) -> bool:
26
26
f"Running training with python={ python_version or latest } and c#={ csharp_version or latest } "
27
27
)
28
28
output_dir = "models" if python_version else "results"
29
- nn_file_expected = f"./{ output_dir } /{ run_id } /3DBall.nn"
30
29
onnx_file_expected = f"./{ output_dir } /{ run_id } /3DBall.onnx"
31
30
frozen_graph_file_expected = f"./{ output_dir } /{ run_id } /3DBall/frozen_graph_def.pb"
32
31
33
- if os .path .exists (nn_file_expected ):
32
+ if os .path .exists (onnx_file_expected ):
34
33
# Should never happen - make sure nothing leftover from an old test.
35
34
print ("Artifacts from previous build found!" )
36
35
return False
@@ -96,21 +95,16 @@ def run_training(python_version: str, csharp_version: str) -> bool:
96
95
if csharp_version is None and python_version is None :
97
96
model_artifacts_dir = os .path .join (get_base_output_path (), "models" )
98
97
os .makedirs (model_artifacts_dir , exist_ok = True )
99
- shutil .copy (nn_file_expected , model_artifacts_dir )
100
98
shutil .copy (onnx_file_expected , model_artifacts_dir )
101
99
shutil .copy (frozen_graph_file_expected , model_artifacts_dir )
102
100
103
- if (
104
- res .returncode != 0
105
- or not os .path .exists (nn_file_expected )
106
- or not os .path .exists (onnx_file_expected )
107
- ):
101
+ if res .returncode != 0 or not os .path .exists (onnx_file_expected ):
108
102
print ("mlagents-learn run FAILED!" )
109
103
return False
110
104
111
105
if csharp_version is None and python_version is None :
112
106
# Use abs path so that loading doesn't get confused
113
- model_path = os .path .abspath (os .path .dirname (nn_file_expected ))
107
+ model_path = os .path .abspath (os .path .dirname (onnx_file_expected ))
114
108
for extension in ["nn" , "onnx" ]:
115
109
inference_ok = run_inference (env_path , model_path , extension )
116
110
if not inference_ok :
0 commit comments