New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add bazel runfiles manifest support for Windows #15475
Conversation
Can one of the admins verify this patch? |
@laszlocsomor |
@snnn :
Wait, actually, let me double check that... :) sorry |
Hi @laszlocsomor
|
I don't think it matters which one you use. Tests conventionally use |
AFAIK nobody fixed it yet. Thanks for raising my awareness to it! Filed bazelbuild/bazel#4327, I'll fix it in Q1-2018.
The first segment "org_tensorflow" is the name of the repository. If it's the main workspace, its name is in The second segment is already part of the path within the workspace or repository. |
Hi TF team, In order to make these cc_tests work on Windows, I need to touch a lot of source files. Should I submit them one by one, or , combine all these changes in one PR? Now this PR contains one change to the test framework, and two unitest fixes for
|
Current implementation has a limit: it only has file to file mappings, no folder to folder mappings. Say, If we have a function which takes a folder as input, e.g. model.h void LoadModel(const string& model_dir); And we want to test this function. model_test.cc TEST(Model, LoadModelFromLocalDir) {
string dirname = "data/checkpoint1"
dirname = TranslateDirNameByUsingManifestInfo(dirname); //This step is not do-able
LoadModel(dirname);
} It's not do-able. Because the path, "data/checkpoint1", doesn't exist in the MANIFEST file, which only has things like:
There is no entry for "data/checkpoint1" |
@snnn : Sorry I don't follow, what has a limitation? Do you mean that the runfiles manifest doesn't allow enumerating runfiles directories, or something else? |
@laszlocsomor: Yes. I don't know how to relocate a dir. |
@snnn : I see. I filed bazelbuild/bazel#4334. In the meantime, can you use |
Yes, I can. Then? |
Then until bazelbuild/bazel#4334 is fixed, use
|
Have no time to work on this right now. Close it temporarily. |
To implement the ideas in:
https://groups.google.com/forum/#!msg/bazel-discuss/Po8xN8dhWkI/sWPUYV9YBAAJ
Now //tensorflow/core:example_example_parser_configuration_test is disabled on Windows, because it cannot find the data files.
testing::RunFileRelocator::GetInstance().Relocate() is the replacement of testing::TensorFlowSrcRoot(). We should mark TensorFlowSrcRoot as deprecated or completely remove it.
Places need to change:
c/c_api_test.cc
cc/saved_model/loader_test.cc
compiler/aot/codegen_test.cc
compiler/xla/service/gpu/llvm_gpu_backend/utils_test.cc
compiler/xla/tests/sample_file_test.cc
contrib/ffmpeg/default/ffmpeg_lib_test.cc
contrib/lite/models/test_utils.h
contrib/lite/testing/generated_examples_zip_test.cc
contrib/session_bundle/bundle_shim_test.cc
contrib/session_bundle/test_util.cc
core/distributed_runtime/rpc/grpc_testlib.cc
core/grappler/costs/graph_properties_test.cc
core/grappler/utils/scc_test.cc
core/kernels/hexagon/graph_transferer_test.cc
core/kernels/spectrogram_test.cc
core/platform/cloud/google_auth_provider_test.cc
core/profiler/internal/tfprof_show_test.cc
core/profiler/internal/tfprof_stats_test.cc
core/profiler/internal/tfprof_tensor_test.cc
core/profiler/internal/tfprof_timeline_test.cc
core/example/example_parser_configuration_test.cc
core/platform/cloud/oauth_client_test.cc
Ref: bazelbuild/bazel#4215
TODO: