swig interface to java

Issue to trace effort of swig interface for java. Started implementation - will update with progress. If anyone has any comments/tips - please feel welcome to join the discussion!

Nice!

Moving this comment here from https://github.com/tensorflow/tensorflow/issues/3:

There's a testsuite with fairly good converge, but currently it's mostly Python with a few C++ tests. There's also a lot of functionality for building graphs that's currently Python only, in particular the automatic differentiation functionality, though that doesn't matter for evaluation of graphs in Java. There are plans to move this functionality into the underlying C++ in future, at which point Java SWIG bindings would be more useful for creating graphs.
If someone takes up the Java SWIG challenge, we'd be happy to accept it upstream pending review, etc., at which point it would be part of our continuous testing. The details of accepting contributions is in flux at the moment, but that will stabilize.

Hello guys
We are also interested in adapting TensorFlow for Java. @ravwojdyla  Have you, by any chance, started working on the Swig Interface for Java? If you have, we could join our efforts and collaborate on that

Hello,
I am working on a SWIG wrap of the main C++ API. You can see my progress thus far on my fork, but what's up there is not finished; I'm currently experiencing a problem in which #include "tensorflow/core/lib/core/error_codes.pb.h" is unable to be resolved and I cannot find it anywhere within the project files. Any input would be greatly appreciated.

There are javacpp preset available for libiraries like Caffe  and OpenCV. See also  https://github.com/bytedeco/javacpp-presets/issues/111. Java-cpp enable also IOS with RoboVM

@girving Initial commit at https://github.com/bytedeco/javacpp-presets/commit/374e1d5ea3cb4db36144aeec2cac33d32e1a7489

/cc @saudet

@pslam - I was able to work just a little bit on this - could definitely use some help!

Hi guys, I believe I have pretty functional bindings for JavaCPP: https://github.com/bytedeco/javacpp-presets/tree/master/tensorflow. Let me know if you see anything that could be done with SWIG, but not JavaCPP. I could definitely use the feedback. (Thanks for the cc @bhack!)

Very nicely done @saudet! I have almost finished a SWIG wrap, but it seems that your implementation works just as well. I do not see anything that my SWIG wrap can do that yours cannot do. JavaCPP seems very cool, I'll have to look into using it for future projects.

Hi @kylevedder, have you resolved the issue related to error_codes.pb.h ?

@tngan Yes, that is what I discovered as well. Additionally, the .proto files require ProtoBuff3 to be compiled. I'm using Ubuntu 14.04 and ProtoBuff3 was too new to be available in my package manager, so I compiled it from source, which I got from the 3.0.0 beta release.
The current roadblock which I am trying to solve is how to get ProtoBuff to recurse over the entire file tree and compile the .proto files into .h and .cc files, and doing each folder piecemeal results in failures due to unsatisfied dependencies upon other yet to be compiled .proto files.

@kylevedder Are your SWIG wrappers in a separate repository or are you working in the tensorflow repository? protoc works similar to other compilers. If you are working in the tensorflow repository or are using Bazel, then you would need to set up the protobuf build targets and the dependencies among them.
If you are working in a separate repository and using a different build system, then you would need to use the protobuf plugin for that build system.
I'd be happy to help you set up the build if you would like.

@davidzchen Thank you for the offer, any and all help is greatly appreciated.
What I have thus far:
I have already setup Bazel and gotten it to compile into a .whl file, which I then handed over to pip and confirmed that I can run the First Tensor Flow program.
I have generated SWIG wrapper files in my forked repository. They are in a folder under core/javaWrapper. [link]
What I am trying to do:
Ultimately, my goal is to generate a .so file which than can be called as a native library in Java. Currently, I'm attempting to use g++ to compile the entire system into a .so file; however, the .proto files need to first be expanded into .hs and .ccs prior to this compilation, and that is what I am trying to do with protoc.
You can see my attempt at a wrap script here to potentially get a better idea of what it is I am getting at, although thus far all of my attempts at using protoc has been directory by directory.
Finally, any feedback on areas of improvement would be greatly appreciated. Thanks!

@kylevedder I already have an .so build as part of the JavaCPP Presets: https://github.com/bytedeco/javacpp-presets/tree/master/tensorflow. Thanks to Bazel, it's really simple. Just apply a patch like this:
diff -ruN tensorflow/tensorflow/cc/BUILD tensorflow-patch/tensorflow/cc/BUILD
--- tensorflow/tensorflow/cc/BUILD	2015-11-22 00:00:02.441829192 +0900
+++ tensorflow-patch/tensorflow/cc/BUILD	2015-11-14 11:15:12.689330351 +0900
@@ -75,6 +75,17 @@
     ],
 )

+cc_binary(
+    name = "libtensorflow.so",
+    copts = tf_copts(),
+    linkshared = 1,
+    deps = [
+        ":cc_ops",
+        "//tensorflow/core:kernels",
+        "//tensorflow/core:tensorflow",
+    ],
+)
+
 filegroup(
     name = "all_files",
     srcs = glob(

And run Bazel like this, for example:
bazel build -c opt //tensorflow/cc:libtensorflow.so

AFAIK, this should gobble up pretty much anything of interest for the C++ API.

@saudet Is there a reason why you are using a cc_binary rule to build the shared library rather than cc_library? You can just have a cc_library rule with the name tensorflow and the build target will build a shared library called libtensorflow.so.
@kylevedder If your goal is to generate an .so file, then something similar to what @saudet suggested would work.
If you need to use the TensorFlow protos in Java code, then you would need to add dependencies from your java_* Bazel build targets to the proto_library targets that generate the Java classes from the .proto files.
We still have a bit of work to do before we open-source the native proto_library rules (see bazelbuild/bazel#52), but in the meantime, TensorFlow uses the cc_proto_library and py_proto_library rules provided by protobuf, and for Java, you should be able to use the Java genproto rule that is included with Bazel. I will check with the team to find out what the timeline for proto_library is and whether it would be worthwhile to unify the rules provided by Protobuf with genproto.
A few other bits of feedback:

I think it would be better to keep the directory names consistent and use java_wrapper rather than javaWrapper
Perhaps a better place for the Java wrapper would be //tensorflow/java/wrapper rather than //tensorflow/core/java_wrapper?
Internally, we have some build rules that take .swig files and generate the sources. This is more ideal because we would avoid checking in the generated files. I can take a look to see how difficult it would be for us to add some SWIG build rules for Bazel to make stuff like this easier.

@davidzchen No reason in particular. I'm new to Bazel and just using linkshared=1 as I've seen mentioned on the mailing list worked. So thanks for the tip! I'll be updating that.

@saudet Thanks! I was just checking to make sure that it wasn't an issue with Bazel. :) Feel free to let me know or open a bug if you run into any issues.

@saudet Thanks for the info on using Bazel. I too am new too it and did not realize it was capable of generating a .so in that manner.
@davidzchen Thanks for the addendum about using a cc_library, I modified the example from @saudet accordingly when I implemented my Bazil wrapper build. Additionally, thank you for the input regarding the directory structure; I have updated my folder structure to align with your suggestions.
Additionally, I was not very clear in my previous comment about generating .so files; while my objective is to generate a .so file from the original source, I also want to include the .cxx file that SWIG generates  inside of the .so in order to facilitate the JNI calls. Currently, I'm running into an issue in which I cannot get the SWIG generated .cxx file to compile; it's trying to reference JNI.h, a header located in $JAVA_HOME/include/, but I cannot seem to get Bazel the external include path.

@davidzchen Hum, nope, cc_library doesn't work. I don't see any other way to make Bazel pass the -shared option to the compiler: http://bazel.io/docs/be/c-cpp.html.

@saudet I don't think you need to pass -shared yourself. cc_library should be building a .so by default. Does that work for you?

@kylevedder You won't be able to add the JNI headers that way since they're outside the workspace. However, Bazel includes the local JDK as a local repository and provides a number of built-in targets (see jdk.WORKSPACE and corresponding jdk.BUILD) you can use to depend on local JDK. These are included in each Bazel workspace by default.
Bazel itself uses JNI and interfaces with the local JDK this way (see src/main/native/BUILD). In this BUILD file, there are two genrules to copy the JNI headers and a cc_library target for the library it is building that uses JNI that depends on the headers, and a includes = ["."] so that the C++ code can include the JNI header with #include <jni.h>. This is currently not documented because we are working on a number of improvements to the external repository mechanism, and the @local-jdk name might change, but we can use it for TensorFlow and any other Bazel project that uses JNI in the meantime.
Here is a patch for your BUILD file that adds the genrule targets for copying the JNI headers you need and some changes to the cc_library target to set up the right dependencies, namely:

Add jni.h and jni_md.h, which are copied to the current package by the genrules to srcs
Add a dependency on //tensorflow/core so that you can include the headers under tensorflow/core/public. Note that, headers or any source file in a separate directory are in a separate package from Bazel's point of view, and you will need to add a dependency on the build target that contains those files.

diff --git a/tensorflow/core/java/wrapper/BUILD b/tensorflow/core/java/wrapper/BUILD
index 72b4076..04a3394 100644
--- a/tensorflow/core/java/wrapper/BUILD
+++ b/tensorflow/core/java/wrapper/BUILD
@@ -7,10 +7,30 @@ exports_files(["LICENSE"])
 load("/tensorflow/tensorflow", "tf_copts")
 load("/tensorflow/tensorflow", "tf_gen_op_wrappers_cc")

+genrule(
+    name = "copy_link_jni_md_header",
+    srcs = ["//external:jni_md_header-linux"],
+    outs = ["jni_md.h"],
+    cmd = "cp -f $< $@",
+)
+
+genrule(
+    name = "copy_link_jni_header",
+    srcs = ["//external:jni_header"],
+    outs = ["jni.h"],
+    cmd = "cp -f $< $@",
+)
+
 cc_library(
     name = "java_wrapper",
-    srcs = glob(["*.cc","*.cxx","*.h"]),
-    copts = ["-I$$JAVA_HOME/include/", "-I$$JAVA_HOME/include/linux/"],
+    srcs = glob(["*.cc", "*.cxx", "*.h"]) + [
+        ":jni.h",
+        ":jni_md.h",
+    ],
+    includes = ["."],
+    deps = [
+        "//tensorflow/core",
+    ],
     visibility = ["//visibility:public"],
 )

Note that in general, compile actions in Bazel are run from the root of the source tree, and you would need to change the includes in your SWIG file as follows and then re-generate the C++ files so that they will have the correct includes as well:
diff --git a/tensorflow/core/java/wrapper/tensor_c_api.i b/tensorflow/core/java/wrapper/tensor_c_api.i
index d08b571..9ab1fa1 100644
--- a/tensorflow/core/java/wrapper/tensor_c_api.i
+++ b/tensorflow/core/java/wrapper/tensor_c_api.i
@@ -1,8 +1,8 @@
 %module tensor_c_api_module
 %{
-#include "../../public/tensor_c_api.h"
+#include "tensorflow/core/public/tensor_c_api.h"
 %}
-%include "../../public/tensor_c_api.h"
+%include "tensorflow/core/public/tensor_c_api.h"
 %include "stddef.h"

Once this works, you would have the JNI build set up for Linux since the copy_link_jni_md_header genrule only copies the Linux-specific header. To have it copy the correct platform-specific JNI header, we would need to do the following:

Set up cpu config_settings for other platforms. Currently, tensorflow has a config_setting for --cpu=darwin in tensorflow/python/BUILD. We should probably move that a more appropriate package such as //tensorflow/core. Basically, we would want the same set of config_settings as Bazel (see src/BUILD).
Have copy_link_jni_md_header copy the right JNI header based on which config setting is set using select(), similar to the one in Bazel. Our genrule would look something like the following:

genrule(
    name = "copy_link_jni_md_header",
    srcs = select({
        "//tensorflow/core:darwin": ["//external:jni_md_header-darwin"],
        "//tensorflow/core:darwin_x86_64": ["//external:jni_md_header-darwin"],
        "//tensorflow/core:freebsd": ["//external:jni_md_header-freebsd"],
        "//conditions:default": ["//external:jni_md_header-linux"],
    }),
    outs = ["jni_md.h"],
    cmd = "cp -f $< $@",
)

I'd be happy to help you with this if you run into any issues. Let me know if this works for you.

@davidzchen cc_library generates a bunch of .a files, but no .so file. I'm
using 0.1.0 as was previously recommended for TensorFlow... Maybe it's
fixed in 0.1.1? I'll have to try again.

@davidzchen Thank you very much for your help. I have followed your instructions and updated both the Java wrapper BUILD file as well as the SWIG .i file as you suggested. Additionally, I moved the wrap script from core/java/wrapper to the root directory and updated the links accordingly.
For now, I have skipped the generalization the genrule for the jni_md.h file, instead focusing on trying to get libtensorflow.so built. Unfortunately, it appears to me as though libtensorflow.so is not being generated; I ended up searching my entire file system for anything named some variant of "libtensorflow" and nothing relevant appeared. It may be named differently or this may be a simple case of user error. Additionally, there is a possibility that it may be related to the issue that @saudet is experiencing with the cc_library rule for .so generation.
Once again, thank you for all of your help, I really appreciate it.

Sorry, it turns out I was wrong. In order to build a .so that includes the transitive dependencies, what @saudet did using cc_binary with linkshared = 1 and name = "libtensorflow.so" was correct. From the cc_binary.linkshared documentation:

Create a shared library. To enable this attribute, include linkshared=1 in your rule. By default this option is off. If you enable it, you must name your binary libfoo.so (or whatever is the naming convention of libraries on the target platform) for some sensible value of foo.

The main difference between the .so's built by cc_library targets and the .so built with cc_binary using the method described above is that the cc_library artifacts only contain the code in srcs. This is why building cc_library targets with no srcs and only deps, such as //tensorflow/core, do not produce any artifacts. On the other hand, cc_binary targets will link in all the transitive dependencies.
I apologize for the confusion. Perhaps we should improve our documentation and add an example on building .sos.

I guess you should follow those steps to build Tensorflow and all it's dependencies. We are working on porting TensorFlow to node.js, and I've implemented a shell script to compile and getter only essential sources from the whole repo:
https://github.com/node-tensorflow/node-tensorflow/blob/1.0.0/tools/install.sh#L233-L282

@davidzchen Thank you for the information regarding the creation of a .so. I have updated my setup accordingly and I have created a tensorflow/core/java/wrapper/example with an extremely basic tester to prove that JNI function calls to the .so work. Note that createWrapper.sh must be run prior to running compileAndRun.sh.
I will try to improve the SWIG wrapper and make a better example, the one I have now is simply a bare minimum proof of working bindings.
Finally, I want to thank @davidzchen and @saudet for all of their help; I would not have been able to do this without them.

Nice! Thanks for working on this, @kylevedder!
If you're interested, I can try integrating your createWrapper.sh and compileAndRun.sh scripts into the Bazel build by 1) creating Skylark SWIG rule and 2) using java_library and java_binary to build the Java code.

@davidzchen That would be great! I will work on improving the SWIG wrapper and the base example.

I've finalized the presets for JavaCPP and ported the example_trainer.cc sample:
https://github.com/bytedeco/javacpp-presets/tree/master/tensorflow
Looking forward to compare this with an equivalent wrapper using SWIG!

Looks like the API link is broken: http://bytedeco.org/javacpp-presets/tensorflow/apidocs/

@verdiyanto Sorry, I don't have CI yet, but uploading the API docs is easy enough, so I've at least done that. Enjoy!

@saudet Nice work on the JavaCPP presets!
An update on my work: I have done some more work on the SWIG wrapper, and you can see the work I've done here. However, I am at a bit of a cross roads and I am not sure of the best way to proceed.
I'm rather new to SWIG, given this is my first major project using it, so I read the SWIG documentation on SWIG Basics and on SWIG and Java which run through how SWIG works and how to wrap C/C++ with SWIG Java wrappers.
The documentation explains how SWIG converts pointers in C++ into opaque Java objects, which is why you get classes like SWIGTYPE_p_void generated by SWIG. The issue is there is not an easy way to convert POJOs into these SWIG classes.
So, for example, in tensor_c_api.h, the C++ method TF_CreateTensor() takes a void* which points to the input data and a size parameter to specify the size of the input data in bytes. This is a perfectly reasonable design pattern for C++, but completely nonsensical in Java. The SWIG generated Java method TF_CreateTensor() takes a SWIGTYPE_p_void object as its data, along with size, but there is no way to convert a POJO such as a String into a SWIGTYPE_p_void without handwriting a lot of code.
And this is the crossroads at which I currently lie: I either write a ton of C++ conversion methods which take any type defined in TF_DataType and convert to a void*, or write a bunch of SWIG typemaps to do the same thing. The SWIG documentation does not seem to favor either solution, as they do both seemingly interchangeably.
So, the question is, C++ conversion functions or SWIG typemaps?

@kylevedder I see you're starting to understand why I created JavaCPP in the first place. :)

I've been using @saudet's JavaCPP presets, extremely useful, thanks! I'm using it to build a Clojure interface to tensorflow.
Some comments:

There is opportunity for simplification / a higher-level layer

A lot of the JavaCPP api replicates protobuf functionality that can be directly achieved on the JVM, without the bridge. Took me a bit to realize this, but one is simply building up a protobuf object using the JavaCPP bindings, producing this platform-independent representation using interop, and then stuffing it into the Session.
I've ended up just using jvm-based protobufs to build the graph directly, bypassing the JavaCPP constructor functions. This has several advantages -- a simpler api to program against, and also nice .toString format that shows the human-readable protobuf.
Particularly for Clojure, its much easier to describe the tensorflow graph in terms of data structures and then convert directly them to protobuf, than it is to look up and invoke a constructor function for each node in my data structure.

Building and package improvements

I'm not expert in building native code, or in the build tools used in these projects. It would be great to have maven-ized artifacts; in particular if they also included the generated java protobuf classes. It took an embarrassing amount of time for me to figure out how to do this.

It would be useful to have a small number of graph test cases to target.

Right now my methodology is somewhat cumbersome: Use the JavaCPP constructor functions to generate a graph, mashall it into my JVM protobufs and see the human-readable form, and figure out how to build my own constructors to make the same form.
It would be useful to have a small collection of very simple graphs that exercise the core functionalities of TensorFlow, so people like me have a reasonable set of test cases to target for interop to different languages.
Anyway thanks for everyones efforts and keep up the good work!

@kovasb Thanks for the feedback! Obviously, there is much to be done to make the interface more natural to Java, Scala, Clojure, etc.
If you have helper classes to integrate the C++ API with the Java protobuf API, feel free to put all that in the following package, including the generated Java protobuf classes themselves, and send a PR:
https://github.com/bytedeco/javacpp-presets/tree/master/tensorflow/src/main/java/org/bytedeco/javacpp/helper
That's what it's meant for, and it will automatically get packaged in the Maven artifact, something that Bazel doesn't appear to support. In any case, thanks for looking into this!

@kovasb A clojure interface sounds really interesting. Got any code to share yet?
Thanks!

So people in this thread are aware also, in https://github.com/tensorflow/tensorflow/issues/3 has been raised: automatic differentiation doesn't currently work unless you use TF from the python api. This seems like a showstopper pending that functionality being ported to C++.
I don't quite understand the data flow but perhaps it is possible to launch the python helper stuff together with the C++ lib?
Another solution I'm looking at is just using Jpy or one of the other bridges (anyone have recommendations?) JyNi also looks quite interesting but pretty far from primetime (though it would be great to see more momentum/community behind it)
If JyNi gets sorted out, it + jython would give the JVM a really awesome story re python ecosystem interop. One can dream.

+1 for a Java interface!

+1 for a Java interface!

if we could use javaCPP, is SWIG still necessary? shall we collaborate to implement the SWIG interface?

@maxiwu I like to think that JavaCPP does a better job than SWIG, but I'm all for comparing them to actually proove it :)

@kovasb I'd be very much interested in helping/contributing to the Clojure interface.

@sorenmacbeth email me at my first-name dot last-name at gmail, happy to walk you through what I have...

Seems that we have here a quite complete Javacpp preset. Is it an acceptable solution for "the team"?

@saudet I'm trying to build a copy of the JavaCPP wrappers, but it seems that due to the rapid rate of change of the tensorflow source they are not compatible with either the 0.6.0 release or today's master branch. Would it be possible to update them with a pointer to the exact tensorflow commit/version they were tested with?

@nikitakit I've just made an update for the master branch here: https://github.com/bytedeco/javacpp-presets/commit/43bdcdf03beaaddb4bd5badf5d4f79669e9e78dd
Unlike Caffe though, TensorFlow actually seems to get a release every month or so, so I guess I'll start stabilizing the bindings at those points, starting with the next release (0.7.0?)

@martinwicke What do you think?

When there's a stable Java binding, I'm happy to work on the Scala API.

/cc @databricks

@kovasb I think I missed this first time through. Are you saying that all the nice auto-differentiation magic that we get from using TensorFlow through python is implemented within python, not within the c++ libs? So in practice, a Java API would either need to re-implement all this, or would be just another numerics library? I'm not familiar enough with the internals of TensorFlow or the python glue to understand exactly what heavy lifting is done where.

I think I missed this first time through. Are you saying that all the nice auto-differentiation magic that we get from using TensorFlow through python is implemented within python, not within the c++ libs? So in practice, a Java API,!!

@drdozer that's my understanding, based on comments by @girving and then looking the source a bit myself. Reimplementing stuff in Java seems like a nonstarter. I suggest looking at the comments in #3

I wonder how far we'd get running the Python code with Jython...

I believe the Python API layer has lots of logic that the C++ layer API does not expose.
I was trying to follow JavaCpp path but at the end there will be lots of duplication code and will be hard to maintain consistencies when something change in the Python implementation.
Probably easier path is to use Jython as @saudet had mentioned before ...

It was assigned in https://github.com/tensorflow/tensorflow/issues/476 to  @josh11b. If he is working on this doesn't make sense to use Jython.

If we use jython will the c++ code still work?  I am looking to use this for a server that's in Java but I'm stuck between trying a Java route directly or just sending the data over a socket to a Python process

I'd like to mention that although the Java API doesn't include a lot of features like auto-differentiation, I haven't found this to be a barrier for my own work. I've had great success generating a model in python, serializing it to a .proto file, and then opening it through the Java wrapper for training. The same can be done for test-time, since I believe the Saver functionality is available through the C++ and Java APIs.

+1

@saudet
Thanks for creating javacpp and the presets for tensorflow.  I was able to successfully recreate a Python graph in Java, but I am stuck trying to restore from a saved model file.  This line doesn't work:
Tensor fn = new Tensor(tensorflow.DT_STRING, new TensorShape(1));
CharBuffer buffer = fn.createBuffer();
buffer.put("modelfile.tf");
session.Run(...);
but the CharBuffer turns out to be NULL.  If I change DT_STRING to DT_FLOAT, I get a FloatBuffer, but DT_STRING doesn't seem to work.
@nikitakit  you said you got this to work.  could you share your code?

@lakshmanok
The part of my code that deals with tensorflow graphs is here: https://gist.github.com/nikitakit/d3ec270aee9d930267cec3efa844d5aa
It's in Scala, but porting to Java / other JVM language should be straightforward.
My code for actually running nodes in the graph is unfortunately heavily tied up with a Scala framework I'm using, so you'll have to rely on the tensorflow API docs for this part.

Has anyone got anywhere with embedding the python tensorflow environment in the jvm? Say with jython + JyNI? Or is this all a bit too experimental to get to work reliably?

I am currently working on expanding the C API to add support for graph definition.  Not sure when it will be done, but it is one of our goals before 1.0.

I am working on using tensor flow from java. I am approaching the problem by using jython and modifying the tensor flow cpython library to accomodate another python interpreter.  the cpython should keep working flawlessly and my code is detecting if the interpreter is Jython and modifying the imports / modules to allow it to work. Underneath it uses the javacpp bindings for libtensorflow_cc.so. Is this something the google team would be open to have in the official repo ? @vrv

That seems like a nice proof of concept but I think an official binding would probably want to bind more natively than going through Python :(

no, instead of calling the c-python wrapper, we call the javaccp wrapper. So it would be the same thing as cpython tensor flow but evaluated from the JVM using Jython. Reimplementing the whole python logic in another language seems too much, you end up with another API.  javacpp bindings allow you to run Inference without problem but the model has to be built/trained from a cpython script at the moment.

Has anyone looked at making tensorflow work with Kotlin?  It seems a more natural fit and it's still 100% java at the end of the day.  I find the Kotlin language to be a very nice middle ground between python and pure Java.

Update: I was able to successfully get things going with javacpp (thanks to @saudet ) and have Java programs read/execute TensorFlow models.
https://medium.com/google-cloud/how-to-invoke-a-trained-tensorflow-model-from-java-programs-27ed5f4f502d#.tx8nyds5v

Thanks @lakshmanok and @saudet . The javacpp project seems to implement most TensorFlow APIs. We're trying to run the tensorflow/serving in Java.
The API is simple and defined by protobuf. Now we have implemented the server and want the implement the client in Java. It just need to construct the TensorProto in Java and invoke the gRPC call. TensorFlow has provides helper functions to convert multiple dimention arrays for Python and C++, but not Java.
Can you tell how to use javacpp or implement by ourselves for this?

What you are looking for is probably already in https://github.com/bytedeco/javacpp-presets/blob/master/tensorflow/src/main/java/org/bytedeco/javacpp/helper/tensorflow.java but let me know if something is missing there. Thanks!

is this still being worked on? is there an official github repo for this porting project? I see a couple of random repos, but can't tell.

how did you come to the conclusion to use the C API? we are working on a
ruby interface using swig:
http://github.com/somaticio/tensorflow.rb
On Tue, Sep 13, 2016 at 6:22 PM, Jonathan Hseu<EMAIL_ADDRESS>wrote:

Yep, but probably sometime in October/November. We're using the C API
instead of SWIGing to the C++ API. In the meantime, you can use the
bindings that saudet mentioned.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/5#issuecomment-246844192,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA5v3g86Z6D1rz-aTGdMyMWnQZhrZUYks5qpyIJgaJpZM4Getd8
.

Going forward, we'd prefer that all language bindings use the C API. A doc is forthcoming.
You can see example usage here:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/go

@jhseu Does that mean that the C API will be expanded to cover all that the Python bindings currently have access to?

Wow, big change.  Wish this was decided earlier on.  Anyway to see the docs
sooner?
On Wed, Sep 14, 2016 at 5:56 PM, Samuel Audet<EMAIL_ADDRESS>wrote:

@jhseu https://github.com/jhseu Does that mean that the C API will be
expanded to cover all that the Python bindings currently have access to?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/5#issuecomment-247167887,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA5vwfBJoZC2s33_7E9Xy6-NYNUjHjnks5qqG2FgaJpZM4Getd8
.

Thanks @saudet . I have found this in stackoverflow about generating TensorProto with pure protobuf API. And here is the example code of TensorFlow serving gRPC Java client.

@tobegit3hub Nice, if you can make this work with the C++ API, please add it to the helper package of the JavaCPP Presets and send a pull request! This guy would be interested in something like that: https://github.com/bytedeco/javacpp-presets/issues/240

@girving Does javacpp solve the problem already?
I want to contribute to tensorflow java api , I prefer implement it like python.

Hi guys, did somebody already start working on the Java/Scala language bindings using the C API ?
(instead of building on top of SWIG)

I have a working Java/Scala interface to tensorflow using only the C API via JNR. Unfortunately, I don't yet have permission to open source it. I will post here if and when I release it. It is still a work in progress, but it's very functional.

@jdolson Does the API you expose accept TensorFlow's protocol buffer objects? One of the biggest issues I've had using the javacpp presets from @saudet is that when you are manipulating tensor objects in Java client code you're dealing with a org.tensorflow.framework.TensorProto which is generated by the protocol buffer compiler when configured to output java. But in the TensorFlow API wrapper you are dealing with a org.bytedeco.javacpp.tensorflow.TensorProto.TensorProto which is generated by javacpp when pointed at the c code generated by the protocol buffer compiler when configured to produce C. Since the types aren't the same you can't directly use your java code's tensors when calling the wrapped TensorFlow API.

@Intropy Yes, I compile all the tensorflow *.proto sources to Java source code with protoc and use those classes in the API.

@jhseu Is the C API interface still on track to be released sometime within November? If not, what's the current status?

@eaplatanios : The C API is mostly stable (and will be officially so by 1.0) and usable though not complete (still missing the ability to automatically gradient computations to the graph). A doc describing how the C API can be used to build language bindings is at https://www.tensorflow.org/how_tos/language_bindings/index.html
The Go API was implemented using the C API as a first example of following the above document.
We hope to have the Java bindings be built on top of this as well (using JNI) and have started exploring that a bit. Any comments/learnings folks have based on using @saudet 's wonderful work with getting JavaCPP working would be nice to know about.

I do have a few suggestions based on using JavaCPP bindings.
First, since protocol buffers compile directly to java, the java versions should be used. Preferably I think that the protocol buffers that take part in the API should be separately available as a maven module and should come with the proto definitions so that people on a Java stack have an easy way to get the definitions as binary as well as an easy way to get the proto definitions for inclusion within other proto definitions.
Second, it would be helpful to find the minimum version of libc that TensorFlow needs and build against that.
Third, it is much easier to use a thoughtfully designed API than an automatically generated one. I know that that's obvious and kind of sounds like a shot at JavaCPP. I don't mean it to be. I'm really glad the automatically generated interface exists. It is usable. But it requires odd circumlocutions, it has a lot of warts, and it's pretty hard to read the code to figure out how to do what you're trying to do. I wish this suggestion was more helpful than "you should make it good", but I guess the point is that look how different the C++ API and the python API are. Both are straightforward because they fit their environment in a way that automatically converted code is unlikely to match.

It would have been maybe nicer to support C backend of Swig and generate TF C API via Swig as well: https://github.com/swig/swig/issues/800

It would have been maybe nicer to support C backend of Swig and generate TF C API via Swig as well: https://github.com/swig/swig/issues/800 so that other languages like Go, Ruby, R can use the C api to write their own bindings.

We have an existing C API for adding support for any language with a C FFI:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api.h

Could the C API be accessed using JNA?

@jhseu I meant, it could have been maybe generated from C++ API earlier, before manually implementing the C API.

@Quantum64, here is a Scala binding of tensorflow that uses JNA.

Since this issue still open, how does
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/java
being implemented and what was the PR for the commit?

@hsaputra : Could you elaborate on what you're looking for? There are multiple commits that contribute to the code in tensorflow/java, most of which are referenced in this issue (such as 2b1cd28, d73a266 and many others in between)

HI @asimshankar , thanks for the reply.
I am just wondering what was the path that tensorflow/java take to implement Java API since this ticket is not closed.
There were discussions about using JavaCPP vs SWIG vs call via Jython.
Seemed like the tensorflow/java is implemented with direct JNI to call C APIs instead?

Correct.

Hey,
I just got these Swig bindings working yesterday. I have a request for an API change. Currently in order to generate Tensors reflection is required and the format of the arrays are a bit unweildy, as they require the use of n-dimensional native Java arrays. Can we keep this interface, but also add some methods for creating tensors that require 1-dimensional arrays and specifying the shape using another array of long? I imagine it could look something like this:
double[] matrix = {1.414, 2.718, 3.1415, 3.4, 56.7, 89.0};
long[] shape = {2, 3};

// add a method for each primitive type
org.tensorflow.Tensor tensor = org.tensorflow.Tensor.createDouble(matrix, shape);

This would also lead to the possibility of create int8, int16, uint8, uint16, uint32 tensors as well, which will help with compatibility.
Should I make this an issue? Or is it ok here?

@hollinwilkins : I'm hoping PR #6577 addresses this, with just a slight tweak to your proposed factory method:
Tensor tensor = Tensor.create(shape, DoubleBuffer.wrap(matrix));

@asimshankar This is great! Thanks for the quick reply. It looks like it's pretty close to being merged too :+1:

I'm trying to use the new java API, and I've come across some things that make it harder to use than I think it ought to be:

The java API should accept a GraphDef object. Currently it only accepts a byte array representing the serialized binary of the GraphDef protocol buffer. It's odd to require a serialization/deserialization step at the library boundary.
Session.Runner.feed should be able to accept org.tensorflow.framework.TensorProto or there should be a  good way to create org.tensorflow.Tensor from org.tensorflow.framework.TensorProto.
Session.Runner.run returns a list of Tensor objects. Similar to above there should be an easy way to get TensorProto output either directly or by giving org.tensorflow.Tensor a good way to convert to TensorProto.
Session.Runner.run swallows Status. There should be a way to get that out information about failures, perhaps through throwing an exception.

@Intropy : Thanks for your comments and they definitely make sense. For now I can share some quick thoughts with you:
RE: protobufs: At this point we're trying to keep the core API independent of protobufs for a number of reasons (including use on resource restricted systems where something like nanproto may be more appropriate). So, that's the reason why we have been hesitant, but it's something we're thinking about and suggestions are appreciated. One possibility is to have all the protobuf related functionality in a separate package so that there is a clear separation.
So, going back to your points:

See above. Though, I'd wager that there are many cases where the byte[] makes more sense (such as reading the graph from a file or network channel)

Point taken

See above.

Session.runner.run should not be swallowing status. If there is an error, an exception will be thrown (session_jni.cc:166. If that is not happening, please do file a bug.

You are right, not all types are supported yet, but should be easy enough to add. If you have a pressing need for the missing types, please feel free to file an issue and/or send in a PR. Contributions are welcome :)

@asimshankar Thanks for your thoughts.
Regarding the first point, it's not really a big deal. As you say there are times where a byte[] makes the most sense. In my own use case I have an InputStream, which is trivial to convert to byte[]. The protocol buffer API makes conversion straightforward. I just consider the byte[] a wart on the API because you're going to have to deserialize anyway (in TF_GraphImportGraphDef) and this way you lose some type safety. There's also proto3's json serialization to consider.
On swallowing status, you're right. I missed the unchecked exception.
The most obvious way to handle 2 and 3 is to give org.tensorflow.Tensor a factory that converts from a TensorProto and some toTensorProto(). If resource limited use cases is the issue with protocol buffers, then people in those circumstances could simply not use those functions. The problem is that people who do use those functions would be paying the cost of a conversion that could likely be avoided by having the Tensor store its data directly in a protobuff. I've never worked with jni before, so I'm having trouble following how the data are stored, but it looks like it's essentially treating nativeHandle like a pointer to a TF_Tensor which has a TensorBuffer that is treated essentially like a sized void*.

Could we break up this issue and file separate issues for each feature in the Java interface? It'll make easier to track/parse, then we can close this issue.

@drpngx : My intention is to get a couple more changes in (reading tensors from buffers and setting up the binary release) before closing this out like we did for Go and having features/bugs be filed individually. So hopefully soon.

Sounds good, thanks!

Alright, seems like we have enough of a base to build on (e.g., enough to build the LabelImage example and folks are filing more specific bugs/feature requests.
I'm going to close this issue out. There is still much to do in the Java API, but let's discuss/track those in separate issues. Thanks!

@asimshankar we are in the process of selecting deep learning framework (mxnet/tf) and our etl/api are based on spark/akka flow...Is there a plan to add distributed_runtime support to Java API to run model parallel training using ps nodes ? ps node is critical to us for many use-cases...javacpp presets may be easier to export for the first cut since the C API itself does not seem to have distributed_runtime in it...

@debasish83 : Including the distributed runtime by itself is trivial, but there are a bunch of higher level constructs in the Python API like the Estimator class that take care of a bunch of things (checkpointing, summary saving etc. that make visualization through TensorBoard trivial) that may make it more suitable to run the training jobs in Python.
All this can be built using the existing primitives in the Java API, but the right approach will depend on your precise needs.
Perhaps we should sync up off thread?

@asimshankar Is there a way already from the tensorflow Java binding to retrieve information from a graphDef (built from the .pb file of the graph on disk) like the list of nodes, input and output format or is it an incoming feature? Thanks!

@asimshankar I'm not sure to understand what is missing to do training with TF Java. Is it a problem od the numeric library (missing numpy)?

What is the state of training models in Java? I have been thinking of writing an ImageJ (popular and free image analysis suite) plugin to apply approaches such as https://arxiv.org/pdf/1505.04597.pdf (recently wildly popular in image segmentation for cell tracking and biomedical applications). I think it would be useful to provide a range of pre-trained models and enable users to refine these for their specific use case. I have been looking into DL4J for this purpose. Are there any concrete plans to allow fitting in the TF Java bindings?

@bergwerf : Training in Java is certainly possibly, if not particularly convenient.
You can find a sample at https://github.com/tensorflow/models/tree/master/samples/languages/java/training

Oh, awesome! My information must be outdated then ;-). I thought I had read
somewhere the Java API was only intended for predicting with pre-trained
models. I will look into the example.
On Wed, Mar 28, 2018, 22:01 Asim Shankar<EMAIL_ADDRESS>wrote:

@bergwerf https://github.com/bergwerf : Training in Java is certainly
possibly, if not particularly convenient.
You can find a sample at
https://github.com/tensorflow/models/tree/master/samples/languages/java/training
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/5#issuecomment-377015867,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEQJ1UD9-xACQAII5996ees_UFJ_NzL-ks5ti-wSgaJpZM4Getd8
.

@asimshankar that's awesome 👍 💯 🥇 , I'm going to add to my repo https://github.com/loretoparisi/tensorflow-java


Infinite loading screen when homeserver not reachable

To reproduce:

Being connected to a local home server with a user who haven't joined a single room
Kill the application
Make the home server unreachable
Launch the application

Riot tries to load with last user connected. It won't give the possibility to the user to change the home server used.

done

Validated


DOC: misc fixes

underline lenght, not critical, but nice to have

blank link before section necessary for correct parsing by numpydoc.

Thanks!


Add Libra post

Adds a blog post on Libra, similar to the talk given at TLS Copenhagen

Merged, thanks!


PoC: general MIDI compatible synthesizer

For host application, JuceAAPAudioPluginHost and tracktion_engine can be seen as useful proof of concept apps. There should be some useful plugin that works well with the hosts.
An example can be fluidsynth-based plugin like juicysfplugin, but Android build needs non-trivial changes. And since we already have fluidsynth itself working on Android, there is not a lot of advantage over simple MIDI player. Especially, it makes little sense to have to instantiate ones for each track.
What I'm seeing good right now is to have SFZ working. sfizz supports LV2, and it actually involves not a few LV2 extension features. It also requires some complicated parameter bindings through Atom port as well as sfz loader through worker threads, so it would be a good dogfooding for LV2 wrapper.
sfizz needs UI support for file picker as well as other parameters. Therefore it could also be a good dogfooding for UI bindings. sfizz has no UI yet, and there is no UI binding generator, so it would also be required (or at least useful) to create UI binding automator in UI-framework-agnostic way.
Actually it does not have to be LV2 (it is rather difficult) so in practice it would be easy to use the library feature directly.

some good sfz list https://www.laptopmusician.net/2019/06/the-ultimate-free-sfz-instruments-list.html
This Japanese website has great set of sfz files https://unreal-instruments.wixsite.com/unreal-instruments
When it comes to instruments with ARIA, this organization has a lot: https://github.com/sfzinstruments/

There is not a few steps to achieve this task:

get sfizz working

with ARIA UI (need own implementation)
get ARIA UI working on desktop first

build sfizz on Android

need prefab package for libsndfile (dependency)

get aap-lv2 split from this repo.

ongoing work at https://github.com/atsushieno/aria2web

This is practically https://github.com/atsushieno/aap-lv2/issues/3 . This one can be closed.


fix: update cookie values on request object.

Fixes #41

Do we just keep this functionality for normal Next.js and make users aware that using it with middleware is an edge case?

Hm, that's a good point. Do we know why and how folks want to use this in middleware? Once we're clear about the use case, we can understand it better.
Also, maybe middleware does update the actually cookies before the next request hits? In that case it would be fine.


Getting errors when using webpack --watch

Hi, thanks for all your work and great plugin.
I'm building with webpack 3.4.1, and getting an error after I make a change
(first load is good, second I get the error after HMR):

I noticed inside 'swiper.vue' file, if I remove this line:
require('swiper/dist/css/swiper.css') (line 18)
I no longer get the error, but my sliders are messed up..
Appreciate any help
thx

Update to v2.6.0 please, starting with version 2.6.0, you need to manually introduce swiper's css.

#123
#41

sweet thx, that's what I did, copied the minified css from swiper module.


Encrypt process log attributes

See docs. Examples include c2pa_exports, registrations, and uploads.
Ben has mentioned in the past that these should be encrypted.

We are not encrypting these.


Refs #32355 -- Bumped required version of sqlparse in setup.cfg.

Follow up to 63d1cb0092f8933a92f471c5150d61140f33882c.

Thanks for checking :+1:


Correctly handle TIME-OFFSET according to spec

Spec reference: https://tools.ietf.org/html/rfc8216#section-<IP_ADDRESS>
According to the spec, TIME-OFFSET is a signed-decimal-floating-point number of seconds, so allowed values can be positive or negative, and can also be 0. (They have different meanings in each case)
With the current implementation of m3u8, TIME-OFFSET is only printed when its value is > 0

This PR changes the type of StartTime from float64 to *float64 to differentiate between 0.0 and nil value
The TIME-OFFSET will be printed if StartTime != nil

Coverage remained the same at 75.365% when pulling 65c7218cbb57321f557fddaea88558f63d72fe51 on radiofrance:handle-time-offset into 036100c52a87e26c62be56df85450e9c703201a6 on grafov:master.


Change calls to provider methods referencing management components

Issue #, if available:
Description of changes:
This PR is continuing to build towards the changes made in this PR while addressing the comments
After extending the API surfaces for all the providers to have methods that use cluster.ManagementComponents instead of the cluster.Spec to reference the management components , we now need to swap out where the old methods are being used with the new ones. This will enable us to then contract the API (remove the old methods using cluster.Spec to get the management components) for all the providers after they aren't in use anymore
Testing (if applicable):
Documentation added/planned (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve

/test eks-anywhere-presubmit


feat: remove node_get_info.proto

Description:

Related issue(s):
Fixes #377
Notes for reviewer:

Checklist

[ ] Documented (Code comments, README, etc.)
[ ] Tested (unit, integration, etc.)

Also need to remove the gRPC definition in address_book_service (roughly line 165).

Also need to remove the gRPC definition in address_book_service (roughly line 165).

I will remove it in PR#380. Thanks @jsync-swirlds


Highlight selected element when switching from Diagram to XML tab

...so that I as a User am able to continue working in the context I am left (in the process diagram).
Idea

[ ] Highlight business objects for selected elements
[ ] Scroll to first element

Related to https://github.com/camunda/camunda-modeler/issues/496

Got this feature request today during a Partner interview.
Although the XML view is not a critical use case, I think that this feature would increase the usability of the view. It would be also helpful in a training context.


Enable date-picker month scroller on Edit Subject, and add date widgets to New Subject

Fixes both #38 and #37
cc: @tjrivera

thanks @r3m0chop


User is able to sign In with wrong wallet seed

Steps To Reproduce:

Open the app.
Tap on 'Activate Coin' button.
Select a coin [KMD] and tap on 'Activate Coin' button.
Tap on 'Create new wallet' button at 'welcome' screen.
Copy the wallet seed and paste it on 'Confirm wallet seed' text field, and tap on 'Register' button.
Now, enter the text randomly at 'wallet seed' text field and tap on 'Sign in' button.
Verify the result.

Expected Result:
User should not be able to sign in with wrong wallet seed.
Actual Result:
user is able to sign in with wrong wallet seed.
Please consider the screencast url:
http://www.screencast.com/t/QnoAqnRuV

this is expected
any passphrase is valid


Multi-threaded execution leads to high CPU load

In my code , I have five threads, for each thread I have generate a Executor just as follows:
std::unique_ptrmxnet::cpp::Executor exec
exec_.reset(network_.SimpleBind(ctx, args_,grad_store,grad_req_type));
but when I run the program,I found the cpu load is very high. I want to know  Whether each thread generates a separate Executor engine，and each Executor engine generate many threads. and
if I want to just generate one Executor engine, and the threads use the same Executor engine, how to code in my program?

@mxnet-label-bot add [Performance, c++, question]
Adding labels for better visibility. You might try asking this question on https://discuss.mxnet.io/ instead. Questions there tend to get better visibility as github is primarily used to track issues.

@songziqin
This is based on my understanding of C++ API.
It is possible to create Executor engine in one thread and share it across many thread. However, the executor engine will run the forward pass on only one input at a time.  That is, for a given input,  the following 3 operations should be performed atomically for the correct inference

Setting the input for the Executor
Running the forward pass . Executor->Forward()
Retrieving the output from the executor.

With this approach your application will be able to process multiple inputs but the inference operation will be serialized.
With some modifications the inception_inference.cpp example can be used to process multiple images. The object of Predictor class can be created by a single thread and shared across multiple threads.  The calls to "PredictImage()" need to be synchronized so that Executor in Predictor object processes one image at a time.
I hope this helps.
@mxnet-label-bot add [Pending Requester Info]

@songziqin - I hope @leleamol response addressed your concern. Let us know if you still facing issue.
Closing the issue for now, please reopen if issue still exists.


Submarine-1235. Display test coverage in PR check progress

What is this PR for?
Display test coverage in PR check progress
What type of PR is it?
Feature
Todos

[x] Check code coverage report can be updated to SonaCloud
[x] Add CodeCov PR comment in every PR

What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-1235
How should this be tested?
Setup both github and codecov, the PR comment should appear everytime while PR
Screenshots (if appropriate)

Test screenshot in my own repository
Questions:

Do the license files need updating? No
Are there breaking changes for older versions? No
Does this need new documentation? No

Github and Codecov need to be set up by the Infra team, see here for more detail
https://docs.google.com/document/d/1aeq6mTHYnQeAxx32k-g7gJ3V46-5Gb99Nn0SBwbzzSs/edit#heading=h.7g0ilxwuuexd


ERROR when convert ONNX to IR in Instance Segmentation

i have successfully converted mask_rcnn_resnet50_fpn_2x.pkl to mask_rcnn_resnet50_fpn_2x.onnx
but when i convert mask_rcnn_resnet50_fpn_2x.onnx to mask_rcnn_resnet50_fpn_2x.xml and mask_rcnn_resnet50_fpn_2x.bin, got error as follows:
[ ERROR ]  Shape is not defined for output 3 of "639".
[ ERROR ]  Cannot infer shapes or values for node "639".
[ ERROR ]  Not all output shapes were inferred or fully defined for node "639".
For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #40.
[ ERROR ]
[ ERROR ]  It can happen due to bug in custom shape infer function <function ExperimentalDetectronDetectionOutput.infer at 0x7f08d9360268>.
Environment:

OS:  Linux Ubuntu 18.04
Framework version: PyTorch
Python version: 3.5.2
OpenVINO version: 2020 1
CUDA/cuDNN version: 9.0/7.5
GPU model and memory: Intel® HD Graphics 530 (Skylake GT2)

and when use OpenVINO version: 2019 R3.1 it can successfully convert mask_rcnn_resnet50_fpn_2x.onnx to mask_rcnn_resnet50_fpn_2x.xml and mask_rcnn_resnet50_fpn_2x.bin, but there is also some error when run the dome
python tools/demo.py     --dataset coco_2017_val     --ckpt pretrained_models/ir/coco/detectron/FP16/mask_rcnn_resnet50_fpn_2x.bin     --fit_window 800 1333     --video test1.mp4     --delay 1     --show_fps     openvino     --model pretrained_models/ir/coco/detectron/FP16/mask_rcnn_resnet50_fpn_2x.xml     --device GPU
as follows:
RuntimeError: Unknown Layer Type: ExperimentalDetectronPriorGridGenerator
Exception ignored in: <bound method OpenVINONet.del of <segmentoly.rcnn.openvino_net.MaskRCNNOpenVINO object at 0x7fbd4e800908>>
Traceback (most recent call last):
File "/home/dcg/Downloads/instance_segmentation/segmentoly/rcnn/openvino_net.py", line 77, in del
del self.exec_net
AttributeError: exec_net

Hi @niuwenju

and when use OpenVINO version: 2019 R3.1 it can successfully convert mask_rcnn_resnet50_fpn_2x.onnx to mask_rcnn_resnet50_fpn_2x.xml and mask_rcnn_resnet50_fpn_2x.bin, but there is also some error when run the dome
python tools/demo.py --dataset coco_2017_val --ckpt pretrained_models/ir/coco/detectron/FP16/mask_rcnn_resnet50_fpn_2x.bin --fit_window 800 1333 --video test1.mp4 --delay 1 --show_fps openvino --model pretrained_models/ir/coco/detectron/FP16/mask_rcnn_resnet50_fpn_2x.xml --device GPU

GPU plugin does not support this model and looks like it will not be added in the future :disappointed:

i have successfully converted mask_rcnn_resnet50_fpn_2x.pkl to mask_rcnn_resnet50_fpn_2x.onnx
but when i convert mask_rcnn_resnet50_fpn_2x.onnx to mask_rcnn_resnet50_fpn_2x.xml and mask_rcnn_resnet50_fpn_2x.bin, got error as follows:
and when use OpenVINO version: 2019 R3.1 it can successfully convert mask_rcnn_resnet50_fpn_2x.onnx to mask_rcnn_resnet50_fpn_2x.xml and mask_rcnn_resnet50_fpn_2x.bin

It's issue with latest release, we will try to solve it.


Installing extension on remote server

Hi, I am receiving the following error when trying to format my lua file
[Error - 7:43:49 PM] Connection to server is erroring. Shutting down server.
[Error - 7:43:49 PM] Connection to server is erroring. Shutting down server.
[Error - 7:43:49 PM] Connection to server is erroring. Shutting down server.
/home/rkarimi/.vscode-server/extensions/sumneko.lua-0.16.4/server/bin/Linux/lua-language-server: ...server/extensions/sumneko.lua-0.16.4/server/platform.lua:17: It doesn't seem to support your OS, please build it in your OS, see https://github.com/sumneko/vscode-lua/wiki/Build
errorMsg: /lib64/libstdc++.so.6: version 'GLIBCXX_3.4.20' not found (required by /home/rkarimi/.vscode-server/extensions/sumneko.lua-0.16.4/server/bin/Linux/bee.so)
exePath:  /home/rkarimi/.vscode-server/extensions/sumneko.lua-0.16.4/server/bin/Linux/lua-language-server
exeDir:   /home/rkarimi/.vscode-server/extensions/sumneko.lua-0.16.4/server/bin/Linux
dll:      so
cpath:    /home/rkarimi/.vscode-server/extensions/sumneko.lua-0.16.4/server/bin/Linux/?.so

stack traceback:
	[C]: in function 'error'
	...server/extensions/sumneko.lua-0.16.4/server/platform.lua:17: in main chunk
	...ode-server/extensions/sumneko.lua-0.16.4/server/main.lua:3: in main chunk
	[C]: in ?

LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.7.1908 (Core)
Release:        7.7.1908
Codename:       Core

I have tried to follow your Build instructions (https://github.com/sumneko/vscode-lua/wiki/Build) but it's a little vague! The extension is installed on remote server and I am new to vscode. Could you explain the following steps:
Open repo and execute tasks in VSCode

PreCompile
Compile
Install

F1 -> run task

ldd bee.so
ldd: warning: you do not have execution permission for `./bee.so'
./bee.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./bee.so)
./bee.so: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./bee.so)
./bee.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./bee.so)
./bee.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by ./bee.so)
        linux-vdso.so.1 =>  (0x00007ffcc5de8000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0e461c0000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f0e45eb9000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0e45ca3000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f0e458d5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0e46634000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f0e455d3000)

I solved it by setting "LD_LIBRARY_PATH" like below
LD_LIBRARY_PATH=/tools/pkg/gcc/8.2.0/lib64 ldd bee.so
ldd: warning: you do not have execution permission for `./bee.so'
        linux-vdso.so.1 =>  (0x00007ffcfdc24000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2ec2d6b000)
        libstdc++.so.6 => /tools/pkg/gcc/8.2.0/lib64/libstdc++.so.6 (0x00007f2ec29ea000)
        libgcc_s.so.1 => /tools/pkg/gcc/8.2.0/lib64/libgcc_s.so.1 (0x00007f2ec27d2000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f2ec2404000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f2ec31df000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f2ec2102000)

Should be fixed.


Adding some routes to a server (the API design is bad, but it isn't mine and I need to match the contract):
	mux.Handle("/v1/rsrc/path1/{geoID}/path2/{orderID}/", ...
	mux.Handle("/v1/rsrc/{geoID}/path2/{orderID}/", ...

What did you see happen?
panic: pattern "/v1/rsrc/{geoID}/path2/{orderID}/" (registered at /Users/user/Dev/feltgis/go/pkg/introspectmux/introspect_mux.go:32) conflicts with pattern "/v1/rsrc/path1/{geoID}/path2/{orderID}/" (registered at /Users/user/Dev/feltgis/go/pkg/introspectmux/introspect_mux.go:32):
	/v1/rsrc/{geoID}/path2/{orderID}/ and /v1/rsrc/path1/{geoID}/path2/{orderID}/ both match some paths, like "/v1/rsrc/path1/path2/path2/orderID/".
	But neither is more specific than the other.
	/v1/rsrc/{geoID}/path2/{orderID}/ matches "/v1/rsrc/geoID/path2/orderID/", but /v1/rsrc/path1/{geoID}/path2/{orderID}/ doesn't.
	/v1/rsrc/path1/{geoID}/path2/{orderID}/ matches "/v1/rsrc/path1/geoID/path2/orderID/", but /v1/rsrc/{geoID}/path2/{orderID}/ doesn't.

What did you expect to see?
The paths should not conflict because the routes refer to different resources. Of course, the better design for this API is:
	mux.Handle("/v1/path1/{geoID}/path2/{orderID}/", ...
	mux.Handle("/v1/rsrc/{geoID}/path2/{orderID}/", ...

But I'm constrained to use this one to satisfy legacy contracts:
	mux.Handle("/v1/rsrc/path1/{geoID}/path2/{orderID}/", ...
	mux.Handle("/v1/rsrc/{geoID}/path2/{orderID}/", ...

Related Issues and Documentation

net/http: Conflicts with pattern when using NewServeMux #68838 (closed)
expvar: creates conflict with "GET /" route #65723 (closed)
net/http.ServeMux: Enhanced routing patterns introduced in 1.22 do not work in 1.23 unless go mod has go version explicitly declared #69686 (closed)
net/http: ServeMux behaves inconsistently across operating systems #66288 (closed)
net/http: ServeMux forcibly cleans double forward slash in URLs even when behaving as a gateway #42244 (closed)

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

The mux is correct: /v1/rsrc/path1/path2/path2/Orderid/ would match both.


Purpose of adding Gulp

Hi,
First I want to say I like that this fork adds testing to the boilerplate. It is very important in my opinion.
However, can you explain the reason for adding so much gulp compared to the original boilerplate?

Hi @Tmarty , Thank you for your feedback.
I have used some gulp plugins to enable some features I want but I will refactor it to use just webpack asap.

AltLayer Airdrop Season One Announcement

Exciting news! AltLayer token (ALT) is set to launch on Binance on January 25, 2024. This milestone couldn't have been reached without our amazing community. Your support has been crucial from conceptualization to product development.
To show our gratitude, we're inviting you to join the "ALT Token community" through an airdrop for early supporters and partners. Below is a summary:

Total Allocated ALT Tokens: 300,000,000 (3% of total supply)
Distribution Categories:

NFT Holders
Altitude Campaign Participants
EigenLayer Restakers
EigenLayer Ecosystem Partners
Celestia Stakers and others

For detailed criteria and information, check the full announcement here.
Claim opens from January 25 to February 25, 2024. Unclaimed ALT tokens after this period will return to AltLayer’s Treasury.
Thank you for being part of AltLayer's success! More to come in Season One, stay tuned.
Note: Certain regions are restricted from the airdrop. Please review the disclaimer before participating.
Winners: @jnnttavilans, @crazy4groovy, @sashaaldrick, @kjruan, @avirajkhare00, @aforamit, @pichtranst123, @guweigang, @adelarsq, @jungai, @MdRashid62, @lmbaeza, @amirgamil, @1Bishop, @mutantmanhattan, @naz, @dansg1, @Uncrownkingg, @hodgerpodger, @michaeloo0, @alykhan, @starktayfun, @D4rkD0g, @konradgalczynski07, @Janthonym24, @noxliu, @camirmas, @RoCry, @picwellwisher12pk, @GhostWalkers

Hello,
We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!
As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:

Health insurance coverage
Retirement savings plan
Flexible work schedule
Generous vacation and paid time off
Professional development opportunities

To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.
Please click here to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.
Important: You have 24 hours to complete the application process.
If you have any questions or need further information, please don't hesitate to contact us.
Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.
Best regards,
GitHub Recruitment Team
wayou, @bagerismo, @chenruibin, @dnabanita7, @wOutlaw, @mdedonno1337, @darjun, @rishabh-1004, @wiseStann, @zeroxy, @KrishnenduDG, @danielsouzaaf, @jbarratt, @88d52bdba0366127fffca9dfa93895, @ladybugsjdk, @GuiBrandt, @yihuxingkong, @venthota, @nd1511, @alikemalocalan


sabnzbd: replace par2cmdline with par2cmdline-turbo

Description of changes
SABnzbd recommends using par2cmdline-turbo instead of par2cmdline, due to its performance benefits. The original par2cmdline is relatively unmaintained at the moment, without a major release in more than 3 years.

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/3251

The path variable still has par2cmdline; it must also be replaced with par2cmdline-turbo.

The path variable still has par2cmdline; it must also be replaced with par2cmdline-turbo.

Oh, shoot! Fixed.


PostgreSQL as a Windows Container

Hi,
This week I wrote a repository to create a PostgreSQL container image based on the Windows platform. Specifically, the image is based on microsoft/nanoserver, version 1803 (the latest).
The container image uses the BigSQL distribution of PostgreSQL, which is one of the two official distributions found on the PostgeSQL for Windows download page.
I used the official Dockerfile and docker-entrypoint.sh as inspiration for building functionality, so with this container image you can (probably) do everything that is possible with the Linux based container image.
I have tested the image against a proprietary enterprise Java application, and all appears to be working well.
I have seen some interest by others for a Windows based PostgreSQL container image, so I'm willing to contribute the files in my repository to this project.
My repository is found at stellirin/docker-postgres-windows
Please take a look at my project and provide feedback. No doubt there will be several issues to work through before we can merge something into this project, but it is something I have a strong motivation to achieve.
Some general topics I can think of:

Do we really want to use the BigSQL distribution or compile it independently?
Are there any Windows specific functionalities we can take advantage of?
How can we reconcile the differences in the Dockerfile and docker-entrypoint.cmd? Should we?

Thanks!

Duplicate of https://github.com/docker-library/postgres/issues/324. :wink:


NavMeshLink doesn't expose the costModifier.

In the NavMeshLink.cs component the costModifier is hardcoded. It would be helpful to have that variable editable in editor for each instance of NavMeshLink.

pushed


Feature windows build script

Added build script for windows, that downloads the npcap sdk and set the LIB environment variable to the right directory.

if i read this correctly, it performs the entire thing with download and everything on every build? this shouldn't happen. check out the chapter on change detection for build scripts in the cargo reference to get a better feel for it.
the most simple solution would probably be emitting cargo::rerun-if-changed=build.rs, so it only ever runs once (as described in the chapter). i'm not 100% sure though if this is the best solution though, since it's just gut feeling typing from my phone. you'll have to look a bit more into this to see if there might be something more appropriate.

Yeah after coming across an issue with windows-aarch64 I also think, that using a build script for this is probably not the best idea.


Back button

Could you transfer the nav bar from the home page to the targetedworkout.html page please and have a functioning back button implemented

could you also remove the Hello World in the targetedworkout.html please


clock module should reuse default timezone (TZ or /etc/localtime)

After updating to Waybar 0.9.3 (with plus rfkill+sndio) I ended up with the following error and the clock module simply being absent from the bar:
[2020-10-08 05:49:13.955] [error] clock: Could not get current timezone

I fixed it by copying my timezone into the config but this isn't something I should have to do, it should fallback to the TZ environment variable and then /etc/localtime.

Hi @lanodan can you check again please? It was implemented at https://github.com/Alexays/Waybar/pull/2001

Hi @lanodan , up

Doesn't seems to be fixed, at least I'm getting the same error on f29a400c97d6cc339c5be2ca6c5467c04323b766
That is:
[2023-03-02 01:59:29.303] [warning] module clock: Disabling module "clock", Could not get current timezone
(At least the logs do follow the timezone information)

Hi @lanodan , can you please:

Provide waybar config
Provide Linux OS you're using
Thanks


Kotlin: keywords are old

I read kotlin.js, I found that KEYWORDS are not enough and include deleted one.
(Kotlin had a lot of destructive changes.)
Now, Kotlin released 1.0.0, and JetBrains won't make more destructive changes, I think...
Missing keywords:

interface
annotation
data
abstract
sealed
internal
infix
operator
out
by
constructor
super
this
noinline
crossinline
dynamic - for Kotlin javascript

Deleted keywords:

trait - changed to interface
volatile, transient, native - changed to annotations (@Volatile, @Transient, @Native)
default - changed to companion

I have just started Kotlin, so keywords may be not enough.
Thanks for adding "vararg"

Could you make a pull request with those changes? And may be update the demo snippet in test/detect/kotlin/default.txt if it doesn't look like up-to-date Kotlin?


Image File Name Saves as Full File Path By Default

When saving images on my computer I noticed that the default name for files is the full containing folder's path (in addition to the original image's name).
Save File Dialog opens in the correct directory, but the file name it's attempting to save as is the full directory.
Current Behavior: Saving as file name "C:\Programming\WPFMultiImage\slnWPFMultiImage\WPFMultiImage\bin\Debug\net5.0-windows\Capture.tif"
Expected Behavior: Saving as file name "Capture.tif"

Fixed


Load exception

Loading when no map available
Expected behaviour: Nothing happens
Actual behaiour:
 Exception in thread "main" ru.hse.spb.model.FailedLoadException: Failed to load save file.
	at ru.hse.spb.model.WorldModel.load(WorldModel.kt:201)
	at ru.hse.spb.actions.LoadGameAction.execute(LoadGameAction.kt:7)
	at ru.hse.spb.controller.Controller.run(Controller.kt:40)
	at ru.hse.spb.RoguelikeSinglePlayerApplication.start(RoguelikeSinglePlayerApplication.kt:16)
	at ru.hse.spb.client.RoguelikeClient$Companion.main(RoguelikeClient.kt:104)
	at ru.hse.spb.client.RoguelikeClient.main(RoguelikeClient.kt)

Fixed.
In single player mode works well.
But actually in multiplayer, it is a quite strange thing and sometimes it could lead to strange behavior.
I think there 2 possible solutions:

Wipe out support for loading/saving in multiplayer mode.
Ignore strange situations and let players be responsible for using multiplayer savings correctly.

I think the second variant is quite good and reasonable and we can follow this way.

Allright thank you


Feature/item net

Description

Added embeddings categorical item features to ItemNetBlock, Constructed Item Net for embeddings items ids and features. Also added method to retrieve categorical features from SparseFeatures.
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Optimization

How Has This Been Tested?
Before submitting a PR, please check yourself against the following list. It would save us quite a lot of time.

Have you read the contribution guide?
Have you updated the relevant docstrings? We're using Numpy format, please double-check yourself
Does your change require any new tests?
Have you updated the changelog file?

TODO:

[ ] Tutorial notebook for SasRec model with category features
[ ] DocString
[ ] Tests


fix entrypoints error

I suggest a bug fix  about my issue

entrypoints.json was changed and now we have merge conflicts here, I think we can close this PR now. Please, try the new changes first

I think we can close this as it's not relevant anymore, the file was already updated

OK then. Let's close. Thanks!


Feature 3.4: Use ManagedDirectory class to add gzip and encryption to import/export

ManagedDirectory class added encryption and later gzip to the arangodump and arangorestore utilities. This PR does the same for arangoimport and arangoexport.
Enterprise PR:  https://github.com/arangodb/enterprise/pull/272
Test running:  http://jenkins01.arangodb.biz:8080/view/PR/job/arangodb-matrix-pr/5194/

One test failure in 3.4:  server_permissions
BashoAir2015:xx matthewv$ cat server_permissions.log
Unknown test "server_permissions"
Maybe a rebase will fix that

Changes made, Jenkins running:  http://<IP_ADDRESS>:8080/view/PR/job/arangodb-matrix-pr/5378/
@danielhlarkin


How to customize select2 widgets (i.e. language, css properties) when declaring a form in forms.py

Hello, I've found the docs a bit lacking regarding all the options that can be passed to the select2 widget (such as https://select2.org/configuration/options-api) in order to configure it. It would be great to expand the docs with such info.
I'm particulary interested in changing the widgets css properties (specially width, since I get very narrow wdigets) and also changing the language.
I haven't been able to find such information in the docs and I think it could help this amazing app to expand.
Thanks for the work!

some example code with the widgets you're trying to customize would be helpful

Sorry! There you have an example, thanks!
#models.py
class PedidoFungible(models.Model):
    producto = models.ForeignKey(ProductoFungible, on_delete=models.SET_NULL, null=True)
    autor = models.ForeignKey(User, on_delete=models.SET_NULL, blank = True, null = True)
    fecha = models.DateTimeField(auto_now_add=True)
    unidades = models.IntegerField(default=1, blank = False)
    almacen = models.ForeignKey(Almacen, null=True, on_delete=models.SET_NULL, blank=True)
    proforma = models.ForeignKey(Proforma, blank = True, null=True, on_delete=models.SET_NULL)

    ESTADO = (
        ('a', _('Pendiente')),
        ('b', _('Incluído en proforma')),
        ('r', _('Recibido'))
    )

    estado = models.CharField(
        max_length=1,
        choices=ESTADO,
        blank=False,
        default = 'a',
        help_text=_('Estado de la solicitud.'),
    )

    class Meta:
        verbose_name = _("Pedido fungible")
        verbose_name_plural = _("Pedidos de fungible")

    def __str__(self):
        """String for representing the MyModelName object (in Admin site etc.)."""
        return self.producto.nombre_amistoso

#forms.py
from django_select2.forms import Select2Widget
class PedidoFungibleForm(ModelForm):
    class Meta:
        model = PedidoFungible
        fields = ['producto', 'unidades']
        widgets = {
            'producto': Select2Widget
        }

for language, why don't you try:
Select2Widget({'data-language': 'es'})
in your forms.py. I'm assuming you want to have language as Spanish.

for language, why don't you try:
Select2Widget({'data-language': 'es'})
in your forms.py. I'm assuming you want to have language as Spanish.

Working! That was easy! (I imagined it should be something like that)
Seeing how it works, I think I can use dropdownCss property of select2 to add some specific css to the widget, although I'm not sure which class I have to override yet.
Thanks again!

For custom width, use:
data-width: 'resolve'
options for this setting are element, style, resolve or <value> where value can be percentage
ref: https://select2.org/appearance#container-width

Seeing how it works, I think I can use dropdownCss property of select2 to add some specific css to the widget

Yes.
Try data-dropdown-css for this. Let me know if it works, since this is a guess from my side, and I'm not sure either.

Seeing how it works, I think I can use dropdownCss property of select2 to add some specific css to the widget

Yes.
Try data-dropdown-css for this. Let me know if it works, since this is a guess from my side, and I'm not sure either.

Whenever a tried to use data-dropdown-css the widget stopped working. Maybe I was writing it wrongly.
I had something like this:
class PedidoFungibleForm(ModelForm):
    class Meta:
        model = PedidoFungible
        fields = ['producto', 'unidades']
        widgets = {
            'producto': Select2Widget(
                {'data-language': 'es',
                 'data-placeholder': _('Busque fungibles'),
                 'data-dropdown-css': {'data-width': 'style'},
                 }
            )
        }

I finally made it work with this:
class PedidoFungibleForm(ModelForm):
    class Meta:
        model = PedidoFungible
        fields = ['producto', 'unidades']
        widgets = {
            'producto': Select2Widget(
                {'data-language': 'es',
                 'data-placeholder': _('Busque fungibles'),
                 'data-width': 'style',
                 }
            )
        }

Thanks a lot! Now it looks quite acceptable! (although it might need more tweaking to make it look better)
Regards,
J.

Cool, and I have no idea why dropdownCss would be used instead of specifying the attributes, so the approach you've taken makes more sense to me.
If this is resolved you can close the issue, cheers!


App crashes when navigating to the same page while useAsyncData is loading

Environment

Operating System: Linux
Node Version: v16.20.0
Nuxt Version: 3.6.2
Nitro Version: 2.5.2
Package Manager<EMAIL_ADDRESS>Builder: vite
User Config: -
Runtime Modules: -
Build Modules: -

Reproduction
https://stackblitz.com/edit/nuxt-starter-w3e6kj
Double-click the "Test page" link.
Describe the bug
App crashes when navigating to the same page while useAsyncData is loading.
Additional context
No response
Logs
No response

This bug was introduced in v3.6.1. Can't reproduce it in earlier versions.

@bombasticseahorse Can't manage to reproduce using your stackblitz. Do you have any stacktrace you can share ?

@benjaminrobinet
https://github.com/nuxt/nuxt/assets/136930412/f561d273-c1d9-4d27-9ef8-18e909250a67
Logs:
chunk-BVQHDTV7.js:1449 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug.  Please make sure it has an appropriate `as` value and it is preloaded intentionally.
content-script.js:1  CastifyDrawComponent   dispose called

I'm having the same issue. Double clicking the link to the page which has await in script setup crashes the app.
Even await new Promise(resolve => setTimeout(resolve, 3000)); can trigger the problem.
My reproduction repository

This is the same issue as https://github.com/nuxt/nuxt/issues/21841.


Jenkin is used as deployment tool

We are using jenkin as both build and deployment tool.
So is there anyway that I can configure jenkin as deployment tool in deploy widget and pull the details  into the dashboard?

There is a jenkins plugin which can report deployment status back to the API.  Hygieia Publisher Plugin

Thank you
On Wed, Apr 19, 2017 at 10:43 AM Rob Miller<EMAIL_ADDRESS>wrote:

There is a jenkins plugin which can report deployment status back to the
API. Hygieia Publisher Plugin
https://github.com/capitalone/Hygieia/tree/master/hygieia-jenkins-plugin
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/capitalone/Hygieia/issues/1334#issuecomment-295294374,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATv-jedVUlX9_DxUnIbVWSVNM45y9WHaks5rxh17gaJpZM4NBJI7
.

@chethanbs Please refer to https://github.com/capitalone/Hygieia/issues/884. Reopen if still an issue.

I am using groovy script for creating pipeline build.This plugin works with
groovy script as well?
On Thu, Apr 20, 2017 at 11:20 AM satishc1<EMAIL_ADDRESS>wrote:

@chethanbs https://github.com/chethanbs Please refer to #884
https://github.com/capitalone/Hygieia/issues/884. Reopen if still an
issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/capitalone/Hygieia/issues/1334#issuecomment-295775973,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATv-jfEjStrINz2oTMF_ktPcR8UqGBDDks5rx3exgaJpZM4NBJI7
.

It does, there is a script syntax generator for it.

One more thing.sorry for too many questions.
I have my Jenkins and Hygieia hosted on two different server.
The jenkin plugin needs to installed by manually uploading the file from
target folder.
I have Hygieia core package on different server.
How do I communicate between two severs? Is there anyway to pull data about
deployment from other server?
On Mon, Apr 24, 2017 at 10:28 AM Rob Miller<EMAIL_ADDRESS>wrote:

It does, there is a script syntax generator for it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/capitalone/Hygieia/issues/1334#issuecomment-296685651,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATv-jeP9N1GUHTfrajsZ9H8OO6_xsa2rks5rzLFzgaJpZM4NBJI7
.

To get it to work, you need to install the Hygieia Publisher Plugin on jenkins, and have the Hygieia API running somewhere.  It doesn't matter where the API is running as long as you have the url to the api.  After the Plugin is installed and the API is up, go to "Manage Jenkins", and then "Configure System".  Go down to the Hygieia section, and put the url for the API in there.  Click "Apply", and then test connection to see if it can hit the API properly.  These instructions should be in the link I referenced above as well.


Question about hidden input fields

Hi Alex! I am trying to incorporate Ibex into a streamlined pipeline such that some students can work with it, and I am running into a small problem: Apparently, data input on a regular input field is saved, but the same data input in a hidden input field is not. In other words, changing the 'type' attribute from "text" to "hidden" prevents the logging of the data.
I am trying to parse a query string into a unique identifier such that I can cross reference the data collected in Qualtrics and Ibex without any participant intervention: Participants visit the Qualtrics webpage, fill their forms etc, and then are automatically redirected to an Ibex experiment with randomly generated code as a unique identifier in a query string (something like "url?SUBJECTCODE"). On my instructions page I would just extract the query string with a simple javascript snippet, but I need to log this information to the results file. Everything works fine if I display the parsed string in a text input and have the participant hit the "continue" link, but that creates the risk that participants edit the information. When the very same input field is set to hidden to prevent this, however, the data is not logged.
Any ideas about why that is? Is there a simpler way of logging data hidden from the participants that I should be trying?

The solution below is a bit of a hack but I used this in several experiments and it worked well.  The idea is basically to store the survey code using a DashedSentence controller that is displayed for just 1 ms:
Parse the query string using the code below:
var QueryString = function () {
  var query_string = {};
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
        // If first entry with this name
    if (typeof query_string[pair[0]] === "undefined") {
      query_string[pair[0]] = pair[1];
        // If second entry with this name
    } else if (typeof query_string[pair[0]] === "string") {
      var arr = [ query_string[pair[0]], pair[1] ];
      query_string[pair[0]] = arr;
        // If third or later entry with this name
    } else {
      query_string[pair[0]].push(pair[1]);
    }
  }
    return query_string;
} ();

Add the DashedSentence controller to the items list:
var items = [
    ["surveycode", "DashedSentence", {s:"" + QueryString.surveycode, mode:"speeded acceptability", wordTime:1}],
...

Make sure the "surveycode" item is included in the shuffleSequence:
var shuffleSequence = seq("surveycode", ...


[RBAC] az ad sp create-for-rabc: support name with space, slash and back slash

Description
This PR is to fix #12355
Previously, if the user uses a string which contains space in it as service principal name, the command will fail and print the trace stack directly.
The name will be also used as url in this command, this fix will replace space, slash and back slash with minus to make it a valid URI
Testing Guide
Before:
az ad sp create-for-rbac --name "Azure DevOps ML Model CI/CD pipeline" --role owner
/Users/algattik/.azure/cliextensions/azure-cli-ml/azureml/core/image/image.py:503: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if key is not "_operation_endpoint":
/Users/algattik/.azure/cliextensions/azure-cli-ml/azureml/_vendor/azure_storage/blob/_upload_chunking.py:402: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if n is 0 or self._buffer.closed:
/Users/algattik/.azure/cliextensions/azure-cli-ml/azureml/_vendor/azure_storage/blob/baseblobservice.py:1008: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if lease_duration is not -1 and \
/Users/algattik/.azure/cliextensions/azure-cli-ml/azureml/_vendor/azure_storage/blob/baseblobservice.py:2607: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if lease_duration is not -1 and \
/Users/algattik/.azure/cliextensions/azure-cli-ml/azureml/_vendor/azure_storage/common/_connection.py:81: SyntaxWarning: "is" with a literal. Did you mean "=="?
  self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme
/Users/algattik/.azure/cliextensions/azure-cli-ml/azureml/core/profile.py:320: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if key is not "_operation_endpoint":
/Users/algattik/.azure/cliextensions/azure-cli-ml/azureml/core/webservice/webservice.py:722: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if key is not "_operation_endpoint":
/Users/algattik/.azure/cliextensions/azure-cli-ml/azureml/_cli/dataset/dataset_commands.py:45: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if current_version[0] is 3 and current_version[1] >= 5:
Changing "Azure DevOps ML Model CI/CD pipeline" to a valid URI of "http://Azure DevOps ML Model CI/CD pipeline", which is the required format used for service principal names
Url is malformed paramName: WwwHomepage, paramValue: https://Azure DevOps ML Model CI/CD pipeline, objectType: Microsoft.Online.DirectoryServices.Application

After:
az ad sp create-for-rbac --name "Azure DevOps ML Model CI/CD pipeline" --role owner
Changing "Azure-DevOps-ML-Model-CI-CD-pipeline" to a valid URI of "http://Azure-DevOps-ML-Model-CI-CD-pipeline", which is the required format used for service principal names
Creating a role assignment under the scope of "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590"
  Retrying role assignment creation: 1/36
{
  "appId": "5754e4b3-3483-48ee-a3e9-ba92c41aaed7",
  "displayName": "Azure DevOps ML Model CI/CD pipeline",
  "name": "http://Azure-DevOps-ML-Model-CI-CD-pipeline",
  "password": "Nh_2G5-GxeZ3GMyDDmjSG2zcPwpzGdQ4np",
  "tenant": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"
}

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

RBAC


Implement beam in Kratos with a linear formulation

not needed anymore as the slow convergence in the calculation was due to a (solved) error in the solver


Prefetch ApolloQuery component

How to Prefetch ApolloQuery component?
It is doesn't work with apollo nuxt module.

@Akryum, Please add apolloquery to smart queries and cache


Avoid/Undo Broken Extensions

VSCode Version: Code 1.9.0 (27240e71ef390bf2d66307e677c2a333cebf75af, 2017-02-02T08:23:30.856Z)
OS Version: Darwin x64 16.4.0
Extensions:

Extension
Author
Version

Go
lukehoban
0.6.53

Steps to Reproduce:

When an extension author's pushes a build that is failing, you can see it in Extensions
Update & it will be broken.

I would like avoidance & undo:
Avoid:  Detect the "build failing" logo on github & stop offering it as an upgrade
Undo:  Let me return to a previous extension version if the present one isn't working.

It's the publisher's responsibility not to publish something that is broken. You should report the issue back to the extension developer so he fixes it asap.


Alternate Key path for /learningContents(externalId='{externalId}') is not generated

The learningContent has the alternate Key present in the metadata set as externalId,
However, the alternate key path is not generated in the collection path in the openApi document with the AlternateKey setting.
      <EntityType Name="learningContent" BaseType="graph.entity">
...
        <Annotation Term="Org.OData.Core.V1.AlternateKeys">
          <Collection>
            <Record Type="Org.OData.Core.V1.AlternateKey">
              <PropertyValue Property="Key">
                <Collection>
                  <Record Type="Org.OData.Core.V1.PropertyRef">
                    <PropertyValue Property="Alias" String="externalId" />
                    <PropertyValue Property="Name" PropertyPath="externalId" />
                  </Record>
                </Collection>
              </PropertyValue>
            </Record>
          </Collection>
        </Annotation>
      </EntityType>

From tentative investigations, it looks like the setting may only work on Entity sets and not other nav properties that return collections.

We received the same question on the internal stack overflow.
After digging further

Key
Entity
Present In OpenAPI
Has Entity Set

appId
application
Y
Y

appId
servicePrincipal
Y
Y

deviceId
device
Y
Y

roleTemplateId
directoryObjectPartnerReference
Y
Y

externalcourseActivityId
learningCourseActivity
N
N

externalId
learningContent
N
N

Both the entity types this workload defines with alternate keys are only exposed through navigation properties and do not have entity sets contrary to the ones exposed by the AAD workload. Which sounds a lot like a limitation of this conversion library.
Updated the title and the issue properties to reflect the work to be done: support alt keys on navigation properties.
The only challenge here is the odata spec is not explicit about navigation property support nor is the vocab definition

I got a confirmation this scenario is supported at the AGS level. from @syprieur
And I received confirmation this is intended to be supported even though the specification is not super clear on that from @mikepizzo
We're good to proceed.


Add Ruby client library for podcast-index API

Hi!  I wrote an API client library for Ruby while working on my new app (podshare.fm).
It currently covers the main Podcast and Episode search requests.  There's a little more work needed to get to 100% so If there are specific endpoints you think I should prioritize, let me know and I'll get them added.
github project page
rubygems.org page
Thanks for all the work on the API!

Thanks Jason!  Sorry for the late reply on this.


i got it working but can only use it in my vps and have pf it and cant register users outside

infinite loading when I try to make a user outside my vps

Hey,
Change the localhost in the client config and package.json(client folder ) to the ip of your Vps

config.js in the main file

No, ./client/src/config/config.js and ./client/package.json It is located in those files

]

it still haveing the same infinite loading issue

Run yarn build in the client folder after changing

ok did it is working thanks just wondering do you suggest using redirects to put it on a domain or can i set the URL as the proxy?

you can point the IP to a domain yes, It might not work depending on how you/provider has it setup though.

Thanks you are now welcome to close this and thanks again for the help.

Sure, no problem! Enjoy.


Fix VST / HTTP2 idle connection keep alive behaviour

Scope & Purpose
Make VST and HTTP2 connection have the same keep-alive behaviour as a HTTP 1 connection. Namely only truely cancel an IDLE connection

[x] :hankey: Bugfix

Backports:

[x] Backports required for: 3.7

Should be more or less covered by existing tests
http://jenkins01.arangodb.biz:8080/job/arangodb-matrix-pr/11663/

another one with go-tests enabled: http://jenkins01.arangodb.biz:8080/job/arangodb-matrix-pr/11664/

http://jenkins01.arangodb.biz:8080/job/arangodb-matrix-pr/11700/

LGTM except that the WriteTimeout is still hard-coded to at least 300 seconds.
I am fine with this being the default value, but I think we should make this value configurable via a startup option.
@fceller @graetzer : ideally we should also make it possible to enforce this write timeout for HTTP/1 connections too, because that would mean all protocols will have the same behavior.
As that would cause downwards-incompatibility for HTTP/1, this probably needs to be opt-in.
What about having the following options:

--http.request-timeout: config option to set this timeout
--http.request-timeout-behavior: values: "enforce", "compat", with "enforce" enforcing the timeout for all protocols, and "compat" enforcing it just for HTTP/2 and VST (downwards-compatible)

And in a future version, we can deprecate the --http.* options and rename them to something else, because they are used for VST as well. Probably something like --protocol.*?

i don't know this is just a fix for buggy idle timeouts, i have too many diverging branches, I understand customers are waiting for that

Has this PR been obsoleted by https://github.com/arangodb/arangodb/pull/12579?
Because https://github.com/arangodb/arangodb/pull/12579 contains the changes made in this PR as well. :thinking:

idgaf if I have to wait for this PR to be merged I cannot work

@graetzer : I am confused now.
Is your preference to merge this PR here sooner than https://github.com/arangodb/arangodb/pull/12579, and merge devel into 12579 once we have merged this PR here?
Just not clear to me, so an explanation would help. Thanks!

Whatever


Can't rerun or debug a test

Hi !
Thank you for your great work !
Usually we can rerun a test or run it in debug mode from the tests results.
With PestPHP, we only can do that with the whole file:

Also, we should be able to jump to code by double clicking.
Thanks!
To Reproduce
Steps to reproduce the behavior:

Run a test.
Context menu on it.
"Nothing here"

Expected behavior
It should have the same menu than for the file.
Desktop (please complete the following information):

OS: MacOS 13.4.1
IntelliJ Version: 2023.2.1 RC
Plugin Version 1.10.1

Duplicate of #471


New HttpBody constructors

Fixes #349.  Now you can easily create a HttpBody using an encoder, but with a custom content-type header.
I also moved HttpBody to it's own file

Current coverage is 83.54%

Merging #367 into master will decrease coverage by -0.17% as of 2f0af7e

@@            master    #367   diff @@
======================================
  Files           69      70     +1
  Stmts         3512    3519     +7
  Branches       507     507
  Methods
======================================
  Hit           2940    2940
  Partial          0       0
- Missed         572     579     +7

Review entire Coverage Diff as of 2f0af7e

Powered by Codecov. Updated on successful CI builds.

:+1:

I also added a new HttpBodyDecoder typeclass, which fixes #332, as well as some tests