| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Sorry, something went wrong.
|
Building everything with "mvn install" will run the tests, yes. Any issues
with the build?
|
Sorry, something went wrong.
| } | ||
| } | ||
|
|
||
| public static List<DeviceSpec> listDevices(Optional<DeviceSpec.DeviceType> deviceType, TFE_Context ctx) { |
There was a problem hiding this comment.
You shouldn't expose TFE_Context at the public level, these classes are generated from the C API and we always wrapped them up in public endpoints for more flexibility and scalability. So in this case, I suggest maybe to create an EagerSession.Context static nested class that encapsulates a TFE_Context?
Sorry, something went wrong.
| deviceList.add(devSpec); | ||
| } | ||
| TF_DeleteDeviceList(devices); | ||
| if(deviceType.isPresent()) return deviceList; |
There was a problem hiding this comment.
Just general comment, be careful to format your code according to Google Java Style Guide, I saw a bunch of missing spaces in the code that will fail the lint checks to pass when enabled.
Sorry, something went wrong.
| } | ||
| TF_DeleteDeviceList(devices); | ||
| if(deviceType.isPresent()) return deviceList; | ||
| return deviceList.stream().filter(d -> d.deviceType().equals(deviceType.get())).collect(Collectors.toList()); |
There was a problem hiding this comment.
Java streams tends to be slower than simple for loops, the overhead is even worst when manipulating such a small list of objects. While I don't think this method needs to be time-critical, I would suggest to take the simple/faster route here (just my two cents).
Sorry, something went wrong.
|
Thanks for the contribution @tomburke-rse , Like @saudet said a simple mvn install should compile and run all tests but you can skip the 6-hours long native build by adding the dev profile to your command, i.e. mvn install -Pdev. This will fetch prebuild binaries for your platform. |
Sorry, something went wrong.
|
Thanks for alle the advice everyone, I'll add them asap. |
Sorry, something went wrong.
|
mvn install -Pdev should build and run the tests without any trouble. Can you please share more context about the issues you are facing, e.g. an error message or a stacktrace? |
Sorry, something went wrong.
|
mvn install -Pdev should build and run the tests without any trouble. Can you please share more context about the issues you are facing, e.g. an error message or a stacktrace? |
Sorry, something went wrong.
|
Like I mentioned, it is the same error as in the pipeline here, specifically only for the TensorFlowTest class. Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-test) on project tensorflow-core-api: There are test failures. Please refer to C:\mpicbg\workspace\tensorflow\java\tensorflow-core\tensorflow-core-api\target\surefire-reports for the individual test results. Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream. The forked VM terminated without properly saying goodbye. VM crash or System.exit called? Command was cmd.exe /X /C "C:\Users\burke\.jdks\adopt-openj9-1.8.0_275\jre\bin\java -jar C:\Users\burke\AppData\Local\Temp\surefire236563113746082396\surefirebooter5751859365434514212.jar C:\Users\burke\AppData\Local\Temp\surefire236563113746082396 2020-12-18T13-57-26_766-jvmRun1 surefire2445852067572510918tmp surefire_05950149004635894208tmp" Error occurred in starting fork, check output in log Process Exit Code: -1 Crashed tests: org.tensorflow.TensorFlowTest org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? Command was cmd.exe /X /C "C:\Users\burke\.jdks\adopt-openj9-1.8.0_275\jre\bin\java -jar C:\Users\burke\AppData\Local\Temp\surefire236563113746082396\surefirebooter5751859365434514212.jar C:\Users\burke\AppData\Local\Temp\surefire236563113746082396 2020-12-18T13-57-26_766-jvmRun1 surefire2445852067572510918tmp surefire_05950149004635894208tmp" Error occurred in starting fork, check output in log Process Exit Code: -1 Crashed tests: org.tensorflow.TensorFlowTest at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) |
Sorry, something went wrong.
|
Just throwing ideas here, I've personally never tried it with OpenJ9, can you check if you have the same error with a standard OpenJDK version? Also, can we check if the test that crashes is yours by commenting out the custom op library test? |
Sorry, something went wrong.
| import org.tensorflow.internal.c_api.TF_Buffer; | ||
| import org.tensorflow.internal.c_api.TF_Library; | ||
| import org.tensorflow.internal.c_api.TF_Status; | ||
| import org.tensorflow.internal.c_api.*; |
There was a problem hiding this comment.
No star imports in the main classes.
Sorry, something went wrong.
|
My own test is indeed the problem. Not sure why, but I will figure out the problem in the next days. Still a weird error. |
Sorry, something went wrong.
|
I've seen this before, when the native process has a process killing error, since the process dies maven thinks it's a fork error. It should generate a dump file somewhere in the project with more info and the stacktrace. |
Sorry, something went wrong.
|
@tomburke-rse , are you unblocked now? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is a draft PR for the list_devices functionality.
Unfortunately, I could not run the tests at all and would highly appreciate any help in setting up the project.
Do I need to build from source to run the tests?
Any remarks and improvements are welcome.