profile
viewpoint

dbonner/vimpdb 1

Pdb and Vim integration

dbonner/ngraph 0

nGraph - open source C++ library, compiler and runtime for Deep Learning

issue commentw0lfschild/cleanHUD

cleanHUD not showing on macOS 10.15.3

No. I tried quitting and also force quitting Notification Center. It then restarts as a new process. Nothing is showing in the menu/status bar.

On Mon, 10 Feb 2020 at 11:30, Wolfgang Baird notifications@github.com wrote:

Does it work if you restart Notification Center using Activity Monitor?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/w0lfschild/cleanHUD/issues/12?email_source=notifications&email_token=AAB26QWKPCL36CVWPGEI7STRCCNZVA5CNFSM4KOSP4X2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELG5CFQ#issuecomment-583913750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QVFWYPF5JMEJA7KYHTRCCNZVANCNFSM4KOSP4XQ .

dbonner

comment created time in 2 months

issue openedw0lfschild/moreMenu

moreMenu does not work with macOS 10.15.3

I had the same issue with cleanHud. The menubar remains unchanged. Other plugins work.

created time in 2 months

issue commentw0lfschild/cleanHUD

cleanHUD not showing on macOS 10.15.3

Yes, AfloatX, binventory, cDock and colorfulSidebar9 work properly. Screen Shot 2020-02-02 at 1 35 07 pm As you can see there is no cleanHUD in the menu/status bar.

dbonner

comment created time in 2 months

issue openedw0lfschild/cleanHUD

cleanHUD not showing on macOS 10.15.3

Hi, I bought cleanHUD and it shows as being installed in MacForge. I have taken the advice on the System tab on MacForge (see screenshot). There is nothing showing on my status bar. Do I need to do anything else to activate it? Screen Shot 2020-02-01 at 10 01 50 pm

created time in 2 months

issue commenttensorflow/tensorflow

Failed to build TF2.0 with TensorRT: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_

@dbonner with Python 2.7?

Hi @freedomtan I was building with Python 3.8

jiapei100

comment created time in 2 months

issue commenttensorflow/tensorflow

Failed to build TF2.0 with TensorRT: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_

@freedomtan This same error still occurs when building with Cuda 10.2 and TensorRT 7.

On Fri, 31 Jan 2020 at 14:49, freedomtan notifications@github.com wrote:

@ahtik https://github.com/ahtik It turns out that it's a Python 2 vs Python 3 problem. Python 2.7 + Cuda 10.[0-2] + TensorRT + Bazel 1.2.1 works fine.

@sanjoy https://github.com/sanjoy it seems bazel 1.2.1 + Python 3.x is problematic when TensorRT enabled.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/tensorflow/issues/35115?email_source=notifications&email_token=AAB26QR7LRTMBIEKUOHS7VTRAONWPA5CNFSM4J23JGCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKNMRBQ#issuecomment-580569222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QXTOA4YELYBY7GWC5TRAONWPANCNFSM4J23JGCA .

jiapei100

comment created time in 2 months

issue commenttensorflow/tensorflow

Failed to build TF2.0 with TensorRT: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_

@freedomtan, I'm on CUDA 10.1 and TensorRT 7 does not support this. Do you know if I can build tensorflow with CUDA 10.2? Cheers, Daniel

On Thu, 30 Jan 2020 at 11:59, freedomtan notifications@github.com wrote:

@sanjoy https://github.com/sanjoy: FYI, as @alanpurple https://github.com/alanpurple mentioned in #35922 https://github.com/tensorflow/tensorflow/issues/35922, TensorRT 7 doesn't have such problem. Unfortunately, not all people can use TensorRT 7, e.g., I have a Jetson Nano board which doesn't have TensorRT 7 (yet).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/tensorflow/issues/35115?email_source=notifications&email_token=AAB26QX7OM2TV2SM7AZCXB3RAIQ65A5CNFSM4J23JGCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKJKGTA#issuecomment-580035404, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QRQ7AGQY6D53IJCY63RAIQ65ANCNFSM4J23JGCA .

jiapei100

comment created time in 2 months

PR closed tensorflow/tensorflow

Reviewers
Update third_party/flatbuffers/BUILD.bazel flatc linkopts cla: yes size:XS

This is suggested for fixing issue #36170 .

I tried building after reverting the linkopts in file third_party/flatbuffers/BUILD.bazel to before https://github.com/tensorflow/tensorflow/commit/adf6e22e4af83afd55e0da3caa7e7959def1e6b6 : i.e. adding the following under “# Public flatc compiler.”

    linkopts = select({
         ":freebsd": [
             "-lm",
         ],
         ":windows": [],
         "//conditions:default": [
             "-lm",
             "-ldl",
         ],
     }),

I get the following build error:

ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted:
@flatbuffers//:freebsd is not a valid configuration key for @flatbuffers//:flatc

Then if I leave out the freebsd selection, I get the following build error:

ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted:
@flatbuffers//:windows is not a valid configuration key for @flatbuffers//:flatc

So I was able to build by just using linkopts = [“-lm”,”-ldl”,], under “# Public flatc compiler.”

+10 -0

5 comments

1 changed file

dbonner

pr closed time in 2 months

pull request commenttensorflow/tensorflow

Update third_party/flatbuffers/BUILD.bazel flatc linkopts

Yes #36264 fixes this. Thanks :)

dbonner

comment created time in 2 months

issue openedjslegendre/AfloatX

Afloatx causes applications to crash when you close all of the application's windows and right click the application's dock icon

Hi, I am using a MacBook Pro 16 inch with macOS 10.15.3 beta 3. I am using AfloatX 1.3.0 with the latest MacForge. This problem occurs every time I take the following steps and can occur for any specific application. Steps:

  1. Close all of the application's windows with the top left window's red x circle
  2. The application remains open (black dot beneath it) in the dock.
  3. Right click the dock icon.
  4. Then you get a crash. The example crash report in the screenshot is produced when using the application TextEdit. I have also copied the entire output of "Problem Details and System Configuration" to the attached text file. Screen Shot 2020-01-27 at 7 01 51 pm Problem Details and System Configuration.txt

created time in 2 months

pull request commenttensorflow/tensorflow

Update third_party/flatbuffers/BUILD.bazel flatc linkopts

Thanks @byronyi . I tried the suggested changes that were in the email I got from you:

    linkopts = select({
        "@org_tensorflow//tensorflow:freebsd": [
	    "-lm",
        ],
        "@org_tensorflow//tensorflow:windows": [],
        "@org_tensorflow//tensorflow:android": [],
        "//conditions:default": [
	    "-lm",
	    "-ldl",
        ],
    }),

The build works with the above changes. I made these changes in to commit https://github.com/tensorflow/tensorflow/pull/36202/commits/ad7b3dc4aac4f291ed087b64d7ad53a412a61904 I noticed that your comment reads differently. I guess you must have edited it. Your comment says: @//tensorflow: instead of @org_tensorflow//tensorflow:. I made a third commit https://github.com/tensorflow/tensorflow/pull/36202/commits/d95511f416d1a346a0c9f14ef4f48791b156b7f4 and this also builds successfully. So the suggested fix from the latest commit at this stage is:

linkopts = select({
    "@//tensorflow:freebsd": [
        "-lm",
    ],
    "@//tensorflow:windows": [],
    "//conditions:default": [
        "-lm",
        "-ldl",
    ],
}),
dbonner

comment created time in 2 months

push eventdbonner/tensorflow

dbonner

commit sha d95511f416d1a346a0c9f14ef4f48791b156b7f4

/third_party/flatbuffers/BUILD.bazel linkopts (revised again) Thanks @byronyi these are the changes in your comment (which must be your latest thinking). This is building successfully.

view details

push time in 2 months

push eventdbonner/tensorflow

dbonner

commit sha ad7b3dc4aac4f291ed087b64d7ad53a412a61904

third_party/flatbuffers/BUILD.bazel linkopts (revised) Thanks @byronyi, The build is working with your suggestion to add `@org_tensorflow//tensorflow:` to the selections in linkopts.

view details

push time in 2 months

PR opened tensorflow/tensorflow

Update third_party/flatbuffers/BUILD.bazel flatc linkopts

This is suggested for fixing issue #36170 .

I tried building after reverting the linkopts in file third_party/flatbuffers/BUILD.bazel to before https://github.com/tensorflow/tensorflow/commit/adf6e22e4af83afd55e0da3caa7e7959def1e6b6 : i.e. adding the following under “# Public flatc compiler.”

    linkopts = select({
         ":freebsd": [
             "-lm",
         ],
         ":windows": [],
         "//conditions:default": [
             "-lm",
             "-ldl",
         ],
     }),

I get the following build error:

ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted:
@flatbuffers//:freebsd is not a valid configuration key for @flatbuffers//:flatc

Then if I leave out the freebsd selection, I get the following build error:

ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted:
@flatbuffers//:windows is not a valid configuration key for @flatbuffers//:flatc

So I was able to build by just using linkopts = [“-lm”,”-ldl”,], under “# Public flatc compiler.”

+4 -0

0 comment

1 changed file

pr created time in 2 months

push eventdbonner/tensorflow

dbonner

commit sha 66d15e3e93965559ba692a230d53b5cf61ab033d

Update third_party/flatbuffers/BUILD.bazel flatc linkopts This is suggested for fixing issue #36170 . I tried building after reverting the linkopts in file `third_party/flatbuffers/BUILD.bazel` to before https://github.com/tensorflow/tensorflow/commit/adf6e22e4af83afd55e0da3caa7e7959def1e6b6 : i.e. adding the following under “# Public flatc compiler.” ``` linkopts = select({ ":freebsd": [ "-lm", ], ":windows": [], "//conditions:default": [ "-lm", "-ldl", ], }), ``` I get the following build error: ``` ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: @flatbuffers//:freebsd is not a valid configuration key for @flatbuffers//:flatc ``` Then if I leave out the freebsd selection, I get the following build error: ``` ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: @flatbuffers//:windows is not a valid configuration key for @flatbuffers//:flatc ``` So I was able to build by just using `linkopts = [“-lm”,”-ldl”,],` under “# Public flatc compiler.”

view details

push time in 2 months

delete branch dbonner/tensorflow

delete branch : patch-1

delete time in 2 months

PR closed tensorflow/tensorflow

Update third_party/flatbuffers/BUILD.bazel to linkopts -lm -lpthread cla: yes size:XS

This fixes #36170

+1 -0

5 comments

1 changed file

dbonner

pr closed time in 2 months

pull request commenttensorflow/tensorflow

Update third_party/flatbuffers/BUILD.bazel to linkopts -lm -lpthread

I'll close the request. I'll try building with the linkopts before https://github.com/tensorflow/tensorflow/commit/adf6e22e4af83afd55e0da3caa7e7959def1e6b6

dbonner

comment created time in 2 months

issue commenttensorflow/ngraph-bridge

"switch (dt)" does not include case "PLAIDML_DATA_BFLOAT16" in plaidml_translate.cpp

I have made a pull request at the ngraph repo:

dbonner

comment created time in 2 months

pull request commentNervanaSystems/ngraph

Update plaidml_translate.cpp to include bloat16

This fixes #4209

dbonner

comment created time in 2 months

pull request commenttensorflow/tensorflow

Update third_party/flatbuffers/BUILD.bazel to linkopts -lm -lpthread

@googlebot I signed it!

dbonner

comment created time in 2 months

PR opened tensorflow/tensorflow

Update third_party/flatbuffers/BUILD.bazel to linkopts -lm -lpthread

This fixes #36170

+1 -0

0 comment

1 changed file

pr created time in 2 months

push eventdbonner/tensorflow

dbonner

commit sha 7786ea81661d97021a676adc6b0ecd8599ee9e0a

Update third_party/flatbuffers/BUILD.bazel to linkopts -lm -lpthread This fixes #36170

view details

push time in 2 months

fork dbonner/tensorflow

An Open Source Machine Learning Framework for Everyone

https://tensorflow.org

fork in 2 months

issue commenttensorflow/tensorflow

Build fails with messages including "undefined reference to symbol 'acos@@GLIBC_2.2.5' ", "Linking of rule '@flatbuffers//:flatc' failed"

@byronyi do you mean that this problem

  • is an issue for the current head because adf6e22e4af83afd55e0da3caa7e7959def1e6b6 broke linux builds
  • and this was not an issue in the master from a couple of days ago before before adf6e22e4af83afd55e0da3caa7e7959def1e6b6?
dbonner

comment created time in 2 months

PR opened NervanaSystems/ngraph

Reviewers
Update plaidml_translate.cpp to include bloat16

ngraph-tensorflow-bridge fails to build with plaidml backend unless case PLAIDML_DATA_BFLOAT16 is included in switch (dt).

+1 -0

0 comment

1 changed file

pr created time in 2 months

push eventdbonner/ngraph

dbonner

commit sha c1c2008e112edd3b2e73e2b08c537f24baf52347

Update plaidml_translate.cpp to include bloat16 ngraph-tensorflow-bridge fails to build with plaidml backend unless case PLAIDML_DATA_BFLOAT16 is included in switch (dt).

view details

push time in 2 months

fork dbonner/ngraph

nGraph - open source C++ library, compiler and runtime for Deep Learning

https://www.ngraph.ai/

fork in 2 months

issue commenttensorflow/tensorflow

Failed to build TF2.0 with TensorRT: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_

I just tried building after doing bazel clean --expunge and I still got the same error:

ImportError: /home/daniel/.cache/bazel/_bazel_daniel/79db702fc9f94af7d11e11c5d64854d0/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_keras_python_api_gen.runfiles/org_tensorflow/tensorflow/compiler/tf2tensorrt/_wrap_py_utils.so: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /home/daniel/tensorflow/tensorflow/python/tools/BUILD:224:1 Executing genrule //tensorflow/python/keras/api:keras_python_api_gen failed (Exit 1)
INFO: Elapsed time: 5010.465s, Critical Path: 291.89s
INFO: 18919 processes: 18919 local.
FAILED: Build did NOT complete successfully
jiapei100

comment created time in 2 months

issue commenttensorflow/tensorflow

Failed to build TF2.0 with TensorRT: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_

Oh, I see. I'll try bazel clean --expunge and use the bazel version tensorflow recommends (1.2.1) next time I try to build.

jiapei100

comment created time in 2 months

issue commenttensorflow/tensorflow

Failed to build TF2.0 with TensorRT: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_

Thanks, I'll keep that in mind. However, I think I got this error from a fresh git clone, so there was nothing for bazel to clean.

jiapei100

comment created time in 2 months

issue commenttensorflow/tensorflow

Failed to build TF2.0 with TensorRT: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_

Yes, you still need to use bazel 0.26.1 to build master (2.1.0), cuda 10.1, cudnn 7.6.5, and tensorrt support with python 3.8. Using bazel 0.26.1 my build completed successfully.

jiapei100

comment created time in 2 months

issue commenttensorflow/tensorflow

Failed to build TF2.0 with TensorRT: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_

I encountered this exact same error building master (2.1.0), cuda 10.1, cudnn 7.6.5, and tensorrt support with python 3.8 using the specified bazel 1.2.1. I am currently running a new build, this time using the https://github.com/tensorflow/tensorflow/issues/35584#issuecomment-570836764 mentioned earlier in order to build with bazel 0.26.1. I'll write another comment to update as to whether this ended up working.

jiapei100

comment created time in 2 months

issue commenttensorflow/tensorflow

Build fails with messages including "undefined reference to symbol 'acos@@GLIBC_2.2.5' ", "Linking of rule '@flatbuffers//:flatc' failed"

I was able to get the build to continue by doing the following:

nano third_party/flatbuffers/BUILD.bazel

After the line "linkstatic = 1", add this line:

    linkopts = ["-lm","-lpthread"],

@Saduf2019 please let me know if this is the right thing to do. All the best, Dan

dbonner

comment created time in 2 months

issue commenttensorflow/tensorflow

Build fails with messages including "undefined reference to symbol 'acos@@GLIBC_2.2.5' ", "Linking of rule '@flatbuffers//:flatc' failed"

After googling of this error, it sounds like there is a missing '-lm' flag. However, I don't know how to incorporate this flag in to the source.

dbonner

comment created time in 2 months

issue commenttensorflow/tensorflow

r2.0/2.1 Python 3.8 AutoGraph could not transform <bound method LinearRegressionTF.fit of <tensorflow.python.eager.function.TfMethodTarget object at 0x7f7a5ccc1fa0>> and will run it as-is

I can't test the resolution until I build tensorflow for python 3.8.0. Unfortunately my build is failing (see issue #36170 )

dbonner

comment created time in 2 months

issue openedtensorflow/tensorflow

Build from head fails with messages including "undefined reference to symbol 'acos@@GLIBC_2.2.5' ", "Linking of rule '@flatbuffers//:flatc' failed"

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • TensorFlow installed from (source or binary): Attempting to build from source
  • TensorFlow version: 2.1.0 (attempting to build from master)
  • Python version: 3.8.0
  • Installed using virtualenv? pip? conda?: virtualenv
  • Bazel version (if compiling from source): 1.2.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: CUDA 10.1 / cuDNN 7.6.5
  • GPU model and memory: NVidia RTX 2080 Ti

Describe the problem

I am trying to build for python 3.8.0 since issues relating to python 3.8.0 should now be fixed (see #34433 ). There is also no pip package that you can install with "pip install tensorflow" for python 3.8.0.

Build fails with the following messages: INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (345 packages loaded, 27926 targets configured). INFO: Found 1 target... INFO: Deleting stale sandbox base /home/daniel/.cache/bazel/_bazel_daniel/79db702fc9f94af7d11e11c5d64854d0/sandbox INFO: From Compiling tensorflow/core/platform/default/logging.cc [for host]: tensorflow/core/platform/default/logging.cc: In member function ‘bool tensorflow::internal::LogFirstNState::ShouldLog(int)’: tensorflow/core/platform/default/logging.cc:369:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (counter_value < n) { ^ INFO: From Compiling external/snappy/snappy-sinksource.cc [for host]: cc1plus: warning: command line option ‘-Wno-implicit-function-declaration’ is valid for C/ObjC but not for C++ INFO: From Compiling external/snappy/snappy-stubs-internal.cc [for host]: cc1plus: warning: command line option ‘-Wno-implicit-function-declaration’ is valid for C/ObjC but not for C++ INFO: From Compiling external/snappy/snappy.cc [for host]: cc1plus: warning: command line option ‘-Wno-implicit-function-declaration’ is valid for C/ObjC but not for C++ INFO: From Compiling tensorflow/core/platform/protobuf.cc [for host]: tensorflow/core/platform/protobuf.cc: In member function ‘virtual bool tensorflow::TStringOutputStream::Next(void**, int*)’: tensorflow/core/platform/protobuf.cc:30:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (old_size < target_->capacity()) { ~^ INFO: From Compiling tensorflow/core/platform/numbers.cc [for host]: tensorflow/core/platform/numbers.cc: In instantiation of ‘T tensorflow::{anonymous}::locale_independent_strtonum(const char*, const char**) [with T = double]’: tensorflow/core/platform/numbers.cc:197:60: required from here tensorflow/core/platform/numbers.cc:65:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < special_num_str.length(); ++i) { ^~~~~~~~~~~~~~~~~~~~~~~~ tensorflow/core/platform/numbers.cc: In function ‘std::__cxx11::string tensorflow::strings::HumanReadableNumBytes(tensorflow::int64)’: tensorflow/core/platform/numbers.cc:459:8: warning: ‘%lld’ directive output may be truncated writing between 1 and 19 bytes into a region of size between 7 and 8 [-Wformat-truncation=] string HumanReadableNumBytes(int64 num_bytes) { ^~~~~~~~~~~~~~~~~~~~~ tensorflow/core/platform/numbers.cc:459:8: note: directive argument in the range [0, 9223372036854775807] In file included from /usr/include/stdio.h:862:0, from /usr/include/c++/7/cstdio:42, from /usr/include/c++/7/ext/string_conversions.h:43, from /usr/include/c++/7/bits/basic_string.h:6361, from /usr/include/c++/7/string:52, from ./tensorflow/core/platform/numbers.h:19, from tensorflow/core/platform/numbers.cc:15: /usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin_snprintf’ output between 3 and 22 bytes into a destination of size 8 __bos (__s), __fmt, __va_arg_pack ()); ^ INFO: From Compiling external/llvm-project/llvm/lib/Support/APFloat.cpp [for host]: external/llvm-project/llvm/lib/Support/APFloat.cpp: In member function ‘llvm::Expectedllvm::APFloatBase::opStatus llvm::detail::IEEEFloat::convertFromDecimalString(llvm::StringRef, llvm::APFloatBase::roundingMode)’: external/llvm-project/llvm/lib/Support/APFloat.cpp:2625:38: warning: ‘D.llvm::decimalInfo::exponent’ may be used uninitialized in this function [-Wmaybe-uninitialized] fs = roundSignificandWithExponent(decSignificand, partCount, ^ D.exponent, rounding_mode); ~~~~~~~~~~~~~~~~~~~~~~~~~~ external/llvm-project/llvm/lib/Support/APFloat.cpp:2561:36: warning: ‘D.llvm::decimalInfo::normalizedExponent’ may be used uninitialized in this function [-Wmaybe-uninitialized] (D.normalizedExponent + 1) * 28738 <= ^~ external/llvm-project/llvm/lib/Support/APFloat.cpp:2622:16: warning: ‘D.llvm::decimalInfo::lastSigDigit’ may be used uninitialized in this function [-Wmaybe-uninitialized] } while (p <= D.lastSigDigit); ^ external/llvm-project/llvm/lib/Support/APFloat.cpp:2581:58: warning: ‘D.llvm::decimalInfo::firstSigDigit’ may be used uninitialized in this function [-Wmaybe-uninitialized] partCount = static_cast<unsigned int>(D.lastSigDigit - D.firstSigDigit) + 1; ~^ INFO: From Compiling external/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp [for host]: external/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp:8:1: warning: multi-line comment [-Wcomment] // utils/unicode-case-fold.py
^ INFO: From Compiling external/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp [for host]: external/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp: In member function ‘std::unique_ptrllvm::vfs::RedirectingFileSystem::Entry llvm::vfs::RedirectingFileSystemParser::parseEntry(llvm::yaml::Node*, llvm::vfs::RedirectingFileSystem*, bool)’: external/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp:1471:5: warning: ‘Kind’ may be used uninitialized in this function [-Wmaybe-uninitialized] switch (Kind) { ^
~ INFO: From Compiling external/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp [for host]: external/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp: In function ‘uint64_t {anonymous}::ELFWriter::writeObject(llvm::MCAssembler&, const llvm::MCAsmLayout&)’: external/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp:1193:36: warning: ‘AddrsigSection’ may be used uninitialized in this function [-Wmaybe-uninitialized] SectionOffsets[AddrsigSection] = std::make_pair(SecStart, SecEnd); ^ INFO: From Compiling external/llvm-project/llvm/lib/MC/MachObjectWriter.cpp [for host]: external/llvm-project/llvm/lib/MC/MachObjectWriter.cpp: In member function ‘void llvm::MachObjectWriter::writeNlist(llvm::MachObjectWriter::MachSymbolData&, const llvm::MCAsmLayout&)’: external/llvm-project/llvm/lib/MC/MachObjectWriter.cpp:381:13: warning: ‘AliaseeInfo’ may be used uninitialized in this function [-Wmaybe-uninitialized] Address = AliaseeInfo->StringIndex; ^
~~~~~~~~~~~~~~~ ERROR: /home/daniel/.cache/bazel/_bazel_daniel/79db702fc9f94af7d11e11c5d64854d0/external/flatbuffers/BUILD.bazel:51:1: Linking of rule '@flatbuffers//:flatc' failed (Exit 1) /usr/bin/ld: bazel-out/host/bin/external/flatbuffers/src/libflatbuffers.a(idl_parser.o): undefined reference to symbol 'acos@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Target //tensorflow/tools/pip_package:build_pip_package failed to build Use --verbose_failures to see the command lines of failed build steps. ERROR: /home/daniel/tensorflow/tensorflow/python/tools/BUILD:141:1 Linking of rule '@flatbuffers//:flatc' failed (Exit 1) INFO: Elapsed time: 103.160s, Critical Path: 25.44s INFO: 1225 processes: 1225 local. FAILED: Build did NOT complete successfully

Provide the exact sequence of commands / steps that you executed before running into the problem

git clone https://github.com/tensorflow/tensorflow.git cd tensorflow ./configure You have bazel 1.2.1 installed. Please specify the location of python. [Default is /home/daniel/tf38/bin/python]: Default accepted Python library path to use. Default is [/home/daniel/tf38/lib/python3.8/site-packages]: Default accepted Do you wish to build TensorFlow with XLA JIT support? [Y/n]: Y XLA JIT support will be enabled for TensorFlow. Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: N No OpenCL SYCL support will be enabled for TensorFlow. Do you wish to build TensorFlow with ROCm support? [y/N]: N No ROCm support will be enabled for TensorFlow. Do you wish to build TensorFlow with CUDA support? [y/N]: y CUDA support will be enabled for TensorFlow. Do you wish to build TensorFlow with TensorRT support? [y/N]: y TensorRT support will be enabled for TensorFlow. Found CUDA 10.1 in: /usr/local/cuda/lib64 /usr/local/cuda/include Found cuDNN 7 in: /usr/lib/x86_64-linux-gnu /usr/include Found TensorRT 6 in: /usr/lib/x86_64-linux-gnu /usr/include/x86_64-linux-gnu CUDA compute capabilities [Default is: 3.5,7.0]: 7.5 Do you want to use clang as CUDA compiler? [y/N]: N nvcc will be used as CUDA compiler. Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: Default accepted Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native -Wno-sign-compare]: Default accepted Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: N Not configuring the WORKSPACE for Android builds. Configuration finished. bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package Build fails with the above messages.

Any other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

I have noticed in the past that builds can sometimes build with different bazel versions. I tried bazel 0.26.1, 1.0.0 and 2.0.0. However the build still fails with all these bazel versions.

created time in 2 months

issue commenttensorflow/ngraph-bridge

macOS users need to use clang (make 'gcc' a symbolic link to clang)

macOS uses clang by default. I set mine up to use gcc (using a symbolic link to gcc at /usr/local/bin/gcc) because I had to build another package using gcc. Building ngraph-bridge worked fine as soon as I deleted my symbolic link (/usr/local/bin/gcc). So it should be enough to just note in the README that macOS users need to use clang. The table in the README indicates that, but maybe there could be a reference to it in the notes.

dbonner

comment created time in 2 months

issue commenttensorflow/swift

"Couldn't lookup symbols" in macOS jupyter notebook (but OK in Xcode)

@marcrasi When I run :log enable lldb all using the S4TF REPL, I just get the following line as output repeated every few seconds as a log message: this = 0x00007FCD65C00170, timeout = 5000000 us The message does not change regardless of what I run with the swift-jupyter kernel. Maybe I'm doing this wrong?

dbonner

comment created time in 2 months

issue openedNervanaSystems/ngraph

"switch (dt)" does not include case "PLAIDML_DATA_BFLOAT16" in plaidml_translate.cpp

see https://github.com/tensorflow/ngraph-bridge/issues/447

I added under "switch (dt)" in this file: case PLAIDML_DATA_BFLOAT16: return "as_float(" + tensor_name + ", 32)";

It then built successfully. Do you want to translate BFLOAT16 as FLOAT32?

created time in 2 months

issue commentvknabel/sourcekite

sourcekite mostly does not work on macOS

I figured it out. I had installed gcc using homebrew. I put a symbolic link (/usr/local/bin/gcc) that pointed to the gcc binary so that the command "gcc" ran gcc and not clang (the default macOS behaviour is to run clang when you issue the command "gcc"). I returned my mac to the default behaviour and built sourcekite. It works properly now. I will try your new version out still.

dbonner

comment created time in 2 months

issue commentvknabel/sourcekite

sourcekite mostly does not work on macOS

Hi @vknabel. Thanks for getting back to me.

I'm still getting the same problem.

My toolchain is set to tensorflow-LOCAL-2020-01-13-a according to Xcode-Preferences-Components-Toolchains, which is the way that is described in the link you sent me. I don't know how to set the toolchain with xcode-select (I tried googling that).

The initial output of the log is:

Debugger listening on ws://127.0.0.1:6004/a6d1b8c7-deff-4e60-ade6-cf39bdbcd888 For help, see: https://nodejs.org/en/docs/inspector [-->onInitialize ] isTracingOn=[true], skProtocolProcess=[/usr/local/bin/sourcekite],skProtocolProcessAsShellCmd=[false] [-->onDidChangeConfiguration] [-->onDidChangeConfiguration tracing: swiftDiverBinPath=[/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-13-a.xctoolchain/usr/bin/swift], shellPath=[/bin/sh]] [sourcekite] ***sourcekite initializing with skProtocolProcess at [/usr/local/bin/sourcekite] [-->SourcekiteResponseHandler constructor done] [---onDidChangeContent]

Then when I mouse of the "print" command I get:

[request] { key.request: source.request.cursorinfo, key.sourcefile: "/Users/daniel/Desktop/Xcode/Transformer/Sources/Transformer/main.swift", key.offset: 679, key.compilerargs: ["-target","x86_64-apple-macosx10.10","-swift-version","5","-enable-batch-mode","-index-store-path","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug/index/store","-sdk","/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk","-F","/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks","-Onone","-enable-testing","-g","-j16","-DSWIFT_PACKAGE","-DDEBUG","-module-cache-path","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug/ModuleCache","-parseable-output","-module-name","Transformer","-Onone","-Xcc","-I","-Xcc","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug","-I","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug","-Xcc","-F","-Xcc","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug","-F","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug","/Users/daniel/Desktop/Xcode/Transformer/Sources/Transformer/main.swift"], key.sourcetext: "// Create version 3\n\nimport TensorFlow\n\nimport Python\n\nprint(Python.version)\n\nlet np = Python.import("numpy")\nprint(np)\nlet zeros = np.ones([2, 3])\nprint(zeros)\n\nimport TensorFlow\n\nlet numpyArray = np.ones([4], dtype: np.float32)\nprint("Swift type:", type(of: numpyArray))\nprint("Python type:", Python.type(numpyArray))\nprint(numpyArray.shape)\n\n// Examples of converting numpy.ndarray to Swift types.\nlet array: [Float] = Array(numpy: numpyArray)!\nlet shapedArray = ShapedArray<Float>(numpy: numpyArray)!\nlet tensor = Tensor<Float>(numpy: numpyArray)!\n\n// Examples of converting Swift types to numpy.ndarray.\nprint(array.makeNumpyArray())\nprint(shapedArray.makeNumpyArray())\nprint(tensor.makeNumpyArray())\n\n// Examples with different dtypes.\nlet doubleArray: [Double] = Array(numpy: np.ones([3], dtype: np.float))!\nlet intTensor = Tensor<Int32>(numpy: np.ones([2, 3], dtype: np.int32))!\n\n\n" }

[SourcekiteResponseHandler] 4 { "key.internal_diagnostic" : "Resolved to incomplete expression or statement." }

dbonner

comment created time in 2 months

pull request commenttensorflow/ngraph-bridge

Sindhu/bfloat16 support

Will your work help with this issue #447 ? The PLAIDML backend won't build because BLFOAT16 enum case is not dealt with in switch (dt).

sindhu-nervana

comment created time in 2 months

issue openedtensorflow/ngraph-bridge

"switch (dt)" does not include case "PLAIDML_DATA_BFLOAT16" in plaidml_translate.cpp

ngraph-bridge fails to build with the plaidml backend, giving an error when compiling:ngraph-bridge/build_cmake/ngraph/src/ngraph/runtime/plaidml/plaidml_translate.cpp

I tried adding under "switch (dt)" in this file: case PLAIDML_DATA_BFLOAT16: return "as_float(" + tensor_name + ", 32)";

because BFLOAT16 is easily translated to float32.

I then tried to build again over what was partially built.

PLAIDML is listed as a backend when I issue the command: ngraph_bridge.list_backends()

However when I issue: ngraph_bridge.set_backend('PLAIDML')

It tells me that the backend is "unavailable".

created time in 2 months

issue openedtensorflow/ngraph-bridge

macOS users need to use clang (make 'gcc' a symbolic link to clang)

I thought I'd put this up as an issue to help anyone who got confused (like me) by the instructions to use gcc 4.8 for building ngraph-bridge (and building tensorflow with the --use_prebuilt_tensorflow option). I am building using the following command: python3 build_ngtf.py --use_prebuilt_tensorflow

On macOS, you can put a symbolic link (/usr/local/bin/gcc) to force building to use gcc and not clang. My mac was set up like this. When building ngraph-bridge/tensorflow, this will produce the error: gcc: error: unrecognized command line option '-fobjc-link-runtime’

This is because this option ('-fobjc-link-runtime’) is recognised by clang not gcc.

In order to get the build working, I needed to issue the following: rm /usr/local/bin/gcc ln -s /usr/bin/clang /usr/local/bin/gcc

created time in 2 months

issue commenttensorflow/ngraph-bridge

Python3 virtualenv fails to activate during build_ngtf.py run and causes the build to crash.

To fix this, issue the following in your terminal: pip3 install virtualenv==16.1.0

The latest version of virtualenv is not compatible with the ngraph build scripts.

I found this out from

ashahba

comment created time in 2 months

issue openedvknabel/sourcekite

sourcekite mostly does not work on macOS

After I build sourcekite, most of the context information on moving the mouse cursor over elements does not work. Here is the output from trace when I mouse over the "print" command:

[request] { key.request: source.request.cursorinfo, key.sourcefile: "/Users/daniel/Desktop/Xcode/Transformer/Sources/Transformer/main.swift", key.offset: 658, key.compilerargs: ["-target","x86_64-apple-macosx10.10","-swift-version","5","-enable-batch-mode","-index-store-path","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug/index/store","-sdk","/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk","-F","/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks","-Onone","-enable-testing","-g","-j16","-DSWIFT_PACKAGE","-DDEBUG","-module-cache-path","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug/ModuleCache","-parseable-output","-module-name","Transformer","-Onone","-Xcc","-I","-Xcc","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug","-I","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug","-Xcc","-F","-Xcc","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug","-F","/Users/daniel/Desktop/Xcode/Transformer/.build/x86_64-apple-macosx/debug","/Users/daniel/Desktop/Xcode/Transformer/Sources/Transformer/main.swift"], key.sourcetext: "import TensorFlow\n\nimport Python\n\nprint(Python.version)\n\nlet np = Python.import("numpy")\nprint(np)\nlet zeros = np.ones([2, 3])\nprint(zeros)\n\nimport TensorFlow\n\nlet numpyArray = np.ones([4], dtype: np.float32)\nprint("Swift type:", type(of: numpyArray))\nprint("Python type:", Python.type(numpyArray))\nprint(numpyArray.shape)\n\n// Examples of converting numpy.ndarray to Swift types.\nlet array: [Float] = Array(numpy: numpyArray)!\nlet shapedArray = ShapedArray<Float>(numpy: numpyArray)!\nlet tensor = Tensor<Float>(numpy: numpyArray)!\n\n// Examples of converting Swift types to numpy.ndarray.\nprint(array.makeNumpyArray())\nprint(shapedArray.makeNumpyArray())\nprint(tensor.makeNumpyArray())\n\n// Examples with different dtypes.\nlet doubleArray: [Double] = Array(numpy: np.ones([3], dtype: np.float))!\nlet intTensor = Tensor<Int32>(numpy: np.ones([2, 3], dtype: np.int32))!\n\n\n" }

[SourcekiteResponseHandler] 24 { "key.internal_diagnostic" : "Resolved to incomplete expression or statement." }

When I mouse over "<Int32>"

[SourcekiteResponseHandler] 28 { "key.internal_diagnostic" : "Unable to resolve cursor info." }

On rare occasions, it does recognise the text, e.g. when I mouse over "array" the trace shows:

[SourcekiteResponseHandler] 30 { "key.annotated_decl" : "<Declaration>let array: [<Type usr="s:Sf">Float</Type>]</Declaration>", "key.filepath" : "/Users/daniel/Desktop/Xcode/Transformer/Sources/Transformer/main.swift", "key.fully_annotated_decl" : "<decl.var.global><syntaxtype.keyword>let</syntaxtype.keyword> <decl.name>array</decl.name>: <decl.var.type>[<ref.struct usr="s:Sf">Float</ref.struct>]</decl.var.type></decl.var.global>", "key.kind" : "source.lang.swift.ref.var.global", "key.length" : 5, "key.name" : "array", "key.offset" : 386, "key.typename" : "[Float]", "key.typeusr" : "$sSaySfGD", "key.usr" : "s:11Transformer5arraySaySfGvp" }

But most mouse over context info does not work.

created time in 2 months

issue commenttensorflow/swift

"Couldn't lookup symbols" in macOS jupyter notebook (but OK in Xcode)

Hi, I did build the swift macOs toolchain with LLDB built with Python 3. I can get the correct result for most Swift and S4TF commands using jupyter notebook with the swift-jupyter kernel. It's just this bit of code it does not work with:

let doubleArray: [Double] = Array(numpy: np.ones([3], dtype: np.float))! let intTensor = Tensor(numpy: np.ones([2, 3], dtype: np.int32))!

Error: Couldn't lookup symbols: (extension in TensorFlow):TensorFlow.Tensor< where A: Python.NumpyScalarCompatible>.makeNumpyArray() -> Python.PythonObject

The code executes properly in Xcode and in swift-jupyter installed on Ubuntu.

The exact steps I took to build the macOS toolchain and install swift-jupyter were:

  1. brew install python (installs the python 3 headers needed for LLDB python 3 support)
  2. brew install python@2
  3. pip2 install numpy future six
  4. brew install cmake ninja
  5. brew cask install java
  6. ./bazel-0.27.1-installer-darwin-x86_64.sh
  7. mkdir swift-source
  8. cd swift-source
  9. git clone https://github.com/apple/swift.git -b tensorflow
  10. ./swift/utils/update-checkout --clone --scheme tensorflow
  11. cd swift
  12. utils/build-toolchain-tensorflow
  13. (This builds swift. I extract swift and then extract symbols to /Library/Developer/Toolchains)
  14. python3 -m venv venv
  15. . venv/bin/activate
  16. pip3 install -r requirements.txt
  17. python register.py --sys-prefix --swift-toolchain /Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-13-a.xctoolchain
  18. jupyter notebook

Since this error does not occur in Ubuntu, I'm guessing you would advise me to use jupyter notebooks in an Ubuntu docker or vm? All the best, Daniel

dbonner

comment created time in 2 months

pull request commentapple/swift

[AutoDiff] add cross-file registration flag to .swiftinterface

Hi, My build fails with the following on macOS while trying to build swiftPM: /Users/daniel/swift-source/swiftpm: error: manifest parse error(s): swift (LLVM option parsing): for the --enable-experimental-cross-file-derivative-registration option: may only occur zero or one times! Cheers, Dan

marcrasi

comment created time in 3 months

issue commenttensorflow/swift

S4TF for macOS fails to build with LLDB Python3 support

Hi marcrasi, I get the following error now while the build script is trying to build swiftPM:/Users/daniel/swift-source/swiftpm: error: manifest parse error(s): swift (LLVM option parsing): for the --enable-experimental-cross-file-derivative-registration option: may only occur zero or one times! Cheers, Dan

dbonner

comment created time in 3 months

issue openedtensorflow/swift

"Couldn't lookup symbols" in macOS jupyter notebook (but OK in Xcode)

Hi, I built S4TF with LLDB Python 3 support so that I could run Jupyter Notebook for macOS by checking out up to commit 7ffb598e6cef5d0373d2693dbadd97073e3c71d8 so that I avoided the regression that prevents swiftPM being built. The following code (from the Python Interoperability notebook) results in "Couldn't lookup symbols" in Jupyter. However, if you run the code in XCode it runs OK:

import TensorFlow

import Python

print(Python.version)

let np = Python.import("numpy") print(np) let zeros = np.ones([2, 3]) print(zeros)

import TensorFlow

let numpyArray = np.ones([4], dtype: np.float32) print("Swift type:", type(of: numpyArray)) print("Python type:", Python.type(numpyArray)) print(numpyArray.shape)

// Examples of converting numpy.ndarray to Swift types. let array: [Float] = Array(numpy: numpyArray)! let shapedArray = ShapedArray<Float>(numpy: numpyArray)! let tensor = Tensor<Float>(numpy: numpyArray)!

// Examples of converting Swift types to numpy.ndarray. print(array.makeNumpyArray()) print(shapedArray.makeNumpyArray()) print(tensor.makeNumpyArray())

// Examples with different dtypes. let doubleArray: [Double] = Array(numpy: np.ones([3], dtype: np.float))! let intTensor = Tensor<Int32>(numpy: np.ones([2, 3], dtype: np.int32))!

You get the right answer to the last bit of code with Xcode: 3.7.6 | packaged by conda-forge | (default, Jan 7 2020, 22:08:30) [Clang 9.0.1 ] <module 'numpy' from '/Users/daniel/anaconda3/envs/conda37/lib/python3.7/site-packages/numpy/init.py'> [[1. 1. 1.] [1. 1. 1.]] Swift type: PythonObject Python type: <class 'numpy.ndarray'> (4,) [1. 1. 1. 1.] [1. 1. 1. 1.] [1. 1. 1. 1.]

With Jupyter you get the following for the final outpu of codet: 3.7.6 | packaged by conda-forge | (default, Jan 7 2020, 22:08:30) [Clang 9.0.1 ] <module 'numpy' from '/Users/daniel/anaconda3/envs/conda37/lib/python3.7/site-packages/numpy/init.py'> [[1. 1. 1.] [1. 1. 1.]] Swift type: PythonObject Python type: <class 'numpy.ndarray'> (4,) Error: Couldn't lookup symbols: (extension in TensorFlow):TensorFlow.Tensor< where A: Python.NumpyScalarCompatible>.makeNumpyArray() -> Python.PythonObject (extension in TensorFlow):TensorFlow.Tensor< where A: Python.NumpyScalarCompatible>.makeNumpyArray() -> Python.PythonObject (extension in TensorFlow):TensorFlow.Tensor< where A: Python.NumpyScalarCompatible>.makeNumpyArray() -> Python.PythonObject (extension in TensorFlow):TensorFlow.Tensor< where A: Python.NumpyScalarCompatible>.makeNumpyArray() -> Python.PythonObject (extension in TensorFlow):TensorFlow.Tensor< where A: Python.NumpyScalarCompatible>.makeNumpyArray() -> Python.PythonObject (extension in TensorFlow):TensorFlow.Tensor< where A: Python.NumpyScalarCompatible>.makeNumpyArray() -> Python.PythonObject

created time in 3 months

issue openedtensorflow/swift

S4TF for macOS fails to build with LLDB Python3 support

I am trying to build S4TF for macOS with LLDB Python3 support so that I can use swift-jupyter.

Steps:

brew install python brew install python@2 (Close and reopen terminal) pip2 install numpy future six sudo chown -R $(whoami) /usr/local/lib/pkgconfig chmod u+w /usr/local/lib/pkgconfig brew install cmake ninja brew cask install java (Download bazel-0.27.1-installer-darwin-x86_64.sh) chmod +x bazel-0.27.1-installer-darwin-x86_64.sh ./bazel-0.27.1-installer-darwin-x86_64.sh mkdir swift-source cd swift-source git clone https://github.com/apple/swift.git -b tensorflow ./swift/utils/update-checkout --clone --scheme tensorflow cd swift utils/build-toolchain-tensorflow

The script almost finishes but then ends on the following error code:

/Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:742:2: error: derivative not in the same file as the original function @derivative(of: tan, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:747:2: error: derivative not in the same file as the original function @derivative(of: asin, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:751:2: error: derivative not in the same file as the original function @derivative(of: acos, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:755:2: error: derivative not in the same file as the original function @derivative(of: atan, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:759:2: error: derivative not in the same file as the original function @derivative(of: sinh, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:763:2: error: derivative not in the same file as the original function @derivative(of: cosh, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:767:2: error: derivative not in the same file as the original function @derivative(of: tanh, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:772:2: error: derivative not in the same file as the original function @derivative(of: asinh, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:776:2: error: derivative not in the same file as the original function @derivative(of: acosh, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:780:2: error: derivative not in the same file as the original function @derivative(of: atanh, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:784:2: error: derivative not in the same file as the original function @derivative(of: expm1, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:788:2: error: derivative not in the same file as the original function @derivative(of: log1p, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:792:2: error: derivative not in the same file as the original function @derivative(of: erf, wrt: x) ^ /Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/lib/swift/macosx/Darwin.swiftmodule/x86_64.swiftinterface:796:2: error: derivative not in the same file as the original function @derivative(of: erfc, wrt: x) ^ <unknown>:0: error: failed to load module 'Darwin' /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface:720:15: error: use of unresolved identifier 'lgammaf_r' let value = lgammaf_r(CFloat(x), &sign) ^~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface:725:15: error: use of unresolved identifier 'lgamma_r' let value = lgamma_r(CDouble(x), &sign) ^~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface:730:15: error: use of unresolved identifier 'lgammal_r' let value = lgammal_r(CLongDouble(x), &sign) ^~~~~~~~~ --- bootstrap: error: Command '['env', 'SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk', 'SWIFTCI_USE_LOCAL_DEPS=1', 'DYLD_LIBRARY_PATH=/Users/daniel/swift-source/build/buildbot_osx/swiftpm-macosx-x86_64/x86_64-apple-macosx/bootstrap/lib:/Users/daniel/swift-source/build/buildbot_osx/llbuild-macosx-x86_64/lib', 'SWIFT_EXEC=/Users/daniel/swift-source/swift/swift-nightly-install/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2020-01-10-a.xctoolchain/usr/bin/swiftc', 'SWIFTPM_PD_LIBS=/Users/daniel/swift-source/build/buildbot_osx/swiftpm-macosx-x86_64/x86_64-apple-macosx/bootstrap/pm', '/Users/daniel/swift-source/build/buildbot_osx/swiftpm-macosx-x86_64/x86_64-apple-macosx/bootstrap/bin/swift-build', '--disable-sandbox', '--disable-index-store', '--build-path', '/Users/daniel/swift-source/build/buildbot_osx/swiftpm-macosx-x86_64', '--configuration', 'release']' returned non-zero exit status 1 ./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting ./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting daniel@Daniels-iMac swift %

created time in 3 months

created repositorydbonner/Transformer

created time in 3 months

issue commenttensorflow/tensorflow

Failed to build TF2.0 with TensorRT: undefined symbol: _ZN15stream_executor14StreamExecutor18EnablePeerAccessToEPS0_

I am getting this too building with Ubuntu 18.04, gcc 7.4.0, bazel 1.1.0, CUDA 10.1, CUDNN 7.6.5, Python 3.7.3 conda virtual environment.

jiapei100

comment created time in 3 months

issue commenttensorflow/tensorflow

r2.0/2.1 Python 3.8 AutoGraph could not transform <bound method LinearRegressionTF.fit of <tensorflow.python.eager.function.TfMethodTarget object at 0x7f7a5ccc1fa0>> and will run it as-is

Hi Dan, gast==0.2.2 Cheers

On Thu, 5 Dec 2019 at 01:59, Dan Moldovan notifications@github.com wrote:

I'm looking into this, but am a bit swamped today. If you have the chance, could you check the version of gast you have installed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/tensorflow/issues/34433?email_source=notifications&email_token=AAB26QXHEPMOUDV47WAHBJDQW7AUFA5CNFSM4JPNL272YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF5JVBI#issuecomment-561683077, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QSSYU74LWBQPDBBHC3QW7AUFANCNFSM4JPNL27Q .

dbonner

comment created time in 4 months

issue commenttensorflow/tensorflow

r2.0/2.1 Python 3.8 AutoGraph could not transform <bound method LinearRegressionTF.fit of <tensorflow.python.eager.function.TfMethodTarget object at 0x7f7a5ccc1fa0>> and will run it as-is

@gadagashwini and @jvishnuvardhan I expected Python 3.6 with TF2.0 to work without warning or error. I believe this problem only occurs with Python 3.8 with TF2.0 built from source using Python 3.8. All the best, Daniel

dbonner

comment created time in 4 months

issue openedtensorflow/tensorflow

Build from head fails with Bazel 1.1.0 but succeeds with Bazel 0.26.1

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • TensorFlow installed from (source or binary): source (building source issue)
  • TensorFlow version: build from head (2.0.0)
  • Python version: 3.7.3
  • Installed using virtualenv? pip? conda?: Conda
  • Bazel version (if compiling from source): 1.1.0 fails while 0.26.1 succeeds
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: CUDA 10.1, cuDNN 7.6.5
  • GPU model and memory: Nvidia RTX 2080 Ti

Describe the problem Building with Bazel 1.1.0 fails with the following message: ImportError: /home/daniel/.cache/bazel/_bazel_daniel/79db702fc9f94af7d11e11c5d64854d0/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_1_keras_python_api_gen.runfiles/org_tensorflow/tensorflow/compiler/tf2tensorrt/_wrap_py_utils.so: undefined symbol: _ZN10tensorflowlsERSoRKNS_6StatusE

Note: The failure of target //tensorflow/python/keras/api:create_tensorflow.python_api_1_keras_python_api_gen (with exit code 1) may have been caused by the fact that it is a Python 2 program that was built in the host configuration, which uses Python 3. You can change the host configuration (for the entire build) to instead use Python 2 by setting --host_force_python=PY2. If this error started occurring in Bazel 0.27 and later, it may be because the Python toolchain now enforces that targets analyzed as PY2 and PY3 run under a Python 2 and Python 3 interpreter, respectively. See https://github.com/bazelbuild/bazel/issues/7899 for more information.

Provide the exact sequence of commands / steps that you executed before running into the problem git clone https://github.com/tensorflow/tensorflow.git cd tensorflow git checkout -b mybranch ./configure tf_configure.bazelrc.txt bazel build --explain=verbose_explanations.txt --verbose_explanations --verbose_failures --subcommands=pretty_print --config=opt --config=cuda --config=v2 --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package &> log.txt

Any other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

See ful log.txt (which shows failure with Bazel 1.1.0) and log2.txt (which shows success with Bazel 0.26.1) from the following link: https://www.dropbox.com/sh/mz1qvrd2yw0fb0a/AAB5ZAIWH0fj7C5okI1By-rna?dl=0

created time in 4 months

issue openedtensorflow/tensorflow

Build failure: undefined reference to protobuf symbols #34117 closed issue still occurring on r2.1

Re: https://github.com/tensorflow/tensorflow/issues/34117 This issue is still occurring when I build r2.1 branch with bazel 1.1.0. It has been fixed on head. Would it be possible to implement the fix on build r2.1 Also the maximum bazel version needs to be increased to 1.1.0 in configure.py once the fix is implemented (in both head and r2.1).

created time in 4 months

issue commenttensorflow/tensorflow

Build failure: undefined reference to protobuf symbols

I am still in the process of building with bazel 1.1.0 and will report back how it goes. If successful, can we update configure.py to allow maximum bazel version of 1.1.0 please?

dbonner

comment created time in 4 months

issue openedtensorflow/tensorflow

r2.0/2.1 Python 3.8 AutoGraph could not transform <bound method LinearRegressionTF.fit of <tensorflow.python.eager.function.TfMethodTarget object at 0x7f7a5ccc1fa0>> and will run it as-is

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes (attached file code_warning_py38.py.txt -> rename it as .py and execute it)
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): This problem occurs with both r2.0 (built from head) and r2.1rc0
  • Python version: 3.8 virtual environment (The problem does not occur with Python 3.7.3)
  • Bazel version (if compiling from source): 0.26.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: CUDA 10 / cuDNN 7.6.5
  • GPU model and memory: Nvidia Geforce RTX 2080 Ti

Describe the current behavior export AUTOGRAPH_VERBOSITY=10 Run the attached python script (renamed as .py) python code_warning_py38.py &> output.txt Read the output in the attached output.txt

Describe the expected behavior There is no warning message when the script is run with Python 3.7.3

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. See both files attached. code_warning_py38.py.txt output.txt

created time in 4 months

issue commenttensorflow/tensorflow

Build failure: undefined reference to protobuf symbols

@scentini I don't know if the build would have been successful with bazel 0.26.1 before https://github.com/tensorflow/tensorflow/commit/a73d7ace8e3c5a59d2325b95f3b02e225a977ff2. I tested building after the patch with bazel 0.26.1 and it worked. I am building the r2.1 branch with bazel 0.26.1 at the moment. It has the same error when you try to build it with bazel 0.27.1.

dbonner

comment created time in 4 months

issue commenttensorflow/tensorflow

Build failure: undefined reference to protobuf symbols

Yes, 0.27.1 still fails with the patch. It builds with bazel 0.26.1. You have to run ./configure with bazel 0.27.1 or higher. Otherwise it won't let you run ./configure. Then uninstall bazel (sudo apt remove bazel) Then install bazel 0.26.1 Then it will build successfully.

dbonner

comment created time in 4 months

issue commentvknabel/sourcekite

make install 'XMLParser' is unavailable

Hi @vknabel and thanks for the advice about vim @KnaveM, Yes, I can confirm that 0.6.1 fixes this issue and sourcekite is built successfully. There is a warning message (see below for the output of the build process with warning message in bold). I don't know if this warning message is a concern: git clone https://github.com/vknabel/sourcekite cd sourcekite mkdir /home/daniel/usr/local/bin make install PREFIX=/home/daniel/usr/local Output: swift build -c release Fetching https://github.com/Quick/Nimble.git Fetching https://github.com/Carthage/Commandant.git Fetching https://github.com/mattgallagher/CwlPreconditionTesting.git Fetching https://github.com/jpsim/Yams.git Fetching https://github.com/mattgallagher/CwlCatchException.git Fetching https://github.com/Quick/Quick.git Fetching https://github.com/jpsim/SourceKitten Fetching https://github.com/drmohundro/SWXMLHash.git Cloning https://github.com/Quick/Nimble.git Resolving https://github.com/Quick/Nimble.git at 8.0.4 Cloning https://github.com/drmohundro/SWXMLHash.git Resolving https://github.com/drmohundro/SWXMLHash.git at 5.0.1 Cloning https://github.com/jpsim/Yams.git Resolving https://github.com/jpsim/Yams.git at 2.0.0 Cloning https://github.com/mattgallagher/CwlPreconditionTesting.git Resolving https://github.com/mattgallagher/CwlPreconditionTesting.git at 1.2.0 Cloning https://github.com/jpsim/SourceKitten Resolving https://github.com/jpsim/SourceKitten at 0.27.0 Cloning https://github.com/Carthage/Commandant.git Resolving https://github.com/Carthage/Commandant.git at 0.17.0 Cloning https://github.com/mattgallagher/CwlCatchException.git Resolving https://github.com/mattgallagher/CwlCatchException.git at 1.2.0 Cloning https://github.com/Quick/Quick.git Resolving https://github.com/Quick/Quick.git at 2.2.0 /home/daniel/sourcekite/.build/checkouts/SourceKitten/Source/SourceKittenFramework/CodeCompletionItem.swift:65:65: warning: cast from 'SourceKitRepresentable?' to unrelated type 'CodeCompletionItem.NumBytesInt' (aka 'Int') always fails numBytesToErase: dict["key.num_bytes_to_erase"] as? **NumBytesInt) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ **~~~~~~~~~~~** [13/13] Linking sourcekite cp .build/release/sourcekite /home/daniel/usr/local/bin/ All the best, Dan

bmaciag

comment created time in 4 months

issue commentdrmohundro/SWXMLHash

Need to update SWXMLHash.swift to use FoundationXML

Apologies. I just realised that you have updated SWXMLHash to import FoundationXML. I was building sourcekite (https://github.com/vknabel/sourcekite), which in turn is dependant on SourceKitten (https://github.com/jpsim/SourceKitten, .package(url: "https://github.com/jpsim/SourceKitten", from: "0.24.0"),), which in turn is dependant on SWXMLHash (.package(url: "https://github.com/drmohundro/SWXMLHash.git", .upToNextMinor(from: "4.9.0")). The version of the file SWXMLHash.swift that gets downloaded when I build sourcekite does not account for the change to needing the FoundationXML module.

dbonner

comment created time in 4 months

issue openeddrmohundro/SWXMLHash

Need to update SWXMLHash.swift to use FoundationXML

SWXMLHash no longer builds with Swift 5.1. To fix: Edit SWXMLHash.swift Add: import FoundationXML Replace: Foundation.XMLParser with FoundationXML.XMLParser These needs to be done about 20-30 times in the file. Please update for Swift 5.1

created time in 4 months

issue commentvknabel/sourcekite

make install 'XMLParser' is unavailable

This is how I fixed this problem: After receiving this error during make install: sudo nano ~/sourcekite/.build/checkouts/SWXMLHash/Source/SWXMLHash.swift Add: import FoundationXML Replace Foundation.XMLParser with FoundationXML.XMLParser You need to replace it about 20-30 times. Then run: make install and it works.

bmaciag

comment created time in 4 months

issue commenttensorflow/tensorflow

Building from head fails - functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x1ac7): undefined reference to `tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)'

@mihaimaruseac log.txt is 119 MB so can't be uploaded to github. You can download from this link: https://www.dropbox.com/s/c7xc9y37k617z93/log.txt?dl=0 Many thanks for helping with this issue.

dbonner

comment created time in 4 months

issue commenttensorflow/tensorflow

Building from head fails - undefined reference to tensorflow::register_op

@gadagashwini Here is the output as requested: ./configure WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown". You have bazel 0.29.1 installed. Please specify the location of python. [Default is /home/daniel/anaconda3/envs/tfgpu/bin/python]:

Found possible Python library paths: /home/daniel/anaconda3/envs/tfgpu/lib/python3.7/site-packages Please input the desired Python library path to use. Default is [/home/daniel/anaconda3/envs/tfgpu/lib/python3.7/site-packages]

Do you wish to build TensorFlow with XLA JIT support? [Y/n]: Y XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: N No OpenCL SYCL support will be enabled for TensorFlow.

Do you wish to build TensorFlow with ROCm support? [y/N]: N No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: y CUDA support will be enabled for TensorFlow.

Do you wish to build TensorFlow with TensorRT support? [y/N]: y TensorRT support will be enabled for TensorFlow.

Found CUDA 10.0 in: /usr/local/cuda/lib64 /usr/local/cuda/include Found cuDNN 7 in: /usr/lib/x86_64-linux-gnu /usr/include Found TensorRT 6 in: /usr/lib/x86_64-linux-gnu /usr/include/x86_64-linux-gnu

Please specify a list of comma-separated CUDA compute capabilities you want to build with. You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. Please note that each additional compute capability significantly increases your build time and binary size, and that TensorFlow only supports compute capabilities >= 3.5 [Default is: 3.5,7.0]: 7.5

Do you want to use clang as CUDA compiler? [y/N]: N nvcc will be used as CUDA compiler.

Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]:

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native -Wno-sign-compare]:

Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: Not configuring the WORKSPACE for Android builds.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details. --config=mkl # Build with MKL support. --config=monolithic # Config for mostly static monolithic build. --config=ngraph # Build with Intel nGraph support. --config=numa # Build with NUMA support. --config=dynamic_kernels # (Experimental) Build kernels into separate shared objects. --config=v2 # Build TensorFlow 2.x instead of 1.x. Preconfigured Bazel build configs to DISABLE default on features: --config=noaws # Disable AWS S3 filesystem support. --config=nogcp # Disable GCP support. --config=nohdfs # Disable HDFS support. --config=nonccl # Disable NVIDIA NCCL support. Configuration finished

dbonner

comment created time in 5 months

issue commenttensorflow/tensorflow

Build failed on matrix_square_root_op using GCC 7.4.0 and Ubuntu 18.04

When you run ./configure with bazel 0.26.1 you are told that you must install a higher version of bazel.

nlbutts

comment created time in 5 months

issue openedtensorflow/tensorflow

Building from head fails - undefined reference to tensorflow::register_op

<em>Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em>

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04.3
  • Python version: Tried with python 3.7.3 and python 3.8
  • Installed using virtualenv? pip? conda?: conda python 3.7.3 and virtualenv python 3.8
  • Bazel version (if compiling from source): 0.29.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: CUDA 10.0 and cuDNN 7.6.4
  • GPU model and memory: Nvidia RTX 2080 Ti

Describe the problem Build fails most of the way in to build.

Provide the exact sequence of commands / steps that you executed before running into the problem

git clone https://github.com/tensorflow/tensorflow.git cd tensorflow git checkout -b mybranch (make up a branch to checkout head) bazel build --config=opt --config=cuda --config=v2 --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package

Here is the last part of the terminal's output: bazel-out/host/bin/tensorflow/core/libfunctional_ops_op_lib.lo(functional_ops.o): In function tensorflow::register_op::OpDefBuilderWrapper<true>::SetShapeFn(tensorflow::Status (*)(tensorflow::shape_inference::InferenceContext*))': functional_ops.cc:(.text._ZN10tensorflow11register_op19OpDefBuilderWrapperILb1EE10SetShapeFnEPFNS_6StatusEPNS_15shape_inference16InferenceContextEE[_ZN10tensorflow11register_op19OpDefBuilderWrapperILb1EE10SetShapeFnEPFNS_6StatusEPNS_15shape_inference16InferenceContextEE]+0x4f): undefined reference totensorflow::OpDefBuilder::SetShapeFn(std::function<tensorflow::Status (tensorflow::shape_inference::InferenceContext*)>)' bazel-out/host/bin/tensorflow/core/libfunctional_ops_op_lib.lo(functional_ops.o): In function tensorflow::Status tensorflow::errors::InvalidArgument<char const*, unsigned long, char const*, int>(char const*, unsigned long, char const*, int)': functional_ops.cc:(.text._ZN10tensorflow6errors15InvalidArgumentIJPKcmS3_iEEENS_6StatusEDpT_[_ZN10tensorflow6errors15InvalidArgumentIJPKcmS3_iEEENS_6StatusEDpT_]+0x42): undefined reference totensorflow::strings::FastInt32ToBufferLeft(int, char*)' functional_ops.cc:(.text.ZN10tensorflow6errors15InvalidArgumentIJPKcmS3_iEEENS_6StatusEDpT[ZN10tensorflow6errors15InvalidArgumentIJPKcmS3_iEEENS_6StatusEDpT]+0x82): undefined reference to tensorflow::strings::FastUInt64ToBufferLeft(unsigned long long, char*)' functional_ops.cc:(.text._ZN10tensorflow6errors15InvalidArgumentIJPKcmS3_iEEENS_6StatusEDpT_[_ZN10tensorflow6errors15InvalidArgumentIJPKcmS3_iEEENS_6StatusEDpT_]+0xd4): undefined reference totensorflow::strings::StrCat[abi:cxx11](tensorflow::strings::AlphaNum const&, tensorflow::strings::AlphaNum const&, tensorflow::strings::AlphaNum const&, tensorflow::strings::AlphaNum const&)' functional_ops.cc:(.text.ZN10tensorflow6errors15InvalidArgumentIJPKcmS3_iEEENS_6StatusEDpT[ZN10tensorflow6errors15InvalidArgumentIJPKcmS3_iEEENS_6StatusEDpT]+0xef): undefined reference to tensorflow::Status::Status(tensorflow::error::Code, absl::string_view)' bazel-out/host/bin/tensorflow/core/libfunctional_ops_op_lib.lo(functional_ops.o): In functiontensorflow::IfShapeInferenceFn(tensorflow::shape_inference::InferenceContext*)': functional_ops.cc:(.text._ZN10tensorflow18IfShapeInferenceFnEPNS_15shape_inference16InferenceContextE+0x3f): undefined reference to tensorflow::AttrSlice::AttrSlice(tensorflow::NodeDef const&)' functional_ops.cc:(.text._ZN10tensorflow18IfShapeInferenceFnEPNS_15shape_inference16InferenceContextE+0x62): undefined reference totensorflow::GetNodeAttr(tensorflow::AttrSlice const&, absl::string_view, std::vector<tensorflow::PartialTensorShape, std::allocatortensorflow::PartialTensorShape >)' functional_ops.cc:(.text._ZN10tensorflow18IfShapeInferenceFnEPNS_15shape_inference16InferenceContextE+0x137): undefined reference to tensorflow::shape_inference::InferenceContext::MakeShapeFromPartialTensorShape(tensorflow::PartialTensorShape const&, tensorflow::shape_inference::ShapeHandle*)' functional_ops.cc:(.text._ZN10tensorflow18IfShapeInferenceFnEPNS_15shape_inference16InferenceContextE+0x233): undefined reference totensorflow::TensorShapeRep::DestructorOutOfLine()' functional_ops.cc:(.text._ZN10tensorflow18IfShapeInferenceFnEPNS_15shape_inference16InferenceContextE+0x268): undefined reference to tensorflow::shape_inference::UnknownShape(tensorflow::shape_inference::InferenceContext*)' bazel-out/host/bin/tensorflow/core/libfunctional_ops_op_lib.lo(functional_ops.o): In functiontensorflow::WhileShapeInferenceFn(tensorflow::shape_inference::InferenceContext)': functional_ops.cc:(.text._ZN10tensorflow21WhileShapeInferenceFnEPNS_15shape_inference16InferenceContextE+0x3f): undefined reference to tensorflow::AttrSlice::AttrSlice(tensorflow::NodeDef const&)' functional_ops.cc:(.text._ZN10tensorflow21WhileShapeInferenceFnEPNS_15shape_inference16InferenceContextE+0x62): undefined reference totensorflow::GetNodeAttr(tensorflow::AttrSlice const&, absl::string_view, std::vector<tensorflow::PartialTensorShape, std::allocatortensorflow::PartialTensorShape >)' functional_ops.cc:(.text._ZN10tensorflow21WhileShapeInferenceFnEPNS_15shape_inference16InferenceContextE+0x137): undefined reference to tensorflow::shape_inference::InferenceContext::MakeShapeFromPartialTensorShape(tensorflow::PartialTensorShape const&, tensorflow::shape_inference::ShapeHandle*)' functional_ops.cc:(.text._ZN10tensorflow21WhileShapeInferenceFnEPNS_15shape_inference16InferenceContextE+0x203): undefined reference totensorflow::TensorShapeRep::DestructorOutOfLine()' bazel-out/host/bin/tensorflow/core/libfunctional_ops_op_lib.lo(functional_ops.o): In function tensorflow::{lambda(tensorflow::shape_inference::InferenceContext*)#2}::_FUN(tensorflow::shape_inference::InferenceContext*)': functional_ops.cc:(.text._ZN10tensorflowUlPNS_15shape_inference16InferenceContextEE0_4_FUNES2_+0x3f): undefined reference totensorflow::AttrSlice::AttrSlice(tensorflow::NodeDef const&)' functional_ops.cc:(.text.ZN10tensorflowUlPNS_15shape_inference16InferenceContextEE0_4_FUNES2+0x62): undefined reference to tensorflow::GetNodeAttr(tensorflow::AttrSlice const&, absl::string_view, std::vector<tensorflow::PartialTensorShape, std::allocator<tensorflow::PartialTensorShape> >*)' functional_ops.cc:(.text._ZN10tensorflowUlPNS_15shape_inference16InferenceContextEE0_4_FUNES2_+0x137): undefined reference totensorflow::shape_inference::InferenceContext::MakeShapeFromPartialTensorShape(tensorflow::PartialTensorShape const&, tensorflow::shape_inference::ShapeHandle)' functional_ops.cc:(.text.ZN10tensorflowUlPNS_15shape_inference16InferenceContextEE0_4_FUNES2+0x233): undefined reference to tensorflow::TensorShapeRep::DestructorOutOfLine()' functional_ops.cc:(.text._ZN10tensorflowUlPNS_15shape_inference16InferenceContextEE0_4_FUNES2_+0x268): undefined reference totensorflow::shape_inference::UnknownShape(tensorflow::shape_inference::InferenceContext*)' bazel-out/host/bin/tensorflow/core/libfunctional_ops_op_lib.lo(functional_ops.o): In function tensorflow::OpDefBuilder::~OpDefBuilder()': functional_ops.cc:(.text._ZN10tensorflow12OpDefBuilderD2Ev[_ZN10tensorflow12OpDefBuilderD5Ev]+0x1c4): undefined reference totensorflow::OpDef::~OpDef()' bazel-out/host/bin/tensorflow/core/libfunctional_ops_op_lib.lo(functional_ops.o): In function __static_initialization_and_destruction_0(int, int) [clone .constprop.70]': functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x140): undefined reference totensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x2d3): undefined reference to tensorflow::OpDefBuilder::SetIsStateful()' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x2e1): undefined reference totensorflow::shape_inference::UnknownShape(tensorflow::shape_inference::InferenceContext*)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x2f8): undefined reference to tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x511): undefined reference totensorflow::OpDefBuilder::SetIsStateful()' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x51f): undefined reference to tensorflow::shape_inference::UnknownShape(tensorflow::shape_inference::InferenceContext*)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x570): undefined reference totensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x808): undefined reference to tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0xa91): undefined reference totensorflow::OpDefBuilder::SetIsStateful()' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0xab6): undefined reference to tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0xcdf): undefined reference totensorflow::OpDefBuilder::SetIsStateful()' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0xd04): undefined reference to tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0xe95): undefined reference totensorflow::OpDefBuilder::SetIsStateful()' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0xeea): undefined reference to tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x10bf): undefined reference totensorflow::OpDefBuilder::SetIsStateful()' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x10e4): undefined reference to tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x12e4): undefined reference totensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x14cd): undefined reference to tensorflow::shape_inference::UnknownShape(tensorflow::shape_inference::InferenceContext*)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x14e4): undefined reference totensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x16fd): undefined reference to tensorflow::shape_inference::UnknownShape(tensorflow::shape_inference::InferenceContext*)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x1714): undefined reference totensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x1951): undefined reference to tensorflow::OpDefBuilder::SetIsStateful()' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x195f): undefined reference totensorflow::shape_inference::UnknownShape(tensorflow::shape_inference::InferenceContext*)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x1976): undefined reference to tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' functional_ops.cc:(.text.startup._Z41__static_initialization_and_destruction_0ii.constprop.70+0x1ac7): undefined reference totensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper<true> const&)' collect2: error: ld returned 1 exit status 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: 6696.021s, Critical Path: 265.12s INFO: 24934 processes: 24934 local. FAILED: Build did NOT complete successfully (tf38) daniel@linuxcorsair:~/tensorflow$

Any other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

created time in 5 months

issue openedtensorflow/tensorflow

TPU support has regressed in tf-nightly (worked perfectly in tf=2.0.0) - operation or function not registered in the binary running in this process

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes (see below). The code has been adopted from the Colab notebook (https://colab.research.google.com/drive/1yWaLpCWImXZE2fPV0ZYDdWWI8f52__9A#scrollTo=mnhwpzb73KIL) with instructions below on how to run a TPU using ctpu. I have 90 days free access with TFRC.
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Google Cloud TPU pair (Master VM is Linux 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64 GNU/Linux and TPU is v3.8 8 corel)
  • TensorFlow installed from (source or binary): binary (pip)
  • TensorFlow version (use command below): Tested on tf-nightly binary (2.1.0-dev20191102) from pip.
  • Python version: conda-forge 3.7.3

Describe the current behavior When tf-nightly is installed, following the setup instructions below and running the attached code (yourcode.py) gives an error. It occurs at lines 54-56 (traceback line 56) of yourcode.py: tpu = tf.distribute.cluster_resolver.TPUClusterResolver() tf.config.experimental_connect_to_cluster(tpu) tf.tpu.experimental.initialize_tpu_system(tpu)

I have marked the place at line 58 with "# This is where the error occurs".

The full output including the error is (follow the steps under "Code to reproduce this issue"):

2019-11-03 06:59:16.549391: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory 2019-11-03 06:59:16.549450: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2.1.0-dev20191102 2019-11-03 06:59:18.662355: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory 2019-11-03 06:59:18.662422: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303) 2019-11-03 06:59:18.662459: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (mimetic): /proc/driver/nvidia/version does not exist 2019-11-03 06:59:18.663151: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2019-11-03 06:59:18.672455: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2300000000 Hz 2019-11-03 06:59:18.673297: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55ca94e697b0 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2019-11-03 06:59:18.673382: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version INFO:absl:Overwrite dataset info from restored data version. INFO:absl:Reusing dataset glue (gs://mimetic_store/glue/mrpc/0.0.2) INFO:absl:Constructing tf.data.Dataset for split None, from gs://mimetic_store/glue/mrpc/0.0.2 Saved glue_mnli_train. Saved glue_mnli_valid. 2019-11-03 07:00:41.886095: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:300] Initialize GrpcChannelCache for job worker -> {0 -> 10.240.1.2:8470} 2019-11-03 07:00:41.886162: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:300] Initialize GrpcChannelCache for job localhost -> {0 -> localhost:54535} 2019-11-03 07:01:53.957214: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:300] Initialize GrpcChannelCache for job worker -> {0 -> 10.240.1.2:8470} 2019-11-03 07:01:53.957297: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:300] Initialize GrpcChannelCache for job localhost -> {0 -> localhost:54535} 2019-11-03 07:01:53.958220: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:390] Started server with target: grpc://localhost:54535 INFO:absl:Entering into master device scope: /job:worker/replica:0/task:0/device:CPU:0 Traceback (most recent call last): File "yourcode.py", line 56, in <module> tf.tpu.experimental.initialize_tpu_system(tpu) File "/home/daniel_bonner_anu_edu_au/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/tpu/tpu_strategy_util.py", line 103, in initialize_tpu_system serialized_topology = output.numpy() File "/home/daniel_bonner_anu_edu_au/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 942, in numpy maybe_arr = self._numpy() # pylint: disable=protected-access File "/home/daniel_bonner_anu_edu_au/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 910, in _numpy six.raise_from(core._status_to_exception(e.code, e.message), None) File "<string>", line 3, in raise_from tensorflow.python.framework.errors_impl.NotFoundError: '__inference__tpu_init_fn_4206710' is neither a type of a primitive operation nor a name of a function registered in binary running on n-48a744b7-w-0. Make sure the operation or function is registered in the binary running in this process. 2019-11-03 07:01:54.492446: W tensorflow/core/distributed_runtime/eager/remote_tensor_handle_data.cc:75] Unable to destroy remote tensor handles. If you are running a tf.function, it usually indicates some op in the graph gets an error: '__inference__tpu_init_fn_4206710' is neither a type of a primitive operation nor a name of a function registered in binary running on n-48a744b7-w-0. Make sure the operation or function is registered in the binary running in this process.

Describe the expected behavior When tested on tensorflow==2.0.0 from pip, the code completes. The whole process (with tf2.0.0) outputs at the end: Epoch: [2] Validation accuracy = 0.843137264251709

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem.

Create a Google Cloud master VM and TPU pair:

ctpu up --name=yourtpupair --zone=us-central1-a --tpu-size=v3-8 --machine-type=n1-standard-8 --disk-size-gb=40

Set up a conda python 3.7 development environment with tf-nightly on the master VM

sudo apt update && sudo apt install bzip2 libxml2-dev libxslt-dev -y && wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh && bash Anaconda3-2019.10-Linux-x86_64.sh

Accept the defaults and initialize Anaconda

rm Anaconda3-2019.10-Linux-x86_64.sh && . ~/.bashrc && conda config --add channels anaconda && conda config --add channels conda-forge && conda config --set channel_priority strict && conda create -n yourconda python=3.7 -y && conda activate yourconda

conda install tqdm

pip install tensorflow-datasets transformers && pip install --upgrade google-api-python-client && pip install --upgrade oauth2client && pip install --ignore-installed --upgrade tf-nightly

Download the "glue/mrpc" dataset to ~/tensorflow_datasets in a python shell:

python import tensorflow as tf import tensorflow_datasets data = tensorflow_datasets.load("glue/mrpc")

Create a Google storage bucket named "your_bucket".

Copy the entire folder (~/tensorflow_datasets/glue) to gs://your_bucket

Run the code in yourcode.py on a Google Cloud VM master's conda environment (yourconda) connected to TPU:

python yourcode.py

The output above (including the error) is produced.

Now install tensorflow==2.0.0 and rerun it and training will complete:

pip install --ignore-installed --upgrade tensorflow==2.0.0 python yourcode.py

yourcode.py.txt (rename it yourcode.py)

created time in 5 months

issue commenttensorflow/tensorflow

TF 2.0.0 Python 3.8 TypeError: _logger_find_caller() takes from 0 to 1 positional arguments but 2 were given

Hi @ymodak, Have you had a chance to test the python 3.8 error I reported (Issue: #33799). All the best, Dan

dbonner

comment created time in 5 months

issue closedtensorflow/tensorflow

TF2.0.0 Error on InceptionV3

Last Edit: This is too hard to reproduce. It relies on a custom 'pylib' module. Closing the issue.

I have updated this post to have a more user-friendly piece of code. You need to run it with ipython or paste it in to a cell on jupyter notebook because the first three lines are bash script executed using the (!) magic command. I have seen this code execute properly with Python 3.6 running on a CPU. I can't get it to run on Python 3.7. Not sure if it has anything to do with my GPU. Sorry, I can't be more certain about this. code_inception.txt

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): 2.0.0
  • Python version: 3.7 conda environment
  • Bazel version (if compiling from source): 0.26.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: CUDA 10/ cuDNN 7.6.4
  • GPU model and memory: NVidia RTX 2080 TI and RTX 2080 MaxQ

You can collect some of this information using our environment capture script You can also obtain the TensorFlow version with: 1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the current behavior

Error produced on python 3.7 on GPU (not on python 3.6 TF2.0.0 on a CPU):

  1/Unknown - 0s 71ms/step

ValueError Traceback (most recent call last) <ipython-input-6-992b5c7b95cf> in <module> 2 # BUMP EPOCHS to 50 for true training 3 EPOCHS = 1 # 50 ----> 4 model.fit(dataset, epochs=EPOCHS)

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs) 783 max_queue_size=max_queue_size, 784 workers=workers, --> 785 use_multiprocessing=use_multiprocessing) 786 787 def evaluate(self,

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py in fit(self, model, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs) 335 mode=ModeKeys.TRAIN, 336 training_context=training_context, --> 337 total_epochs=epochs) 338 cbks.make_logs(model, epoch_logs, training_result, ModeKeys.TRAIN) 339

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py in run_one_epoch(model, iterator, execution_function, dataset_size, batch_size, strategy, steps_per_epoch, num_samples, mode, training_context, total_epochs) 125 step=step, mode=mode, size=current_batch_size) as batch_logs: 126 try: --> 127 batch_outs = execution_function(iterator) 128 except (StopIteration, errors.OutOfRangeError): 129 # TODO(kaftan): File bug about tf function and errors.OutOfRangeError?

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py in execution_function(input_fn) 84 # numpy translates Tensors to values in Eager mode. 85 return nest.map_structure(_non_none_constant_value, ---> 86 distributed_function(input_fn)) 87 88 return execution_function

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in call(self, *args, **kwds) 566 xla_context.Exit() 567 else: --> 568 result = self._call(*args, **kwds) 569 570 if tracing_count == self._get_tracing_count():

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in _call(self, *args, **kwds) 613 # This is the first call of call, so we have to initialize. 614 initializers = [] --> 615 self._initialize(args, kwds, add_initializers_to=initializers) 616 finally: 617 # At this point we know that the initialization is complete (or less

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in _initialize(self, args, kwds, add_initializers_to) 495 self._concrete_stateful_fn = ( 496 self._stateful_fn._get_concrete_function_internal_garbage_collected( # pylint: disable=protected-access --> 497 *args, **kwds)) 498 499 def invalid_creator_scope(*unused_args, **unused_kwds):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py in _get_concrete_function_internal_garbage_collected(self, *args, **kwargs) 2363 args, kwargs = None, None 2364 with self._lock: -> 2365 graph_function, _, _ = self._maybe_define_function(args, kwargs) 2366 return graph_function 2367

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py in _maybe_define_function(self, args, kwargs) 2671 2672 self._function_cache.missed.add(call_context_key) -> 2673 graph_function = self._create_graph_function(args, kwargs) 2674 self._function_cache.primary[cache_key] = graph_function 2675 return graph_function, args, kwargs

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py in _create_graph_function(self, args, kwargs, override_flat_arg_shapes) 2561 arg_names=arg_names, 2562 override_flat_arg_shapes=override_flat_arg_shapes, -> 2563 capture_by_value=self._capture_by_value), 2564 self._function_attributes, 2565 # Tell the ConcreteFunction to clean up its graph once it goes out of

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py in func_graph_from_py_func(name, python_func, args, kwargs, signature, func_graph, autograph, autograph_options, add_control_dependencies, arg_names, op_return_value, collections, capture_by_value, override_flat_arg_shapes) 956 converted_func) 957 --> 958 func_outputs = python_func(*func_args, **func_kwargs) 959 960 # invariant: func_outputs contains only Tensors, CompositeTensors,

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in wrapped_fn(*args, **kwds) 437 # wrapped allows AutoGraph to swap in a converted function. We give 438 # the function a weak reference to itself to avoid a reference cycle. --> 439 return weak_wrapped_fn().wrapped(*args, **kwds) 440 weak_wrapped_fn = weakref.ref(wrapped_fn) 441

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py in distributed_function(input_iterator) 71 strategy = distribution_strategy_context.get_strategy() 72 outputs = strategy.experimental_run_v2( ---> 73 per_replica_function, args=(x, y, sample_weights)) 74 # Out of PerReplica outputs reduce or pick values to return. 75 all_outputs = dist_utils.unwrap_output_dict(

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/distribute/distribute_lib.py in experimental_run_v2(self, fn, args, kwargs) 761 fn = autograph.tf_convert(fn, ag_ctx.control_status_ctx(), 762 convert_by_default=False) --> 763 return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs) 764 765 def reduce(self, reduce_op, value, axis):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/distribute/distribute_lib.py in call_for_each_replica(self, fn, args, kwargs) 1817 kwargs = {} 1818 with self._container_strategy().scope(): -> 1819 return self._call_for_each_replica(fn, args, kwargs) 1820 1821 def _call_for_each_replica(self, fn, args, kwargs):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/distribute/distribute_lib.py in _call_for_each_replica(self, fn, args, kwargs) 2162 self._container_strategy(), 2163 replica_id_in_sync_group=constant_op.constant(0, dtypes.int32)): -> 2164 return fn(*args, **kwargs) 2165 2166 def _reduce_to(self, reduce_op, value, destinations):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/autograph/impl/api.py in wrapper(*args, **kwargs) 290 def wrapper(*args, **kwargs): 291 with ag_ctx.ControlStatusCtx(status=ag_ctx.Status.DISABLED): --> 292 return func(*args, **kwargs) 293 294 if inspect.isfunction(func) or inspect.ismethod(func):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py in train_on_batch(model, x, y, sample_weight, class_weight, reset_metrics) 262 y, 263 sample_weights=sample_weights, --> 264 output_loss_metrics=model._output_loss_metrics) 265 266 if reset_metrics:

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_eager.py in train_on_batch(model, inputs, targets, sample_weights, output_loss_metrics) 310 sample_weights=sample_weights, 311 training=True, --> 312 output_loss_metrics=output_loss_metrics)) 313 if not isinstance(outs, list): 314 outs = [outs]

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_eager.py in _process_single_batch(model, inputs, targets, output_loss_metrics, sample_weights, training) 251 output_loss_metrics=output_loss_metrics, 252 sample_weights=sample_weights, --> 253 training=training)) 254 if total_loss is None: 255 raise ValueError('The model cannot be run '

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_eager.py in _model_loss(model, inputs, targets, output_loss_metrics, sample_weights, training) 125 inputs = nest.map_structure(ops.convert_to_tensor, inputs) 126 --> 127 outs = model(inputs, **kwargs) 128 outs = nest.flatten(outs) 129

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/base_layer.py in call(self, inputs, *args, **kwargs) 776 outputs = base_layer_utils.mark_as_return(outputs, acd) 777 else: --> 778 outputs = call_fn(cast_inputs, *args, **kwargs) 779 780 except errors.OperatorNotAllowedInGraphError as e:

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py in call(self, inputs, training, mask) 715 return self._run_internal_graph( 716 inputs, training=training, mask=mask, --> 717 convert_kwargs_to_constants=base_layer_utils.call_context().saving) 718 719 def compute_output_shape(self, input_shape):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py in _run_internal_graph(self, inputs, training, mask, convert_kwargs_to_constants) 871 872 # Compute outputs. --> 873 output_tensors = layer(computed_tensors, **kwargs) 874 875 # Update tensor_dict.

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/base_layer.py in call(self, inputs, *args, **kwargs) 776 outputs = base_layer_utils.mark_as_return(outputs, acd) 777 else: --> 778 outputs = call_fn(cast_inputs, *args, **kwargs) 779 780 except errors.OperatorNotAllowedInGraphError as e:

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py in call(self, inputs, training, mask) 715 return self._run_internal_graph( 716 inputs, training=training, mask=mask, --> 717 convert_kwargs_to_constants=base_layer_utils.call_context().saving) 718 719 def compute_output_shape(self, input_shape):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py in _run_internal_graph(self, inputs, training, mask, convert_kwargs_to_constants) 871 872 # Compute outputs. --> 873 output_tensors = layer(computed_tensors, **kwargs) 874 875 # Update tensor_dict.

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/base_layer.py in call(self, inputs, *args, **kwargs) 776 outputs = base_layer_utils.mark_as_return(outputs, acd) 777 else: --> 778 outputs = call_fn(cast_inputs, *args, **kwargs) 779 780 except errors.OperatorNotAllowedInGraphError as e:

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/layers/convolutional.py in call(self, inputs) 191 # behavior. 192 call_input_shape = inputs.get_shape() --> 193 call_input_channel = self._get_input_channel(call_input_shape) 194 if call_input_channel != self._build_input_channel: 195 raise ValueError(

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/layers/convolutional.py in _get_input_channel(self, input_shape) 299 channel_axis = self._get_channel_axis() 300 if input_shape.dims[channel_axis].value is None: --> 301 raise ValueError('The channel dimension of the inputs ' 302 'should be defined. Found None.') 303 return int(input_shape[channel_axis])

ValueError: The channel dimension of the inputs should be defined. Found None.

Describe the expected behavior No error. It trains.

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. See code_inception.txt attached

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Nil

closed time in 5 months

dbonner

issue commenttensorflow/tensorflow

TF 2.0.0 Python 3.8 TypeError: _logger_find_caller() takes from 0 to 1 positional arguments but 2 were given

@ravikyram I've finally got this right. Sorry to mess you around with this. Github markdown removed the underscores on the init part of the LinearRegressionTF() class when I pasted it in. This got transferred through to the code file. The correct code is attached. It runs fine in Python 3.7 but errors in Python 3.8. I have also removed the reference to the subdirectory "small_data" so you can run the code with the file "cal_house.json.gz" in the current working directory. code_py38_tf2_error.txt cal_house.json.gz

dbonner

comment created time in 5 months

issue openedtensorflow/tensorflow

TF2.0.0 with NVidia GPU Error on InceptionV3 (no error on CPU)

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): 2.0.0
  • Python version: 3.7 conda environment
  • Bazel version (if compiling from source): 0.26.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: CUDA 10/ cuDNN 7.6.4
  • GPU model and memory: NVidia RTX 2080 TI and RTX 2080 MaxQ

You can collect some of this information using our environment capture script You can also obtain the TensorFlow version with: 1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the current behavior

Error produced on GPU (not CPU):

  1/Unknown - 0s 71ms/step

ValueError Traceback (most recent call last) <ipython-input-6-992b5c7b95cf> in <module> 2 # BUMP EPOCHS to 50 for true training 3 EPOCHS = 1 # 50 ----> 4 model.fit(dataset, epochs=EPOCHS)

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs) 783 max_queue_size=max_queue_size, 784 workers=workers, --> 785 use_multiprocessing=use_multiprocessing) 786 787 def evaluate(self,

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py in fit(self, model, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs) 335 mode=ModeKeys.TRAIN, 336 training_context=training_context, --> 337 total_epochs=epochs) 338 cbks.make_logs(model, epoch_logs, training_result, ModeKeys.TRAIN) 339

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py in run_one_epoch(model, iterator, execution_function, dataset_size, batch_size, strategy, steps_per_epoch, num_samples, mode, training_context, total_epochs) 125 step=step, mode=mode, size=current_batch_size) as batch_logs: 126 try: --> 127 batch_outs = execution_function(iterator) 128 except (StopIteration, errors.OutOfRangeError): 129 # TODO(kaftan): File bug about tf function and errors.OutOfRangeError?

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py in execution_function(input_fn) 84 # numpy translates Tensors to values in Eager mode. 85 return nest.map_structure(_non_none_constant_value, ---> 86 distributed_function(input_fn)) 87 88 return execution_function

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in call(self, *args, **kwds) 566 xla_context.Exit() 567 else: --> 568 result = self._call(*args, **kwds) 569 570 if tracing_count == self._get_tracing_count():

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in _call(self, *args, **kwds) 613 # This is the first call of call, so we have to initialize. 614 initializers = [] --> 615 self._initialize(args, kwds, add_initializers_to=initializers) 616 finally: 617 # At this point we know that the initialization is complete (or less

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in _initialize(self, args, kwds, add_initializers_to) 495 self._concrete_stateful_fn = ( 496 self._stateful_fn._get_concrete_function_internal_garbage_collected( # pylint: disable=protected-access --> 497 *args, **kwds)) 498 499 def invalid_creator_scope(*unused_args, **unused_kwds):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py in _get_concrete_function_internal_garbage_collected(self, *args, **kwargs) 2363 args, kwargs = None, None 2364 with self._lock: -> 2365 graph_function, _, _ = self._maybe_define_function(args, kwargs) 2366 return graph_function 2367

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py in _maybe_define_function(self, args, kwargs) 2671 2672 self._function_cache.missed.add(call_context_key) -> 2673 graph_function = self._create_graph_function(args, kwargs) 2674 self._function_cache.primary[cache_key] = graph_function 2675 return graph_function, args, kwargs

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py in _create_graph_function(self, args, kwargs, override_flat_arg_shapes) 2561 arg_names=arg_names, 2562 override_flat_arg_shapes=override_flat_arg_shapes, -> 2563 capture_by_value=self._capture_by_value), 2564 self._function_attributes, 2565 # Tell the ConcreteFunction to clean up its graph once it goes out of

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py in func_graph_from_py_func(name, python_func, args, kwargs, signature, func_graph, autograph, autograph_options, add_control_dependencies, arg_names, op_return_value, collections, capture_by_value, override_flat_arg_shapes) 956 converted_func) 957 --> 958 func_outputs = python_func(*func_args, **func_kwargs) 959 960 # invariant: func_outputs contains only Tensors, CompositeTensors,

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in wrapped_fn(*args, **kwds) 437 # wrapped allows AutoGraph to swap in a converted function. We give 438 # the function a weak reference to itself to avoid a reference cycle. --> 439 return weak_wrapped_fn().wrapped(*args, **kwds) 440 weak_wrapped_fn = weakref.ref(wrapped_fn) 441

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py in distributed_function(input_iterator) 71 strategy = distribution_strategy_context.get_strategy() 72 outputs = strategy.experimental_run_v2( ---> 73 per_replica_function, args=(x, y, sample_weights)) 74 # Out of PerReplica outputs reduce or pick values to return. 75 all_outputs = dist_utils.unwrap_output_dict(

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/distribute/distribute_lib.py in experimental_run_v2(self, fn, args, kwargs) 761 fn = autograph.tf_convert(fn, ag_ctx.control_status_ctx(), 762 convert_by_default=False) --> 763 return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs) 764 765 def reduce(self, reduce_op, value, axis):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/distribute/distribute_lib.py in call_for_each_replica(self, fn, args, kwargs) 1817 kwargs = {} 1818 with self._container_strategy().scope(): -> 1819 return self._call_for_each_replica(fn, args, kwargs) 1820 1821 def _call_for_each_replica(self, fn, args, kwargs):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/distribute/distribute_lib.py in _call_for_each_replica(self, fn, args, kwargs) 2162 self._container_strategy(), 2163 replica_id_in_sync_group=constant_op.constant(0, dtypes.int32)): -> 2164 return fn(*args, **kwargs) 2165 2166 def _reduce_to(self, reduce_op, value, destinations):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/autograph/impl/api.py in wrapper(*args, **kwargs) 290 def wrapper(*args, **kwargs): 291 with ag_ctx.ControlStatusCtx(status=ag_ctx.Status.DISABLED): --> 292 return func(*args, **kwargs) 293 294 if inspect.isfunction(func) or inspect.ismethod(func):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py in train_on_batch(model, x, y, sample_weight, class_weight, reset_metrics) 262 y, 263 sample_weights=sample_weights, --> 264 output_loss_metrics=model._output_loss_metrics) 265 266 if reset_metrics:

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_eager.py in train_on_batch(model, inputs, targets, sample_weights, output_loss_metrics) 310 sample_weights=sample_weights, 311 training=True, --> 312 output_loss_metrics=output_loss_metrics)) 313 if not isinstance(outs, list): 314 outs = [outs]

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_eager.py in _process_single_batch(model, inputs, targets, output_loss_metrics, sample_weights, training) 251 output_loss_metrics=output_loss_metrics, 252 sample_weights=sample_weights, --> 253 training=training)) 254 if total_loss is None: 255 raise ValueError('The model cannot be run '

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_eager.py in _model_loss(model, inputs, targets, output_loss_metrics, sample_weights, training) 125 inputs = nest.map_structure(ops.convert_to_tensor, inputs) 126 --> 127 outs = model(inputs, **kwargs) 128 outs = nest.flatten(outs) 129

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/base_layer.py in call(self, inputs, *args, **kwargs) 776 outputs = base_layer_utils.mark_as_return(outputs, acd) 777 else: --> 778 outputs = call_fn(cast_inputs, *args, **kwargs) 779 780 except errors.OperatorNotAllowedInGraphError as e:

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py in call(self, inputs, training, mask) 715 return self._run_internal_graph( 716 inputs, training=training, mask=mask, --> 717 convert_kwargs_to_constants=base_layer_utils.call_context().saving) 718 719 def compute_output_shape(self, input_shape):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py in _run_internal_graph(self, inputs, training, mask, convert_kwargs_to_constants) 871 872 # Compute outputs. --> 873 output_tensors = layer(computed_tensors, **kwargs) 874 875 # Update tensor_dict.

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/base_layer.py in call(self, inputs, *args, **kwargs) 776 outputs = base_layer_utils.mark_as_return(outputs, acd) 777 else: --> 778 outputs = call_fn(cast_inputs, *args, **kwargs) 779 780 except errors.OperatorNotAllowedInGraphError as e:

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py in call(self, inputs, training, mask) 715 return self._run_internal_graph( 716 inputs, training=training, mask=mask, --> 717 convert_kwargs_to_constants=base_layer_utils.call_context().saving) 718 719 def compute_output_shape(self, input_shape):

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py in _run_internal_graph(self, inputs, training, mask, convert_kwargs_to_constants) 871 872 # Compute outputs. --> 873 output_tensors = layer(computed_tensors, **kwargs) 874 875 # Update tensor_dict.

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/base_layer.py in call(self, inputs, *args, **kwargs) 776 outputs = base_layer_utils.mark_as_return(outputs, acd) 777 else: --> 778 outputs = call_fn(cast_inputs, *args, **kwargs) 779 780 except errors.OperatorNotAllowedInGraphError as e:

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/layers/convolutional.py in call(self, inputs) 191 # behavior. 192 call_input_shape = inputs.get_shape() --> 193 call_input_channel = self._get_input_channel(call_input_shape) 194 if call_input_channel != self._build_input_channel: 195 raise ValueError(

~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow_core/python/keras/layers/convolutional.py in _get_input_channel(self, input_shape) 299 channel_axis = self._get_channel_axis() 300 if input_shape.dims[channel_axis].value is None: --> 301 raise ValueError('The channel dimension of the inputs ' 302 'should be defined. Found None.') 303 return int(input_shape[channel_axis])

ValueError: The channel dimension of the inputs should be defined. Found None.

Describe the expected behavior No error. It trains.

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. See code_inception.txt attached

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Nil code_inception.txt

created time in 5 months

issue commenttensorflow/tensorflow

TF 2.0.0 Python 3.8 TypeError: _logger_find_caller() takes from 0 to 1 positional arguments but 2 were given

@ravikyram I'm sorry the code is not properly indented in a number of places. Here is the properly indented code that reproduces this error on my system when running in one cell in Jupyter Notebook. I will also correct the indentation in the original post:

import tensorflow as tf import numpy as np import gzip import json from sklearn.model_selection import ShuffleSplit

with gzip.open("small_data/cal_house.json.gz", "r") as fin: housing = json.load(fin)

for train, test in ShuffleSplit(1, 0.2, random_state=42).split(housing['data']): X_train = np.array(housing['data'])[train].astype(np.float32) y_train = np.array(housing['target'])[train].astype(np.float32) X_test = np.array(housing['data'])[test].astype(np.float32) y_test = np.array(housing['target'])[test].astype(np.float32)

X_mean = X_train.mean(axis=0) X_std = X_train.std(axis=0)

Xs_train = (X_train - X_mean) / X_std Xs_test = (X_test - X_mean) / X_std

class LinearRegressionTF(): def init(self, eta=.1): self.W = tf.Variable(0.) self.b = tf.Variable(0.) self.opt = tf.keras.optimizers.SGD(learning_rate=eta)

def loss(self, X, y, return_func=False):
    def loss_():
        return tf.reduce_mean(tf.square(X * self.W + self.b - y))

    if not return_func:
        return loss_()

    return loss_

@tf.function
def fit(self, X, y, steps=1):
    for _ in range(steps):
        self.opt.minimize(self.loss(X, y, return_func=True), [self.W, self.b])

tf_model = LinearRegressionTF()

tf_model.fit(Xs_train[:, 0:1], y_train.reshape(-1, 1));

dbonner

comment created time in 5 months

issue openedtensorflow/tensorflow

TF 2.0.0 Python 3.8 TypeError: _logger_find_caller() takes from 0 to 1 positional arguments but 2 were given

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): See script from Tensorflow training session and uploaded file below. Nb: There is no error with TF2.0.0 and python 3.6 or 3.7. The error occurs with TF2.0.0 and python 3.8.
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): 2.0.0
  • Python version: 3.8
  • Bazel version (if compiling from source): 0.26.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: CUDA 10/cuDNN 7.6.4
  • GPU model and memory: NVidia RTX 2080 TI and 2080 MaxQ

Describe the current behavior

After running the code below (with the attached file), you get the following error:


AssertionError Traceback (most recent call last) ~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/impl/api.py in converted_call(f, args, kwargs, caller_fn_scope, options) 525 options=options, autograph_module=tf_inspect.getmodule(converted_call)) --> 526 converted_f = conversion.convert(target_entity, program_ctx) 527

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/impl/conversion.py in convert(entity, program_ctx) 324 --> 325 converted_entity_info = _convert_with_cache(entity, program_ctx, 326 free_nonglobal_var_names)

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/impl/conversion.py in _convert_with_cache(entity, program_ctx, free_nonglobal_var_names) 238 --> 239 nodes, converted_name, entity_info = convert_entity_to_ast( 240 entity, program_ctx)

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/impl/conversion.py in convert_entity_to_ast(o, program_ctx) 474 elif tf_inspect.ismethod(o): --> 475 nodes, name, entity_info = convert_func_to_ast(o, program_ctx) 476 elif hasattr(o, 'class'):

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/impl/conversion.py in convert_func_to_ast(f, program_ctx, do_rename) 672 context = converter.EntityContext(namer, entity_info, program_ctx, new_name) --> 673 node = node_to_graph(node, context) 674

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/impl/conversion.py in node_to_graph(node, context) 702 node = converter.standard_analysis(node, context, is_initial=True) --> 703 node = converter.apply_(node, context, function_scopes) 704 node = converter.apply_(node, context, arg_defaults)

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/core/converter.py in apply_(node, context, converter_module) 408 node = standard_analysis(node, context) --> 409 node = converter_module.transform(node, context) 410 return node

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/converters/function_scopes.py in transform(node, ctx) 119 def transform(node, ctx): --> 120 return FunctionBodyTransformer(ctx).visit(node)

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/core/converter.py in visit(self, node) 345 try: --> 346 return super(Base, self).visit(node) 347 finally:

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/pyct/transformer.py in visit(self, node) 479 if not anno.hasanno(node, anno.Basic.SKIP_PROCESSING): --> 480 result = super(Base, self).visit(node) 481 self.ctx.current_origin = parent_origin

/usr/local/lib/python3.8/ast.py in visit(self, node) 359 visitor = getattr(self, method, self.generic_visit) --> 360 return visitor(node) 361

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/converters/function_scopes.py in visit_FunctionDef(self, node) 101 """ --> 102 wrapped_body = templates.replace( 103 template,

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/pyct/templates.py in replace(template, **replacements) 268 for node in nodes: --> 269 node = ReplaceTransformer(replacements).visit(node) 270 if isinstance(node, (list, tuple)):

/usr/local/lib/python3.8/ast.py in visit(self, node) 359 visitor = getattr(self, method, self.generic_visit) --> 360 return visitor(node) 361

/usr/local/lib/python3.8/ast.py in generic_visit(self, node) 435 if isinstance(value, AST): --> 436 value = self.visit(value) 437 if value is None:

/usr/local/lib/python3.8/ast.py in visit(self, node) 359 visitor = getattr(self, method, self.generic_visit) --> 360 return visitor(node) 361

/usr/local/lib/python3.8/ast.py in generic_visit(self, node) 444 elif isinstance(old_value, AST): --> 445 new_node = self.visit(old_value) 446 if new_node is None:

/usr/local/lib/python3.8/ast.py in visit(self, node) 359 visitor = getattr(self, method, self.generic_visit) --> 360 return visitor(node) 361

/usr/local/lib/python3.8/ast.py in generic_visit(self, node) 435 if isinstance(value, AST): --> 436 value = self.visit(value) 437 if value is None:

/usr/local/lib/python3.8/ast.py in visit(self, node) 359 visitor = getattr(self, method, self.generic_visit) --> 360 return visitor(node) 361

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/pyct/templates.py in visit_Name(self, node) 199 --> 200 new_nodes = self._prepare_replacement(node, node.id) 201

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/pyct/templates.py in _prepare_replacement(self, replaced, key) 138 --> 139 new_nodes = ast_util.copy_clean(repl, preserve_annos=self.preserved_annos) 140 if isinstance(new_nodes, gast.AST):

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/pyct/ast_util.py in copy_clean(node, preserve_annos) 75 """ ---> 76 return CleanCopier(preserve_annos).copy(node) 77

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/pyct/ast_util.py in copy(self, node) 53 if not f.startswith('__') and hasattr(node, f): ---> 54 new_fields[f] = self.copy(getattr(node, f)) 55 new_node = type(node)(**new_fields)

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/pyct/ast_util.py in copy(self, node) 40 if isinstance(node, list): ---> 41 return [self.copy(n) for n in node] 42 elif isinstance(node, tuple):

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/pyct/ast_util.py in <listcomp>(.0) 40 if isinstance(node, list): ---> 41 return [self.copy(n) for n in node] 42 elif isinstance(node, tuple):

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/pyct/ast_util.py in copy(self, node) 54 new_fields[f] = self.copy(getattr(node, f)) ---> 55 new_node = type(node)(**new_fields) 56

~/tf38/lib/python3.8/site-packages/gast/gast.py in create_node(self, *args, **kwargs) 9 nbparam = len(args) + len(kwargs) ---> 10 assert nbparam in (0, len(Fields)),
11 "Bad argument number for {}: {}, expecting {}".\

AssertionError: Bad argument number for keyword: 1, expecting 2

During handling of the above exception, another exception occurred:

TypeError Traceback (most recent call last) <ipython-input-10-8b26b7af23a7> in <module> ----> 1 tf_model.fit(Xs_train[:, 0:1], y_train.reshape(-1, 1));

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/eager/def_function.py in call(self, *args, **kwds) 566 xla_context.Exit() 567 else: --> 568 result = self._call(*args, **kwds) 569 570 if tracing_count == self._get_tracing_count():

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/eager/def_function.py in _call(self, *args, **kwds) 613 # This is the first call of call, so we have to initialize. 614 initializers = [] --> 615 self._initialize(args, kwds, add_initializers_to=initializers) 616 finally: 617 # At this point we know that the initialization is complete (or less

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/eager/def_function.py in _initialize(self, args, kwds, add_initializers_to) 494 self._graph_deleter = FunctionDeleter(self._lifted_initializer_graph) 495 self._concrete_stateful_fn = ( --> 496 self._stateful_fn._get_concrete_function_internal_garbage_collected( # pylint: disable=protected-access 497 *args, **kwds)) 498

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/eager/function.py in _get_concrete_function_internal_garbage_collected(self, *args, **kwargs) 2363 args, kwargs = None, None 2364 with self._lock: -> 2365 graph_function, _, _ = self._maybe_define_function(args, kwargs) 2366 return graph_function 2367

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/eager/function.py in _maybe_define_function(self, args, kwargs) 2671 2672 self._function_cache.missed.add(call_context_key) -> 2673 graph_function = self._create_graph_function(args, kwargs) 2674 self._function_cache.primary[cache_key] = graph_function 2675 return graph_function, args, kwargs

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/eager/function.py in _create_graph_function(self, args, kwargs, override_flat_arg_shapes) 2551 arg_names = base_arg_names + missing_arg_names 2552 graph_function = ConcreteFunction( -> 2553 func_graph_module.func_graph_from_py_func( 2554 self._name, 2555 self._python_function,

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/framework/func_graph.py in func_graph_from_py_func(name, python_func, args, kwargs, signature, func_graph, autograph, autograph_options, add_control_dependencies, arg_names, op_return_value, collections, capture_by_value, override_flat_arg_shapes) 956 converted_func) 957 --> 958 func_outputs = python_func(*func_args, **func_kwargs) 959 960 # invariant: func_outputs contains only Tensors, CompositeTensors,

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/eager/def_function.py in wrapped_fn(*args, **kwds) 437 # wrapped allows AutoGraph to swap in a converted function. We give 438 # the function a weak reference to itself to avoid a reference cycle. --> 439 return weak_wrapped_fn().wrapped(*args, **kwds) 440 weak_wrapped_fn = weakref.ref(wrapped_fn) 441

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/eager/function.py in bound_method_wrapper(*args, **kwargs) 3179 # However, the replacer is still responsible for attaching self properly. 3180 # TODO(mdan): Is it possible to do it here instead? -> 3181 return wrapped_fn(*args, **kwargs) 3182 weak_bound_method_wrapper = weakref.ref(bound_method_wrapper) 3183

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/framework/func_graph.py in wrapper(*args, **kwargs) 935 # TODO(mdan): Push this block higher in tf.function's call stack. 936 try: --> 937 return autograph.converted_call( 938 original_func, 939 args,

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/impl/api.py in converted_call(f, args, kwargs, caller_fn_scope, options) 552 'Cause: %s', target_entity, e) 553 else: --> 554 logging.warn( 555 'AutoGraph could not transform %s and will run it as-is.\n' 556 'Please report this to the TensorFlow team. When filing the bug, set'

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/autograph/utils/ag_logging.py in warn(msg, *args, **kwargs) 144 145 def warn(msg, *args, **kwargs): --> 146 logging.warn(msg, *args, **kwargs) 147 if echo_log_to_stdout: 148 _output_to_stdout('WARNING: ' + msg, *args, **kwargs)

~/tf38/lib/python3.8/site-packages/tensorflow_core/python/platform/tf_logging.py in warn(msg, *args, **kwargs) 159 @tf_export(v1=['logging.warn']) 160 def warn(msg, *args, **kwargs): --> 161 get_logger().warning(msg, *args, **kwargs) 162 163

/usr/local/lib/python3.8/logging/init.py in warning(self, msg, *args, **kwargs) 1444 """ 1445 if self.isEnabledFor(WARNING): -> 1446 self._log(WARNING, msg, args, **kwargs) 1447 1448 def warn(self, msg, *args, **kwargs):

/usr/local/lib/python3.8/logging/init.py in _log(self, level, msg, args, exc_info, extra, stack_info, stacklevel) 1563 #IronPython can use logging. 1564 try: -> 1565 fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel) 1566 except ValueError: # pragma: no cover 1567 fn, lno, func = "(unknown file)", 0, "(unknown function)"

TypeError: _logger_find_caller() takes from 0 to 1 positional arguments but 2 were given

Describe the expected behavior

There should be no error. It works fine with TF2.0.0 and Python 3.6 or Python 3.7.

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem.

import tensorflow as tf import numpy as np import gzip import json from sklearn.model_selection import ShuffleSplit

with gzip.open("small_data/cal_house.json.gz", "r") as fin: housing = json.load(fin)

for train, test in ShuffleSplit(1, 0.2, random_state=42).split(housing['data']): X_train = np.array(housing['data'])[train].astype(np.float32) y_train = np.array(housing['target'])[train].astype(np.float32) X_test = np.array(housing['data'])[test].astype(np.float32) y_test = np.array(housing['target'])[test].astype(np.float32)

X_mean = X_train.mean(axis=0) X_std = X_train.std(axis=0)

Xs_train = (X_train - X_mean) / X_std Xs_test = (X_test - X_mean) / X_std

class LinearRegressionTF(): def init(self, eta=.1): self.W = tf.Variable(0.) self.b = tf.Variable(0.) self.opt = tf.keras.optimizers.SGD(learning_rate=eta)

def loss(self, X, y, return_func=False):
    def loss_():
        return tf.reduce_mean(tf.square(X * self.W + self.b - y))
    
    if not return_func:
        return loss_()
    
    return loss_

@tf.function
def fit(self, X, y, steps=1):
    for _ in range(steps):
        self.opt.minimize(self.loss(X, y, return_func=True), [self.W, self.b])

tf_model = LinearRegressionTF()

tf_model.fit(Xs_train[:, 0:1], y_train.reshape(-1, 1));

cal_house.json.gz

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Nil

created time in 5 months

issue commenttensorflow/tensorflow

[tf2.0.0] tf.keras.layers.GRU incorrect output of model.fit_generator trying to run Francois Chollet's notebook

Hi, Was this issue fixed on master or r2.0 branch or both? Cheers, Daniel

On Tue, 22 Oct. 2019, 8:07 am Qianli Scott Zhu, notifications@github.com wrote:

Should be fixed now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tensorflow/tensorflow/issues/32987?email_source=notifications&email_token=AAB26QUJK3BUC43ML53ULALQPYKZHA5CNFSM4I4VK2J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB3Y2XA#issuecomment-544705884, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QUUNLNT66JXPZYWRDTQPYKZHANCNFSM4I4VK2JQ .

dbonner

comment created time in 5 months

issue commentrstudio/reticulate

Python 3.8 no longer uses libpython - please patch reticulate() to use Python 3.8 virtual environments

Many thanks @kevinushey. I built python 3.8 again with sudo ./configure --enable-optimizations sudo make altinstall All is fixed. library(reticulate) and usevirtualenv() works. Hooray!

dbonner

comment created time in 5 months

issue commentrstudio/reticulate

Python 3.8 no longer uses libpython - please patch reticulate() to use Python 3.8 virtual environments

My libpython3.8.a file is a static library which reticulate can't work with. It needs the shared library (.so) .

On Tue, 22 Oct. 2019, 9:00 pm Daniel Bonner (OsPark), < osborne.park@gmail.com> wrote:

Still not working.

My pythonhome: /usr/local:/usr/local

Does this help?

What is your output in R of: pyconfig() and py_discover_config() ?

On Tue, 22 Oct 2019 at 20:41, Daniel Bonner (OsPark) < osborne.park@gmail.com> wrote:

Looking at 'python-config', I think the lib directory is '/usr/local/lib'. It contains libpython3.8.a Should I try: sudo patchelf --set-rpath '/usr/local/lib' /usr/local/bin/python3.8 Daniel

On Tue, 22 Oct 2019 at 20:31, Daniel Bonner (OsPark) < osborne.park@gmail.com> wrote:

Sorry I didn't specify a PREFIX in configure.

I issued:

sudo ./configure --enable-optimizations sudo make altinstall

I think the default prefix directory is /usr/local

So I tried:

sudo patchelf --set-rpath '${ORIGIN}/../lib' /usr/local/bin/python3.8

The output of 'ldd /usr/local/bin/python3.8' remains the same.

reticulate() fails to initialize python and does not find libpython.

I'm not sure where the /lib directory is.

Much appreciated if you can help me.

Daniel

On Tue, 22 Oct 2019 at 19:33, Sigrid Keydana notifications@github.com wrote:

You could either set it in configure, e.g.

./configure --enable-shared --prefix=/home/someuser/python/python3.8 LDFLAGS=-Wl,-rpath=/home/someuser/python/python3.8/lib

or you could use patchelf to change it on the executable after it was built:

assume PREFIX is the location you specified in configure

don't need to set ORIGIN, will be known automatically

patchelf --set-rpath '${ORIGIN}/../lib' ${PREFIX}/bin/python3.7

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rstudio/reticulate/issues/615?email_source=notifications&email_token=AAB26QSIE6BOHS3TUVVQ4V3QP23GDA5CNFSM4JDKYUT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB46KHQ#issuecomment-544859422, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QXP7BYHYRJQISX7T2DQP23GDANCNFSM4JDKYUTQ .

dbonner

comment created time in 5 months

issue commentrstudio/reticulate

Python 3.8 no longer uses libpython - please patch reticulate() to use Python 3.8 virtual environments

Still not working.

My pythonhome: /usr/local:/usr/local

Does this help?

What is your output in R of: pyconfig() and py_discover_config() ?

On Tue, 22 Oct 2019 at 20:41, Daniel Bonner (OsPark) osborne.park@gmail.com wrote:

Looking at 'python-config', I think the lib directory is '/usr/local/lib'. It contains libpython3.8.a Should I try: sudo patchelf --set-rpath '/usr/local/lib' /usr/local/bin/python3.8 Daniel

On Tue, 22 Oct 2019 at 20:31, Daniel Bonner (OsPark) < osborne.park@gmail.com> wrote:

Sorry I didn't specify a PREFIX in configure.

I issued:

sudo ./configure --enable-optimizations sudo make altinstall

I think the default prefix directory is /usr/local

So I tried:

sudo patchelf --set-rpath '${ORIGIN}/../lib' /usr/local/bin/python3.8

The output of 'ldd /usr/local/bin/python3.8' remains the same.

reticulate() fails to initialize python and does not find libpython.

I'm not sure where the /lib directory is.

Much appreciated if you can help me.

Daniel

On Tue, 22 Oct 2019 at 19:33, Sigrid Keydana notifications@github.com wrote:

You could either set it in configure, e.g.

./configure --enable-shared --prefix=/home/someuser/python/python3.8 LDFLAGS=-Wl,-rpath=/home/someuser/python/python3.8/lib

or you could use patchelf to change it on the executable after it was built:

assume PREFIX is the location you specified in configure

don't need to set ORIGIN, will be known automatically

patchelf --set-rpath '${ORIGIN}/../lib' ${PREFIX}/bin/python3.7

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rstudio/reticulate/issues/615?email_source=notifications&email_token=AAB26QSIE6BOHS3TUVVQ4V3QP23GDA5CNFSM4JDKYUT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB46KHQ#issuecomment-544859422, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QXP7BYHYRJQISX7T2DQP23GDANCNFSM4JDKYUTQ .

dbonner

comment created time in 5 months

issue commentrstudio/reticulate

Python 3.8 no longer uses libpython - please patch reticulate() to use Python 3.8 virtual environments

Looking at 'python-config', I think the lib directory is '/usr/local/lib'. It contains libpython3.8.a Should I try: sudo patchelf --set-rpath '/usr/local/lib' /usr/local/bin/python3.8 Daniel

On Tue, 22 Oct 2019 at 20:31, Daniel Bonner (OsPark) osborne.park@gmail.com wrote:

Sorry I didn't specify a PREFIX in configure.

I issued:

sudo ./configure --enable-optimizations sudo make altinstall

I think the default prefix directory is /usr/local

So I tried:

sudo patchelf --set-rpath '${ORIGIN}/../lib' /usr/local/bin/python3.8

The output of 'ldd /usr/local/bin/python3.8' remains the same.

reticulate() fails to initialize python and does not find libpython.

I'm not sure where the /lib directory is.

Much appreciated if you can help me.

Daniel

On Tue, 22 Oct 2019 at 19:33, Sigrid Keydana notifications@github.com wrote:

You could either set it in configure, e.g.

./configure --enable-shared --prefix=/home/someuser/python/python3.8 LDFLAGS=-Wl,-rpath=/home/someuser/python/python3.8/lib

or you could use patchelf to change it on the executable after it was built:

assume PREFIX is the location you specified in configure

don't need to set ORIGIN, will be known automatically

patchelf --set-rpath '${ORIGIN}/../lib' ${PREFIX}/bin/python3.7

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rstudio/reticulate/issues/615?email_source=notifications&email_token=AAB26QSIE6BOHS3TUVVQ4V3QP23GDA5CNFSM4JDKYUT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB46KHQ#issuecomment-544859422, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QXP7BYHYRJQISX7T2DQP23GDANCNFSM4JDKYUTQ .

dbonner

comment created time in 5 months

issue commentrstudio/reticulate

Python 3.8 no longer uses libpython - please patch reticulate() to use Python 3.8 virtual environments

Sorry I didn't specify a PREFIX in configure.

I issued:

sudo ./configure --enable-optimizations sudo make altinstall

I think the default prefix directory is /usr/local

So I tried:

sudo patchelf --set-rpath '${ORIGIN}/../lib' /usr/local/bin/python3.8

The output of 'ldd /usr/local/bin/python3.8' remains the same.

reticulate() fails to initialize python and does not find libpython.

I'm not sure where the /lib directory is.

Much appreciated if you can help me.

Daniel

On Tue, 22 Oct 2019 at 19:33, Sigrid Keydana notifications@github.com wrote:

You could either set it in configure, e.g.

./configure --enable-shared --prefix=/home/someuser/python/python3.8 LDFLAGS=-Wl,-rpath=/home/someuser/python/python3.8/lib

or you could use patchelf to change it on the executable after it was built:

assume PREFIX is the location you specified in configure

don't need to set ORIGIN, will be known automatically

patchelf --set-rpath '${ORIGIN}/../lib' ${PREFIX}/bin/python3.7

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rstudio/reticulate/issues/615?email_source=notifications&email_token=AAB26QSIE6BOHS3TUVVQ4V3QP23GDA5CNFSM4JDKYUT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB46KHQ#issuecomment-544859422, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QXP7BYHYRJQISX7T2DQP23GDANCNFSM4JDKYUTQ .

dbonner

comment created time in 5 months

issue commentrstudio/reticulate

Python 3.8 no longer uses libpython - please patch reticulate() to use Python 3.8 virtual environments

Hi Sigrid, Here's the output: ldd ~//tf38/bin/python3 linux-vdso.so.1 (0x00007ffce1fe3000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff48e7e5000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff48e5e1000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007ff48e3de000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff48e040000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff48dc4f000) /lib64/ld-linux-x86-64.so.2 (0x00007ff48efc5000)

I built python 3.8 from source using this tutorial: https://tecadmin.net/install-python-3-8-ubuntu/ I didn't set rpath. What's the exact command that includes rpath? Regards, Daniel

On Tue, 22 Oct. 2019, 6:56 pm Sigrid Keydana, notifications@github.com wrote:

What output do you get for

ldd ~//tf38/bin/python3

?

Also, how did you install Python 3.8? For linux, here: https://www.python.org/downloads/release/python-380/ I found the source only and building Python 3.8 from source (setting rpath), reticulate works fine for me.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rstudio/reticulate/issues/615?email_source=notifications&email_token=AAB26QSJAWVO2ITGEZISQHDQP2W2LA5CNFSM4JDKYUT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB43G5I#issuecomment-544846709, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB26QXHSNDWOEJEHHU62N3QP2W2LANCNFSM4JDKYUTQ .

dbonner

comment created time in 5 months

issue openedrstudio/reticulate

Python 3.8 no longer uses libpython - please patch reticulate() to use Python 3.8 virtual environments

Hi, I have installed Python 3.8 as an alternate installation on Ubuntu 18.04 (under /opt/Python-3.8.0). The system is still able to use the default Python that came with Ubuntu.

I created a virtual environment in my home directory with: python -m venv tf38

I can not get python to initialize in R:

library(reticulate) use_virtualenv("~/tf38") py_config() Error in initialize_python(required_module, use_environment) : Python shared library not found, Python bindings not loaded. py_discover_config() python: /home/daniel/tf38/bin/python libpython: [NOT FOUND] pythonhome: /usr/local:/usr/local version: 3.8.0 (default, Oct 20 2019, 16:51:39) [GCC 7.4.0] numpy: /home/daniel/tf38/lib/python3.8/site-packages/numpy numpy_version: 1.17.3

I believe this is because Python 3.8 no longer uses libpython (the file is not included and can not be installed).

I believe this is relevant (from https://docs.python.org/3/whatsnew/3.8.html):

"On Unix, C extensions are no longer linked to libpython except on Android and Cygwin. When Python is embedded, libpython must not be loaded with RTLD_LOCAL, but RTLD_GLOBAL instead. Previously, using RTLD_LOCAL, it was already not possible to load C extensions which were not linked to libpython, like C extensions of the standard library built by the shared section of Modules/Setup. (Contributed by Victor Stinner in bpo-21536.)"

Please patch reticulate() to work with Python 3.8 and Python 3.8 virtual environments which are without libpython.

Many thanks, Daniel

created time in 5 months

issue openedtensorflow/tensorflow

[tf2.0.0] Fails to build on Python 3.8 - suggested fix (change nullptr to 0 in source)

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • TensorFlow installed from (source or binary): source
  • TensorFlow version: 2.0.0 with cuda and TensorRT
  • Python version: 3.8
  • Installed using virtualenv? pip? conda?: virtualenv
  • Bazel version (if compiling from source): 0.26.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: CUDA 10.0, CUDNN 7.6.4
  • GPU model and memory: NVidia RTX 2080 Ti

Describe the problem

While building from source: ERROR: /home/daniel/tensorflow/tensorflow/python/BUILD:341:1: C++ compilation of rule '//tensorflow/python:ndarray_tensor_bridge' failed (Exit 1) tensorflow/python/lib/core/ndarray_tensor_bridge.cc:108:1: error: cannot convert ‘std::nullptr_t’ to ‘Py_ssize_t {aka long int}’ in initialization

Provide the exact sequence of commands / steps that you executed before running into the problem

git checkout r2.0

bazel build --explain=verbose_explanations.txt --verbose_explanations --verbose_failures --subcommands=pretty_print --config=opt --config=cuda --config=v2 --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package

Probable Fix:

In Python 3.8, the reserved "tp_print" slot was changed from a function pointer to a number, Py_ssize_t tp_vectorcall_offset. In C, there is no "nullptr"; either a 0 or NULL casts automatically to both pointers and numbers. Use 0 instead of "nullptr" in the slot to be source-compatible both with Python 3.8 and previous versions.

Change nullptr to 0 in the corresponding files where tp_print is in the comment: /tensorflow/tensorflow/python:ndarray_tensor_bridge.cc /tensorflow/tensorflow/python/lib/core/bfloat16.cc /tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc

created time in 5 months

issue openedkeras-team/keras

[tf2.0.0 keras2.3.0] keras.layers.GRU incorrect output of model.fit_generator trying to run Francois Chollet's notebook #32987

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • TensorFlow installed from (source or binary): built from source
  • TensorFlow version (use command below): 2.0.0 (i.e. the release)
  • Keras version: 2.3.0
  • Python version: 3.7 conda
  • Bazel version (if compiling Tensorflow from source): 0.26.1
  • GCC/Compiler version (if compiling Tensorflow from source): 7.4.0
  • CUDA/cuDNN version: 10 / 7.6.4
  • GPU model and memory: RTX 2080 Ti and Tesla V100 (tried on both. error occurs on both)

Describe the current behavior I am going through Francois Chollet's book "Deep Learning with Python" and running the code in his Jupyter Notebooks with Tensorflow 2.0.0 as a backend to Keras 2.3.0. Notebook 6.3, (under the heading "1.6 Using recurrent dropout to fight overfitting") has a model with a tensorflow.keras.layers.GRU(32, dropout=0.2, recurrent_dropout=0.2, input_shape=(None, float_data.shape[-1])). The data is read earlier in the notebook from jena_climate_2009_2016.csv. I get a loss of 699013271268870062080.0000 after the first epoch and similar figures after subsequent epochs. This figure is simply wrong (see below). The original notebook (from Francois Chollet) is here: link to github and includes the correct output.

Describe the expected behavior The loss after 1 or 2 epochs is supposed to be around 0.3

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. Download the data as follows: cd ~ mkdir Datasets cd ~/Datasets mkdir jena_climate cd jena_climate wget https://s3.amazonaws.com/keras-datasets/jena_climate_2009_2016.csv.zip unzip jena_climate_2009_2016.csv.zip

Run jupyter notebook and load the notebook in a Python 3.7 environment with tensorflow 2.0.0 as the backend and keras 2.30. Run each cell from the beginning of the notebook so you load the data and create the generators before you get to the example under heading 1.6. Then try to run the example. You will find that the loss is terribly wrong.

EDIT: Since writing this, I have tried to run more code in the notebook. The code under heading "1.7 Stacking recurrent layers" also runs incorrectly in tensorflow 2.0.0 using tensorflow.keras. The loss produced is "nan" (it should be around 0.3). I think it is the same problem with layers.GRU

EDIT: The rest of the remaining code in the notebook runs correctly, e.g. bidirectional GRU runs OKSystem information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): I have slightly modified Francoiis Chollet's Jupyter notebook 6.3 from his book "Deep Learning with Python" so that it runs on tensorflow.keras rather than keras (i.e. "from tensorflow.keras import layers" instead of "from keras import layers" etc)
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • TensorFlow installed from (source or binary): built from source
  • TensorFlow version (use command below): 2.0.0 (i.e. the release)
  • Python version: 3.7 conda
  • Bazel version (if compiling from source): 0.26.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: 10 / 7.6.4
  • GPU model and memory: RTX 2080 Ti and Tesla V100 (tried on both. error occurs on both)

Describe the current behavior Please see attached Jupyter Notebook 6.3-advanced-usage-of-recurrent-neural-networks-Copy1.zip. I am going through Francois Chollet's book "Deep Learning with Python" and running the code in his Jupyter Notebooks in Tensorflow 2.0.0 adapting the code to "import tensorflow.keras" instead of "import keras". Notebook 6.3, (under the heading "1.6 Using recurrent dropout to fight overfitting") has a model with a tensorflow.keras.layers.GRU(32, dropout=0.2, recurrent_dropout=0.2, input_shape=(None, float_data.shape[-1])). The data is read earlier in the notebook from jena_climate_2009_2016.csv. With tensorflow 2.0.0 and tensorflow.keras I get a loss of 20417499919998144512.0000 and val_loss: 1.1059 after the first epoch and similar figures after subsequent epochs. These figures are simply wrong (see below). It also runs about 10x slower than its supposed to. I interrupted the kernel after 4 epochs. The original notebook (from Francois Chollet) is here: link to github and includes the correct output.

Describe the expected behavior I ran the same code with keras (not tf.keras) using a tensorflow 1 backend a while ago and it gave correct results. The loss after 1 or 2 epochs is supposed to be around 0.3 The validation loss is supposed to be a little less than 0.3. The graph below this code was produced using keras and a tensorflow 1 backend. It shows the correct output. Francis Chollet's original notebook (as linked to github above) also shows the correct output.

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. Download the data as follows: cd ~ mkdir Datasets cd ~/Datasets mkdir jena_climate cd jena_climate wget https://s3.amazonaws.com/keras-datasets/jena_climate_2009_2016.csv.zip unzip jena_climate_2009_2016.csv.zip

Run jupyter notebook and load the notebook that is attached to this issue in a Python 3.7 environment with tensorflow 2.0.0. In the notebook replace /home/daniel with /home/(your username). Run each cell from the beginning of the notebook so you load the data and create the generators before you get to the example under heading 1.6. Then try to run the example. You will find that the loss and val_loss are terribly wrong.

The code under heading "1.7 Stacking recurrent layers" also runs incorrectly. The loss produced is "nan" (it should be around 0.3). I think it is the same problem with layers.GRU

I have reproduced this problem running tensorflow.keras in tensorflow 2.0.0. I think it is a problem with tensorflow rather than keras. However it also occurs running multi-backend keras 2.30 with a tensorflow 2.0.0 backend.

created time in 6 months

issue openedtensorflow/tensorflow

[tf2.0.0] tf.keras.layers.GRU incorrect output of model.fit_generator trying to run Francois Chollet's notebook

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): I have slightly modified Francoiis Chollet's Jupyter notebook 6.3 from his book "Deep Learning with Python" so that it runs on tensorflow.keras rather than keras (i.e. "from tensorflow.keras import layers" instead of "from keras import layers" etc)
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • TensorFlow installed from (source or binary): built from source
  • TensorFlow version (use command below): 2.0.0 (i.e. the release)
  • Python version: 3.7 conda
  • Bazel version (if compiling from source): 0.26.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: 10 / 7.6.4
  • GPU model and memory: RTX 2080 Ti and Tesla V100 (tried on both. error occurs on both)

Describe the current behavior Please see attached Jupyter Notebook 6.3-advanced-usage-of-recurrent-neural-networks-Copy1.zip. I am going through Francois Chollet's book "Deep Learning with Python" and running the code in his Jupyter Notebooks in Tensorflow 2.0.0 adapting the code to "import tensorflow.keras" instead of "import keras". Notebook 6.3, (under the heading "1.6 Using recurrent dropout to fight overfitting") has a model with a tensorflow.keras.layers.GRU(32, dropout=0.2, recurrent_dropout=0.2, input_shape=(None, float_data.shape[-1])). The data is read earlier in the notebook from jena_climate_2009_2016.csv. With tensorflow 2.0.0 and tensorflow.keras I get a loss of 20417499919998144512.0000 and val_loss: 1.1059 after the first epoch and similar figures after subsequent epochs. These figures are simply wrong (see below). It also runs about 10x slower than its supposed to. I interrupted the kernel after 4 epochs. The original notebook (from Francois Chollet) is here: link to github and includes the correct output.

Describe the expected behavior I ran the same code with keras (not tf.keras) using a tensorflow 1 backend a while ago and it gave correct results. The loss after 1 or 2 epochs is supposed to be around 0.3 The validation loss is supposed to be a little less than 0.3. The graph below this code was produced using keras and a tensorflow 1 backend. It shows the correct output. Francis Chollet's original notebook (as linked to github above) also shows the correct output.

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. Download the data as follows: cd ~ mkdir Datasets cd ~/Datasets mkdir jena_climate cd jena_climate wget https://s3.amazonaws.com/keras-datasets/jena_climate_2009_2016.csv.zip unzip jena_climate_2009_2016.csv.zip

Run jupyter notebook and load the notebook that is attached to this issue in a Python 3.7 environment with tensorflow 2.0.0. In the notebook replace /home/daniel with /home/(your username). Run each cell from the beginning of the notebook so you load the data and create the generators before you get to the example under heading 1.6. Then try to run the example. You will find that the loss and val_loss are terribly wrong.

created time in 6 months

more