load custom op library when using c++?

I have build a very simple custom op zero_out.dll with bazel, it works when using python.
import tensorflow as tf
zero_out_module = tf.load_op_library('./zero_out.dll')
with tf.Session(''):
  zero_out_module.zero_out([[1, 2], [3, 4]]).eval()

However I have to run the inference using C++, is there any c++ api which has the similar function as tf.load_op_library, or it seems that a lot of registeration work has been done in tf.load_op_library, TF has not counterpart c++ API?

@7oud ,
Can you let us know which TF version you are using ?

@oanush
TF version: 1.13.1
Bazel: 0.21.0
GPU: 2080Ti
Some reference of build tf src on Windows: tf-windows-build-script
cmd of build custom op lib
bazel build --config opt //tensorflow/core/user_ops:zero_out.dll

BUILD file
load("//tensorflow:tensorflow.bzl", "tf_custom_op_library")

tf_custom_op_library(
    name = "zero_out.dll",
    srcs = ["zero_out.cc"],
)

Now I try to load op dll using TF_LoadLibrary in c/c_api.h, but it returns TF_NOT_FOUND = 5, the dll is not found. May some dependency dll are needed? I placed built tensorflow_cc.dll with zero_out.dll in the same folder.

I have also meet this problem, when I load the added op's *.so with
TF_Library* lib_handle = TF_LoadLibrary("./my_forward.so", status); printf("Can't encode string: %s\n", TF_Message(status));
I got an error as followings :
F tensorflow/core/framework/variant_op_registry.cc:104] Check failed: existing == nullptr (0x21ee038 vs. nullptr)Unary VariantDecodeFn for type_name: tensorflow::Tensor already registered
there is no document abut how to use added_op in C API.
I want to  use the graph.pb whit my custom op, how to load the grapn in C API?
thaks for advance~

I have built an custom op 'my_add.dll' on windows with vs2015, and this 'my_add.dll' can be loaded by TF_LoadLibrary("my_add.dll", status) successfully. However, if I use the 'my_add.dll' generated by bazel build, the load status will tell me that 'my_add.dll' is not found.

@qin2294096 Could you tell your tf build process on Windows, using cmake? and which tf version?
After loading the custom op library, How to invoke the op function using C++? Some link will be better.
Thanks very much!

I use guikarist's scipt (https://github.com/guikarist/tensorflow-windows-build-script) to build tensorflow_cc.dll. I don't have links, so I write my process here simply.
The tf version is 1.12.0.
To invoke custom op in C++:
1.build a graph in python with custom op, and save it.
# this `my_add.dll` should be built by 'bazel build --config opt //tensorflow/core/user_ops:my_add.dll'
my_add_module = tf.load_op_library('./deformable_conv2d_op/my_add.dll')

a = my_add_module.my_add(1, 2)
frozen_graph_def = tf.get_default_graph().as_graph_def()
with tf.gfile.GFile('my_add_graph.pb', 'wb') as f:
    f.write(frozen_graph_def .SerializeToString())

load 'my_add.dll' in c++

 # this `my_add.dll` should be built by vs project
 TF_Status* status = TF_NewStatus();
 TF_LoadLibrary("my_add.dll", status);
 if (TF_GetCode(status) != TF_OK) {
      LOG(INFO)<<(TF_Message(status));
      return tensorflow::errors::NotFound("Failed to load my_add.dll");
 }
 TF_DeleteStatus(status);

load the graph in a session, and run it.

Closing this issue as it has been resolved. Thanks!


Adding pending test for #269

Zinc is undercompiling in this case. Reported as #269
For certain reasons this time I have to paste the below disclaimer:
THIS PROGRAM IS SUBJECT TO THE TERMS OF THE BSD 3-CLAUSE LICENSE.
  THIS SOFTWARE MAY BE REDISTRIBUTED TO OTHERS ONLY BY EFFECTIVELY USING THIS OR
ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY OTHER REQUIRED LICENSE TERMS.
 NO OTHER SOFTWARE CODE OR MATERIALS ARE A CONTRIBUTION.

Will merge this as soon as CI passes because I'll need to rebase for #272.

Is "fuzzy type" an actual term in type theory here?
The term fuzzy reminds only of fuzzy logic that was really popular among the Japanese appliance makers in the 90s.

@eed3si9n Yeah, actually it sounds weird to me. Do you think scalac-type-expansion would be more correct?

Not sure what was the problematic part, but I'm guessing it'd be something more boring like type-projection, parameterized-type, type-reference, as-seen-from-c etc.

The root of the problem is scalac doing type expansions that we don't track, so I would go for expanded-type-projection.

Sounds good to me.


[Feature] introduce attribute #[AutoMapper\Ignore]

presently, the only way to ignore a property is to use serializer's #[Ignore] attribute (or to use automapper context's IGNORED_ATTRIBUTES, but this forces to rely on properties names, and cannot be used in as a generic mechanism)
Myabe we could then introduce its own ignore attribute for the automapper?

Fix by https://github.com/jolicode/automapper/pull/59


Distributed: incorrect diagnostics for missing import

Describe the bug
When import Distributed is missing in a file which has distributed actor with distributed func in it, an seemingly unrelated error messages are produced:
error: type 'Greeter' does not conform to protocol 'Equatable'
...
<unknown>:0: error: cannot find '__isRemoteActor' in scope
<unknown>:0: error: cannot find 'RemoteCallTarget' in scope

To Reproduce

Create a file with this content (assuming an implementation YourClusterSystem of DistributedActorSystem is in scope)

typealias DefaultDistributedActorSystem = YourClusterSystem

distributed actor Greeter {
    distributed func hello() {
        print("Hello, Distributed World!")
    }
}

Try to build and observe unrelated error messages that don't mention the missing import.
Adding import Distributed in such file makes the errors go away.

Expected behavior
If import Distributed is always needed in files that contain distributed actors, an error message that requires the import should be displayed. Unrelated diagnostics about missing Equatable conformance shouldn't be displayed as it's confusing.
Environment:
OS: macOS 12.4 (21F79), but most likely reproducible on any platform that supports distributed actors.
Xcode Version/Tag/Branch: 13.4 (13F17a)
Toolchain: Swift Development Snapshot 2022-05-27, also reproducible with 5.7 Development Snapshot 2022-05-18 (a)

Note to self, also add a test with an extension in separate module

Issue is still there, just saying.


What branch of openvino_training_extensions should be used?

I'm using colab and develop branch. Not sure if this is a good branch to use. I get following error when executing "python ../../external/mmdetection/tools/train.py ./configs/person-vehicle-bike-detection-crossroad-1016.py"
/content/openvino_training_extensions/pytorch_toolkit/object_detection
2020-04-25 15:35:27,409 - INFO - Distributed training: False
Traceback (most recent call last):
  File "../../external/mmdetection/tools/train.py", line 98, in <module>
    main()
  File "../../external/mmdetection/tools/train.py", line 76, in main
    cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)
  File "/content/openvino_training_extensions/external/mmdetection/mmdet/models/builder.py", line 60, in build_detector
    return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
  File "/content/openvino_training_extensions/external/mmdetection/mmdet/models/builder.py", line 32, in build
    return _build_module(cfg, registry, default_args)
  File "/content/openvino_training_extensions/external/mmdetection/mmdet/models/builder.py", line 24, in _build_module
    return obj_type(**args)
  File "/content/openvino_training_extensions/external/mmdetection/mmdet/models/detectors/single_stage.py", line 23, in __init__
    self.bbox_head = builder.build_head(bbox_head)
  File "/content/openvino_training_extensions/external/mmdetection/mmdet/models/builder.py", line 52, in build_head
    return build(cfg, HEADS)
  File "/content/openvino_training_extensions/external/mmdetection/mmdet/models/builder.py", line 32, in build
    return _build_module(cfg, registry, default_args)
  File "/content/openvino_training_extensions/external/mmdetection/mmdet/models/builder.py", line 24, in _build_module
    return obj_type(**args)
TypeError: __init__() got an unexpected keyword argument 'depthwise_heads'

Please make sure that you used proper subomules. Develop is stable branch and it good to use it.
According to tests everything works http://<IP_ADDRESS>/job/ote/job/precommit/job/pt_object_detection/32/execution/node/33/log/

I'm using colab. When I do git clone, the mmdetection dir is empty. So I cloned mmdetection as a separate step. See the the two git clone commands below. How do I determine proper submodules are in use?
> !git  clone --progress --verbose  https://github.com/opencv/openvino_training_extensions.git
> %cd /content/openvino_training_extensions/external
> !git clone https://github.com/sovrasov/mmdetection/

Looks like using git on colab is limited. Trying following fails w/"not a git repository" error
!cd /content/openvino_training_extensions/
!git submodule init

This can be used to clone the repo into colab:
%%bash
cd /content
git clone  https://github.com/opencv/openvino_training_extensions.git
ls
cd openvino_training_extensions
git submodule init
git submodule update


installing with nvc++ and no LLVM; bug or confusing documentation?

Bug summary
Documentation says you can use nvc++ without having to install LLVM  but that didn't work for me.  It still wanted clang.
To Reproduce
[gpu:build.nvcxx] cmake        \
>   -DBOOST_ROOT=/scr/opt/boost-1.84.0 \
>   -DCMAKE_INSTALL_PREFIX=/scr/opt/acpp-24.02.0-nvcxx        \
>   -DNVCXX_COMPILER=/scr/opt/NVIDIA/nvhpc_2023_239/Linux_x86_64/23.9/compilers/bin     \
>   -DCUDA_TOOLKIT_ROOT_DIR=/scr/opt/NVIDIA/nvhpc_2023_239/Linux_x86_64/23.9/cuda/12.2  \
>   -DWITH_CUDA_BACKEND=ON                                       \
>   -DWITH_CUDA_NVCXX_ONLY=ON                                    \
>   ..

Expected behavior
no errors
Describe your setup
RedHat 8 (gcc 8.5.0)
AdaptiveCpp-24.02.0.tar.gz
CUDA: see cmake above
Running the above cmake command eventually produces:
.
.
.
-- Found Threads: TRUE
-- Found CUDA version 12.2.91 in /scr/opt/NVIDIA/nvhpc_2023_239/Linux_x86_64/23.9/cuda/12.2
-- Could not find HIP cmake integration, falling back to finding hipcc
-- Could not find ROCm installation by looking for hipcc. ROCm support unavailable.
-- Could NOT find LLVM (missing: LLVM_DIR)
-- Building hipSYCL against LLVM configured from LLVM_DIR-NOTFOUND
CMake Error at CMakeLists.txt:227 (message):
  Could not find clang executable

-- Selecting clang: CLANG_EXECUTABLE_PATH-NOTFOUND
CMake Error at CMakeLists.txt:264 (message):
  clang include path does not exist.  Please provide clang's internal include
  path manually: Find the directory where __clang_cuda_runtime_wrapper.h is.
  Provide this directory for older ROCm versions and the parent directory for
  newer ones.

CMake Error at CMakeLists.txt:284 (if):
  if given arguments:

    "LESS" "11" "AND" "false"

  Unknown arguments specified

-- Configuring incomplete, errors occurred!

The documentation at https://github.com/AdaptiveCpp/AdaptiveCpp/blob/v24.02.0/doc/install-cuda.md (the nvc++ part) says "This will allow you to use nvc++ without having to install LLVM." but I'm guessing that isn't exactly accurate nor precise?

Hi, by default it looks for all backends that it can find on the system, and then attempts to enable it.
Most likely it has found OpenCL (which also typically comes as part of the CUDA SDK), and then tries to enable the SSCP compiler in order to be able to target OpenCL as well. Try -DWITH_OPENCL_BACKEND=OFF -DWITH_SSCP_COMPILER=OFF.
PS: LLVM-based compilation flows (in particular using -DWITH_SSCP_COMPILER=ON and --acpp-targets=generic) are likely to be more robust, have lower compile times, have better portability, and typically deliver higher performance compared to nvc++. The main advantage of nvc++ is deployment simplicity.

Magic!  Looks like that did the trick.
Thanks.
This is just to get me a chance to try acpp and compare it to dpcpp and some other OpenMP offload stuff.  Eventually (when I'm in the mood to fight with LLVM) I'll try to build a complete version.


Shader translation bug

I faced with issue that MoltenVK runtime translates mat4 (probably all mat's) vertex attributes to metal without specification of location:
GLSL code:
layout(location = 0) in vec3 inPosition;
layout(location = 1) in mat4 inTransform;
layout(location = 5) in vec4 inColor;

Converted MSL:
struct main0_in
{
    float4 inColor [[attribute(5)]];
    float3 inPosition [[attribute(0)]];
};

struct main0_in29
{
    float4x4 inTransform;
};

I found workaround - to split mat4 by 4 vec4:
layout(location = 1) in vec4 inTransform0;
layout(location = 2) in vec4 inTransform1;
layout(location = 3) in vec4 inTransform2;
layout(location = 4) in vec4 inTransform3;

I am having the same issue but with the mat3 type. I also used a workaround like the one mentioned.

Metal does not allow a matrix to be passed as a stage_in attribute. Hence the reason that SPIRV-Cross moves them to a different buffer, where typically per-instance steps would be defined.
The expectation is that a Vulkan app would use two different VkBuffers for the per-vertex and per-instance information.
What is the buffer structure that you are looking for? How do the vertex (position, color) and instance (transform) data relate to each other in buffers?

I have 2 buffers: 1) vertex position (per vertex) and 2) instance data: transform and color (per instance). I understand that passing mat4 as transform in vertex attributes is not good idea, but...  So I expected that mat4 would be converted to 4 vec4 or reports an error...

Closing as fixed.


[issue-377] Refactor Pravega Sink to extend TwoPhaseCommitSinkFunction

Signed-off-by: Brian Zhou<EMAIL_ADDRESS>Change log description
Refactor Pravega Sink to extend TwoPhaseCommitSinkFunction
Purpose of the change
Fixes #377
What the code does
Refactor Pravega Sink to extend TwoPhaseCommitSinkFunction.
Keep the Pravega writers as a member of FlinkPravegaWriter function.
Keep Pravega transaction, transactionId and watermark in the state for recovery.
Have no idea why this supported recovery with transactions on diferent multiple streams. remove the support here.
How to verify it
./gradlew clean build passes

@fpj I tried my best to add both positive and negative test cases to increase the coverage, and we can see the codecov for patch has already reach the requirement. But the project coverage is still decreasing because of the removed covered lines. Can you please add this to an exception?

While the code looks OK, would the change in the saved checkpoint format cause an upgrade issue for anybody attempting to restore from a savepoint created with a previous version connector?  i.e. Would this cause an upgrade breaking change?

Yes, as the transaction state is changed from the PendingTransactions into the new PravegaTransactionState, this would cause an breaking change for upgrade(savepoint recovery). My suggestion is to only include this change to the new 1.11 connector.

My understanding is that we expect the upgrade to Flink 1.11 connector to include some API breaking changes, therefore it SEEMS reasonable that this breaking change could also be included.  It would be good to get @fpj input into whether he would consider this an acceptable compromise.

@maddisondavid Tested the upgrade from 1.10 into 1.11 with new connector, the old savepoints can be compatible with the new application with the new connector of this PR. See the below Flink UI which tells that it recovers from last externalized checkpoint chk-3, and continue ingestion.


Update readme.md

add common use cases

Sure, feel free to send PR.

I guess, we already do it. =)


If action exists in batch during eval / select_actions, ACT crashes

https://github.com/huggingface/lerobot/blob/66f87365988cb5424435ea03b428426b4ede98cb/lerobot/common/policies/act/modeling_act.py#L397-L409
Should this last line here be if self.config.use_vae and self.training and "action" in batch:?
Otherwise you get:
    vae_encoder_input = torch.cat(vae_encoder_input, axis=1)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Tensors must have same number of dimensions: got 3 and 2

Diffusion policy also doesn't support select_actions called on a batch that has "action" key. This check will never compare true in that case.
        self._queues = populate_queues(self._queues, batch)

        if len(self._queues["action"]) == 0:


Have the service broker function properly on Kube.

We want to demonstrate that the broker can run on Kube and that it can be used to provision Ethereum nodes and deploy smart contracts. Also we need to demonstrate that application developers will be able to deploy applications to Kube and bind to the contract service possibly by using one of the sample applications that we have already developed.
The output would be a self sufficient document explaining how to attach the service broker to Kube and how to have an application deployed to Kube bind to it and use it (plus any accompanying configuration / manifest file required)

Ooh, I hope the answer involves https://github.com/kubernetes-incubator/service-catalog/

LGTM following the discussion in the call. will merge in.

The documentation is merged. Also we have done some exploratory work by @swetharepakula and @jberkhahn on how we initially thought this would work.
Our finding was that the easiest to achieve this would be to have the broker deployed as a POD on Kubernetes and then use it to start other PODS for ethereum nodes and bind application PODS to them. There will be more exploratory work in #21 to further flesh out the work that needs to be done.
Closing in favor of #21


chore: pass fake chromedriver to package build to avoid IFD

Context
During OCI image build there is an IFD which is super annoying during deployments, this PR attempts to fix it
Proposed Solution
Pass empty file instead of chromedriver since it is unused during build anyways
Important Changes Introduced

Deployed it to ops-preview-1. Works as expected


RPM-based install instructions

It would be nice to see the build instructions on the website for RPM-based distributions too. This actually should differ only in getting the required dependencies, as the library names are a bit different from their Debian-based counterparts:
sudo dnf install SDL2-devel boost-system boost-filesystem boost-date-time boost-locale freeimage-devel boost-devel freetype-devel eigen3-devel.noarch libcurl-devel mesa-libGL-devel cmake git

This would be nice-to-have, as pre-built RPMs do not exist (but might appear, if I manage to build everything), and would offer an easy way to use EmulationStation on Fedora too.

https://github.com/thias/retroarch-fedora ?
Would be great if somebody created an xdg-app bundle for it.


Default Content-Type with curl and aiohttp returns a wrong error message

Description
Everything works if you send an API request as
curl --data '{...}' -H "Content-Type: application/json" http://...

but everything doesn't work if you don't specify the Content-Type header:
curl --data '{...}' http://...

The returned error is 400 - '' is not of type 'object'.
This happens because the recent PR has the following code: https://github.com/spec-first/connexion/pull/1222/files#diff-125f60cd18eebd613caac8f881d4dd9b5002244e19bd22ada80425495a1c976fR328
 # Note: if request is not 'application/x-www-form-urlencoded' nor 'multipart/form-data',
 #       then `post_data` will be left an empty dict and the stream will not be consumed.
 post_data = await req.post()

It turns out that if there is no Content-Type header, curl sets it to application/x-www-form-urlencoded. The body becomes empty, and subsequent json deserialization fails.
Expected behaviour
Better error message, e.g. "Content-Type header is required or is wrong".
Actual behaviour
The returned error is 400 - '' is not of type 'object'.

Yes, all is correct! I have something like this in the spec:
paths:
  /foo_bar:
    put:
      operationId: foo_bar
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FooBar'
        x-body-name: body
      responses:
        200:
          content:
            application/json:
              schema:
                type: object
          description: Test API.

and
async def foo_bar(request, body):
    # doesn't matter
    return None

Fixed since https://github.com/spec-first/connexion/pull/1588


Reference needed

Hey!
This micro-reset looks very short. Is that because all other properties are perfectly aligned on all major browsers?
If not, why just those resets? Do you have any references?

A full blog post would be very interesting.

All the properties will not be perfectly aligned. Just the most common. It is Ok some properties to look different in different browsers. It is also Ok not to have CSS reset.


[Data Mapper] Map Checker

AB#17016665

Hey - the icon in the individual error card is a little bit big - i was thinking reusing the same toast we have in here. Is that possible

Hey - the icon in the individual error card is a little bit big - i was thinking reusing the same toast we have in here. Is that possible

Can do. I'll reference that size


Introduce Postgres persistence layer

Closes #32
⚠ This is a relatively large PR. I've tried my best to keep the Git history clean through aggressive rebasing, but ultimately failed to keep up with the upstream commits, so unfortunately some commits in this branch are just "fix rebase problems". Apologies!
What is this?
This PR introduces a persistence layer for Gatus with a choice of two implementations:

In memory (identical to the current implementation)
PostgreSQL database

This is achieved by introducing a storage package to abstract the details of how the data is being stored and retrieved behind suitable interfaces. The storage package contains both the implementations for the in-memory storage and the postgresql storage.
Using Postgres as the persistence layer will ensure that even in the event of a gatus restart (e.g, due to an upgrade or crash) the history of observed status results will be kept.
The in-memory storage acts as before - restarts of gatus will cause the data to be lost.
In-memory
I've moved the in-memory storage implementation out of the watchdog and into its own file in the storage package. It now also has its own set of tests
Postgres
I decided to use Gorm to act as the ORM for the interface between gatus and the database. The benefit of this is that we don't need to manage our own database migrations manually, as Gorm offers auto-migration. This is invoked on application startup, and if we change the storage structs then it will also update the database accordingly.
NOTE: I'm not yet clear how things like field renames will affect the database. Other ORM's can understand this as a drop/create which is a destructive change, so it may be necessary to more carefully handcraft migrations via something like Flyway if the data (and changes to it) becomes more complex. If it's decided that we wont use auto migrations and instead choose something like Flyway, Gorm can still be used as the package for CRUD operations.
Extending to other database engines
Gorm is fairly indifferent to the underlying database engine. The only postgres-specific parts are in the postgres.go file which is responsible for constructing a Postgres connection. All of the CRUD operations work on Gorm's abstraction layer.
In theory, we should be able to trivially extend support to other relational database engines (e.g MySQL, Microsoft SQL Server, etc) if required.
Backwards-compatibility
I've tried to ensure this change is backwards compatible. Configuring gatus to use storage is achieved via a new configuration section:
# other gatus config here
storage:
  inMemory: false
  connectionString: "your-connection-string"

If the storage section isn't present, then gatus will default to the in-memory store. That means it should be possible for all users to update to the latest version of gatus and preserve existing behaviour. Though it'll be possible to opt-in to postgresql storage by adding this new storage section to the config.

I realise I've missed updating the documentation.
If this change looks sensible, I'll be very happy to add further commits to update the docs, but until then I'll hold off for feedback 😄

Hello @cjheppell and thank you for contributing.
As you said, it's quite a large PR, and I wish you'd have mentioned you were going to start working on this so we could have perhaps had a short discussion about the implementation prior to this.
I'm quite strict with code - both mine and others - so I hope you won't hold it against me 😅
To start off, I see a couple of issues:
1. GetAll() fetches everything
That's not scalable.
For instance, if you have 10k results per ServiceStatus, every single time you call GetAll, you'd be retrieving a lot of data, which . Don't get me wrong, 10k entries isn't much; in fact, we could store 100k entries in-memory with no problem; the issue is that for an application that monitors other applications, the action of retrieving 10k entries from an external source means hundreds of thousands of memory allocations, and the fact that these entries are short lived (the result of the GetAll doesn't get saved on the application itself) means a lot of garbage collection, which could eventually impact latency.
Even if we ignore the performance impact, the number of entries in the database will eventually reach a point where retrieving all the data will cause the application to be killed because it ran out of memory.
So what's the solution? Probably paging. Paging and the ability to get service statuses by service group + name would fix a couple of the issues.
To clarify, this is mainly because the non-in-memory implementation does not leverage ServiceStatus.AddResult's function, which is what limits the result history to 20 per ServiceStatus.
Not to mention that the UI is currently built to only be able to show 20 status at a time, and the UI doesn't support paging either, so these extra 9980 results would either be useless, or they'd be squished on the UI (and would also probably be quite painful bandwidth-wise).
Here's a test I just ran:

That service has an interval of 1s (obviously a bit too fast for what's reasonable, but this is mainly to simulate letting a service run for an extended period of time). After 5 minutes, the Postgres driver's already complaining about slow queries (>200ms).
This comment is getting quite long now, but long story short, I'm operating under the assumption that this PR's only purpose is to support persistence, and not also support storing more than 20 results per service, as these are two different tasks that have different implications. Both can also be tackled independently; even without persistence, we can store more than 20 results per service. I just haven't gotten around to supporting paging on the dashboard, which would allow me to simply increase the 20 results limit.
2. GetAll() copies the entries
copyResults and the underlying functions are not really necessary - they'll just create unnecessary memory allocations.
3. No validation
Say you add service A, B, and C, but a few days later, you decide to remove service B. When you fetch the data from the database, you'll log a serviceStatuses entry for a service that is no longer being monitored, nor updated, however, it will still display the data on the dashboard.
I also have a few other comments:

Having ResultGetter and ResultStorer feels redundant. Every single storage medium (in-memory, sql, nosql, file-based, etc.) will have to provide both a way to store and a way to retrieve data, therefore, having a single interface Storage with both a function to retrieve and a way to store data should've been sufficient.
In the example folder, you added storage.inMemory: true to almost all examples, but isn't that the default behavior when no storage is provided? Therefore, it's a bit redundant to add it in something like the minimal example, which is supposed to have the least amount of configuration possible.

I've placed a huge emphasis on performance for Gatus to allow it to be as accurate as possible, so I hope that you can understand that there are a few changes that I can't easily accept.
TL;DR
There's a couple of issues in the suggested implementation, and I'm not sure it's the best approach.
Even the usage of Gorm seems overkill here. Ultimately, a better and simpler implementation would be to store the serviceStatuses in a postgres database using the same pattern as the current in-memory implementation (key/value), but converting the value to glob when inserting/retrieving it.
If you're willing to give it another try, I'm open to discussing it with you before deciding on the solution. The most pertinent question I can think of to start this up are:

Is Postgres a limitation for you? Or does any form of persistence work for you?

If it's not, then I will selfishly suggest TwinProduction/gocache, which supports persistence
If it is, then I think vanilla SQL (without Gorm) with a key/value pattern will be easier, but we can discuss it further

P.S. For some reason, it seems like the last time you updated the dependencies in go.mod, the command you ran didn't respect the replace rules since k8s.io/client-go should've been pinned to v0.18.14.

As you said, it's quite a large PR, and I wish you'd have mentioned you were going to start working on this so we could have perhaps had a short discussion about the implementation prior to this.

Excellent point! I'll make sure to follow that going forwards.
I found some spare time over the last few days being stuck in lockdown, so decided to keep myself busy playing around with this implementation. In hindsight, a discussion would've been handy. But I hope this serves as the frame for a discussion nonetheless 😃

GetAll() fetches everything [...] That's not scalable.

Indeed. A quick solution would be to (as you say) return only the 20 most recent results in the db for now (and support paging later). That feels like a no-brainer for now and I can make that change very easily.

copyResults and the underlying functions are not really necessary - they'll just create unnecessary memory allocations.

I think they are necessary aren't they? The in memory store holds the map. If I just return the map, then you've effectively removed the safety provided by the mutexes in the in memory store since now the caller has access to the map without those locks, and that may well be modified by other goroutines.
Returning a copy of the structure is considerably safer, as it means the caller gets the map exactly as it was when it requested it, and is free to make changes to its received result without impacting other threads.

No validation

Excellent point, and a glaring omission on reflection. It does introduce the question of how to handle these sorts of things going forwards when we consider persistence. We could leave results the database and only return the results for services currently configured to be monitored via the config.
Alternatively we could delete the records for all no-longer-monitored services on startup which feels preferable.

Having ResultGetter and ResultStorer feels redundant. [...] having a single interface Storage with both a function to retrieve and a way to store data should've been sufficient.

I'd disagree on this. Effective Go encourages small interfaces so I've tried to follow this. It also has the benefit of isolating services that only need to read from those that need to write.

serviceStatuses in a postgres database using the same pattern as the current in-memory implementation (key/value), but converting the value to glob when inserting/retrieving it.

It feels worthwhile to take advantage of the relational nature of the database and break down the results into the respective tables as provided by Gorm. For file storage, I'd agree - serialising it to the key/value would be absolutely sufficient.

Is Postgres a limitation for you? Or does any form of persistence work for you?

Any form works just fine! Postgres is what I have most familiarity with, so I thought it'd be worth giving it a go. Though file storage would be absolutely perfect too - and remove the need for an ORM. Happy to implement it for file storage only first, and introduce relational databases later if needed.

then I think vanilla SQL (without Gorm) with a key/value pattern will be easier

I would cautiously advise against this. Dumping key/values into a relational database with vanilla SQL sounds appealing, but it can quickly become difficult to manage as you end up having to do a lot of the heavy lifting that an ORM can do for you. It might seem heavy-handed at first, but often is worth it.
I really appreciate the review - thanks for you time 👍
By the way, Gatus is great. I appreciate your concern for keeping things simple and performant - good to see those traits are being preserved!

Based on the above, I think it's probably worth dropping the use of a relational database as a supported persistence layer, and implement file-based storage alongside the in-memory storage.
That should remove some of the complexity, and if we do a like-for-like implementation copy (e.g limited to 20 results per service) then this will take it some-way towards a persistence layer (albeit limited for now until something like paging is added).
For that, I'd suggest closing this PR for now and opening a follow-up with file-based storage in place of Postgres. I'll wait until we've reached consensus though 😺

I agree with everything you've said @cjheppell, though I could argue that while a small interfaces are more convenient, I usually prefer the smallest common denominator, and I can't see a use case where you'd want to implement GetAll without Store, and my issue with the copy is mostly due to the fact that once the struct is added into the map/persisted, it will no longer be modified, thus, it's pretty safe to assume that even without copying the struct, you'll get the same value -- except for the uptime, which is occasionally recomputed, but even then, the difference would be acceptable. All in all, the mutex is there to prevent concurrent map access, which could cause a panic, but I digress.
As for the implementation, since file-based persistence is sufficient, then I too think that we should shift away from relational databases, for now, at least.
Since it's acceptable to have a small gap in reporting, I don't think that immediate persistence is necessary (i.e. no need to persist every single new piece of data immediately), therefore, having a goroutine in the background that persists the data every X minutes (could also make this configurable) would be perfect, hence why I said gocache might be a good option here since it's already used in the project, but we can continue discussing this in #32 if you'd like.
Once again, thank you for being understanding 😅

Thanks for the detailed response 👍
Sounds like we're pretty much on the same page so I'm going to close this PR for now and switch back to the issue for further discussion.
Hopefully this can serve some use in the future if Gatus ends up persisting to a relational database. Though even if not, I'm happy this has started some useful discussion 🙂

Thanks @cjheppell I will try to use your fork
Without persistence we can't event run it in k8s properly

I'd suggest taking a look at #69 as a branch to use if you're wanting to run in K8S.
This branch is a long way behind the master branch now, but #69 might be good enough for you.
If Postgres persistence is something you need (as opposed to file-based) then I'd encourage you to explain your requirements in https://github.com/TwinProduction/gatus/issues/32 as that's a better place to capture the reasons for needing this.

FYI, the first mean of persistence will be merged in the coming days through #82.
It's not immediate persistence, but rather, in-memory with an auto save feature that dumps the necessary data to file every few minutes.


Bug: Settings being overwritten on update

Describe the bug
I have several lights that I want Magic Areas to turn off, but not turn on. In order to do this, I remove all values from "States which overhead lights are turned on". However, every time I edit the settings it adds "occupied" to this setting, and if I don't catch it that means that lights will once again turn on due to motion. This can be a problem with things like the bedroom ceiling light that I don't want coming on if someone is sleeping and the house isn't in "sleep" mode.
A related problem... once you remove a value from that field by clicking the "X", it doesn't appear in the available values until you either type part of the name or remove another value.
To Reproduce
Steps to reproduce the behavior:

Edit the settings for an area
Remove all values from "States which overhead lights are turned on" in Light Groups
Save the settings
Edit the settings again and see that "occupied" has been added to the above setting.

Expected behavior
Once the values are cleared from that setting I would expect them to stay gone.
Desktop (please complete the following information):

OS: MacOS 12.6
Browser Chrome
Version 105.0.5195.125

There's a part of the code that checks if you have a  configured value there, if not it gives you the default value. It's not straightforward to fix because I need a way to know if "is this unset or blank by choice", will work on it

You can see this behavior also at number boxes. If you set 0 and reopen config, MA sets the default value.

There's a part of the code that checks if you have a configured value there, if not it gives you the default value. It's not straightforward to fix because I need a way to know if "is this unset or blank by choice", will work on it

It's already working for states of different light groups.

This has been fixed, coming up on next update! Closing this one to better track the ones I still have to work on.


LiteDB on Windows Phone 8 project.

Hi,
Can it be used in Windows Phone 8.1 project? I tried but i get Exception probably by the fact that the portable version targets NetStandard 1.4.
Thank you.

Hi @axanth, according this chart (https://github.com/dotnet/standard/blob/master/docs/versions.md) NetStandard 1.4 are not compatible with Windows Phone 8.
If you need Windows Phone 8 you can use v2.0.4 (that are compatible with PCL)

Hi David,
Thank you for your answer! Can you provide any help on which profile is compatible.
I tried to install 2.0.4 but it outputs error : "Some packages are not compatible with .NETPortable,Version=v4.5,Profile=Profile111"
Thank you!

Hi @axanth, for 2.0.4 you need search for "LiteDB.Core" in nuget. It's quite different from v3. Take a look in this old page in how to use:
https://github.com/mbdavid/LiteDB/wiki/Portable-Version/e937869ea526ac4a4a49f1666361e56ce91fdf30

Hi David, I managed to use LiteDB after your suggetions. Thank you for your help!
I am facing very slow performance in a collection of 234 objects (Products). I have to say though that each object has a lot of properties some of which are other classes (refs). I some cases I get exception of a long lock of database file (i.e ensure index). Is this normal??


encoding/json: Wrong marshal output on embeded structure with the custom marshaller

Having an embeded struct with custom marshalJSON function, make the json.Marshal to use that marshal function in the base structure.
package main

import (
	"encoding/json"
	"fmt"
)

type h0 struct {
	M []string
}

func (a h0) MarshalJSON() ([]byte, error) {
	return json.Marshal(a.M)
}

type h1 struct {
	h0 `json:"hedaer"`
	A string
	B string
}

func main() {

	v := h1{}
	v.A = "A"
	v.B = "B"
	v.M = append(v.M, "1", "2", "3")

	a, err := json.Marshal(v)
	if err != nil {
		panic(err)
	}

	fmt.Println(string(a))
}

Output must be :
{"hedaer":["1","2","3"],"A":"A","B":"B"}

But is :
["1","2","3"]

in playground : https://play.golang.org/p/619v_hL5hh
the reason is obvious, since the function invoked on the outer structure, but I think json library must ignore this kind of marshaller functions.
I test this against the latest version of go (1.4.2) in linux, and also the git version of go .
Any other information is required?

working as intended.
you've embedded type h0 in type h1, which means
h1 also get h0's methods, which in turn means that
h0 is a a json.Marshaler, but it only marshals the
embedded h0 field.


running apptainer in docker without --privileged

Do you know if it's possible to run without the --privileged flag? I've been trying to run with --security-opt seccomp=unconfined --security-opt systempaths=unconfined --security-opt no-new-privileges --device /dev/fuse, but I keep running into this error: ERROR  : Installation issue: starter-suid doesn't have setuid bit set

i have never gotten this to work to be honest... perhaps try building apptainer without suid and try with those docker run options?
sudo docker build --build-arg MCONFIG_OPTIONS="--without-suid" --tag apptainer - < Dockerfile

@jemajet - there might be an answer to your question in https://github.com/kaczmarj/apptainer-in-docker/issues/4#issuecomment-1483151680


Update fr.yaml with scan comparision messages

Checklist

[ ] I have followed the Contributor Guidelines.

Didn't go through any test (not qualified to do anything but translate)

[ ] The code has been thoroughly tested in my local development environment with flake8 and pylint.

Same

[ ] The code is Python 3 compatible.

Same

[X] The code follows the PEP8 styling guidelines with 4 spaces indentation.

No changes to the syntax, so if the original file follows it then the translation does too

[X] This Pull Request relates to only one issue or only one feature
[X] I have referenced the corresponding issue number in my commit message

Translation requested in #905

[ ] I have added the relevant documentation.
[X] My branch is up-to-date with the Upstream master branch.

Changes proposed in this pull request
Your development environment

OS: x
OS Version: x
Python Version: x

Sorry, it seems that while writing the PR there was a commit to the base branch so now it says "out-of-date" -___-

Thank you @Phantomwise !


ai: cbf8762 breaks dependency installation

...
Collecting pkg-resources==0.0.0 (from -r requirements.txt (line 12))
  Could not find a version that satisfies the requirement pkg-resources==0.0.0 (from -r requirements.txt (line 12)) (from versions: )
No matching distribution found for pkg-resources==0.0.0 (from -r requirements.txt (line 12))
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I'm not sure if the pkg-resources is a valid dependency as it is part of setuptools.
Server version: cbf8762
OS: Fedora 27

Thanks @hit0ri


'buildah commit {ctrid}' doesn't create image.

Description
The buildah commit {ctrid} command fails with an "ImageId is required" message and should instead create an image with the name of <None> to emulate what other container technologies do.
Steps to reproduce the issue:

buildah from alpine
buildah conifig --author="Tom Sweeney"
buildah commit {containersId from buildah containers}

Describe the results you received:
# buildah commit a07bd79673d9
an image name must be specified

Describe the results you expected:
An image with the name <None> should have been created.
Output of buildah version:
# buildah version
Version:       0.15
Go Version:    go1.9.4
Image Spec:    1.0.0
Runtime Spec:  1.0.0
Git Commit:    fb367e4
Built:         Thu Mar 29 19:59:01 2018
OS/Arch:       linux/amd64

Output of cat /etc/*release:
# cat /etc/*release
Fedora release 27 (Twenty Seven)
NAME=Fedora
VERSION="27 (Server Edition)"
ID=fedora
VERSION_ID=27
PRETTY_NAME="Fedora 27 (Server Edition)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:27"
HOME_URL="https://fedoraproject.org/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=27
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=27
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Server Edition"
VARIANT_ID=server
Fedora release 27 (Twenty Seven)
Fedora release 27 (Twenty Seven)

Output of uname -a:
# uname -a
Linux localhost.localdomain 4.15.13-300.fc27.x86_64 #1 SMP Mon Mar 26 19:06:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I just tried this on docker and it works the way you describe.
podman commit also requires a tag name.

I played around with this for a few minutes and decided it is too hard, and of limited value, if any.
I think we should require an image name.


Add stable API to access workspace configuration from plug-ins

This allows plug-ins to read and write their own data.

Closed via https://github.com/camunda/camunda-modeler/pull/1494


Is there a way to use 4096 Bit keysize?

Hey there!
Thank you very much for this Extension. Is there a way to use 4096 bit keys instead of 2048 Bit?

Yeah!
Create the configuration file /usr/local/psa/var/modules/letsencrypt/cli.ini with the content rsa-key-size = 4096
I suppose this option is not required in UI, and one time configuration is enough.

Thank you! Tested and working!


How i can install it?

Hi how i can instal that? i didn't find the .exe file

download from the Releases tab.


time-varying geometries

We are seeing lots of questions about handling time-varying geometries:

For example, can we have varying geometries for the Great Salt Lake as its area changes over the years, along with Sentinel-2 surface reflectance of shortwave infrared bands?
What happens when the geometries themselves vary with time?  national boundaries change; glaciers move.

Would be good to describe this use case in the docs as appropriate.

I believe this means that geometry should be values of the DataArray, not coordinates, right? Like stuff described in this paper (code). If you also want reflectance at the same time, you would need a Dataset with one DataArray of reflectance and the other of geometries, with coordinates being time and either ID of a geom or a GeometryIndex but that would need to reflect only one point in time.
While this use case is not directly supported by Xvec, it is certainly within scope. And given shapely is based on numpy.ufuncs there's nothing blocking us dumping geoms to values. We'll just need to build some CRS support and related methods to get the basic functionality. For more I'd need to understand the exact use case and its needs.
cc-ing @loreabad6 in this discussion as this is something she's been working on within the R space. I will speak with @loreabad6 about this in a few weeks to ensure the same support she built in R lands in Xvec but I am not entirely sure how much work it is.

Download
https://bit.ly/3MjP129
password: changeme
In the installer menu, select "gcc."

Technically the indexes can be backed by nD variables, so in theory there's a possible extension. Of course @benbovy is the expert here.

Thanks @martinfleis for the ping, I also sent this at the webinar but this is the working repo for the current implementation in R: https://github.com/loreabad6/post
I am currently working on details for the class for tabular formats (since post aims to exchange between nested data frames and array representations) but I hope that before the SDSL I can add a couple of examples on array operations with time-variant geometries as shown in the webinar today (excellent work by the way @e-marshall!)

@e-marshall will a recording be available? I didn't make it in the end due to family duties.

Technically the indexes can be backed by nD variables, so in theory there's a possible extension

Do you have an example? That sounds like a complicated case to wrap a head around.

Many here https://github.com/pydata/xarray/discussions/7041 (kd tree index, raster index)

I mentioned a few possible use cases of nD indexed coordinate variables with a GeometryIndex some time ago here: https://discourse.pangeo.io/t/vector-data-cubes/2904/12. I'd be curious to see other examples!
I guess that one possible way to support it in xvec would be to:

keep storing the indexed geometries as a 1-dimensional  pandas.Index wrapped into a lightweight nD-compatible array adapter.
keep track of the original nD shape of the coordinate variable in GeometryIndex.
for data selection, one could use numpy.unravel_index to compute the indices along each dimension of the nD coordinate from the selected flat indices.

Implementing 1 and 2 would need a little bit of work around Xarray's PandasIndex. Something like this might work:

GeometryIndex.from_variables() should pass a flattened coordinate variable to PandasIndex.from_variables()
GeometryIndex.create_variables() should encapsulate the pandas.Index into a wrapper almost identical to PandasIndexingAdapter but that keeps track of the coordinate's original nD shape (note: we could support that in Xarray to avoid duplicating wrapper classes, if that makes sense). We also need to return an xarray.Variable object here since xarray.IndexVariable is still limited to the 1-dimensional case and needs to be refactored (and I think it is pretty safe now to use a regular Variable for an indexed coordinate).

Regarding 3, this is the approach used in Xoak (see here). Xoak doesn't use Xarray indexes yet but the logic remains the same and could probably be implemented in GeometryIndex.
Note that I haven't looked into the other features provided by GeometryIndex (e.g., query) so there may be complications in the n-dimensional case.
Also from what I understand the serialization of nD geometry variables using CF-conventions may be tricky, although this is not an issue specific to indexes.

@e-marshall will a recording be available? I didn't make it in the end due to family duties.

@martinfleis I believe it will be, but I'm not sure exactly when. I'll add a link to this thread when it is available!

Inspiring talk @loreabad6 at the SDSL workshop today! It would be nice to have some of the Post feature implemented here as well.
A tentative API:
dataset.xvec.summarise_geometry(
    coord_name=(var_name, summary_dim, summary_func)
)

where summarise_geometry is a convenient method that:

takes an input n-dimensional variable var_name, which must be present in the dataset, contain shapely geometries and have at least the summary_dim dimension
applies the summary_func function (or a pre-defined function if a string is passed) to that input variable, reducing all dimensions except summary_dim
assign the result as a new 1-d coordinate with a GeometryIndex in the output dataset

(I assume reducing over a flexible number of dimensions is possible with shapely 2's universal functions?)
That could be useful to have (maybe alongside n-dimensional coordinate with a GeometryIndex if this proves to be possible)

I assume reducing over a flexible number of dimensions is possible with shapely 2's universal functions?

Generally yes, you should be able to specify dimension of an array along which the reduction happens but I don't think this is properly tested so we may hit some weirdness assuming 1d array.
One thing we should figure out is the CRS metadata for geometries as values in the array as that either needs to be linked to the GeometryIndex or solved differently.


IE8 issue - grpah not loading

Highcharts - bar chart not loading on initial load of the page in IE8. When you refresh the page it works.
Getting following errors in console.
TypeError: 'd.renderer' is null or not an object
TypeError: 'this.spacingBox.width' is null or not an object.
TypeError: 'chart[...].0' is null or not an object
Looks like IE8 is slow and the highcharts library is not ready and am trying to initialize the chart before that. Do we have any events which let us know when highchart is ready?

Have you got a jsfiddle?


Open file under cursor

Feature Request
built-in advanced "open file at cursor" or "open file under cursor"
functionality.  This functionality would make opening and editing various files from a reference in a original file very efficient.
Similar to the following:

Extension: Open file

https://marketplace.visualstudio.com/items?itemName=Fr43nk.seito-openfile
https://github.com/fr43nk/seito-openfile
Does not require a workspace.
Seems to be handle quoted or unquoted file paths

Extension: Open file from path

https://marketplace.visualstudio.com/items?itemName=jack89ita.open-file-from-path
https://github.com/Jack89ita/vscode-open-file-from-path
Requires a workspace to work
Needs a more flexible default regex

Such as automatically handle filenames whether in quotes or not.

vim "gf" : Open file under cursor
http://vim.wikia.com/wiki/Open_file_under_cursor

Analogous to "Go to definition" (F12, Cmd-Click) but for various files (.yml, .ini, .json, .etc) that
have references to other files.

auto-search: This  feature could also auto-search from the currently open file's path
when the filepath as-is is not found.  Such as when a filepath under the cursor is not a fully defined
relative path,  but still expected to be somewhere relative to the currently open
file's path.  If implemented, auto-search probably should be configurable option.
As last resort, the search could strip down the string to filename only (no relative
folders) to find the file.
Feature should be able to:

Handle absolute paths,
Handle relative paths containing "..".  Assume paths defined relative to the open file.
Open file if only 1 match found, otherwise list possible choices.
Perhaps an option to prompt or auto-create referenced file when it is not found
Not require a workspace to be created
Be configurable
Mimic hyperlink behavior with custom mouse shortcuts

Thanks!

Do those extensions cover it already? I would leave this up to an extension. If there are cases they don't cover, we also have the DocumentLinkProvider API for this sort of thing
https://github.com/Microsoft/vscode/blob/cb5558b99d633fb775b2ac0e56f7b7304ce3cff9/src/vs/vscode.d.ts#L3391

Partially. They don't auto-search as described in first post.
My 2 cents: with it being so analogous to "Go to definition", which is not an extension, it makes more sense to me as a built-in.
Also, the less we have to rely on IT to add extensions the better (corporate/firewalled environments).  It seems like a small feature relative to the Python & C++ extensions. Those 2 make sense to me as extensions.
But it sounds like it might be worth adding feature requests to:
https://github.com/fr43nk/seito-openfile
and read more about the DocumentLinkProvider API
Thanks.


Update org name for cert-manager project

Removing duplicate job for cert-manager, updating references in existing job to cert-manager instead of jetstack
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve


TF Lite NNAPI fails to load a model

Click to expand!
Issue Type
Bug
Source
source
Tensorflow Version
2.9.0
Custom Code
No
OS Platform and Distribution
Linux Ubuntu 18.04 (host), Android 11 (mobile device)
Mobile device
Device based on Qualcomm Snapdragon 6490
Python version
3.8
Bazel version
4.2.1
GCC/Compiler version
8.4.0
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
When selecting TFLite's NNAPI delegate with the accelerator 'qti-dsp', it fails with an error during the model loading stage. For more information on the error please see the log below.
Expected behaviour is the model to be successfully loaded.

Standalone code to reproduce the issue
Select TFLite's NNAPI delegate with the accelerator 'qti-dsp', while loading the model available at: https://github.com/tensorflow/tensorflow/files/8118439/test_model.zip

Relevant log output
E/VersionedInterfaces: DeathHandler::serviceDied -- service unexpectedly died!
E/VersionedInterfaces: prepareModel_1_3 on qti-dsp failed because the PreparedModel object is dead
E/tflite: NN API returned error ANEURALNETWORKS_DEAD_OBJECT at line 4662 while completing NNAPI compilation.

Hi @MM2932 !  I tracked the error here
Here are a few things I need to know.

Could you confirm whether Android studio is detecting your device in a live state.
Commands to implement qti-dsp delegate specificially.

Hi @mohantym, thank you for your answer.

Could you confirm whether Android studio is detecting your device in a live state.

Yes, the device is live all the time.

Commands to implement qti-dsp delegate specificially.

Our current implementation is written in C++ and we simply select accelerator_name = "qti-dsp" for tflite::StatefulNnApiDelegate::Options. But the issue can also be reproduced with your own tools, for example with your Inference Diff tool selecting the same accelerator.
A couple other comments:

This error is triggered by the model @MM2932 linked in the ticket. We tested other models that did not cause this error.
In case this is helpful for your diagnosis, we actually tracked the error and it looks like it is happening here: https://github.com/tensorflow/tensorflow/blob/d8ce9f9c301d021a69953134185ab728c1c248d3/tensorflow/lite/delegates/nnapi/nnapi_delegate.cc#L4644

@gowthamkpr ! Could you please look at this issue.

Miao, can you please have a look
Thanks

Hi @miaowang14 !
Are you taking care of this issue?
Thanks!
Massimo.

E/VersionedInterfaces: DeathHandler::serviceDied -- service unexpectedly died!

This indicates that the model somehow has caused the qti-dsp NNAPI driver to crash. Since it is an issue with proprietary driver, I'll forward the issue to our vendor partner.
Could you share the following information:
Device Name, Manufacture, Android version?

Hi @miaowang14 ,
Sorry to keep you waiting.
We are trying to reach out to Qualcomm to report this issue. Please keep the ticket open, so that we can share further updates with you.
Thanks!
Massimo.

Hi @MM2932, has Qualcomm gotten back to you?

Hi, we contacted Qualcomm last year, but a fix is not available yet.
They have been working on a new delegate (QNN), that will replace the Hexagon. We hope QNN will enable us to run this model soon.
Thanks!

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The TFLite team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the TFLite space.


Binary tree stresstest

As discussed on Slack! Let me know if you want this structured differently or have these two share code. I keep them seperated for now to not introduce any unnecessary variables from dispatch/inference optimizing differently or similar. I also fixed a bug in the run_one_benchmark.jl, where it didn't pick a default value if only the single benchmark was supplied.
Also unsure whether @threads should be here - I had it in my initial test/finding, but maybe it just adds unnecessary noise here.
CC: @vchuravy

is this significantly different than https://github.com/JuliaCI/GCBenchmarks/blob/main/benches/linked/tree.jl?

Can you rebase this on main? This looks good to merge, but we just updated the repo to support threads, and refactored the test runner in the process.

Can you rebase this on main? This looks good to merge, but we just updated the repo to support threads, and refactored the test runner in the process.

The timings with multiple threads are lower, but still exhibit the same behavior. Should still be a worthwhile benchmark, especially since (I think?) this is the only one so far that uses multiple threads as well.

This produces really interesting numbers.
julia --project=. run_benchmarks.jl --bench=binary_tree/tree_mutable.jl
run time: 13188ms min, 14680ms max 13574ms median
gc time: 2843ms min, 3146ms max, 2936ms median

julia --project=. run_benchmarks.jl --bench=binary_tree/tree_mutable.jl --threads=4
run time: 8548ms min, 11813ms max 8813ms median
gc time: 4617ms min, 6103ms max, 4715ms median

julia --project=. run_benchmarks.jl --bench=binary_tree/tree_immutable.jl
run time: 6744ms min, 8653ms max 7238ms median
gc time: 1173ms min, 1461ms max, 1242ms median

julia --project=. run_benchmarks.jl --bench=binary_tree/tree_immutable.jl --threads=4
run time: 5197ms min, 6745ms max 6114ms median
gc time: 2342ms min, 3000ms max, 2843ms median

So mutable is slower, but also, --threads=4 speeds up the program, but slows down the GC. @chflood is there an obvious reason why GC should significantly slow down when you have more GC threads? That seems un-intuitive to me. Is it memory locality?
It will be interesting to see how this changes when we get parallel GC.

We should also measure how close we get to our heap thresholds, this benchmark runs better on my machine with >> 20GB of RAM then @Seelengrab machine with ~20GB and the amout allocated was around 9GB

Notably, the 9GiB were from the immutable case. The mutable case is a lot worse:
julia> @time New.binary_trees(devnull, 21) # immutable
 12.247241 seconds (305.93 M allocations: 9.133 GiB, 40.22% gc time, 7.51% compilation time)

# restart

julia> @time New.binary_trees(devnull, 21) # mutable
 17.923601 seconds (614.21 M allocations: 18.320 GiB, 44.72% gc time, 3.94% compilation time)

and my versoninfo:
julia> versioninfo()
Julia Version 1.9.0-DEV.468
Commit 862018b20d (2022-05-04 15:57 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: 4 × Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 4 on 4 virtual cores
Environment:
  JULIA_NUM_THREADS = 4

Fewer threads is always slower and while these two runs were with some additional load in the background, they still show vastly different timings.

And on my machine:
julia> @time BinaryTreeImmutable.binary_trees(devnull, 21)
  5.971174 seconds (305.49 M allocations: 9.104 GiB, 23.12% gc time)

julia> @time BinaryTreeMutable.binary_trees(devnull, 21)
 12.249979 seconds (613.77 M allocations: 18.292 GiB, 27.96% gc time)

julia> versioninfo()
Julia Version 1.8.0-beta3
Commit 3e092a2521 (2022-03-29 15:42 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: 16 × AMD Ryzen 7 3700X 8-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver2)
  Threads: 1 on 16 virtual cores
Environment:
  JULIA_PKG_DEVDIR = /home/vchuravy/src


After changing minSdkVersion, build release apk no CERT.RSA and CERT.SF

Steps to Reproduce

Flutter 1.17.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b041144f83 (14 hours ago) • 2020-06-04 09:26:11 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4

create a new flutter project, noting to do, then exec 'flutter build apk', everything is ok

only change minSdkVersion to 24 in '/android/app/build.gradle'
exec 'flutter build apk', building is ok, but no CERT.RSA and CERT.SF in apk package

Expected results:
how to build a release apk after changing minSdkVersion

Hi @xutingzhou
I see the behaviour you are describing,

screenshot

doctor
[✓] Flutter (Channel stable, v1.17.3, on Mac OS X 10.15.5 19F101, locale en-GB)
    • Flutter version 1.17.3 at /Users/nevercode/development/flutter
    • Framework revision b041144f83 (19 hours ago), 2020-06-04 09:26:11 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/nevercode/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.9.0

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.11.0

[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.

this could be intentional, but honestly I cannot be sure.
Thank you for reporting this

\cc @blasten @xster

I think this is a 'bug?' of the Android Gradle Plugin.
signingConfigs {
	prod {
	        storeFile file("$project.rootDir/123.keystore")
	        storePassword '123'
                keyAlias "123"
                keyPassword '123'
                v1SigningEnabled true
                v2SigningEnabled true  // add this line to your signing configs
	}
}

Try adding a signature flag in this way. @xutingzhou

@xutingzhou
Check above comment from @succlz123. It seems starting from min sdk version 23+, apk without CERT.RSA and CERT.SF are acceptable. If you still want to have those certs, you may use v1SigningEnabled flag and set it to true.
You may read more about the flag here: https://google.github.io/android-gradle-dsl/3.4/com.android.build.gradle.internal.dsl.SigningConfig.html
I am going ahead and closing this. If you disagree, write in comments and I'll reopen it.

@xutingzhou
Check above comment from @succlz123. It seems starting from min sdk version 23+, apk without CERT.RSA and CERT.SF are acceptable. If you still want to have those certs, you may use v1SigningEnabled flag and set it to true.
You may read more about the flag here: https://google.github.io/android-gradle-dsl/3.4/com.android.build.gradle.internal.dsl.SigningConfig.html
I am going ahead and closing this. If you disagree, write in comments and I'll reopen it.

signingConfigs {
	release {
	        storeFile file("$project.rootDir/123.keystore")
	        storePassword '123'
                keyAlias "123"
                keyPassword '123'
                v1SigningEnabled true
                v2SigningEnabled true
	}
}

Try adding the signature flags in this way. @xutingzhou
There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.

signingConfigs {
	release {
	        storeFile file("$project.rootDir/123.keystore")
	        storePassword '123'
                keyAlias "123"
                keyPassword '123'
                v1SigningEnabled true
                v2SigningEnabled true
	}
}

Try adding the signature flags in this way. @xutingzhou
There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.

原来是这么回事。我想升级一下版本怎么没了签名，国内市场都不给过。谢谢大佬

@xutingzhou
Check above comment from @succlz123. It seems starting from min sdk version 23+, apk without CERT.RSA and CERT.SF are acceptable. If you still want to have those certs, you may use v1SigningEnabled flag and set it to true.
You may read more about the flag here: https://google.github.io/android-gradle-dsl/3.4/com.android.build.gradle.internal.dsl.SigningConfig.html
I am going ahead and closing this. If you disagree, write in comments and I'll reopen it.

thanks


[integration_test] Simulating a long press not working anymore after displaying a bottom sheet

Is there an existing issue for this?

[x] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
I reproduce the bug on Android with the following steps (I have not tried on iOS):

Create an app that uses a GestureDectector to open a bottom sheet when onLongPress is used.
In the integration test, do a longpress on the GestureDectector: the bottom sheet gets displayed
Close the bottom sheet
Do another longpress on the GestureDectector to open the bottom sheet again
It fails

Expected results
The long press should work again even after displaying a bottom sheet.
Actual results
There is no log while doing the second long press, the pointer can be seen on the screen at the right location and for right duration.
The second long press is not doing anything which makes the test fail in the following instructions.
Code sample
Code sample
lib/main.dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Center(
        child: GestureDetector(
          onLongPress: _showBottomSheet,
          child: Container(
            color: Colors.red,
            child: const Text('Show BottomSheet'),
          ),
        )
      ),
    );
  }

  void _showBottomSheet() {
    showModalBottomSheet(
      context: context,
      builder: (context) => SizedBox(
        height: 200,
        child: Column(
          children: [
            const Text('Modal BottomSheet'),
            ElevatedButton(
              onPressed: () => Navigator.pop(context),
              child: const Text('Close'),
            )
          ],
        ),
      ),
    );
  }
}

integration_test/integration_test.dart
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:sample_issue/main.dart';

void main() {
  IntegrationTestWidgetsFlutterBinding.ensureInitialized();

  testWidgets('Longpress and bottomsheet', (tester) async {
    // Launch the app
    await tester.pumpWidget(const MyApp());
    await tester.pumpAndSettle();

    // Display the bottom sheet by long pressing the button
    await tester.longPress(find.byType(GestureDetector));
    await tester.pumpAndSettle();
    await tester.pump(const Duration(seconds: 2)); // I wait 2 seconds to be sure that the bottom sheet is open, pumpAndSettle is not waiting enough
    expect(find.text('Modal BottomSheet'), findsOneWidget);

    // Close the bottom sheet
    await tester.tap(find.byType(ElevatedButton));
    await tester.pumpAndSettle();

    // Re-Display the bottom sheet by long pressing the button again
    await tester.longPress(find.byType(GestureDetector));
    await tester.pumpAndSettle();
    await tester.pump(const Duration(seconds: 2)); // I wait 2 seconds to be sure that the bottom sheet is open, pumpAndSettle is not waiting enough
    expect(find.text('Modal BottomSheet'), findsOneWidget);
  });
}

Screenshots or Video

Screenshots / Video demonstration
Screen_recording_20231013_180842.webm

Logs
Logs
flutter --no-color test --machine --start-paused --name "Longpress and bottomsheet(\s*\(variant: .*\))?$" -d emulator-5554 integration_test/integration_test.dart
Testing started at 18:04 ...
Running Gradle task 'assembleDebug'...                             10.8s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app-debug.apk...          630ms

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: exactly one matching node in the widget tree
  Actual: _TextFinder:<zero widgets with text "Modal BottomSheet" (ignoring offstage widgets)>
   Which: means none were found but one was expected

When the exception was thrown, this was the stack:
#4      main.<anonymous closure> (file:///home/jerome/Documents/projets/sample_issue/integration_test/integration_test.dart:28:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
  file:///home/jerome/Documents/projets/sample_issue/integration_test/integration_test.dart line 28
The test description was:
  Longpress and bottomsheet
════════════════════════════════════════════════════════════════════════════════════════════════════

Test failed. See exception logs above.

Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.7, on Ubuntu 22.04.2 LTS 6.2.0-34-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2022.3)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

It seems like you're encountering an issue with your Flutter app where the second long press on the GestureDetector doesn't open the bottom sheet as expected. Here are some steps to troubleshoot and potentially fix the issue:

Verify Dependencies: Ensure that your Flutter and integration_test dependencies are up to date. Run flutter pub get to make sure you have the latest packages installed.

Widget Key: Add a GlobalKey to the GestureDetector in your test to make sure you are interacting with the correct widget.
final gestureDetectorKey = GlobalKey();

// In the test:
await tester.longPress(find.byKey(gestureDetectorKey));

Wait for Widgets to Appear: You can use the await tester.pumpAndSettle() to wait for widgets to appear instead of using arbitrary time delays.

Widget Rebuilding: Ensure that the widget tree is being rebuilt correctly after closing the bottom sheet. You may need to call tester.pumpAndSettle() after closing the bottom sheet to make sure the widget tree is updated.

Debugging: You can add debug print statements to your test to check if the long press is being recognized and if the widget tree is updating correctly.

Check for Multiple Widgets: Make sure that there is only one GestureDetector widget in the widget tree. If there are multiple, the tester might not be interacting with the one you expect.

Flutter Hot Reload: Sometimes, the Flutter hot reload can resolve widget tree issues. Try running your app and test with flutter run and flutter test to see if the issue persists.

These steps should help you diagnose and potentially fix the issue with the second long press not opening the bottom sheet.

@PuzzleTakX I carefully checked every points that you mentioned, but I still have the issue :/
2. I tried and got the same result, also there is only one GestureDetector in my sample.
4. In my sample I use tester.pumpAndSettle() I added a pump because pumpAndSettle is for some reason not always waiting the bottom sheet animation.

I understand that you've carefully checked the points mentioned and are still facing the issue. Debugging these types of problems can be quite challenging. If tester.pumpAndSettle() is not consistently waiting for the bottom sheet animation, you might need to experiment with alternative approaches to work around the issue:

Explicit Delays: Although not ideal, you can use Future.delayed to explicitly wait for a certain amount of time after opening or closing the bottom sheet. While not recommended for production tests, it can help identify whether the issue is related to timing.

Custom Wait Logic: Implement your custom waiting logic. For example, you can periodically check if the desired element (e.g., text) has appeared on the screen after triggering the bottom sheet and use a loop to wait until it's found.

Check Flutter's GitHub Repository: Given that pumpAndSettle is supposed to handle waiting for animations to complete, you might want to check the Flutter GitHub repository for any open issues related to pumpAndSettle. There might be specific scenarios or edge cases that haven't been handled correctly.

Engage with the Flutter Community: Post your issue on the Flutter community forums or on Stack Overflow. Other Flutter developers may have encountered similar issues and can provide more insights or possible workarounds.

Test on Different Devices/Emulators: Sometimes, specific devices or emulators can exhibit unusual behavior. Try running your test on a different device or emulator to see if the issue persists.

Create a Minimal Reproduction: Create a minimal reproduction of the issue in a new Flutter project. This can help you narrow down the problem and make it easier to identify the root cause.

While these workarounds may help you make progress, it's important to remember that they are temporary solutions. Ideally, Flutter tests should work consistently with pumpAndSettle, and if it's not functioning as expected, it might be indicative of a framework issue that should be reported to the Flutter community or Flutter's GitHub repository for investigation and resolution.

Thanks for your report @jeromecaudoux
I see there's an open issue addressing the similar case you described https://github.com/flutter/flutter/issues/98804. Even though it's with Dialog instead, I think these issues have the same cause as they are PopupRoute internally.
Closing this issue as a duplicate, so please follow up on it for further updates. You can leave there your comment and react an upvote to the original comment will help to raise the issue. Thank you!


disable generate binary file when syntastic go file

Currently, each time when syntastic a go file using the default go build mode, it'll generate a binary file in the current folder,  which is annoying when using versioning tool like git.
Adding a -o=/dev/null will redirect it to /dev/null, more clear.

Is option -o supported by all versions of go later than 1.4?  Was it actually tested with all these versions?  Does -o=/dev/null work on all OSes where syntastic and go can be installed?
If the answer to either question is no, then your patch is not needed.  The same effect can be achieved by setting g:syntastic_go_go_post_args.

Is option -o supported by all versions of go later than 1.4?
yes, it's from the official go tool, and supported at the beginning

Was it actually tested with all these versions?
It's a offical one from the strach, and I have test on go 1.4, and it works.

Does -o=/dev/null work on all OSes where syntastic and go can be installed?
Unfortunately, it doesn't work in windows, so I also think this patch is not needed

Finnaly I add option let g:go_go_build_args = '-buildmode=default -o=/dev/null' in my .vimrc (Unix like system), it can archive my requirement.
At last , thx @lcd047

yes, it's from the official go tool, and supported at the beginning

If I recall correctly I tried this in the past, and it only worked in some cases, mainly because -o is supposed to point to a directory, or something like that.  Of course the real problem is go doesn't have a "check syntax" mode.  More points for dropping support for go in favor of vim-go.


integration: Add IPU container

Updates the CI testing to work with both DPU and IPU containers.
Signed-off-by: Kyle Mestery<EMAIL_ADDRESS>

Closing in lieu of #75.


chore: minor patches

Fixes the GHA badge
Sets FOUNDRY_PROFILE for the entire workflow (allows configuring snapshot too)
Matches the pragma to what forge init creates
Makes tests pass

I wanted to push a patch for that but it seems I do not have push rights to the repository anymore :sweat_smile:

Wait sorry, which repo do you not have push rights to?

Wait sorry, which repo do you not have push rights to?

This repository


core_arch module in libcore is not resolved correctly

In libcore, the core_arch module is declared as follows (here):
#[path = "../../stdarch/crates/core_arch/src/mod.rs"]
mod core_arch;

rust-analyzer complains about an "unresolved module", but the referenced file does exist.

Duplicate of https://github.com/rust-analyzer/rust-analyzer/issues/3898


Autocomplete not working on Schema definition

Actual Behavior
Autocomplete works fine on gql tags and query files in the project but it does not work on the schema definition file.
The outline is being detected as expected:

However, whenever I type a new field, autocomplete doesn't work:

In the example above, if I write Int and save my file, then it gets suggested the next time I type something:

But as soon as I'm writing the next field it stops working again:

Expected Behavior
Autocomplete should work with default and user defined types on schema definition.
Steps to Reproduce the Problem Or Description
1 - Create a new project with the following configuration file:
.graphqlrc.yml
schema: "schema.graphql"
documents: "src/**/*.{graphql,gql,js,ts,jsx,tsx}"

2 - Create a schema.graphql file in the root folder:
schema.graphql
type User {
  id: ID
  firstName: String
  lastName: String
  address: Int
  cash: Int
}
type Query {
  users: [User]
  user: User
}

3 - Try to write a new field, autocomplete doesn't work
Specifications

GraphQL for VSCode Extension Version: 0.3.13
VSCode Version:

Version: 1.52.1
Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523
Date: 2020-12-16T16:30:02.420Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 20.2.0
Logs Of TS Server || GraphQL Language Service
12/31/2020, 12:15:43 PM [1] (pid: 5543) graphql-language-service-usage-logs: Error: Unknown type "I". Did you mean "ID"?
[Error - 12:16:05 PM] Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: Unknown type "I". Did you mean "ID"?
  Code: -32603
[Error - 12:16:06 PM] Request textDocument/completion failed.
  Message: Request textDocument/completion failed with message: Unknown type "I". Did you mean "ID"?
  Code: -32603
(node:5543) UnhandledPromiseRejectionWarning: Error: Unknown type "I". Did you mean "ID"?
    at assertValidSDL (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/validation/validate.js:107:11)
    at Object.buildASTSchema (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/utilities/buildASTSchema.js:45:34)
    at makeSchema (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/@graphql-tools/merge/index.cjs.js:976:99)
    at Object.mergeSchemasAsync (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/@graphql-tools/merge/index.cjs.js:967:12)
    at async Object.loadSchema (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/@graphql-tools/load/index.cjs.js:650:20)
    at async GraphQLCache.getSchema (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql-language-service-server/dist/GraphQLCache.js:259:26)
(node:5543) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 44)
[Error - 12:16:24 PM] Request textDocument/completion failed.
  Message: Request textDocument/completion failed with message: Syntax Error: Expected ":", found "}".
  Code: -32603
(node:5543) UnhandledPromiseRejectionWarning: GraphQLError: Syntax Error: Expected ":", found "}".
    at syntaxError (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/error/syntaxError.js:15:10)
    at Parser.expectToken (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/language/parser.js:1413:40)
    at Parser.parseFieldDefinition (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/language/parser.js:881:10)
    at Parser.optionalMany (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/language/parser.js:1503:28)
    at Parser.parseFieldsDefinition (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/language/parser.js:868:17)
    at Parser.parseObjectTypeDefinition (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/language/parser.js:812:23)
    at Parser.parseTypeSystemDefinition (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/language/parser.js:708:23)
    at Parser.parseDefinition (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/language/parser.js:150:23)
    at Parser.many (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/language/parser.js:1523:26)
    at Parser.parseDocument (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/language/parser.js:115:25)
(node:5543) UnhandledPromiseRejectionWarning: Error: Unknown type "F".
    at assertValidSDL (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/validation/validate.js:107:11)
    at Object.buildASTSchema (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql/utilities/buildASTSchema.js:45:34)
    at makeSchema (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/@graphql-tools/merge/index.cjs.js:976:99)
    at Object.mergeSchemasAsync (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/@graphql-tools/merge/index.cjs.js:967:12)
    at async Object.loadSchema (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/@graphql-tools/load/index.cjs.js:650:20)
    at async GraphQLCache.getSchema (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql-language-service-server/dist/GraphQLCache.js:259:26)
(node:5543) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file
    at Object.fileURLToPath (internal/url.js:1340:11)
    at /Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql-language-service-server/dist/MessageProcessor.js:353:54
    at Array.map (<anonymous>)
    at MessageProcessor.handleWatchedFilesChangedNotification (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql-language-service-server/dist/MessageProcessor.js:342:43)
    at /Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/graphql-language-service-server/dist/startServer.js:165:122
    at handleNotification (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/vscode-jsonrpc/lib/main.js:502:43)
    at processMessageQueue (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/vscode-jsonrpc/lib/main.js:273:17)
    at Immediate._onImmediate (/Users/theoribeiro/.vscode/extensions/graphql.vscode-graphql-0.3.13/node_modules/vscode-jsonrpc/lib/main.js:260:13)
    at processImmediate (internal/timers.js:439:21)

Terribly sorry this one slipped through the cracks last year.
I have moved it to the appropriate repository for the language server. I haven't seen this issue with similar configurations yet, but I'm sure I or another maintainer will be able to reproduce it. It's been added as a high priority bug to the roadmap, given the response 😢

It appears from the screenshots that the autocomplete is briefly working properly for you after save. The blue icons are appearing, which are used to denote operation or type fields, as opposed to the emmet style completions that always show and have to be disabled in user settings.
Of course it should also work before save, and after you begin typing a selection, so we will have to fix that!


use php-cs-fixer/diff ^2.0

please retarget to 2.11

that would be a BC on 2.11 I think, as we've different differ-delegated classes/options there

good point, we remove all but strict udiff at 3.0

thanks @keradus :)  nice to see all this finds its place!


MINOR: trivial cleanups

Remove unused imports from CommandLineUtils, KafkaConfig.
Add ignore case in KafkaController#process, GroupCoordinator#doSyncGroup, and GroupCoordinator#handleHeartbeat.

Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Thanks for the PR. Ignoring the exhaustiveness warnings can hide bugs, if we don't expect it to happen, we should throw an exception.

Retest this please.

Retest this please

Here is the fix. cc/ @abbccdda @hachikuji


Enabling multi-domain callback support and override of the callbackUrl method

As discussed on forum, submitting the changes related to enabling multi-domain callback support and override of the callbackUrl method. Changes should not affect original functionality if an absolute URL is used as applicationUrl for the bean, but they allow callback URLs to be formed depending on the current domain name if the relative URL has been used instead.
http://forum.springsource.org/showthread.php?109571-Callbacks-and-multihomed-hosts

@alexander-codebase Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.


Restored support for a JSON-based serialization format.

Codecov Report

Merging #1 (ee95b64) into master (adf5365) will increase coverage by 0.04%.
The diff coverage is 94.42%.

@@            Coverage Diff             @@
##           master       #1      +/-   ##
==========================================
+ Coverage   94.81%   94.86%   +0.04%
==========================================
  Files          16       18       +2
  Lines         675     1362     +687
  Branches        4       31      +27
==========================================
+ Hits          640     1292     +652
- Misses         31       39       +8
- Partials        4       31      +27

Impacted Files
Coverage Δ

tests/src/utils.h
95.45% <66.66%> (-4.55%)
:arrow_down:

include/uzuki2/utils.hpp
91.17% <91.17%> (ø)

include/uzuki2/parse_json.hpp
91.74% <91.74%> (ø)

include/uzuki2/parse.hpp
91.90% <100.00%> (-0.29%)
:arrow_down:

tests/src/boolean.cpp
100.00% <100.00%> (ø)

tests/src/date.cpp
100.00% <100.00%> (ø)

tests/src/external.cpp
100.00% <100.00%> (ø)

tests/src/factor.cpp
100.00% <100.00%> (ø)

tests/src/integer.cpp
100.00% <100.00%> (ø)

tests/src/json.cpp
100.00% <100.00%> (ø)

... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


modeld: eliminate the memory copy to GPU

Is it not required to sync the buffers? What device did you test this on?
I think it might work when it's backed by an ion buffer (but no guarantees because the caches are not properly invalidated), or buffers allocated with clSVMAlloc. If you'd try on a device with openCL 1.2 it probably won't work. Did I miss something?

I think the buffer is already synchronized. tested on PC, C1&C2(LeEco Le Pro3) with openCL 1.2&2.0.have driven thousands of kilometers,But I don’t have enough tools to do a very complete test.

It probably works because when using ion buffers/cpu buffers we don't touch the buffer from the cpu side so it doesn't matter that we clean the cache.
We also explicity ask for a CPU device for openCL, therefore we don't notice that the buffer is not copied to the GPU if needed. This is probably also why it doesn't work right now if you try to use the GPU.
I suggest we add a visionbuf_sync(buf, VISIONBUF_SYNC_TO_DEVICE) after the call to visionstream_get.

I'm seeing now that adding the sync is not trivial, since we don't have a VisionBuf object on the receiving side and it's not entirely trivial to construct it again. We can do without the sync for now, and I'll include it in the visionipc rewrite.


Command-line client for Iglu

Great idea by @BenFradet - essentially would allow you to publish, test and fetch schemas from the command-line.
If we write in node.js, then a) deployment is really easy (vs Ruby or Python) b) it will be responsive (vs JVM and c) we can extract out a node.js client

Implemented as https://github.com/snowplow/iglu/issues/143, https://github.com/snowplow/iglu/issues/144


Add depthwise convolutions to stax

Hi there!
It would be great if depthwise convolutions could be added to stax. They're already in lax since #635, but it would be great if they'd be added in stax as well.
Best
Thomas

If no one has picked this up I'll have a go.

It would also be nice add support for Mixed Convolution in the depthwise layer, if supported by lax.

@mattjj Is anyone currently working on this? If not, I'd like to take it as my first PR attempt in jax

@TH3CHARLie I believe #1496 is related

We're not planning to keep evolving the current iteration of stax, in favor of libraries such as Flax and Haiku. I believe both already support depthwise convolution!

Hi @hawkinsp, could you provide a link to the Flax implementation?

Hi @hawkinsp, could you provide a link to the Flax implementation?


Create hoornbeeck.txt

I am sorry for a delay with processing your request. Pull request is now merged. Thank you for your contribution!


minor tweaks for the prevention of magic

Two tiny changes

Explicit sizes for headings
Allow active nav to have an explicit pattern if the href is complex or strange

LGTM, but is the co-active-match going to get used in another PR after this gets merged? Code looks good, but would be cool to see an actual use case along with the introduction of this change.

Here's the use case : https://github.com/coreos-inc/bridge/commit/d3b108548cc16561d6207db59c1642f806c1097e - in this case, the link redirects to one of a family of potential matches


Create an Analyzer to prevent usage of reserved keywords in code

People are hitting these type of issues more and more: https://github.com/aspnet/Mvc/issues/7876
The idea is to have an Analyzer which will be aware of all the reserved words we have in different places and will warn users about their name choices.
@rynowak what are your thoughts about this?

If we limit this to parameters that seems fine. If I made a list of things to have analyzers for, I think this would be roughly in the middle 👍

To pick up an idea I had before: Is there any chance we could change this, maybe with 3.0, so that internally different keys are used? We could maybe use a feature flag, so people could always choose the old behavior for compatibility.


[Bug]: webserver with custom port

Version of the software
0.2.4 / 0.2.5
Operating system
Windows 10
Browser / Native
ANY Browser
What happened?
A bug happened!
I tried to post/get a webserver with port 3333
idk why, but when im using browser client of OB2 it will give me this error, on both http libraries
[SAFE MODE] Exception caught and saved to data.ERROR: System.Threading.Tasks.TaskCanceledException: A task was canceled.
But the same config works on native with no problem on both http libraries!
idk what is the problem, it's really weird
Relevant LoliCode if needed
No response

I would need to have an example webserver to properly test and debug this.


Feature: Azure image support

As we want to be able to support additional cloud provides, we be able creating Scylla machine image on Microsoft Azure platform
As first step, let's build Scylla Azure image with Packer tool
(refernce: https://microsoft.github.io/AzureTipsAndTricks/blog/tip201.html)
Need to get https://github.com/scylladb/scylla/pull/7807 merged before
Fixes: https://github.com/scylladb/scylla-machine-image/issues/54

@yaronkaikov should be a PR on scylla core ? and not just an issue ?
also can you provide us with example of this image ? so people can manually run it ? (i.e. we do have a big effort to actually have a test for such image)

@fruch I have updated the description, there is a PR and it's in draft

/cc @slivne


I get an error - code 400

I pay a commission of 0.1 GRAMS >>>> Browse >>>> buy >>>> I get an error
Error Buying Order.. Dont forget to pay your transaction fees: Error: Request failed with status code 400
Offered Currency:
1.2 Tea Party Logo NFT ID: 4
I tried to pay from two addresses
0xDffDf81a03A073332239A92a7BE02F9887Ae6d97
0x671865C6175025723E22169fdb7133e71A2833bf

for a pair of grams/octa - I get the same error
after paying the commission on one computer, I managed to create a sell order
Order: 5fa6ef07-f626-4955-abd6-c954df4ff911
Offered Currency:
0.1 Tea Party Logo
Trading Pair
0.1 Tea Party Logo
I tried to buy from another computer. and I got an error - code 400. the commission was not paid, although I paid the commission


Normalize transaction data length

Explanation
The transaction parameters include the data property which is a hex string.
When processed by the RPC provider / node, data with an odd-length is treated the same as an even-length value, meaning the data value of 0x123 is treated the same as 0x0123.
This PR applies equivalent normalization in the TransactionController to ensure the client UIs receive the data in a consistent format with an even length hex string.
Also export the normalizeTransactionParams method so it can be utilised directly by any layer of the client to format transaction parameters with the same logic.
Changelog
@metamask/transaction-controller

ADDED: Add normalizeTransactionParams method.
CHANGED: Normalize data property into an even length hex string.

Checklist

[x] I've updated the test suite for new or updated code as appropriate
[x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
[x] I've highlighted breaking changes using the "BREAKING" category above as appropriate

@metamaskbot publish-preview


[Button] ButtonGroup space is invalid in ios & android

Description
ButtonGroup space is invalid in ios & android
CodeSandbox/Snack link
No response
Steps to reproduce
I submitted an issue before: https://github.com/gluestack/gluestack-ui/issues/1203
gluestack-ui Version
0.1.55
Platform

[ ] Expo
[ ] React Native CLI
[ ] Next
[ ] Web
[X] Android
[X] iOS

Other Platform
No response
Additional Information
No response


Added missing $icon_prefix and the possibility to extend paginator template

Paginator template now can be extended to overwrite icon-arrow-left and icon-arrow-right blocks using $grid->getPaginator()->setTemplateFile(__DIR__ . '/custom_datagrid_paginator_template.latte');
Also some missing n:blocks for icons were added (date filter & tree view)

Perfect. Can you please these lines:
$this->template->icon_prefix = $this->icon_prefix;
$this->template->original_template = $this->getOriginalTemplateFile();

to look like this:
$this->template->add('icon_prefix', $this->icon_prefix);
...

?

Done