You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/02 17:47:37 UTC

[GitHub] [beam] yeandy commented on a diff in pull request #17462: [BEAM-14068]Add Pytorch inference IT test and example

yeandy commented on code in PR #17462:
URL: https://github.com/apache/beam/pull/17462#discussion_r888218977


##########
build.gradle.kts:
##########
@@ -327,7 +327,7 @@ tasks.register("python39PostCommit") {
   dependsOn(":sdks:python:test-suites:direct:py39:postCommitIT")
   dependsOn(":sdks:python:test-suites:direct:py39:hdfsIntegrationTest")
   dependsOn(":sdks:python:test-suites:portable:py39:postCommitPy39")
-  dependsOn(":sdks:python:test-suites:dataflow:py39:torchTests")
+  dependsOn(":sdks:python:test-suites:direct:py39:inferencePostCommitIT")

Review Comment:
   Do we also want to add `dependsOn(":sdks:python:test-suites:direct:py38:inferencePostCommitIT")`



##########
sdks/python/test-suites/direct/common.gradle:
##########
@@ -185,3 +185,36 @@ tasks.register("hdfsIntegrationTest") {
     }
   }
 }
+
+// Pytorch RunInference IT tests
+task torchTests {
+  dependsOn 'installGcpTest'
+  dependsOn ':sdks:python:sdist'
+  def requirementsFile = "${rootDir}/sdks/python/apache_beam/ml/inference/torch_tests_requirements.txt"
+  doFirst {
+      exec {
+        executable 'sh'
+        args '-c', ". ${envdir}/bin/activate && pip install -r $requirementsFile"
+      }
+    }
+  doLast {
+      def testOpts = basicTestOpts
+      def argMap = [
+          "test_opts": testOpts,
+          "suite": "postCommitIT-direct-py${pythonVersionSuffix}",
+          "collect": "uses_pytorch and it_postcommit",
+          "runner": "TestDirectRunner"
+      ]
+      def cmdArgs = mapToArgString(argMap)
+      exec {
+        executable 'sh'
+        args '-c', ". ${envdir}/bin/activate && export FORCE_TORCH_IT=1 && ${runScriptsDir}/run_integration_test.sh $cmdArgs"
+      }
+    }
+}
+
+// Add all the RunInference framework IT tests to this gradle task that runs on Direct Runner Post commit suite.
+// TODO(anandinguva): Add sklearn IT test here

Review Comment:
   Do we need a JIRA for this?



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org