Issue running code locally(help)

Hi I am Sreejan Chattopadhyay. I have recently started with open sorce contribution. So I had to add test cases for some functions. After adding the test cases I tried to test it. But I got some errors.

This is the error. So for crosschecking if it is my my code which caused the error I cloned the tensorflow repo without my changes. On testing the original code I got the same error.

On careful analysing I saw the problem might be with my laptop beacuse the error was raised from tfjs backend file. My laptop does not contain any gpu or some highend configurations. So can anyone guide me on what to do next?

Sreejan Chattopadhyay

Thanks for posting and welcome to the forum. Looping in @Matthew_Soulanille who is our build expert on the TensorFlow.js team - do you know what may be going on here? Seems to be a Bazel thing.

Thanks for posting this issue! We have been seeing some build issues on Windows as we’re shifting to Bazel as a build system. The issue you’re seeing looks like it’s caused by Bazel workers, which are used to improve build performance. Normally, you can disable workers by creating a file named .bazelrc.user in the root of the repository with the contents “build --spawn_strategy=local”, although I actually just tried this now on my linux machine and saw a different error, which I’m going to investigate.

My preferred solution (but not everyone might like it) is to build TensorFlow.js in Windows Subsystem for Linux (version 2), which runs a full linux distribution in parallel with Windows. This solution is the most stable since many members of the team build on Linux, and our CI tests run on linux as well.

Another solution is to run the build in git bash, which emulates a lot of the unix-style terminal commands and features that Bazel seems to at least partially depend on. I’ve observed builds to be more stable in this environment.