Bazel build failed in compiling TensorFlow from source.

I am compiling TensorFlow from source on an Ubuntu machine. This is a verbose output of the error log generated in the bazel build //tensorflow/tools/pip_package:build_pip_package execution.
Error Log:
ERROR: /home/annanay/.cache/bazel/_bazel_root/9b62c7240de3d9136528cdded945b550/external/llvm/BUILD:418:5: Generating code from table: lib/Target/AArch64/AArch64.td @llvm//:aarch64_target_gen__gen_fast_isel_genrule failed: bash failed:
error executing command
(cd /home/annanay/.cache/bazel/_bazel_root/9b62c7240de3d9136528cdded945b550/execroot/tensorflow && \
exec env - \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin \
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/external/llvm/llvm-tblgen -I external/llvm/include -I external/llvm/tools/clang/include -I $(dirname external/llvm/lib/Target/AArch64/AArch64.td) -gen-fast-isel external/llvm/lib/Target/AArch64/AArch64.td -o bazel-out/local-opt/genfiles/external/llvm/lib/Target/AArch64/AArch64GenFastISel.inc'): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 127.
bazel-out/host/bin/external/llvm/llvm-tblgen: relocation error: bazel-out/host/bin/external/llvm/llvm-tblgen: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
Target //tensorflow/tools/pip_package:build_pip_package failed to build

I built TensorFlow from source, and here is the relevant information:
$ git rev-parse HEAD
4c3bb1aeb7bb46bea35036433742a720f39ce348

$ bazel version
Build label: 0.4.4
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Feb 1 18:54:21 2017<PHONE_NUMBER>)
Build timestamp:<PHONE_NUMBER>
Build timestamp as int:<PHONE_NUMBER>

System:
x86_64 GNU/Linux

using gcc version 5.x?
http://stackoverflow.com/questions/36816570/glibcxx-3-4-21-not-defined-in-file-libstdc-so-6-with-link-time-reference
and https://www.tensorflow.org/install/install_sources -> "NOTE on gcc version 5: the binary pip packages available on the TensorFlow website are built with gcc4 that uses the older ABI. To make the library compatible with the older abi you have to add -cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0""

@truatpasteurdotfr but I'm not using the binary packages from the TensorFlow website. Building everything from source!

libstdc++ was already in the latest version.
If I were to add the flag, do I have to manually enter it in the bazel build files or is there a way to pass it as a flag?
Also, my gcc -v is 6.3.0.

We have instructions in the website for building from source, as @truatpasteurdotfr indicated:
https://www.tensorflow.org/install/install_sources
Please go to this website and follow the instructions there.

Please reopen if the official instructions don't work for you.

I am getting a similar error, building from source. I have multiple gccs available on my system, but $(which gcc) --version says 4.8.5.

this works for me: (cpu only version on CentOS-7) https://github.com/truatpasteurdotfr/docker-centos7-tensorflow

That doesn't help me because 1) I'd like to compile with optimizations and 2) I can't use docker on my system.

@vladfi1 you can get the ideas just by reading the Dockerfile, ymmv.

I have kind of the same problem, installing from source gives the following error
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 384.280s, Critical Path: 107.73s
FAILED: Build did NOT complete successfully

Digging a bit dipper I found multiple errors:
ERROR: /home/kirk/tensorflow/tensorflow/contrib/mpi_collectives/BUILD:40:1: C++ compilation of rule '//tensorflow/contrib/mpi_collectives:python/ops/_mpi_ops.so' failed (Exit 1)
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:76:18: error: 'se' does not name a type
 using StatusOr = se::port::StatusOr<T>;
                  ^~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:139:28: error: 'StatusOr' was not declared in this scope
 typedef std::function<void(StatusOr<Tensor>)> CommunicationDoneCallback;
                            ^~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:139:28: note: suggested alternatives:
In file included from ./tensorflow/stream_executor/dnn.h:33:0,
                 from ./tensorflow/stream_executor/stream.h:30,
                 from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:31:
./tensorflow/stream_executor/lib/statusor.h:28:36: note:   'stream_executor::port::StatusOr'
 using StatusOr = ::xla::StatusOr<T>;
                                    ^
In file included from ./tensorflow/stream_executor/lib/statusor.h:21:0,
                 from ./tensorflow/stream_executor/dnn.h:33,
                 from ./tensorflow/stream_executor/stream.h:30,
                 from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:31:
./tensorflow/compiler/xla/statusor.h:87:7: note:   'xla::StatusOr'
 class StatusOr : private internal_statusor::StatusOrData<T>,
       ^~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:139:45: error: template argument 1 is invalid
 typedef std::function<void(StatusOr<Tensor>)> CommunicationDoneCallback;
                                             ^
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In function 'void tensorflow::contrib::mpi_collectives::{anonymous}::PerformCollectiveOp(tensorflow::contrib::mpi_collectives::{anonymous}::TensorTable&, tensorflow::contrib::mpi_collectives::MPIResponse)':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:512:14: error: 'StatusOr' was not declared in this scope
     callback(StatusOr<Tensor>(*output_tensor));
              ^~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:512:14: note: suggested alternatives:
In file included from ./tensorflow/stream_executor/dnn.h:33:0,
                 from ./tensorflow/stream_executor/stream.h:30,
                 from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:31:
./tensorflow/stream_executor/lib/statusor.h:28:36: note:   'stream_executor::port::StatusOr'
 using StatusOr = ::xla::StatusOr<T>;
                                    ^
In file included from ./tensorflow/stream_executor/lib/statusor.h:21:0,
                 from ./tensorflow/stream_executor/dnn.h:33,
                 from ./tensorflow/stream_executor/stream.h:30,
                 from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:31:
./tensorflow/compiler/xla/statusor.h:87:7: note:   'xla::StatusOr'
 class StatusOr : private internal_statusor::StatusOrData<T>,
       ^~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:512:29: error: expected primary-expression before '>' token
     callback(StatusOr<Tensor>(*output_tensor));
                             ^
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:512:46: error: 'callback' cannot be used as a function
     callback(StatusOr<Tensor>(*output_tensor));
                                              ^
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:514:14: error: 'StatusOr' was not declared in this scope
     callback(StatusOr<Tensor>(status));
              ^~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:514:14: note: suggested alternatives:
In file included from ./tensorflow/stream_executor/dnn.h:33:0,
                 from ./tensorflow/stream_executor/stream.h:30,
                 from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:31:
./tensorflow/stream_executor/lib/statusor.h:28:36: note:   'stream_executor::port::StatusOr'
 using StatusOr = ::xla::StatusOr<T>;
                                    ^
In file included from ./tensorflow/stream_executor/lib/statusor.h:21:0,
                 from ./tensorflow/stream_executor/dnn.h:33,
                 from ./tensorflow/stream_executor/stream.h:30,
                 from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:31:
./tensorflow/compiler/xla/statusor.h:87:7: note:   'xla::StatusOr'
 class StatusOr : private internal_statusor::StatusOrData<T>,
       ^~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:514:29: error: expected primary-expression before '>' token
     callback(StatusOr<Tensor>(status));
                             ^
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:514:38: error: 'callback' cannot be used as a function
     callback(StatusOr<Tensor>(status));
                                      ^
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In member function 'void tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback)':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:997:52: error: 'StatusOr' has not been declared
     auto allreduce_done_callback = [done, context](StatusOr<Tensor> status) {
                                                    ^~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:997:60: error: expected ',' or '...' before '<' token
     auto allreduce_done_callback = [done, context](StatusOr<Tensor> status) {
                                                            ^
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In lambda function:
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:998:26: error: 'status' was not declared in this scope
       context->SetStatus(status.status());
                          ^~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In member function 'void tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback)':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1091:52: error: 'StatusOr' has not been declared
     auto allgather_done_callback = [done, context](StatusOr<Tensor> status) {
                                                    ^~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1091:60: error: expected ',' or '...' before '<' token
     auto allgather_done_callback = [done, context](StatusOr<Tensor> status) {
                                                            ^
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In lambda function:
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1092:26: error: 'status' was not declared in this scope
       context->SetStatus(status.status());
                          ^~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In instantiation of 'void tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1095:21: error: cannot convert 'tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda(int)>' to 'tensorflow::contrib::mpi_collectives::{anonymous}::CommunicationDoneCallback {aka int}' in assignment
     record.callback = allgather_done_callback;
     ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1108:32: error: invalid use of 'auto'
       allgather_launch_callback();
       ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/move.h:57:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/stl_pair.h:59,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/stl_algobase.h:64,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/deque:60,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/queue:60,
                 from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:18:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits: In instantiation of 'class std::result_of<tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&()>':
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/functional:1913:9:   required by substitution of 'template<class _Functor, class, class> std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>; <template-parameter-1-2> = void; <template-parameter-1-3> = <missing>]'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1111:7:   required from 'void tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:2496:12: error: invalid use of incomplete type 'std::__result_of_impl<false, false, tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&>::type'
     struct result_of<_Functor(_ArgTypes...)>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:2291:12: note: declaration of 'std::__result_of_impl<false, false, tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&>::type'
     struct __result_of_success : __success_type<_Tp>
            ^~~~~~~~~~~~~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In instantiation of 'void tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1111:7: error: no matching function for call to 'stream_executor::Stream::ThenDoHostCallback(tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&)'
       stream->ThenDoHostCallback(allgather_launch_callback);
       ^~~~~~
In file included from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:31:0:
./tensorflow/stream_executor/stream.h:1987:11: note: candidate: stream_executor::Stream& stream_executor::Stream::ThenDoHostCallback(std::function<void()>)
   Stream &ThenDoHostCallback(std::function<void()> callback);
           ^~~~~~~~~~~~~~~~~~
./tensorflow/stream_executor/stream.h:1987:11: note:   no known conversion for argument 1 from 'tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>' to 'std::function<void()>'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In instantiation of 'void tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1095:21: error: cannot convert 'tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda(int)>' to 'tensorflow::contrib::mpi_collectives::{anonymous}::CommunicationDoneCallback {aka int}' in assignment
     record.callback = allgather_done_callback;
     ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1108:32: error: invalid use of 'auto'
       allgather_launch_callback();
       ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/move.h:57:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/stl_pair.h:59,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/stl_algobase.h:64,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/deque:60,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/queue:60,
                 from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:18:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits: In instantiation of 'class std::result_of<tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&()>':
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/functional:1913:9:   required by substitution of 'template<class _Functor, class, class> std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>; <template-parameter-1-2> = void; <template-parameter-1-3> = <missing>]'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1111:7:   required from 'void tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:2496:12: error: invalid use of incomplete type 'std::__result_of_impl<false, false, tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&>::type'
     struct result_of<_Functor(_ArgTypes...)>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:2291:12: note: declaration of 'std::__result_of_impl<false, false, tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&>::type'
     struct __result_of_success : __success_type<_Tp>
            ^~~~~~~~~~~~~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In instantiation of 'void tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1111:7: error: no matching function for call to 'stream_executor::Stream::ThenDoHostCallback(tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&)'
       stream->ThenDoHostCallback(allgather_launch_callback);
       ^~~~~~
In file included from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:31:0:
./tensorflow/stream_executor/stream.h:1987:11: note: candidate: stream_executor::Stream& stream_executor::Stream::ThenDoHostCallback(std::function<void()>)
   Stream &ThenDoHostCallback(std::function<void()> callback);
           ^~~~~~~~~~~~~~~~~~
./tensorflow/stream_executor/stream.h:1987:11: note:   no known conversion for argument 1 from 'tensorflow::contrib::mpi_collectives::MPIAllgatherOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>' to 'std::function<void()>'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In instantiation of 'void tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1001:21: error: cannot convert 'tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda(int)>' to 'tensorflow::contrib::mpi_collectives::{anonymous}::CommunicationDoneCallback {aka int}' in assignment
     record.callback = allreduce_done_callback;
     ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1014:32: error: invalid use of 'auto'
       allreduce_launch_callback();
       ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/move.h:57:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/stl_pair.h:59,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/stl_algobase.h:64,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/deque:60,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/queue:60,
                 from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:18:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits: In instantiation of 'class std::result_of<tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&()>':
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/functional:1913:9:   required by substitution of 'template<class _Functor, class, class> std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>; <template-parameter-1-2> = void; <template-parameter-1-3> = <missing>]'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1017:7:   required from 'void tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:2496:12: error: invalid use of incomplete type 'std::__result_of_impl<false, false, tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&>::type'
     struct result_of<_Functor(_ArgTypes...)>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:2291:12: note: declaration of 'std::__result_of_impl<false, false, tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&>::type'
     struct __result_of_success : __success_type<_Tp>
            ^~~~~~~~~~~~~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In instantiation of 'void tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1017:7: error: no matching function for call to 'stream_executor::Stream::ThenDoHostCallback(tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&)'
       stream->ThenDoHostCallback(allreduce_launch_callback);
       ^~~~~~
In file included from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:31:0:
./tensorflow/stream_executor/stream.h:1987:11: note: candidate: stream_executor::Stream& stream_executor::Stream::ThenDoHostCallback(std::function<void()>)
   Stream &ThenDoHostCallback(std::function<void()> callback);
           ^~~~~~~~~~~~~~~~~~
./tensorflow/stream_executor/stream.h:1987:11: note:   no known conversion for argument 1 from 'tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::GpuDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>' to 'std::function<void()>'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In instantiation of 'void tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1001:21: error: cannot convert 'tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda(int)>' to 'tensorflow::contrib::mpi_collectives::{anonymous}::CommunicationDoneCallback {aka int}' in assignment
     record.callback = allreduce_done_callback;
     ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1014:32: error: invalid use of 'auto'
       allreduce_launch_callback();
       ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/move.h:57:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/stl_pair.h:59,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/bits/stl_algobase.h:64,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/deque:60,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/queue:60,
                 from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:18:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits: In instantiation of 'class std::result_of<tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&()>':
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/functional:1913:9:   required by substitution of 'template<class _Functor, class, class> std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>; <template-parameter-1-2> = void; <template-parameter-1-3> = <missing>]'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1017:7:   required from 'void tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]'
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:2496:12: error: invalid use of incomplete type 'std::__result_of_impl<false, false, tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&>::type'
     struct result_of<_Functor(_ArgTypes...)>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:2291:12: note: declaration of 'std::__result_of_impl<false, false, tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&>::type'
     struct __result_of_success : __success_type<_Tp>
            ^~~~~~~~~~~~~~~~~~~
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc: In instantiation of 'void tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]':
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1130:1:   required from here
tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:1017:7: error: no matching function for call to 'stream_executor::Stream::ThenDoHostCallback(tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>&)'
       stream->ThenDoHostCallback(allreduce_launch_callback);
       ^~~~~~
In file included from tensorflow/contrib/mpi_collectives/kernels/mpi_ops.cc:31:0:
./tensorflow/stream_executor/stream.h:1987:11: note: candidate: stream_executor::Stream& stream_executor::Stream::ThenDoHostCallback(std::function<void()>)
   Stream &ThenDoHostCallback(std::function<void()> callback);
           ^~~~~~~~~~~~~~~~~~
./tensorflow/stream_executor/stream.h:1987:11: note:   no known conversion for argument 1 from 'tensorflow::contrib::mpi_collectives::MPIAllreduceOp<Device>::ComputeAsync(tensorflow::OpKernelContext*, tensorflow::AsyncOpKernel::DoneCallback) [with Device = Eigen::ThreadPoolDevice; tensorflow::AsyncOpKernel::DoneCallback = std::function<void()>]::<lambda()>' to 'std::function<void()>'

On another note the installation instructions are not helpful if someone uses different distro other than ubuntu.
Also I've noticed that during the configuration if you set up option to compile with mpi support then there is a problem in linking the correct files. The configure.py sript looks at /usr/lib/libmpi.so but my installation is located at /usr/lib/openmpi/libmpi.so which I had to configure manually.
Now for the errors that are occurring dose anyone have any idea why do we get them?
My baze version is 0.12 the latest release is 0.13? Does that have to do anything or is the gcc version. I have installed on my system 7 and version 6 but the error that I get are from compiling with version 6.
I hope someone from the dev team can shed some light?

I am afraid I do not have a very helpful response to your problem too, but MPI support and contrib folder are also community supported. If you can find a fix, we are happy to review and merge. But it is not likely for us to find the cycles and fix this ourselves.
For your comment about installation instructions, thanks for your feedback, it is very helpful. This has been mostly because we use ubuntu, and we have not tried many things on other distros. We are slowly trying to make things more distro independent, but as we are mostly ubuntu/debian users, it is usually difficult to see for us. We are happy to discuss any of your concerns, and if you have proposed fixes, I am happy to review them for documentation, too.

@gunan Thank you for your prompt reply. If u don't mind me asking the binary wheels that u guys provide are they built with or without mpi support?

As far as I know they are without MPI support.
Adding @av8ramit and @case540 to confirm

Also pretty sure they are without MPI support.

@gunan & @case540 thank you! I believe that the error that I'm facing must have to do sth with older c/c++ syntax and newer compiler, at least that's the only thing that I can infer from the error output:
error: 'se' does not name a type
 using StatusOr = se::port::StatusOr<T>;

But requires further investigation...

@kirk86 u just need to change se to stream_executor, and the mpiops.cc just complies successfully. Looks like someone shortened the name of stream_executor as se, and unfortunately the se was deleted in newer code.
check the file //tensorflow/stream_executor/lib/statusor.h

@ghostindex good catch mate. I confirm that indeed changing se to stream_executor did solve the problem, as you said someone apparently tried to use a shortened version but without linking that somehow to the original namespace.


Update Martian.tmTheme

This should fix the theme's presentation on the website preview.
Thanks!

thank you


Unable to use Windows Auth on a Single Page App due to Antiforgery token being incorrect

Issue
I am trying to use the Microsoft.AspNetCore.ApiAuthorization.IdentityServer sample of creating a SPA together with IdentityServer, running against a oidc source works great but when attempting to use Windows Auth I get a 400 error, which turns out to be because a AntiforgeryValidationException is thrown with the error message The provided antiforgery token was meant for a different claims-based user than the current user.
I have been trying to find a way to disable the antiforgery validation to see if this would work in that case but have been unable to find a way around it (and I assume that should really be enabled).
I am running IIS Express as my own user so it should have access to verify my login.
I hope that I correctly identified this as an issue with IdentityServer (as the login page is just the quickstart ui pages running) and not a issue that belong with ApiAuthorization, if I was wrong I apologize.
Repro

Use dotnet new react -o <output_directory_name> -au Individual to create a react SPA application. See https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity-api-authorization?view=aspnetcore-3.0
Enable Windows Auth

services.Configure<IISServerOptions>(iis =>
            {
                iis.AuthenticationDisplayName = "Windows";
                iis.AutomaticAuthentication = false;
            });```

Enable windows auth in IIS Express
Debug site,  stopping on all exceptions. try to login using windows auth. Note the exception.

Relevant parts of the log file
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/1.1 POST https://localhost:44385/Identity/Account/ExternalLogin?returnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DHimalia2%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A44385%252Fauthentication%252Flogin-callback%26response_type%3Dcode%26scope%3DHimalia2API%2520openid%2520profile%26state%3D2e07cf0192664d70b1a915e7d1881484%26code_challenge%3DFG2cbwTwPd3vDZV_nPxjSiMUe26-dcSQV4wZRtW2Yu4%26code_challenge_method%3DS256%26response_mode%3Dquery application/x-www-form-urlencoded 199
Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware: Information: No CORS policy found for the specified request.
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executing endpoint '/Account/ExternalLogin'
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker: Information: Route matched with {page = "/Account/ExternalLogin", area = "Identity", action = "", controller = ""}. Executing page /Account/ExternalLogin
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker: Information: Executing handler method Microsoft.AspNetCore.Identity.UI.V4.Pages.Account.Internal.ExternalLoginModel.OnPost - ModelState is Invalid
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker: Information: Executed handler method OnPost, returned result Microsoft.AspNetCore.Mvc.ChallengeResult.
Microsoft.AspNetCore.Mvc.ChallengeResult: Information: Executing ChallengeResult with authentication schemes (Windows).
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker: Information: Executed page /Account/ExternalLogin in 69.03540000000001ms
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint '/Account/ExternalLogin'
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 129.8761ms 401
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/1.1 POST https://localhost:44385/Identity/Account/ExternalLogin?returnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DHimalia2%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A44385%252Fauthentication%252Flogin-callback%26response_type%3Dcode%26scope%3DHimalia2API%2520openid%2520profile%26state%3D2e07cf0192664d70b1a915e7d1881484%26code_challenge%3DFG2cbwTwPd3vDZV_nPxjSiMUe26-dcSQV4wZRtW2Yu4%26code_challenge_method%3DS256%26response_mode%3Dquery application/x-www-form-urlencoded 199
Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware: Information: No CORS policy found for the specified request.
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executing endpoint '/Account/ExternalLogin'
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker: Information: Route matched with {page = "/Account/ExternalLogin", area = "Identity", action = "", controller = ""}. Executing page /Account/ExternalLogin
Exception thrown: 'Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException' in Microsoft.AspNetCore.Antiforgery.dll
The provided antiforgery token was meant for a different claims-based user than the current user.

That's a question for Microsoft. @javiercn

And best asked on the aspnetcore repo.
Basically Windows Auth is special, annoyingly so. Trying to treat it like any other auth type doesn't work. Adding in a SPA app to this makes it worse. If you want Windows Auth in a SPA then don't use the Identity Server templates, the SPA needs to be dedicated to just Windows auth.

This is only partially true - our default UI for IdentityServer has some additional code to make Windows authN behave like any other external authN mechanism
https://github.com/IdentityServer/IdentityServer4/issues/3819
and
https://github.com/IdentityServer/IdentityServer4/blob/master/src/IdentityServer4/host/Quickstart/Account/ExternalController.cs#L148-L193
Maybe thr ASP.NET Identity UI needs something comparable.

Closing because this is about the MS integration. Use our raw APIs to get the full feature set.


ModuleNotFoundError: No module named 'tensorflow.compiler.tf2tensorrt'

Hello.
I have created a small python application using tensorflow 2.2.0 and can run it with no problem using python 3.7.4
Then I use pyinstaller to make a package of my project.
But when I try to run pyinstaller compiled version, I get this error (line 14 is "import tensorflow as tf").
Traceback (most recent call last):
  File "test_wx1.py", line 14, in <module>
  File "/usr/local/lib/python3.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/__init__.py", line 41, in <module>
  File "/usr/local/lib/python3.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/__init__.py", line 74, in <module>
  File "/usr/local/lib/python3.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/ops/standard_ops.py", line 117, in <module>
  File "/usr/local/lib/python3.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/compiler/tensorrt/__init__.py", line 22, in <module>
  File "/usr/local/lib/python3.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/compiler/tensorrt/trt_convert.py", line 79, in <module>
  File "tensorflow/python/util/lazy_loader.py", line 62, in __getattr__
  File "tensorflow/python/util/lazy_loader.py", line 45, in _load
  File "importlib/__init__.py", line 127, in import_module
ModuleNotFoundError: No module named 'tensorflow.compiler.tf2tensorrt'

I cannot find any information Googling, so maybe you could help?
Or maybe this is solely pyinstaller's responsibility and I should ask them?

@LumaRay,
In order to expedite the trouble-shooting process, could you please provide the complete code to reproduce the issue reported here.
Also, please check this thread and let us know if it helps. Thanks!

@amahendrakar,
Well, I tried narrowing down my code and came to a conclusion that in order to reproduce you need just to create any python file and put a single line in it:
import tensorflow as tf
Sorry, I could not make any use of the link you gave me.
I use PyInstaller 3.6 and setuptools 44.1.1

I'm having the same issue using PyInstaller 3.6 and setuptools 49.2.0

In my case, I am abel to make it work by creating custom hook file for tensorflow as below:
test.py -> test.zip
hook-tensorflow.py -> hook-tensorflow.zip
Copy hook-tensorflow.py to ./hooks/
pyinstaller test.py --additional-hooks-dir ./hooks/

In my case, I am able to make it work by creating custom hook file for tensorflow as below:
test.py -> test.zip
hook-tensorflow.py -> hook-tensorflow.zip

Copy hook-tensorflow.py to ./hooks/
pyinstaller test.py --additional-hooks-dir ./hooks/

Thank you so much for this. In my particular case, your hook fixed my issue!

I had the same problem on CentOS 7 where line 12 in pfexplorer.py  is "import tensorflow as tf".
Tensorflow 2.3.0 (CPU & GPU)
Python 3.6.9
CUDA10.1
TensorRT<IP_ADDRESS>
/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py:493: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
  exec(bytecode, module.__dict__)
2020-10-21 15:10:35.535785: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
Traceback (most recent call last):
  File "test.py", line 3, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "src/launcher.py", line 23, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "src/pfexplorer.py", line 12, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/__init__.py", line 41, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/__init__.py", line 47, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/keras/__init__.py", line 27, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/keras/models.py", line 27, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/keras/engine/sequential.py", line 27, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/keras/layers/__init__.py", line 122, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/keras/layers/core.py", line 45, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/keras/layers/ops/core.py", line 26, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/ops/standard_ops.py", line 117, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/compiler/tensorrt/__init__.py", line 22, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "tensorflow/python/compiler/tensorrt/trt_convert.py", line 79, in <module>
  File "tensorflow/python/util/lazy_loader.py", line 62, in __getattr__
  File "tensorflow/python/util/lazy_loader.py", line 45, in _load
  File "importlib/__init__.py", line 126, in import_module
ModuleNotFoundError: No module named 'tensorflow.compiler.tf2tensorrt'
[393] Failed to execute script test

In my case, I am able to make it work by creating custom hook file for tensorflow as below:
test.py -> test.zip
hook-tensorflow.py -> hook-tensorflow.zip

Copy hook-tensorflow.py to ./hooks/
pyinstaller test.py --additional-hooks-dir ./hooks/

Could you explain a little more on the hook file? I dont have much experience with that.  Thank you so much.

@LumaRay
Is this still an issue ? It looks like you are using an older Version of Tensorflow . Can you please try to  use Latest Version 2.7.0 and let us know if it helps? Thanks!


Selected option title not correctly displayed in V5

🐛 Bug Report
When the new select component is closed, the value displayed comes from the default values (eg 'Option 1', 'Option 2') not those provided by the user.
To Reproduce

Copy simple select but change the title of the SelectItems to something "React", "Angular", "Something else"
Load the component and select "Angular".
The value displayed when the select closes is "Option 2"

Expected behavior

The value displayed when the select closes should be "Angular"

Link to runnable example or repository (highly encouraged)
https://codesandbox.io/s/gallant-grass-j0tw4?file=/src/App.js
UI Kitten and Eva version

Package
Version

@eva-design/eva
^2.0.0-alpha.1

@ui-kitten/components
^5.0.0-alpha.1

Mentioned in the docs


[Paginator] Add jump-to-item functionality

Feature Description
Bug, feature request, or proposal:
Feature request
What is the expected behavior?
To be able to jump to a specific item from the dataSource.
If MatSort applied, paginator should consider it.
It should also scroll to this element.
What is the current behavior?
Absence.
What is the use-case or motivation for changing an existing behavior?
I have a table with say ten elements per page, I have 20-30 pages. When I interact with source item not on the table, I want to update view in the table.
Currently I do it like this:
const sortedData = this.tableDataSource.sortData(this.tableDataSource.data, this.tableDataSource.sort);
const itemIndex = sortedData.findIndex(x => x.id === item.id);
const pageSize = this.tableDataSource.paginator.pageSize;
const pageIndex = itemIndex < pageSize - 1 ? 0 : Math.floor(itemIndex / pageSize);

// Should call both: pageIndex and page.emit
this.tableDataSource.paginator.pageIndex = pageIndex;
this.tableDataSource.paginator.page.emit({
          pageIndex,
          pageSize,
          length: this.tableDataSource.paginator.length,
});

// Wait for the Paginator to be updated and rendered
// There's an event: 'page', but it's called to early (not rendered yet)
// This is not reliable
setTimeout(() => {
          const querySelector = `[id='${item.id}']`;
          this.perfectScrollbar.directiveRef.scrollToElement(querySelector, null, 1000); // TODO: offset the height of sticky header
}, 1000);

Use Case
No response

It seems the utility you built is great for what you are trying to accomplish. I don't expect to add this functionality to our library anytime soon, especially since the paginator is intentionally unaware of the data presented


Increase the timeout for //test/cpp/end2end:rls_end2end_test

Recent runs of //test/cpp/end2end:rls_end2end_test@poller=epoll1[k8-fastbuild] showed the test RlsEnd2endTest/Basic is flaky. The error message shows "Deadline Exceeded". Increasing the timeout by 10x may help relieve the flakiness.

https://source.cloud.google.com/results/invocations/125b3407-6a46-412c-af21-591af460d06e/targets
https://source.cloud.google.com/results/invocations/f75ca41c-1482-45d5-b566-f252108fd999/targets

Closing this since there is a newer duplicate #32222.


Validate tool unable to handle large SBOMS

It appears, to be confirmed, that the SBOM validate tools are unable to handle large SBOMs (>1000 nodes).

A problematic file is attached to this issue. More examples are also available with same error.
keycloak-13.0.1.zip-too-big.txt

Now that I moved this over, I realize this is a duplicate of #306
I'll copy over some of the comments and close this issue.

I did a some experimentation and found the issue is really https://github.com/spdx/Spdx-Java-Library/issues/40
If I comment out the check for removing in-use SPDX ID's, the time it take to verify keycloak-13.0.1.zip-too-big goes from 1:42 down to less than 6 seconds on my machine - a 16X improvement in performance.


AMBARI-23072. Handle some configs moved

@swagle can you +1 again. I created the change without fixes of Oliver so it does not conflict.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/806/
Test FAILed.
Test FAILured.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/809/
Test FAILed.
Test FAILured.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/810/
Test PASSed.


Cluster autoscaler doc - part 1

cc: @piosz @jszczepkowski @fgrzadkowski

I think that this PR should be against branch release-1.3, not master.

It should also be made in master - the feature will not go away in 1.4. I can create another one for 1.3.

My understanding is that master is the current release, i.e. 1.2. Later 1.3 will become master, master will become 1.2 and we'll create new branch for 1.4

Yes, this should have been opened against the release-1.3 branch, but you're not alone in the confusion here.

@johndmulhausen Can we change this PR to be against 1.3 release and merge it now, instead of waiting for the release?

Filip: We are asking the PR authors to do the rebase.
To rebase your work on 1.3 do something like this starting in the branch that you used for this PR:
COMMITS=$(git log master.. | grep commit | cut -f 2 -d " " | tac)
BR=$(git rev-parse --abbrev-ref HEAD)
git fetch upstream
git checkout upstream/release-1.3
git checkout -b $BR-1.3
for c in $COMMITS
do
  git cherry-pick $c; done
done
git push

@fgrzadkowski Yes, if you rebase this against 1.3 we can merge it now! Thanks to @erictune for providing instructions

Unfortunately it seems that we cannot do this under this PR (or maybe can someone change the target branch of this PR). Please reopen #684 which is for the correct branch.

@mwielgus Reopened PR. Merging that one. Closing this one. :)


File location for snippets

Just wondering if maybe at some point (if it's at all possible with how this extension is designed), snippets should be saved to somewhere other than the brackets.json file? I have some pretty large snippets and I'm thinking over time that file could get pretty large and it would be nice to have these saved separately.
Also when you remove the extension should your snippets be removed from brackets.json? I notice a lot of extensions leave behind their settings, probably not a big deal, just wondering what the Brackets best practice is?

Hi onetrev, as you mentioned saving large pieces of data to brackets.json would make it a little bit dirty, and I also wonder if there are any other better solutions as I see many other extensions do the same way.
Maybe I should save the data to a independent file (yaml format for better human readable) instead, how about that?

Hi, on the same direction about managing snippets, I'm trying to sync my two machines with the same snippets, and I was wondering if a solution using dropbox to sync the snippet files is viable.

@chuyik ... Yes some sort of independent file would be great I think. Anything outside of brackets.json really is the key. Also this separate file may double as completing your To Do of export/import?

Hi guys!
I choose to do the import/export rather than separate file, and please check out the new version!
Since Brackets would delete all files of the extension and override whenever extension updates, and I could not come up with a safe position to store the file elsewhere, so I think import/export might be better.
@loucimj If you want to sync the files between the machines, you could sync the brackets.json file. For more instructions please check out: Migrating or Syncing Brackets Configuration


Refactor Library page

The library component would forget what the query and tagIds were when navigating away from the /library page. This PR lifts the query and tagIds state to the reducer,  which gives it purpose to live there.
Split the responsibilities of the library page to their respective components, which reduces the complexity and increases the efficiency.

 remove library from the store state


update wait_backend_ready method

Update wait_backend_ready() method to detect a more accurate time when the VM is ready to receive commands, and avoid possible ssh errors #516
Developer's Certificate of Origin 1.1
   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@JosepSampe i was too fast to merge it...with this code things doesn;t work for me
Traceback (most recent call last):
  File "/Users/gilv/Dev/ibm-pywren-internal/pywren-tester/pywrencos/LithopsMultipleBackendTest.py", line 38, in <module>
    run_test("standalone", "ibm_vpc", cf_runtime, [1])
  File "/Users/gilv/Dev/ibm-pywren-internal/pywren-tester/pywrencos/LithopsMultipleBackendTest.py", line 19, in run_test
    futures = pw.map(my_map_function, iterdata)
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/site-packages/lithops/executors.py", line 233, in map
    runtime_meta = self.invoker.select_runtime(job_id, runtime_memory)
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/site-packages/lithops/invokers.py", line 107, in select_runtime
    runtime_meta = self.compute_handler.create_runtime(self.runtime_name)
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/site-packages/lithops/standalone/standalone.py", line 289, in create_runtime
    runtime_meta = json.loads(out)
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

It fails here
            out = backend.get_ssh_client().run_remote_command(backend.get_ip_address(), cmd)
            runtime_meta = json.loads(out)

@JosepSampe i was too fast to merge it...with this code things doesn;t work for me
Traceback (most recent call last):
  File "/Users/gilv/Dev/ibm-pywren-internal/pywren-tester/pywrencos/LithopsMultipleBackendTest.py", line 38, in <module>
    run_test("standalone", "ibm_vpc", cf_runtime, [1])
  File "/Users/gilv/Dev/ibm-pywren-internal/pywren-tester/pywrencos/LithopsMultipleBackendTest.py", line 19, in run_test
    futures = pw.map(my_map_function, iterdata)
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/site-packages/lithops/executors.py", line 233, in map
    runtime_meta = self.invoker.select_runtime(job_id, runtime_memory)
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/site-packages/lithops/invokers.py", line 107, in select_runtime
    runtime_meta = self.compute_handler.create_runtime(self.runtime_name)
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/site-packages/lithops/standalone/standalone.py", line 289, in create_runtime
    runtime_meta = json.loads(out)
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/gilv/.pyenv/versions/3.8.5/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

It fails here
            out = backend.get_ssh_client().run_remote_command(backend.get_ip_address(), cmd)
            runtime_meta = json.loads(out)

@JosepSampe I revered the PR, but i can't reopen original one. Can you submit PR again? And what do you think about error i get?

@JosepSampe I revered the PR, but i can't reopen original one. Can you submit PR again? And what do you think about error i get?

@JosepSampe but i liked your new code, just something get broken..the previous ssh code with that 20 sec sleep is very bad. may be extend it from 2 sec to a bit larger value?

@JosepSampe but i liked your new code, just something get broken..the previous ssh code with that 20 sec sleep is very bad. may be extend it from 2 sec to a bit larger value?

@gilv Ok, no problem. I will check it and open another PR. Thanks

@gilv Ok, no problem. I will check it and open another PR. Thanks


Added Requested Fields Issue #1791

I rule and have completed some work on Case Manager that's ready for review!
Added requested fields to data entry form
This pull request makes the following changes:

added Language field
added Voicemail preference field
added Resolved without fund field
added Referred to clinic field
added Completed ultrasound field

(If there are changes to the views, please include a screenshot so we know what to look for!)
It relates to the following issue #s:
1791

I've made the requested changes to the voicemail_options and related files. I was unsure about the tests, because only two of the added fields already appear in the patient_information.html.erb file to check for. I thought adding them might be outside of the scope of the issue, so I didn't want to mess with it.

Per discussion, we're going to handle the tests in a separate issue. Thank you very much for grinding this out @andrewrosario , you nailed it!


Connection lost after HTTPS update

Senec made an update to theirs System and disabled local http access, forcing https access. Seems that the connection of the integration to the local senec server is no more possible after this update to HTTPS.

Duplicate of #47


Trying to connect to different MQTT broker than in the demo

1. SDK version（SDK 版本）
{
CSDTK 4.2 ($Revision: 43828 $)
SDK V2112
}

2. In what kind of operation problems appear, and how to reproduce the problem ?（什么样的操作步骤问题会出现，是否是稳定复现，如何复现问题？）
{
I'm trying to use the MQTT to connect with AWS IOT but cannot connect to the server. No connection is established.
I am using information from this post to setup my MQTT connection settings  https://github.com/Azure/azure-iot-sdk-c/issues/660
I've attached my files i'm using.
mqtt_ssl_aws.zip
Getting my CA certificate from here
https://docs.aws.amazon.com/iot/latest/developerguide/managing-device-certs.html
The device certificate and private keys are here:
Certificate and Keys.zip
This is my tracer ouput...

Sometimes the tracer will also ouput this error after network connection like above.

}

This problem was due to my policy linked to the certificate not allowing the connection.
The Qos should also be 0 or 1.

Hi,
I also have a problem connecting to AWS:
"MQTT connect to broker fail. Error: 256"
With MQTT-Fx I can connect. But not with the the A9G demo script. I changed the QoS levels from 2 to 1. But it still doesn't work. What else has to be changed?

I have it running now, by making these changes:
change
ci.ssl_min_version   = MQTT_SSL_VERSION_SSLv3;
to
ci.ssl_min_version   = MQTT_SSL_VERSION_TLSv1_2;
delete:
ci.entropy_custom    = "GPRS_A9";
ci.will_qos = 2;
ci.will_topic = "will";
ci.will_retain = 1;
memcpy(strstr(willMsg,"GPRS")+5,imei,15);
ci.will_msg = willMsg;


Incompatible with Big Sur / 11.0.1

This currently does not function on BigSur.
Initial issue during execution @ line 140
`# Check the OS version.
Big Sur is 11.0.#, validation will fail due to being below required version. Similar logic is used elsewhere in the script and fails as well.

@erishiamu
@kc9wwh
This ticket has been closed but I do not see a fix implemented. Is there a fix?


Modals not vertically centered on mobile browsers

Bug report 🐞
Version & Environment

Version of browser
Version of geist-ui/react

Version 84.0.4147.135 (Official Build) (64-bit)
^1.8.0-canary.7
Expection
The behavior I expect is ...
On mobile browers (iOS) Safari, Chrome, modals should be vertically centered.
Actual results (or Errors)
Modals are not vertically centered - due to the mobile top and bottom menu bars? Below is an example illustrating this behavior:

To reproduce: open https://react.geist-ui.dev/en-us/components/modal on iOS Safari, click on "Open Modal". Top margin is taller compared to bottom margin.

This must be the result of the browser panel(s). The same effect can be seen in Chrome. But since Chrome doesn't have a bottom accessibility panel, the effect is not so prominent.

Makes sense — might be same reason why 100vh doesn't work on mobile.
On Mon, Aug 31, 2020 at 8:37 AM, Harsh Karande <<EMAIL_ADDRESS>> wrote:

This must be the result of the browser panel(s). The same effect can be
seen in Chrome. But since Chrome doesn't have a bottom accessibility
panel, the effect is not so prominent.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub (
https://github.com/geist-org/react/issues/380#issuecomment-683856680 ) , or
unsubscribe (
https://github.com/notifications/unsubscribe-auth/ACRBWAO2JVIFK6VYIAOYJF3SDO7VPANCNFSM4QPLXA5Q
).

It looks like a problem caused by height, and I'm following up.

This is a compatibility issue, but there is no good solution at present. I've refactored some of the layout logic of Modal to make sure it works in a variety of environments, fortunately, there is no change in the user API.
You can see this change here: #382 , I added a new example to the document, and you can see how the changes work on your device, If everything goes well, please let me know that I will merge and release a new version.

Just tested it out on my own device, it's now vertically centered even if bottom menu bar is present or not. The only issue is that on Safari/Chrome, the bottom menu bar is present on page load, modal is fine; however, once I scroll down the bottom menu bar disappears, so the modal is no longer vertically centered.
But this is just a minor edge case, overall it's a lot better — thanks for improving it!
On Wed, Sep 02, 2020 at 1:33 AM, witt <<EMAIL_ADDRESS>> wrote:

This is a compatibility issue, but there is no good solution at present.
I've refactored some of the layout logic of Modal to make sure it works in
a variety of environments, fortunately, there is no change in the user
API.
You can see this change here: #382 (
https://github.com/geist-org/react/pull/382 ) , I added a new example to
the document, and you can see how the changes work on your device, If
everything goes well, please let me know that I will merge and release a
new version.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub (
https://github.com/geist-org/react/issues/380#issuecomment-685444728 ) , or
unsubscribe (
https://github.com/notifications/unsubscribe-auth/ACRBWANATDKOFWATNRGVXHDSDX7OBANCNFSM4QPLXA5Q
).


proposal: x/sync/errgroup: add (Try?)Go variants that return channel closed when f terminates

Proposal Details
Add the following to errgroup.Group (note: I don't really like the names, bikeshedding is welcome):
// GoChan is like Go, but returns a channel that is closed after f has returned.
func (g *Group) GoChan(f func() error) <-chan struct{}

// TryGoChan is like TryGo but, if f was started, it returns a non-nil channel like GoChan.
func (g *Group) TryGoChan(f func() error) <-chan struct{}

The channel returned by these variants is closed after f terminates and, crucially, after cancel has been called on the context (if necessary).
I just sketched out the idea here (untested! it's just to discuss the potential semantics).
My main usecase for this is in the following (simplified) scenario:
ch := eg.GoChan(func() error {
  // ...
})

eg.Go(func() error {
  // do something ...

  select {
  case <-ctx.Done():
    return ctx.Err()
  case <-ch:
  }

  // do something else, but only after the first function has completed
})

(this example above is extremely simplified, in reality there are often many more calls, sometimes not even known statically, so manually find an order becomes unwieldy fast)

Related Issues and Documentation

proposal: x/sync/errgroup: Additional goroutines should not be started after the context is cancelled #61611 (closed)
proposal: sync: add golang.org/x/sync/errgroup #57534

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)


DBZ-1966 Fix NPE during quarkus:dev operation of Outbox Extension

https://issues.redhat.com/browse/DBZ-1966

Hum, hum, seeing an NPE on CI in the outbox test now :(

Might have to try loading the resource via both ways and then raise a meaningful exception if it cannot be found?

Hi @gunnarmorling, that's what I ended up doing.  I honestly didn't expect fixing one to break the other mode of operation but from what I can gather this seems to work for both.

Applied; thx!


Implement better user permissions

Issue type
[X] Feature request
[ ] Bug report
[ ] Documentation

Environment

Python version:  3.7
Peering Manager version: master

Description
Currently Peering Manager manages permissions with only 2 levels:

user not logged in, read-only mode
user logged in, read/write mode

Improving the permissions management will able users to assign permissions based on what they want other users to do, like read-only or read and edit without add permission, etc…
This should be fairly easy to do since Django provides a feature to manage user permissions.

Implementation of this still needs some work:

Use permissions for all buttons allowing user to take actions
Define more permissions to control users accessing specific views (e.g. IX config view)


passing tests and name changes

This pull request includes several changes to improve the consistency and functionality of the case-based reasoning system. The main changes involve renaming variables for clarity, updating method signatures, and modifying the configuration and initialization processes.
Changes to CaseBase and Case Management:

casebased/components/casebase/casebase.py: Renamed the df variable to cases throughout the CaseBase class to improve clarity.
casebased/actors/adapter.py: Updated the adapt method to use cases instead of data for consistency with the new CaseBase variable names.

Changes to Similarity Measure:

casebased/components/similarity_measure/similarity.py: Updated the SimilarityMeasure class to accept a Configuration object in its constructor and modified related methods to use this configuration. [1] [2] [3] [4]

Changes to Vocabulary:

casebased/components/vocabulary/attribute.py: Corrected the data_type parameter in TargetAttribute and FeatureAttribute to use lists instead of tuples. [1] [2]
casebased/components/vocabulary/vocabulary.py: Modified the Vocabulary class to handle None values for features and targets, ensuring default empty lists are used. [1] [2]

Changes to Configuration:

casebased/config.py: Renamed k_algorithm to k_optimizer in the Configuration class to better reflect its purpose.

Changes to Tests:

tests/test_case_base_system.py: Updated test configurations to use the new Configuration class and variable names.
tests/test_similarity_measure.py: Adjusted tests to reflect changes in the SimilarityMeasure class and CaseBase initialization. [1] [2] [3] [4]
tests/test_vocabulary.py: Fixed the data_type parameter in TargetAttribute initialization.

This pull request includes several changes to improve the consistency and functionality of the case-based reasoning system. The main changes involve renaming variables for clarity, updating method signatures, and modifying the configuration and initialization processes.
Changes to CaseBase and Case Management:

casebased/components/casebase/casebase.py: Renamed the df variable to cases throughout the CaseBase class to improve clarity.
casebased/actors/adapter.py: Updated the adapt method to use cases instead of data for consistency with the new CaseBase variable names.

Changes to Similarity Measure:

casebased/components/similarity_measure/similarity.py: Updated the SimilarityMeasure class to accept a Configuration object in its constructor and modified related methods to use this configuration. [1] [2] [3] [4]

Changes to Vocabulary:

casebased/components/vocabulary/attribute.py: Corrected the data_type parameter in TargetAttribute and FeatureAttribute to use lists instead of tuples. [1] [2]
casebased/components/vocabulary/vocabulary.py: Modified the Vocabulary class to handle None values for features and targets, ensuring default empty lists are used. [1] [2]

Changes to Configuration:

casebased/config.py: Renamed k_algorithm to k_optimizer in the Configuration class to better reflect its purpose.

Changes to Tests:

tests/test_case_base_system.py: Updated test configurations to use the new Configuration class and variable names.
tests/test_similarity_measure.py: Adjusted tests to reflect changes in the SimilarityMeasure class and CaseBase initialization. [1] [2] [3] [4]
tests/test_vocabulary.py: Fixed the data_type parameter in TargetAttribute initialization.

Amazing 😍


Create a new "Finance" user role with their own Hypha view

Set up "is_finance" similar to "is_apply_staff". They should only have access to project part of Hypha.
They need a dashboard that shows a table of invoices that have been approved by staff but not by finance.
I think we can reuse the table that is shown on the staff dashboard. We have some updates for that table in another issue.
The project page, the invoices and reports, uploaded files (PDF invoices etc.) and the project communication tab.
They will mostly use Hypha to talk with staff via the communication tab when invoices need corrections.
UI Design Demo
https://user-images.githubusercontent.com/1899506/121546973-065b5800-ca0c-11eb-9683-f834448700a7.mp4
UI Designs
When the finance user logs in they see their dashboard - by default it shows the invoices that need to be reviewed.

If Yodit wants to see all the invocies, she clicks on "Show all invoices", which brings her to the next screen:
The view of "Show all invoices" -

If Yodit needs to see projects, she clicks on "Projects".
Project statuses shown in this view are for projects that have been funded, are being funded, or will be funded.

If Yodit the finance user needs to see a specific project, she clicks on the project name, e.g. Maya Summit, which brings her to the next screen:

We've added a "files tab" to the project view. This is shown for the finance user only. Here they see all the files that have been uploaded to Hypha that are related to the project. Adding a files tab is being handled by issue #2414.

Individuals currently working in our Finance Dept currently has the 'staff' role in WagTail.

[x] assign user to Finance role in WagTail Admin
[x] dashboard that shows a table of invoices that have been approved by staff but not by finance.
[x] project page, the invoices and reports, uploaded files (PDF invoices etc.) and the project communication tab.


[ShopifyVM] Add schema analyzer using blue to function-runner

#gsd37875
Addresses:

https://github.com/Shopify/script-service/issues/7502

Description
Current scaling implementation: https://github.com/Shopify/shopify/pull/518219/files#diff-bef9ccfcca30dfc391c6ad9d0a3e0739bf8a2ab27e659473894e4e62d43bad08
We currently scale our function run limits based on the directive scaleLimits with an argument rate on cartLines. We scale by the length of the field. We multiply the directive rate found on the fields definition, by the length of that fields (seem by either array length or string length) to determine how much to scale limits our default limits by.
This PR adds an analyzer that will determine the maximum scale factor from all fields with the scale limits directive on it.  We chose to use this implementation because we want to ability to add directives for scale limits of different fields in the future. Currently we only scale on cart lines.
Note: Currently have a few .graphql and json files used for testing, I will remove these before merging, but will keep in this PR for now incase anyone wants to tophat.
Run Commands:
See Scaled Limits
cargo run -- -f './tests/fixtures/build/js_function.wasm' -i './tests/fixtures/input/js_function_input_large_willnotmerge.json' -s='yolo-schema_willnotmerge.graphql' -q='yolo-query_willnotmerge.graphql'

Scaled limits arn't used if query or schema is not provided:
cargo run -- -f './tests/fixtures/build/js_function.wasm' -i './tests/fixtures/input/js_function_input_large_willnotmerge.json'

We will traverse the query alongside the input, and determine the scale factor.
Example Query:
query {
  cart {
    lines {
      quantity
    }
  }
}

Notes on Visitor implementation:
Initialization: An instance of ScaleLimits is created, initializing the value_stack with the entire input JSON. The path_stack and rates are initialized as empty. The path stack, will keep track of the current field we are visiting. The value stack will keep track of what part of the json we are focused on.  The rates hashmap will be used to track different rates (different fields with the directive).
Visiting cart Field: The visitor enters the cart field.

"cart" is pushed onto the path_stack.
The value_stack is updated to focus on the value of "cart" from the input JSON.

Visiting lines Field: The visitor moves to the lines field inside cart.

"lines" is pushed onto the path_stack.
The value_stack is updated to focus on the value of "lines".
The rate_for_field_definition function retrieves the scaling rate (0.005) for the lines field from the schema.
The scaling factor is calculated based on the length of the lines array.
The rates hashmap is updated with the path as the key and the calculated scaling increment as the value.

Final Output: After the traversal is complete, the into_output method of the Analyzer trait is called.

This method clamps the result between minimum and maximum scale factors (1.0 to 10.0).

After we call the analyzer, we then use that result when we display the output. I applied the same logic in showing red color for the usage when the run is over the limit, and regular text when it is within the limits. Limts are now calculated by multiplying the scaling rate determined by the analyzer, to the defaults.
Tophatting
Normal Cart:

With Scaled Limits:

cargo run -- -f './tests/fixtures/build/js_function.wasm' -i './tests/fixtures/input/js_function_input_large.json' -s='yolo-schema.graphql' -q='yolo-query.graphql'

These files no longest exist in this PR, but can copy them over from any the spin app.
When Query or Schema are not passed to function-runner

these are optional parameters for function runner
when they are not provided, we will use the defaults for determined the output of the limits

Made an update to address the comments around how we handle errors. I updated to use the anyhow error, and handle them with the following:
If both the query and schema are not provided to function runner, we will print a message to the user:

And continue as normal, and use the default limits when outputting in the benchmark section:

and if the query and schema are passed in, but we get an error at some point, the user will see the error message:

And still continue as normal.

And without errors, the scaled limits will be used in the Benchmarks section of function runner output. It will change the color of the related fields depending if its above or below the limit.


Release ModelMapper StandAlone package

eXpandFramework modules use the ModelAdaptor functionality to map/synchronize controls to the model.
The implementation is complex and based on controllers that are spawn across many modules, so it is very hard for users to utilize them in their own modules.
The new package should provide a very simple API for mapping/synchronizing any object to the model. Furthermore the new package should be platform agnostic and should generate only one assembly minimizing deployment cost.
As with other standalone modules once released should replace all related classes from  eXpandFramework main modules with minimum breaking change.
At the moment there is a ModelAdaptor context which is shared through all control maps. These does not make much sense and it should be moved as a child to each map.

The DevExpress.XAF repository includes commits that relate to this task:

Release ModelMapper StandAlone package #434

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.
If you do not use the Xpand.XAF.Modules directly but through an module of the main eXpandFramework module, you may wait for the bot to notify you again.
Thanks a lot for your contribution.

the ModelMapper is now integrated and documented at lab
https://github.com/eXpandFramework/DevExpress.XAF/tree/lab/src/Modules/ModelMapper
https://github.com/eXpandFramework/eXpand.lab/releases/tag/19.1.402.4

Currently the ModelMapper does not support the Visual Studio Model Editor. However you can use the XpandModelEditor found in the Xpand.VSIX package. Note that the XpandModelEditor is embedded and version agnostic so its one time only installation.

The DevExpress.XAF repository includes commits that relate to this task:

ModelMapper: documentation #434

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.
If you do not use the Xpand.XAF.Modules directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.
Thanks a lot for your contribution.

eXpand.lab release 19.1.402.5 includes commit that relate to this task:

Integrate ModelMapper #434
Integrate modelmapper #434

Please test if it addresses the problem. If you use nuget add our LAB NugetServer as a nuget package source in VS.
Thanks a lot for your contribution.

Closing issue for age. Feel free to reopen it at any time.
.Thank you for your contribution.


Where is the code for queries to get phrases searching score rank?

Nice to meet you , I am a newcomer to NLP and I am very intersted in your code , but I am not good at coding ,I havd tried a week to find the code where to get the score of query embedding and the phrases embedding , I have found many score but do not know which is I need .
I would appreciate it if you could answer this question，thanks for your time !
eval_phrase_retrieval.zip
eval_phrase_retrieval.zip

Hi @zhaozhengyu0328,
I guess you are searching for this code: https://github.com/princeton-nlp/DensePhrases/blob/9583883ea9390b0308e806c3e72fa5831afa445b/densephrases/index.py#L189-L218

@jhyuklee thank you !


Lack of hash -> Buffer interface

A noticeable gap in the APIs seems to be taking a hash and getting a buffer back.
The Scenario ... on the Archive.org gateway, we add a file to IPFS using the https..../api/v0/add"  interface (working with Kyle) and get back a multihash-base58 that could EITHER
a) hash of the raw bytes (on a small file) or
b) the IPLD (for a larger file that got sharded).
The problem is turning that hash back to bytes in the JS, we've been using block.get() to retrieve it, but of course that files on case b.
Kyle has suggested using files.get() but this runs into the API limitation that files.cat returns a stream, and I'm guessing that a lot of people using this end up writing code to convert that Stream back into a buffer (so it can be passed to a Blob).
If I understand the code in files.js (and its possible that I don't), the code in cat() already has the whole file in a Buffer, which it converts into a Stream, which the caller then has to convert back into a buffer.   Wouldn't it make a lot of sense to provide an API that allows returning it as a Buffer in the first place ?

If you use the files command (ipfs add) or files endpoint (/api/v0/add) to add a file, then if you wish to get the file back, you should always use the files command to retrieve the file, that can be either cat or get.

Kyle has suggested using files.get() but this runs into the API limitation that files.cat returns a stream, and I'm guessing that a lot of people using this end up writing code to convert that Stream back into a buffer (so it can be passed to a Blob).

It is very common pattern to buffer a stream with a module like http://npmjs.com/bl, nevertheless, I'm working on exposing two interfaces so that users do not have to. Track here https://github.com/ipfs/interface-ipfs-core/pulls

If I understand the code in files.js (and its possible that I don't), the code in cat() already has the whole file in a Buffer, which it converts into a Stream, which the caller then has to convert back into a buffer.

This is not the case, we stream it all the way.

Wouldn't it make a lot of sense to provide an API that allows returning it as a Buffer in the first place?

We will have both :) https://github.com/ipfs/interface-ipfs-core/pull/162

Thanks for addressing the buffering issue -I didn't know about BL - and of course the trouble was that writing a new pattern to me (stream buffering) had its own bugs, that were confounded by the nasty bug in JS-IPFS's file.get with short (single block) files.
The other half of this problem is that if you have a CIDv0 (such as returned by /api/v0/add) for example embedded in a string ipfs/QmTds3bVoiM9pzfNJX6vT2ohxnezKPdaGHLd4Ptc4ACMLa and you don't know that it was created by "ipfs add" its very hard to know HOW to fetchit.  In fact, due to the bug posted above there is actually NO way to fetch that particular string in a browser.
I've appended my current code to fetch a URL from IPFS. It is kluge upon kluge to work around that bug, and the API weakness of not knowing how to fetch.
async p_rawfetch(url, verbose) {
        /*
        Fetch some bytes based on a url of the form ipfs:/ipfs/Qm..... or ipfs:/ipfs/z....  .
        No assumption is made about the data in terms of size or structure, nor can we know whether it was created with dag.put or files.put or http api.

        Where required by the underlying transport it should retrieve a number if its "blocks" and concatenate them.
        Returns a new Promise that resolves currently to a string.
        There may also be need for a streaming version of this call, at this point undefined since we havent (currently) got a use case..

        TODO - there is still the failure case of short files like  ipfs/QmTds3bVoiM9pzfNJX6vT2ohxnezKPdaGHLd4Ptc4ACMLa
        TODO - added with http /api/v0/add/ but unretrievable on a browser (it retrieves below in Node).

        :param string url: URL of object being retrieved
        :param boolean verbose: True for debugging output
        :resolve buffer: Return the object being fetched. (may in the future return a stream and buffer externally)
        :throws:        TransportError if url invalid - note this happens immediately, not as a catch in the promise
         */
        if (verbose) console.log("IPFS p_rawfetch", url);
        if (!url) throw new Dweb.errors.CodingError("TransportIPFS.p_rawfetch: requires url");
        let cid = (url instanceof CID) ? url : TransportIPFS.url2cid(url);  // Throws TransportError if url bad

        try {
            let res = await this.ipfs.dag.get(cid);
            if (res.remainderPath.length)
                throw new Error("Not yet supporting paths in p_rawfetch"); //TODO-PATH
            let buff;
            if (res.value instanceof DAGNode) { // Its file or something added with the HTTP API for example, TODO not yet handling multiple files
                //console.log("Case a or b" - we can tell the difference by looking at (res.value._links.length > 0) but dont need to
                // as since we dont know if we are on node or browser best way is to try the file.get and if it fails try the block to get an approximate file);
                // Works on Node, but fails on Chrome, cant figure out how to get data from the DAGNode otherwise (its the wrong size)
                buff = await p_streamToBuffer(await this.ipfs.files.cat(cid), true);
                if (buff.length === 0) {    // Hit the Chrome bug
                    // This will get a file padded with ~14 bytes - 4 at front, 4 at end and cant find the other 6 !
                    // but it seems to work for PDFs which is what I'm testing on.
                    if (verbose) console.log("Kludge alert - files.cat fails in Chrome, trying block.get");
                    let blk = await this.promisified.ipfs.block.get(cid)
                    buff = blk.data;
                }
            } else { //c: not a file
                buff = res.value;
            }
            if (verbose) console.log("fetched ", buff.length)
            return buff;
        } catch (err) {
            console.log("Caught misc error in TransportIPFS.p_rawfetch");
            throw err;
        }
    }

By the way .. if anyone else is struggling with this, I'll keep a version of p_rawfetch updated to deal with current bugs in IPFS and Kludges around API issues, feel free to contact for a recent version.

The other half of this problem is that if you have a CIDv0 (such as returned by /api/v0/add) for example embedded in a string ipfs/QmTds3bVoiM9pzfNJX6vT2ohxnezKPdaGHLd4Ptc4ACMLa and you don't know that it was created by "ipfs add" its very hard to know HOW to fetch it. In fact, due to the bug posted above there is actually NO way to fetch that particular string in a browser.

Using the endpoint /api/v0/add will always use ipfs add, see https://ipfs.io/docs/api/#api-v0-add

Hi David - I think I'm not communicating the issues here.
a) You can't use files.add if you aren't working with a file - I've stopped using block.put, but I'm using dag.put if I'm storing a JSON object (not a file).
b) Once you receive a string of the form shown you have no way to know IF it was sent via api/v0/add=files.add OR dag.put, and retrieval fails if you use the wrong way to retrieve it.
c) That string was generated via /api/v0/add so it should be retrievable with jsipfs:files.get, but it fails anyway on Chrome (works in Node) (bug posted in js-ipfs Issue#1049 )
d) IF that hash was generated with block.put and you try and retrieve it with dag.get or files.get it fails in REALLY BAD WAYS - in a crash on some other IPFS thread that appears unrelated to the code. (I'm not using block.put any more, but that hash looks like a valid hash to retrieve)
These cases (Except for #c which is just a presumably fixable IPFS bug) are cases that can all occur BECAUSE there is no way to determine what kind of IPFS multihash you've got, and no IPFS way to fetch it when all you have is it embedded in a URL, hence the kludgy code I posted above.

Got it! Thanks for expanding more on the issues that you were pointing.

a) + b)

That is correct and I believe that it shouldn't be considered a bug, we just need to have better learning materials.
A File is an IPLD Graph and you can get and add files through the Files API
An IPLD node is one single object and can be accessed by the DAG API
A block is a serialized IPLD node.

c)

Working on it! https://github.com/ipfs/interface-ipfs-core/pull/162

d)

Agreed, it should provide a better error to the user. Will look into it. It would be stellar if you could PR with tests showing those errors.

b: I think should be considered a bug, IPFS talks a lot about self-describing identifiers, but at the basic level the main outward facing identifier of IPFS does not appear to be self-describing, i.e. if you have a CID1 /ipfs/Q.... or a CID2 /ipfs/z....  then you don't know how to fetch it because it does not tell you whether its a File, an IPLDnode/DAG or a Block. You need out-of-band info as to what to expect, which is contrary to the essence of something being self-describing.
Without knowing what you have, you have to

try and retrieve it with dag.get
-- (and hope its not a block which would crash the IPFS thread in the background so you can't catch it (bug#d),
then look to see if its an IPLD
in which case re-retrieve it with files.cat,
-- and also do the partial workaround to the bug in "c" (the corrupt file retrieved coincidentally opens in PDF readers).

My nasty kludgy code to do this is in https://github.com/internetarchive/dweb-transport/blob/master/js/TransportIPFS.js , not proud of it, but its the only way I've figure in the JS API to turn an IPFS identifier back into data.
c:  I couldnt find any notes in Issue #162 as to whether this is addressed? Though 162 seems to have progressed to testing.
d: I posted tests on my repo as commented in https://github.com/ipfs/js-ipfs/issues/1049, as mentioned elsewhere I have zero confidence in finding docs for the clone/edit/test/submitPR cycle on IPFS's multiple repos

On your comment:

because it does not tell you whether its a File, an IPLDnode/DAG or a Block. You need out-of-band info as to what to expect, which is contrary to the essence of something being self-describing.

You are mixing concepts. It is important to to understand that a CID always references to a node of a graph (IPLD node), that node can be also retrieved in its serialized format (Block). If a node is the root of a graph that represents a file, then you can fetch it as a File.
If you want to bring more of these notes up, I invite to you open a issue on https://github.com/ipfs/notes since it is a topic that affects more of IPFS than just its interface.
On your main question on this issue:

A noticeable gap in the APIs seems to be taking a hash and getting a buffer back.

The API has been upgraded, see:

https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md
shipped as v17 of js-ipfs-api https://github.com/ipfs/js-ipfs-api/releases/tag/v17.0.0
almost there on js-ipfs https://github.com/ipfs/js-ipfs/pull/1086 (already working on core, what's missing is just a couple of tests on http-api and cli)

Going to close this issue for now, let's track the remaining work on https://github.com/ipfs/js-ipfs/pull/1086


Add url sticker

Feature Request
Add url sticker to story stickers.
Form
Put an [x] if you meet the condition, else leave [ ].

[ x ] I've searched the Issues
[ x ] I've read the basic concepts
[ x ] I'm using the latest version

Description
Instagram remove url from the story for some users and add sticker instead so it's very useful to have this.

This guy implemented a link function in a python API. I tried to understand how to apply it here, but I was not successful in a first look.
Maybe it's useful:
https://github.com/adw0rd/instagrapi


[New metric] KID

Before submitting

[ ] Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
[ ] Did you read the contributor guideline, Pull Request section?
[ ] Did you make sure to update the docs?
[ ] Did you write any new necessary tests?

What does this PR do?
Implements kernel inception distance (KID).
Should be merged after #299
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

Hello @SkafteNicki! Thanks for opening this PR.

In the file tests/image/test_kid.py:

Line 149:46: W291 trailing whitespace

In the file torchmetrics/image/kid.py:

Line 263:1: W293 blank line contains whitespace

Do see the Hitchhiker's guide to code style

@SkafteNicki there seems to some argument errors with Conda tests


Is there any plan to do dependency update in package.json

Yes, I'll be upgrading and fixing something this week.

Yes, I'll be upgrading and fixing something this week.

Thanks, bro.