Skip to content

fixes integration test#4373

Merged
wyli merged 2 commits intoProject-MONAI:devfrom
wyli:dev
May 27, 2022
Merged

fixes integration test#4373
wyli merged 2 commits intoProject-MONAI:devfrom
wyli:dev

Conversation

@wyli
Copy link
Copy Markdown
Contributor

@wyli wyli commented May 27, 2022

Signed-off-by: Wenqi Li [email protected]

followup of #4347

fixes error:

 ======================================================================                                                                                                                                                                                                                                       
 ERROR: test_timing (__main__.IntegrationWorkflows)                                                                          
 ----------------------------------------------------------------------                                                      
 ValueError: operands could not be broadcast together with shapes (0,) (40,)                                                 
                                                                                                                             
 The above exception was the direct cause of the following exception:                                                        
                                                                                                                             
 Traceback (most recent call last):                                                                                          
   File "/opt/monai/tests/utils.py", line 575, in _wrapper                                                                   
     raise RuntimeError(res.traceback) from res                                                                              
 RuntimeError: Traceback (most recent call last):                                                                            
   File "/opt/monai/tests/utils.py", line 526, in run_process                                                                
     output = func(*args, **kwargs)                                                                                          
   File "/opt/monai/tests/utils.py", line 607, in _call_original_func                                                        
     return f(*args, **kwargs)                                                                                               
   File "/opt/monai/tests/test_integration_workflows.py", line 354, in test_timing                                           
     self.train_and_infer(idx=2)                                                                                             
   File "/opt/monai/tests/test_integration_workflows.py", line 330, in train_and_infer                                       
     _test_saved_files(postfix="seg_handler")                                                                                
   File "/opt/monai/tests/test_integration_workflows.py", line 326, in _test_saved_files                                     
     self.assertTrue(test_integration_value(TASK, key="output_sums_2", data=values, rtol=1e-2))                              
   File "/opt/monai/tests/testing_data/integration_answers.py", line 593, in test_integration_value                          
     if np.allclose(data, value, rtol=rtol):                                                                                 
   File "<__array_function__ internals>", line 180, in allclose                                                              
   File "/opt/conda/lib/python3.8/site-packages/numpy/core/numeric.py", line 2251, in allclose                               
     res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan))                                                     
   File "<__array_function__ internals>", line 180, in isclose                                                               
   File "/opt/conda/lib/python3.8/site-packages/numpy/core/numeric.py", line 2361, in isclose                                
     return within_tol(x, y, atol, rtol)                                                                                     
   File "/opt/conda/lib/python3.8/site-packages/numpy/core/numeric.py", line 2342, in within_tol                             
     return less_equal(abs(x-y), atol + rtol * abs(y))                                                                       
 ValueError: operands could not be broadcast together with shapes (0,) (40,)  

Status

Readyd

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli requested a review from Nic-Ma May 27, 2022 17:52
@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented May 27, 2022

/build

@wyli wyli enabled auto-merge (squash) May 27, 2022 17:58
@wyli wyli merged commit d46904b into Project-MONAI:dev May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants