damccorm commented on code in PR #24965:
URL: https://github.com/apache/beam/pull/24965#discussion_r1097498121


##########
sdks/python/tox.ini:
##########
@@ -326,3 +326,16 @@ commands =
   # Run all PyTorch unit tests
   # Allow exit code 5 (no tests run) so that we can run this command safely on 
arbitrary subdirectories.
   /bin/sh -c 'pytest -o junit_suite_name={envname} 
--junitxml=pytest_{envname}.xml -n 6 -m uses_pytorch {posargs}; ret=$?; [ $ret 
= 5 ] && exit 0 || exit $ret'
+
+[testenv:py{37,38,39,310}-xgboost-{160,170}]
+deps =
+  -r build-requirements.txt
+  160: torch>=1.6.0,<1.7.0
+  170: torch>=1.7.0

Review Comment:
   Ah, we also need to handle import exceptions like this - 
https://github.com/apache/beam/blob/aee2c844ad8f583dc161219f4ea0988d5a8860e9/sdks/python/apache_beam/ml/inference/pytorch_inference_it_test.py#L36
 - and skip if datatable/xgboost aren't installed like this - 
https://github.com/apache/beam/blob/aee2c844ad8f583dc161219f4ea0988d5a8860e9/sdks/python/apache_beam/ml/inference/pytorch_inference_it_test.py#L63
   
   Also, please add uses_xgboost to 
https://github.com/apache/beam/blob/aee2c844ad8f583dc161219f4ea0988d5a8860e9/sdks/python/pytest.ini#L29



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to