Paging Error

This is thrown after I add an item to a bound collection. I can't really seem to narrow down the exact cause, and my stuff still all works.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.ObjectModel.Collection1.RemoveAt(Int32 index)    at DynamicData.Binding.SortedObservableCollectionAdaptor2.<>c__DisplayClass5.b__6(Change`2 update) in C:\projects\dynamicdata\DynamicData\Binding\SortedObservableCollectionAdaptor.cs:line 90
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.ObjectModel.Collection1.RemoveAt(Int32 index)    at DynamicData.Binding.SortedObservableCollectionAdaptor2.<>c__DisplayClass5.b__6(Change2 update) in C:\projects\dynamicdata\DynamicData\Binding\SortedObservableCollectionAdaptor.cs:line 90    at DynamicData.Kernel.EnumerableEx.ForEach[T](IEnumerable1 source, Action1 action) in C:\projects\dynamicdata\DynamicData\Kernel\EnumerableEx.cs:line 30    at DynamicData.Binding.SortedObservableCollectionAdaptor2.DoUpdate(ISortedChangeSet2 updates, IObservableCollection1 list) in C:\projects\dynamicdata\DynamicData\Binding\SortedObservableCollectionAdaptor.cs:line 82
at DynamicData.Binding.SortedObservableCollectionAdaptor2.Adapt(ISortedChangeSet2 changes, IObservableCollection1 collection) in C:\projects\dynamicdata\DynamicData\Binding\SortedObservableCollectionAdaptor.cs:line 59    at DynamicData.DynamicDataEx.<>c__DisplayClass3312.b__333(ISortedChangeSet2 updates) in C:\projects\dynamicdata\DynamicData\DynamicDataEx.cs:line 2505 --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at System.Reactive.PlatformServices.ExceptionServicesImpl.Rethrow(Exception exception)    at System.Reactive.ExceptionHelpers.Throw(Exception exception)    at System.Reactive.Stubs.<.cctor>b__1(Exception ex)    at System.Reactive.AnonymousObserver1.OnErrorCore(Exception error)
at System.Reactive.ObserverBase1.OnError(Exception error)    at System.Reactive.AutoDetachObserver1.OnErrorCore(Exception exception)
at System.Reactive.ObserverBase1.OnError(Exception error)    at DynamicData.DynamicDataEx.<>c__DisplayClass3312.b__333(ISortedChangeSet`2 updates) in C:\projects\dynamicdata\DynamicData\DynamicDataEx.cs:line 2509

Try and implement a hash code on the object which includes the key field. It probably has something to do with hashing

If that does not work try adding the key field as an extra field on the sortexpressioncomparer.

and if that fails, can you copy the entire ItemVm object  + the SortComparer  and I will try and replicate it

I made GetHashCode return my unique itemVm Id, no change.
i don't see where to add a key field
my sort comparer is really simple
SortController.Change(SortExpressionComparer.Descending(t => t.Name));
my itemvm is pretty big but not really complicated...
i investigated a bit more and this is the trigger
                DynamicDataVm.ItemCache.Clear();
                DynamicDataVm.ItemCache.AddOrUpdate(MyList<ItemVm>);
                DynamicDataVm.Connect()....
.Subscribe();

i said earlier this occurs when i change the collection, that was incorrect. it seems to happen when i call this pattern repeatedly even when the list doesnt change. perhaps my usage could be improved

You should only ever call connect once to initialise the stream. Have a look at the dynamic.trader example. Perhaps that is it

Also sortexpressioncomparer.ascending(t=>t.name).thenascending...

Is there an easy way to check if an ItemCache is connected to an OC already?

in constructor of vm do:
var connected = ItemCache.Connect().......Page().Bind().Subscribe()
There is no need to ever resubscribe as reactive ex / dynamic data takes care of the rest.
And treat calling ItemCache,AddOrUpdate(..) / ItemCache.Clear(..) etc as a completely different operation which can be called multiple times. Then the bindings will look after themselves

niiiiice


CIS Cross Reference

Please help me out to understand the script result is showing the CIS Benchmarks Cross Reference, Is that is a passed or Failed controls?
And the script output has some fail how I can fix those Issues. Please help us as soon as possible.

The cross reference simply contains the links to the checks relatated to a specific benchmark. If You follow the link You'll find the results.
The errors maybe related to the MySQL versions You are using... this script should work fine for MySQL 5.7. Can also work for other versions or forks but it was not designed too.


Changed npm scripts to work cross platform

The scripts in package.json were not working on a Windows npm dev environment, so I am proposing these changes to make them work across Windows and Linux systems.

Awesome, thanks!


redpanda: init at 21.11.15

Description of changes
adding redpanda from binary from now.
compilation is pretty involved so I want to use it first before I invest time into figuring this one out.
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

I'm going to merge this for now, but happy to take feedback should there be any.

this is only a RedPanda CLI tool called rpk, which is a Go application easy to build from sources (https://github.com/redpanda-data/redpanda/tree/dev/src/go/rpk)
RedPanda is not here neither in binary not from source form

Ah, you make a good point. I've never had time to actually run this to verify, I only ran the version check thinking I would do it later.
I don't have time to do it at the moment, but happy to review any MR should you have one.


Make iDOM Compatible With Nteract's VDOM

After #73 iDOM's spec was nearly compatible with Nteract's VDOM, but VDOM still doesn't have a way to indicate stopPropagation or preventDefault.

New issue added to support importSource:

I kind of think we can give up on this. I'm not especially interested in remaining compatible since the two projects have mostly diverged. I kind of wonder whether I should rename "attributes" to "props" if we ignore vdom completely.


util: Add GENMASK helper macro definition

Macro is used to create contiguous bitmask between the
arguments passed to the macro.
BITS_PER_LONG is computed as the multiplication of predefined
macros __CHAR_BIT__ and __SIZEOF_LONG__.
Both gcc and clang support these predefined macros.
With this change, replace the redundant defintions of
GENMASK with the new generic macro available.
Fixes #10843
Signed-off-by: Himanshu Jha<EMAIL_ADDRESS>Cc @ulfalizer
himanshu@himanshu-Vostro-3559:~$ uname -a
Linux himanshu-Vostro-3559 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

himanshu@himanshu-Vostro-3559:~$ clang -dM -E -x c /dev/null | grep -w '__SIZEOF_LONG__\|__CHAR_BIT__'
#define __CHAR_BIT__ 8
#define __SIZEOF_LONG__ 8

himanshu@himanshu-Vostro-3559:~$ gcc -dM -E -x c /dev/null | grep -w '__SIZEOF_LONG__\|__CHAR_BIT__'
#define __CHAR_BIT__ 8
#define __SIZEOF_LONG__ 8

Codecov Report

Merging #10944 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #10944      +/-   ##
==========================================
- Coverage   53.32%    53.3%   -0.02%
==========================================
  Files         215      215
  Lines       25908    25908
  Branches     5711     5711
==========================================
- Hits        13815    13810       -5
- Misses       9772     9777       +5
  Partials     2321     2321

Impacted Files
Coverage Δ

include/misc/util.h
50% <ø> (ø)
:arrow_up:

subsys/logging/log_core.c
76.05% <0%> (-2.35%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58058ee...7288bca. Read the comment docs.


Which directory do the models exist in, it's useless to follow the instructions, I can't find all the models I've already downloaded.

Which directory do the models exist in, it's useless to follow the instructions, I can't find all the models I've already downloaded.

The models aren't downloaded automatically, so what did you use to download them?

a browser? If yes, you can open the download tab and open the folder where they have been downloaded.
you want to use already existing models? They wont work probably, they aren't in diffusers format, and anyway the extension read only the models in models/diffusion_models, so you can't tell it to use the already downloaded ones used in another folder.

Then you can put the model files in a folder and the controlnet files in another folder, and the 2 folders into comfyui/models/diffusion_models, as shown in the grid.


Can't set sites with hold

When you try to set a site, that has a hold, as home site there will be an error message saying "This site is on hold".
Could it be possible to have this as a note here?
[Enter feedback here]

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 59d3ba5d-e16b-0d9b-c623-37a75802d6ea
Version Independent ID: 24f1a751-a2de-ee1d-a58e-c4a630d543fb
Content: Set a site as your home site - SharePoint in Microsoft 365
Content Source: SharePoint/SharePointOnline/home-site.md
Service: sharepoint-online
GitHub Login: @MikePlumleyMSFT
Microsoft Alias: mikeplum

Thank you for your feedback


conf: check storage or coprocessor readpool config when partially unified

What problem does this PR solve?
Issue Number: close #7384
Problem Summary: When read pools are partially unified, invalid configurations may not be rejected.
What is changed and how it works?
For storage or coprocessor read pools, check their own configurations when they're not unified.
Related changes

Need to cherry-pick to the release branch

Check List
Tests

Unit test

Release note
Fix the bug that an invalid storage or coprocessor read pool configuration may be not rejected when the unified thread pool is enabled.

@BusyJay PTAL, thank you

/merge

/merge


Windows version won't build

Latest repo dev or master branch gives

when trying to build with VS2019.
and this

when trying to build with VS2022.

Hi
Please read https://github.com/mariuz/flamerobin/blob/master/BUILD.txt
./jo


TC config cleanup - remove unused utility test configurations

I created these configs two years ago for some testing. They haven't
been used since then. Now that everything is maintained in the TC
config DSL, these two configurations should either be better linked
to everything else (there is a lot duplication with other configurations
in the Check pipeline) or removed. I think they should be removed
as they are unused.

Thanks @wolfs!


RFC: have #print display structure fields

Proposal
The #print command currently treats structures just like any other inductive type. For example:
structure A (α β) where
  a : α
  b : β

/-
inductive A.{u_1, u_2} : Sort u_1 → Sort u_2 → Sort (max (max 1 u_1) u_2)
number of parameters: 2
constructors:
A.mk : {α : Sort u_1} → {β : Sort u_2} → α → β → A α β
-/
#print A

Unfortunately, this omits useful information about the structure type A, in particular the name and types of the fields. Indeed, there is no easy way to find the names the fields of a structure at this time.
I propose changing that default behavior as follows:
/-
structure A.{u_1, u_2} : Sort u_1 → Sort u_2 → Sort (max (max 1 u_1) u_2)
number of parameters: 2
constructor:
A.mk : {α : Sort u_1} → {β : Sort u_2} → α → β → A α β
fields:
a : {α : Sort u_1} → {β : Sort u_2} → A α β → α
b : {α : Sort u_1} → {β : Sort u_2} → A α β → β
-/
#print A

I propose the following spec for the info:

The output of the #print command for structures should extend that for inductive except that the word "inductive" should be replaced by "structure" or "class" and the word "constructors" should be replaced by "constructor".
There should be an additional line "fields:" followed, on separate lines, by the names of each structure field followed by the type of the associated projection.
Private fields should be prefixed by the "private" keyword.
The fields should be listed in the order of their indices so that numerical projections can be identified as well.

The rationale is ensure that no information is lost from the current behavior and to keep the info simple. Considerations were given for adding an option for printing flattened subobject fields and other display features. However, these were rejected on the basis that these would not fit with the current utilitarian design of the #print command in Lean 4. That information could be obtained by multiple uses of the #print command. Additional features such as this should be tested in Std or Mathlib before adding to Lean 4.
The WIP implementation in #3768  shows that the PR footprint would be limited to Lean.Elab.Print, with no additional infrastructure. This supports that the maintenance cost should be minimal compared to user benefits.
Context
The #print command in Lean 3 did print structure fields and their types.
The lack of support for structures in the #print command has been mentioned several times on Zulip. Here is a recent example: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/improving.20.23print.20structure/near/422209781
This RFC comes from WIP std4#672, which is currently on hold pending the outcome of this RFC. Note that this PR implements features which are not part of this RFC.
Impact
Add :+1: to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add :+1: to it.

I would suggest that it output the fields with their qualified names:
structure A.{u_1, u_2} : Sort u_1 → Sort u_2 → Sort (max (max 1 u_1) u_2)
number of parameters: 2
constructor:
A.mk : {α : Sort u_1} → {β : Sort u_2} → α → β → A α β
fields:
A.a : {α : Sort u_1} → {β : Sort u_2} → A α β → α
A.b : {α : Sort u_1} → {β : Sort u_2} → A α β → β

One thing that enables is copy/pasting the projection functions.
It could be nice if it omitted the parameters from the types of the fields somehow, since this is already apparent from the constructor.
structure A.{u_1, u_2} : Sort u_1 → Sort u_2 → Sort (max (max 1 u_1) u_2)
number of parameters: 2
constructor:
A.mk : {α : Sort u_1} → {β : Sort u_2} → α → β → A α β
fields:
A.a : ... → A α β → α
A.b : ... → A α β → β

I would suggest that it output the fields with their qualified names:
structure A.{u_1, u_2} : Sort u_1 → Sort u_2 → Sort (max (max 1 u_1) u_2)
number of parameters: 2
constructor:
A.mk : {α : Sort u_1} → {β : Sort u_2} → α → β → A α β
fields:
A.a : {α : Sort u_1} → {β : Sort u_2} → A α β → α
A.b : {α : Sort u_1} → {β : Sort u_2} → A α β → β

One thing that enables is copy/pasting the projection functions.

I thought about this but decided against for this RFC because the required prefix is easy to find and this leads to really ugly stuff for private fields. I'm happy to hear more ideas about this. Does it make sense to omit private fields when outside the right module? That sounds wrong for Lean 4 core but it might make sense downstream.

It could be nice if it omitted the parameters from the types of the fields somehow, since this is already apparent from the constructor.
structure A.{u_1, u_2} : Sort u_1 → Sort u_2 → Sort (max (max 1 u_1) u_2)
number of parameters: 2
constructor:
A.mk : {α : Sort u_1} → {β : Sort u_2} → α → β → A α β
fields:
A.a : ... → A α β → α
A.b : ... → A α β → β

I agree but I don't know how to do that off the top of my head. Any examples of this?

Why not use a syntax closer to the definition instead of inventing something new? That is, for this example:
structure A.{u_1, u_2} (α : Sort u_1) (β : Sort u_2) : Sort (max (max 1 u_1) u_2) where
  a : α
  b : β

Makes sense, I think that basically reduces to "omitting parameters" as in Kyle's comment. I'm not sure how to do that.

The basic idea is to introduce the binders for the parameters once, while printing the type, and then instantiate the types of the projections with the parameter fvars for each constructor. (It might be easier to continue the implementation discussion on zulip and stick to design decisions here.)

I think I figured out how to implement these ideas. I'll have an update on Thursday.

I got the draft PR to implement @kmill's proposal (minus the dots, do you really want the dots?). You can see some actual output examples at tests/lean/printStruct.lean and the accompanying expected output.
@digama0 Thank you for the hint. Turns out I was just missing liftTermElabM and then everything worked out.
I also like your idea of making the #print output closer to the definition. However, I wanted to stay close to what #print currently does for inductive types. Your suggestion makes perfect sense to me for a more comprehensive update of #print but this is not the current scope of this RFC. I'm happy to hear more of your thoughts about this.

(I didn't really want the dots — I'm happy to see the idea discarded :-))

#6096 has a prototype with some more modifications to #print for structures. The design principle that "the fields should be listed in the order of their indices so that numerical projections can be identified as well" is lost, but it's still encoded in the constructor. It gives fully qualified names for projections so that it's possible to know which parent structure it was inherited from (and you can do "go to definition" on them).
Zulip discussion here: https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/.23print.20command.20for.20structures/near/482503637


systemd notify when service is up

If systemd is enabled, we should issue a notify: https://hackage.haskell.org/package/systemd-2.3.0/docs/System-Systemd-Daemon.html#g:1 when the service is completely up. This would a) let our deployments properly report if the service is up or not and b) make the chairman test much less ugly as we could just use waitForUnit.

Closing this. If this is still relevant please re-open with more details.


Scenario: flows and wizard

Would be good to have an example of a flow/wizard such as a sign-up process.

(unpopular opinion: it would be cool if this could be done declaratively.. like flow_builder by felangel.. haha.. ha..) 😅

Currently trying to develop an API for this, here's the current state for a bottom sheet page flow that looks like this:
https://user-images.githubusercontent.com/756862/120100640-6c152d80-c14a-11eb-95f4-4a802ff6c8f2.mp4
Route map:
'/flow': (_) => FlowPage(
      pageBuilder: (child) => BottomSheetPage(child: child),
      child: FlowContainerPage(),
      paths: ['one', 'two'],
    ),

'/flow/one': (_) => MaterialPage(child: BottomSheetPageOne()),

'/flow/two': (_) => MaterialPage(child: BottomSheetPageTwo()),

Then you could advance to the next page with:
FlowPage.of(context).pushNext();

One interesting issue is that for a lot of cases you don't want users navigating to /flow/two without having gone through /flow/one. FlowPage could have an option to block this, but I'm not sure what to call it or what the default should be 😁

Another use case is that you do want to use Routemaster's navigation but do not want the URL to change throughout the flow.
So the URL might internally change to /flow/two, but the user only ever sees /flow.

Super cool stuff Tom! API looks really clean , thanks for taking my suggestion!
If I may, the FlowPage.of(context).pushNext(); and paths works well for linear flows - but i have a use-case where some flow pages depends on the response given in one of the earlier pages of the flow. So something like:
paths: [
  'one',
  'two',
  if (state.value == 'A') 'oneA',
  if (state.value == 'A') 'twoA,
  if (state.value == 'B') 'oneB',
  if (state.value == 'B') 'twoB,
]

Would that work with this?
Also - another point,

So the URL might internally change to /flow/two, but the user only ever sees /flow.

Personally, I prefer if /flow/one and /flow/two are shown instead of just /flow. It feels more like separate pages on web, but also - changing the url means that we can track the pages that were visited with navigatorObservers. Or maybe i am misunderstanding, and we can still track the pages that were visited because internally, routemaster is still changing to /flow/one.

Super cool stuff Tom! API looks really clean , thanks for taking my suggestion!

Thank you!

If I may, the FlowPage.of(context).pushNext(); and paths works well for linear flows - but i have a use-case where some flow pages depends on the response given in one of the earlier pages of the flow. So something like:
paths: [
  'one',
  'two',
  if (state.value == 'A') 'oneA',
  if (state.value == 'A') 'twoA',
  if (state.value == 'B') 'oneB',
  if (state.value == 'B') 'twoB,
]

Would that work with this?

Yes, you can still do Routemaster.of(context).push('twoB') to jump to any page in the flow.

So the URL might internally change to /flow/two, but the user only ever sees /flow.

Personally, I prefer if /flow/one and /flow/two are shown instead of just /flow. It feels more like separate pages on web, but also - changing the url means that we can track the pages that were visited with navigatorObservers. Or maybe i am misunderstanding, and we can still track the pages that were visited because internally, routemaster is still changing to /flow/one.

Yes - don't worry, if I add this URL masking then it will be totally optional.

With the URL masking, I'm thinking of just borrowing from Dart: so a _ prefix will make that part of the route private.
      '/bottom-sheet': (_) {
        return FlowPage(
          pageBuilder: (child) => BottomSheetPage(child: child),
          child: BottomSheetContents(),
          paths: ['_one', '_two'],
        );
      },

      '/bottom-sheet/_one': (_) => MaterialPage(child: BottomSheetPageOne()),

      '/bottom-sheet/_two': (route) {
        print(route.source);
        return MaterialPage(child: BottomSheetPageTwo());
      },

So after calling push('/bottom-sheet/_two'), everything internally will report the path as /bottom-sheet/_one, but a browser's address bar will just display /bottom-sheet

very cool very cool!

@tomgilder
When will this be implemented?

@nikitadol currently working on private routes which is nearly done: #178, will move on to getting this finished after that.
There are already multiple ways you could implement a flow or wizard using Routemaster or just using the Flutter Navigator APIs, though.
Do you have a specific use case?

@tomgilder
The app has a bottom navigation screen
And nested screens can open Flow on top of everything
Flow can show different screens depending on what the user chooses
There is also a Login Flow in which one of the screens can send an email with a deep link, which should open a screen that will be in the stack (so that the user can go back)

Private routes is now merged. The last remaining part of this is introducing more flexible routing maps, including relative paths. API design is being done over at this issue:

#5

It's a bit complicated and important to get right, so any all feedback is very welcome 💙


Validation warning possibly needs clarification

In the rbenv:validate task, a failure to find appropriate ruby version will produce a message:
ERROR rbenv: 2.4.2 is not installed or not found in /usr/local/rbenv/versions/2.4.2
What it doesn't mention is that it is the targeted remote host and not the local one that is missing this version. I soon discovered that I wasn't the first of my colleagues to be confused by this.
Could a clarification along the lines of "…at the remote host" be beneficial here? I'll provide a PR if needed.

Looks good now, thanks.


What is the efficient way to get images using FAST API?

How to get an image using Fast API ?

Get an image of/from what?

from fastapi import FastAPI, File, UploadFile
from fastapi.responses import FileResponse
from pydantic import BaseModel

import numpy as np

from PIL import Image

import shutil

import tensorflow as tf
from object_detection.utils import label_map_util
from object_detection.utils import visualization_utils as viz_utils

app = FastAPI()

detect_fn = tf.saved_model.load('saved_model')
category_index = label_map_util.create_category_index_from_labelmap("label_map.pbtxt",use_display_name=True)

def load_image_into_numpy_array(path):
    """Load an image from file into a numpy array.

    Puts image into numpy array to feed into tensorflow graph.
    Note that by convention we put it into a numpy array with shape
    (height, width, channels), where channels=3 for RGB.

    Args:
      path: the file path to the image

    Returns:
      uint8 numpy array with shape (img_height, img_width, 3)
    """
    return np.array(Image.open(path))

def predict(image):
     # The input needs to be a tensor, convert it using `tf.convert_to_tensor`.
    image_np = np.array(image.file)
    input_tensor = tf.convert_to_tensor(image_np)
    # The model expects a batch of images, so add an axis with `tf.newaxis`.
    input_tensor = input_tensor[tf.newaxis, ...]

    # input_tensor = np.expand_dims(image_np, 0)
    detections = detect_fn(input_tensor)

    # All outputs are batches tensors.
    # Convert to numpy arrays, and take index [0] to remove the batch dimension.
    # We're only interested in the first num_detections.
    num_detections = int(detections.pop('num_detections'))

    detections = {key: value[0, :num_detections].numpy()
                   for key, value in detections.items()}
    detections['num_detections'] = num_detections

    # detection_classes should be ints.
    detections['detection_classes'] = detections['detection_classes'].astype(np.int64)

    image_np_with_detections = image_np.copy()

    viz_utils.visualize_boxes_and_labels_on_image_array(
          image_np_with_detections,
          detections['detection_boxes'],
          detections['detection_classes'],
          detections['detection_scores'],
          category_index,
          use_normalized_coordinates=True,
          max_boxes_to_draw=200,
          min_score_thresh=.50,
          agnostic_mode=False)
    print("Detected")
    return image_np_with_detections

@app.get("/")
async def main():
    return FileResponse(r"misdo.jpg")

@app.post("/uploadfile/")
async def create_upload_file(image: UploadFile = File(...)):
    predicted_image = predict(image)
    return predicted_image```

###ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type SpooledTemporaryFile).

Get an image of/from what?

Could you look at my code and suggest me a way to pass image and get inference from it?

You can post an image using a form file upload, the rest is up to you.
See here: https://fastapi.tiangolo.com/tutorial/request-files/

In what format would the uploaded image/file be?

You can post an image using a form file upload, the rest is up to you.
See here: https://fastapi.tiangolo.com/tutorial/request-files/

In what format would the uploaded image/file be?

Btw in your code, you are trying to predict with a SpooledTemporaryFile not the file itself, use image.file instead.

Btw in your code, you are trying to predict with a SpooledTemporaryFile not the file itself

Inside the predict function I would have used image.file

@Gokulnath31 Ups,i must've missed it.

@Gokulnath31 the file will be in whatever format you post it? If you post a jpg, you'll get a jpg, etc

@Gokulnath31 the file will be in whatever format you post it? If you post a jpg, you'll get a jpg, etc

I found the answer there is a function called read using that I read the image content as bytes and converted it

from fastapi import FastAPI, File, UploadFile
from fastapi.responses import FileResponse
from pydantic import BaseModel

import io

import numpy as np

from PIL import Image

import shutil

import tensorflow as tf
from object_detection.utils import label_map_util
from object_detection.utils import visualization_utils as viz_utils

app = FastAPI()

detect_fn = tf.saved_model.load('saved_model')
category_index = label_map_util.create_category_index_from_labelmap("label_map.pbtxt",use_display_name=True)

def load_image_into_numpy_array(data):
    """Load an image from file into a numpy array.

    Puts image into numpy array to feed into tensorflow graph.
    Note that by convention we put it into a numpy array with shape
    (height, width, channels), where channels=3 for RGB.

    Args:
      path: the file path to the image

    Returns:
      uint8 numpy array with shape (img_height, img_width, 3)
    """
    return np.array(Image.open(io.BytesIO(data)))

def predict(image):
     # The input needs to be a tensor, convert it using `tf.convert_to_tensor`.
    image_np = load_image_into_numpy_array(image)
    input_tensor = tf.convert_to_tensor(image_np)
    print(input_tensor.shape)
    # The model expects a batch of images, so add an axis with `tf.newaxis`.
    input_tensor = input_tensor[tf.newaxis, ...]

    # input_tensor = np.expand_dims(image_np, 0)
    detections = detect_fn(input_tensor)

    # All outputs are batches tensors.
    # Convert to numpy arrays, and take index [0] to remove the batch dimension.
    # We're only interested in the first num_detections.
    num_detections = int(detections.pop('num_detections'))

    detections = {key: value[0, :num_detections].numpy()
                   for key, value in detections.items()}
    detections['num_detections'] = num_detections

    # detection_classes should be ints.
    detections['detection_classes'] = detections['detection_classes'].astype(np.int64)

    image_np_with_detections = image_np.copy()

    viz_utils.visualize_boxes_and_labels_on_image_array(
          image_np_with_detections,
          detections['detection_boxes'],
          detections['detection_classes'],
          detections['detection_scores'],
          category_index,
          use_normalized_coordinates=True,
          max_boxes_to_draw=200,
          min_score_thresh=.50,
          agnostic_mode=False)
    print("Detected")
    return image_np_with_detections

@app.get("/")
async def main():
    return FileResponse(r"misdo.jpg")

@app.post("/uploadfile/")
async def create_upload_file(image: UploadFile = File(...)):
    img_data = await image.read()
    predicted_image = predict(img_data)
    return predicted_image

But I am facing some other issues with loading cuda libraries
**2020-11-05 13:45:52.639682: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-11-05 13:45:53.943552: E tensorflow/stream_executor/cuda/cuda_dnn.cc:328] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
2020-11-05 13:45:53.948468: E tensorflow/stream_executor/cuda/cuda_dnn.cc:328] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
INFO:     <IP_ADDRESS>:64114 - "POST /uploadfile/ HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 389, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 45, in call
return await self.app(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\applications.py", line 179, in call
await super().call(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\applications.py", line 111, in call
await self.middleware_stack(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\middleware\errors.py", line 181, in call
raise exc from None
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\middleware\errors.py", line 159, in call
await self.app(scope, receive, _send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\exceptions.py", line 82, in call
raise exc from None
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\exceptions.py", line 71, in call
await self.app(scope, receive, sender)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 566, in call
await route.handle(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 227, in handle
await self.app(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 41, in app
response = await func(request)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\routing.py", line 183, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\routing.py", line 133, in run_endpoint_function
return await dependant.call(**values)
File ".\api.py", line 85, in create_upload_file
predicted_image = predict(img_data)
File ".\api.py", line 47, in predict
detections = detect_fn(input_tensor)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\tensorflow\python\saved_model\load.py", line 509, in _call_attribute
return instance.call(*args, **kwargs)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\tensorflow\python\eager\def_function.py", line 780, in call
result = self._call(*args, **kwds)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\tensorflow\python\eager\def_function.py", line 846, in _call
return self._concrete_stateful_fn._filtered_call(canon_args, canon_kwds)  # pylint: disable=protected-access
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\tensorflow\python\eager\function.py", line 1848, in _filtered_call
cancellation_manager=cancellation_manager)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\tensorflow\python\eager\function.py", line 1924, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\tensorflow\python\eager\function.py", line 550, in call
ctx=ctx)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\tensorflow\python\eager\execute.py", line 60, in quick_execute
inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found.
(0) Unknown:  Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[{{node StatefulPartitionedCall/ssd_mobile_net_v2fpn_keras_feature_extractor/functional_1/Conv1/Conv2D}}]]
[[StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression/Reshape/_64]]
(1) Unknown:  Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[{{node StatefulPartitionedCall/ssd_mobile_net_v2fpn_keras_feature_extractor/functional_1/Conv1/Conv2D}}]]
0 successful operations.
0 derived errors ignored. [Op:__inference_restored_function_body_49628]
Function call stack:
restored_function_body -> restored_function_body
WARNING:  Detected file change in 'api.py'. Reloading...
2020-11-05 13:48:29.841520: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-11-05 13:48:34.271709: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2020-11-05 13:48:35.486899: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 1650 Ti computeCapability: 7.5
coreClock: 1.485GHz coreCount: 16 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 178.84GiB/s
2020-11-05 13:48:35.495410: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-11-05 13:48:35.508514: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
2020-11-05 13:48:35.518288: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-11-05 13:48:35.523537: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-11-05 13:48:35.533288: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-11-05 13:48:35.542287: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_10.dll
2020-11-05 13:48:35.559898: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-11-05 13:48:35.564893: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-11-05 13:48:35.568591: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-11-05 13:48:35.584917: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x21b301b2d00 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-11-05 13:48:35.589754: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-11-05 13:48:35.596274: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 1650 Ti computeCapability: 7.5
coreClock: 1.485GHz coreCount: 16 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 178.84GiB/s
2020-11-05 13:48:35.604391: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-11-05 13:48:35.608076: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
2020-11-05 13:48:35.611968: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-11-05 13:48:35.616459: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-11-05 13:48:35.620139: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-11-05 13:48:35.624158: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_10.dll
2020-11-05 13:48:35.629499: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-11-05 13:48:35.633295: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-11-05 13:48:36.284913: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-11-05 13:48:36.290404: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263]      0
2020-11-05 13:48:36.292787: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0:   N
2020-11-05 13:48:36.295533: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 2905 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1650 Ti, pci bus id: 0000:01:00.0, compute capability: 7.5)
2020-11-05 13:48:36.305660: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x21b52d976b0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-11-05 13:48:36.310961: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): GeForce GTX 1650 Ti, Compute Capability 7.5
INFO:     Started server process [2032]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     <IP_ADDRESS>:64415 - "POST /uploadfile/ HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 389, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 45, in call
return await self.app(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\applications.py", line 179, in call
await super().call(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\applications.py", line 111, in call
await self.middleware_stack(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\middleware\errors.py", line 181, in call
raise exc from None
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\middleware\errors.py", line 159, in call
await self.app(scope, receive, _send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\exceptions.py", line 82, in call
raise exc from None
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\exceptions.py", line 71, in call
await self.app(scope, receive, sender)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 566, in call
await route.handle(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 227, in handle
await self.app(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 41, in app
response = await func(request)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\routing.py", line 183, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\routing.py", line 133, in run_endpoint_function
return await dependant.call(**values)
File ".\api.py", line 86, in create_upload_file
predicted_image = predict(img_data)
File ".\api.py", line 43, in predict
print(input_tensor.shape())
TypeError: 'TensorShape' object is not callable
INFO:     <IP_ADDRESS>:64423 - "POST /uploadfile/ HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 389, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 45, in call
return await self.app(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\applications.py", line 179, in call
await super().call(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\applications.py", line 111, in call
await self.middleware_stack(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\middleware\errors.py", line 181, in call
raise exc from None
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\middleware\errors.py", line 159, in call
await self.app(scope, receive, _send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\exceptions.py", line 82, in call
raise exc from None
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\exceptions.py", line 71, in call
await self.app(scope, receive, sender)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 566, in call
await route.handle(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 227, in handle
await self.app(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 41, in app
response = await func(request)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\routing.py", line 183, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\routing.py", line 133, in run_endpoint_function
return await dependant.call(values)
File ".\api.py", line 86, in create_upload_file
predicted_image = predict(img_data)
File ".\api.py", line 43, in predict
print(input_tensor.shape())
TypeError: 'TensorShape' object is not callable
WARNING:  Detected file change in 'api.py'. Reloading...
2020-11-05 13:49:20.335698: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-11-05 13:49:23.845101: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2020-11-05 13:49:24.761712: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 1650 Ti computeCapability: 7.5
coreClock: 1.485GHz coreCount: 16 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 178.84GiB/s
2020-11-05 13:49:24.770216: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-11-05 13:49:24.778382: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
2020-11-05 13:49:24.784437: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-11-05 13:49:24.791746: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-11-05 13:49:24.799000: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-11-05 13:49:24.806297: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_10.dll
2020-11-05 13:49:24.820214: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-11-05 13:49:24.824928: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-11-05 13:49:24.828401: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-11-05 13:49:24.849003: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x12ce6fd1a00 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-11-05 13:49:24.855502: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-11-05 13:49:24.861839: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 1650 Ti computeCapability: 7.5
coreClock: 1.485GHz coreCount: 16 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 178.84GiB/s
2020-11-05 13:49:24.872308: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-11-05 13:49:24.877183: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
2020-11-05 13:49:24.881524: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-11-05 13:49:24.887515: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-11-05 13:49:24.891730: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-11-05 13:49:24.896201: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_10.dll
2020-11-05 13:49:24.899834: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-11-05 13:49:24.903427: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-11-05 13:49:25.510396: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-11-05 13:49:25.515865: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263]      0
2020-11-05 13:49:25.518655: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0:   N
2020-11-05 13:49:25.522499: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 2905 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1650 Ti, pci bus id: 0000:01:00.0, compute capability: 7.5)
2020-11-05 13:49:25.531706: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x12c887fcf70 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-11-05 13:49:25.537499: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): GeForce GTX 1650 Ti, Compute Capability 7.5
INFO:     Started server process [2024]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
(288, 432, 3)
2020-11-05 13:50:25.225508: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-11-05 13:50:26.551697: E tensorflow/stream_executor/cuda/cuda_dnn.cc:328] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
2020-11-05 13:50:26.557905: E tensorflow/stream_executor/cuda/cuda_dnn.cc:328] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
INFO:     <IP_ADDRESS>:64459 - "POST /uploadfile/ HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
T

It looks like this is your issue:
File ".\api.py", line 86, in create_upload_file
predicted_image = predict(img_data)
File ".\api.py", line 43, in predict
print(input_tensor.shape())
TypeError: 'TensorShape' object is not callable

It looks like this is your issue:
File ".\api.py", line 86, in create_upload_file
predicted_image = predict(img_data)
File ".\api.py", line 43, in predict
print(input_tensor.shape())
TypeError: 'TensorShape' object is not callable

I have one small doubt. In what format I can return an image as response?

You can return it as a jpg or png?

Returning in such format shows  internal server error

You can return it as a jpg or png?

Returning in such format shows internal server error

Show us the error so we can actually help you please

from fastapi import FastAPI, File, UploadFile
from fastapi.responses import FileResponse
from pydantic import BaseModel

import io

import numpy as np

from PIL import Image

import shutil
import os

os.environ["CUDA_VISIBLE_DEVICES"]="-1"
import tensorflow as tf
from object_detection.utils import label_map_util
from object_detection.utils import visualization_utils as viz_utils

app = FastAPI()

detect_fn = tf.saved_model.load('saved_model')
category_index = label_map_util.create_category_index_from_labelmap("label_map.pbtxt",use_display_name=True)

def load_image_into_numpy_array(data):
    """Load an image from file into a numpy array.

    Puts image into numpy array to feed into tensorflow graph.
    Note that by convention we put it into a numpy array with shape
    (height, width, channels), where channels=3 for RGB.

    Args:
      path: the file path to the image

    Returns:
      uint8 numpy array with shape (img_height, img_width, 3)
    """
    return np.array(Image.open(io.BytesIO(data)))

def predict(image):
     # The input needs to be a tensor, convert it using `tf.convert_to_tensor`.
    image_np = load_image_into_numpy_array(image)
    input_tensor = tf.convert_to_tensor(image_np)
    #print(input_tensor.shape)
    # The model expects a batch of images, so add an axis with `tf.newaxis`.
    input_tensor = input_tensor[tf.newaxis, ...]

    # input_tensor = np.expand_dims(image_np, 0)
    detections = detect_fn(input_tensor)

    # All outputs are batches tensors.
    # Convert to numpy arrays, and take index [0] to remove the batch dimension.
    # We're only interested in the first num_detections.
    num_detections = int(detections.pop('num_detections'))

    detections = {key: value[0, :num_detections].numpy()
                   for key, value in detections.items()}
    detections['num_detections'] = num_detections

    # detection_classes should be ints.
    detections['detection_classes'] = detections['detection_classes'].astype(np.int64)

    image_np_with_detections = image_np.copy()

    viz_utils.visualize_boxes_and_labels_on_image_array(
          image_np_with_detections,
          detections['detection_boxes'],
          detections['detection_classes'],
          detections['detection_scores'],
          category_index,
          use_normalized_coordinates=True,
          max_boxes_to_draw=200,
          min_score_thresh=.50,
          agnostic_mode=False)
    #print(detections)
    return Image.fromarray(image_np_with_detections)

@app.get("/")
async def main():
    return FileResponse(r"misdo.jpg")

@app.post("/uploadfile/")
async def create_upload_file(image: UploadFile = File(...)):
    img_data = await image.read()
    predicted_image = predict(img_data)
    #print(predicted_image.shape)
    #predicted_image.save("Predicted.jpg")
    return predicted_image

Traceback (most recent call last):
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 389, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 45, in call
return await self.app(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\applications.py", line 179, in call
await super().call(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\applications.py", line 111, in call
await self.middleware_stack(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\middleware\errors.py", line 181, in call
raise exc from None
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\middleware\errors.py", line 159, in call
await self.app(scope, receive, _send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\exceptions.py", line 82, in call
raise exc from None
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\exceptions.py", line 71, in call
await self.app(scope, receive, sender)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 566, in call
await route.handle(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 227, in handle
await self.app(scope, receive, send)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\starlette\routing.py", line 41, in app
response = await func(request)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\routing.py", line 199, in app
is_coroutine=is_coroutine,
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\routing.py", line 122, in serialize_response
return jsonable_encoder(response_content)
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\encoders.py", line 147, in jsonable_encoder
sqlalchemy_safe=sqlalchemy_safe,
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\encoders.py", line 94, in jsonable_encoder
sqlalchemy_safe=sqlalchemy_safe,
File "c:\users\goku\anaconda3\envs\tensorflow2.0\lib\site-packages\fastapi\encoders.py", line 139, in jsonable_encoder
raise ValueError(errors)
ValueError: [ValueError('dictionary update sequence element #0 has length 3; 2 is required'), TypeError('vars() argument must have dict attribute')]

You must return a fastapi response with the image in a binary format, and with the correct mimetype

from io import BytesIO

output = BytesIO
predicted_image.save(output, 'png')

return Response(output.getvalue(), media_type='image/png')

In the future, please consult the documentation, and read the error messages you receive.
https://fastapi.tiangolo.com/advanced/custom-response/#response

Thanks for the help here @Mause and @ycd ! 🍰
Thanks for closing the issue @Gokulnath31

Sorry for the long delay! 🙈  I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.


Revert "Bump react-to-print from 2.14.15 to 2.15.1 in /horreum-web"

This reverts commit 079ef80b41feaab49b79933c04f59230e135ee03.

Why does this need to revert?

@willr3 this commit included changes to package-lock.json that are excessively verbose. The whole file was reformatted.

@willr3 this commit included changes to package-lock.json that are excessively verbose. The whole file was reformatted.

Ahh, I see it's reverting a recent commit.  I'll be investigating what's not working as expected in the recently added workflow that is supposed to re-format to the correct format.


feat: Add prometheus-adapter port 6443 to recommended sec groups

Description
I wonder if kubernetes-sigs/prometheus-adapter can be added to the default recommended security groups.
When deployed with kube-prometheus/kube-prometheus-stack/helm/manifests it uses port 6443.
Thinking if metrics-server could be added by default so can prometheus-adapter.
Motivation and Context
To have the Kubernetes aggregated API v1beta1.metrics.k8s.io/default available by default if using the prom-adapter.
Breaking Changes

None
How Has This Been Tested?

[] I have updated at least one of the examples/* to demonstrate and validate my change(s)
[] I have tested and validated these changes using one or more of the provided examples/* projects

This PR is included in version 19.6.0 :tada:

I used to add precisely the same rule for KEDA, another metrics server(among other things). not sure if it's worth mentioning in the comments(and docs?) that it's not only prometheus-adaptor but also KEDA which are both covered by the same ingress rule.
Why is Kubernetes unable to get metrics from KEDA? | Amazon Elastic Kubernetes Service (EKS)

yes, that would be great to add a note on if you want to submit a PR


feature:  Ability to toggle specific services

Did you check the docs?

[X] I have read all the noice.nvim docs

Is your feature request related to a problem? Please describe.
This is a great looking plugin.  The issue is how to turn it down.  I don't want all the noise, all the time.  Furthermore, there are many reasons to call a command to then study the output.  Something that cannot be done with a chip that only displays for a few seconds.
All in all, I really like this plugin.  However, it is mostly a distraction without the ability to turn things off without also having to figure out how to channel the information back to where the default has it.
Finally, my next step would be to thoroughly document how to customize the look and feel of the components.  Somehow  there needs to be a way to configure the high groups, the channels, the animations all in one config slot for each service (notify, cmd, messages etc. - I don't know all them).
Describe the solution you'd like
xx
Describe alternatives you've considered
xx
Additional context
xx

Did you see Noice Disable ?

I did try the Noice disable.  It seems to disable a lot of things.  I'm looking for a more fine-grained capability.

You can already enable/disable multiple things. Check the readme


[deliver] Invalid screen resolution images can be uploaded as Apple TV and Mac screenshots

Issue Description
Similar to #14585 but from a slightly different root cause. If an image in the directory happens to be a rotated version of a valid screen resolution (i.e 2880 x 1800 (the portrait equivalent of a Mac screenshot (2880 x 1800)) then it'll be incorrectly classified as that screen size.
This is because for all images that aren't in the 'appleTV' directory, it attempts to map both landscape and portrait versions however this can lead to invalid cases with Mac, Apple Watch and legacy iOS screenshots that don't have a status bar.
Command executed
bundle exec fastlane deliver
Complete output when running fastlane, including the stack trace and command used

 n/a

Environment

 n/a

Fix was merged and released 👍🏼


Makie showing both standalone and plot pane in Juno

I thought I saw a discussion about this recently but I can't find it.
When plotting in Makie within Juno, it seems to pop up the standalone GL window and also tries to plot in the plot pane. Is there a way to disable the plot pane? From #87 I thought I could do Makie.use_plot_pane(false) but that doesn't seem to be defined anymore.
edit:this is on Makie 0.9.0

You need to disable it in the atom Julia settings!

It would be useful to have a programmatic way of doing it - usually I want the plot pane on and use it when I'm using Plots.jl. For interactive stuff I'm using Makie with the separate GL window, so it would be useful to be able to have my code determine where the plots go, rather than going into the Atom settings when I switch between projects.

Is there also a way to do the opposite? I want to only use the plot pane, not the external window. The external window demands the input focus upon update. As a result I have to alt-tab back into atom to enter the next graphics command.

@krcools see https://github.com/JuliaPlots/Makie.jl/issues/341#issuecomment-482921928

Thank you. This solved things for me.


Optimize validator API response time during epoch transition with large validator number

Related to #7443
We addressed this via #7433 by augmenting the number of threads, but we investigate more on Beacon Node performance when handling VC calls at epoch transition.
Things we could look into are these APIs performances that are called at epoch transition

Duties retrieval: getAttestationDuties, getSyncCommitteeDuties and getProposerDuties
Subscription: subscribeToBeaconCommittee (and subscribeToSyncCommitteeSubnets)

Is this still being investigated? Any progress solving this one?

@zikarad This is currently in our backlog and is not actively investigated. Are you currently affected by poor performance during epoch transition?


New connection wizard redesign

We have too many drivers. It is inconvenient to manage them in tree view.
We could try to use tiles for the first page (like this: https://github.com/prasser/swttiles).
Also we need tags, colors and better icons.

 Nebula Gallery seems to be more adaptable.

Need to finish this before 5.3


readme should contain the exact list of handled bug types

with a short description of how the repair is implemented

Added.


Version 2.0 doesn't keep folders named like Tags

The scenario is just like the one described in #161 : I have an /_assets folder and inside it some css, js, img, fonts, foo, bar.... folders.
In config.yml:
assets :
  assets    : [*]
  sources   : [_assets]
  prefix    : /assets

It used to work like a charm in betas before release 2.0. Now it seems that if a folder is named like a Tag (ie:css, js, img) the hierarchy won't be mantained, while using some folders names like fonts, foo, bar it still works as expected.

@gasparesganga I don't get what you mean, can you clarify a bit or provide and possibly provide an example as a repo I can clone and turn into a test case?

Which beta are you referring to as well.  The 2.0 beta on master that's been there for months or a beta that we released for 2.0 or a 1.0 beta?

I see what you mean now, if you set it to "_assets" you want the subfolder structure kept.  So you want "_assets/" as the primary source you want "css/file.scss" to be "/assets/css/file.css"?

Exactly. My folder structure is _assets/css/file.css and using the tag
{% stylesheet css/file.css %}
I would expect /assets/css/file.css as output, keeping the subfolder structure indeed.
PS: I was referring to 2.0.0.pre.beta1.

Yes, that's probably the result of me appending sources rather than replacing them because there was a user who got caught by that.  I might add an option or just detect it, which would you prefer?

Maybe the autodetection would be a more consistent behaviour (as a user, I can't see why certain folder names should act differently), but any kind of solution would work for me: a config option, some kind of quoting/escaping in the tags and filters, etc.

Technically it's not behaving different, it's behaving exactly as it was designed, which is to use the sub-folders of your asset base folders as part of the path.  So if your base folder is _assets and you have css/* it will use css/* but if you have _asset/css as a base folder it will not use css as part of that path, that is a base asset folder.
What is happening here is that we append your path, not prepend your path, so it's actually pulling your assets from _assets/css before it searches _assets and assumes it's a sub-path... which intern strips your sub-directory and that sub-directory from your final path.
What we need to do here is detect if you want to use _assets as the base directory and if you do then remove our base directories instead of appending your base directory which will bring that back, otherwise you would have to do _assets/css/css/*.scss to get that back.

Thanks for the clarification, I hadn't thought about it that way. But what puzzled me was the fact that when a subdirectory is named differently, it works. Also sub-sub-diretories are kept. Here is an example:
_assets/css/file1
_assets/css/x/file2
_assets/dummy/file3

produces:
/assets/file1
/assets/x/file2
/assets/dummy/file3

So both subfolder dummy and sub-subfolder x are kept. I assumed only the subfolders named like tags (image, img, stylesheet, css, javascript, js, etc.) were dropped.

Yes, that's the right behavior so here let me use those to exaplify the feature bug:
Right now
sources:
- _assets/

which results in:
sources:
- _assets/css
- _assets/

Which results in Sprockets picking from _assets/css first, which means "css" is not a sub-directory so it's not going to be apart of the path which will result in: _asset/css/file1 # => /assets/file1 which is the standard behavior, we did not detect a sub-folder, it was a base directory.
Previously
sources:
- _assets/

would result in:
sources:
- _assets/

Which would result in Sprockets picking from _assets first which means that "css" is a sub-directory so it's going to detect that the path will ship as /assets/css/file1
The bug here was that a user added a custom folder but wanted to retain ours, it led to a couple dozen messages of me assuming they did something wrong but  they figured out that they added our folders back after I pointed out the config example, which resulted in it working, I considered that a bug so I started appending your sources rather than replacing ours.
What I need to do now is further address that bug through your bug by now grepping _assets in the sources list and replacing rather than appending in only on that scenario.  This way if you want to use our container as your base folder, then by all means do it.
That might actually also end up solving #195 for @igolden too because now I can tell him to set _assets as his sole source and the prefix to "/" and in theory it will do exactly what he wants.

I didn't consider the default sources list (I also assumed they were replaced and not appended) thus I speculated about tag names, my bad.
Now it's all clear, thank you for the fix!


Is "AF2 initial guess" supposed to have access to the standard AF2 databases?

Hello,
My installation seems to be running as expected and it produced some beautifully-folded peptide binders with low pae_interaction scores for my project. My question is how is the "AF2 initial guess" pipeline able to generate a predicted structure without access to all the same databases that are normally required to run AF2? i.e.:
    bfd/                                   # ~ 1.8 TB
    mgnify/                                # ~ 64 GB
    params/                                # ~ 3.5 GB
    pdb70/                                 # ~ 56 GB
    pdb_mmcif/                             # ~ 206 GB
    uniclust30/                            # ~ 87 GB
    uniref90/                              # ~ 59 GB

Did I miss an important part of the installation? Is the predict.py script somehow running the full AF2 installation on my machine?
I just want to make sure that my dl_binder_design installation is configured properly before I put too much trust into the pae_interaction scores and spend money on peptide orders.
Thank you,
Robert Szabla

I have the same question.

Thank you, that is very helpful!


formatter should translate HTML entities to code points where possible

cf https://github.com/tc39/ecma262/issues/404#issuecomment-1218537924
See also https://github.com/tc39/ecmarkup/issues/476.

Additionally, can the linter require the formatter's output in this case?

There's a --check flag to the formatter which asserts that the input is already formatted in the form which would be output by the formatter, which is intended to serve that purpose. (We use that in CI on 262.)


Expression Term Substitution

User Story
As a TSB developer I want to substitute a term in an upf expression with another term to evaluate an expression given an assignment and to perform rewritings of the expression.
Acceptance Criteria

[x] Given an expression phi with fluents x and y, it must be possible to substitute a constant value for x and a value for y, such that a call to the simplifier on the resulting expression yields a constant
[x] Given an expression phi it must be possible to substitute a sub-term x + 3 with a fresh variable y

Additional Material

This is analogous to the pysmt substituter, without function interpretation: https://github.com/pysmt/pysmt/blob/master/pysmt/substituter.py
The substituter shall take in input a dict-like object mapping terms to substitute to their substitution
Pay attention and document what happens if substitutions {a: b, b:c} are used on a formula containing a (see: https://github.com/pysmt/pysmt/blob/master/pysmt/substituter.py#L103)

Attention Points

Use a dagwalker
Pay attention to the caching mechanism

Done in #29


build on windows failed

go version : go1.11.2 windows/amd64
github.com/Drakirus/go-flutter-desktop-embedder/flutter
......\github.com\Drakirus\go-flutter-desktop-embedder\flutter\flutter.go:200:17: cannot use _Ctype_ulong(len(data)) (type _Ctype_ulong) as type _Ctype_ulonglong in argument to func literal

Does the fix works ?


wont work on this site

doesn't work on https://www.rockmods.net/

Thanks for your input. I will check it out and try to make it work. Depending on the site's implementation of anti-adblock feature it may be possible - or not - to provide a working solution.
Either way, stay up to date with this issue's status. 😁

Unfortunately, due to the nature of how UserScripts work and what access to the browser API they have, it is not possible for a UserScript to block the given anti-adblock.
Fortunately, though, you could use an adblocker and subscribe to filter lists I maintain, in particular, you'll need:

AdVoid.Core and,
AdVoid.Scriptlets.AntiAntiAdBlock

You'll need to add both filter lists to your adblocker and the anti-adblock bug will be gone, note, AdVoid.Scriptlets.AntiAntiAdBlock is the one doing the blocking on the particular site you mentioned.
😉

Thanks boss

No prob, fam 😎


Perform some transformations on IR to legalize for GLSL

When outputting GLSL from a Slang or HLSL entry point, we need to translate any parameters or results of an entry-point function into global declarations of in or out parameters, as needed by GLSL.
This change adds these transformations at the IR level, so that they don't need to complicate the emit logic.
More detailed changes:

Make render0 test use IR. It passes out of the box.

Fix test runner to not always dump diffs on failures
I accidentally initialized an option to true instead of false when working on debugging the Travis CI failures.

Special-case output for component-wise multiplication to handle GLSL matrixCompMul()

Handle GLSL vs. HLSL output for calls to mul()

Output proper layout(std140) on GLSL constant buffer declarations

Require appropriate GLSL extension when emitting explicit layout(offset = ...) on constant buffer members

TODO: Need to avoid requiring this extension in cases where the offsets are what would be computed anyway.
Realistically, should probably be emitting code with explicit padding, etc. to guarantee layouts.

Add an IR-based pass to translate entry point functions by eliminating their input/output parameters and replacing them with global variables.

Demangle names when calling target intrinsics
The lowering to the IR will turn a call like sin(foo) into a call to a function declaration with a   mangled name like _S3sin.... This works fine when the user is calling their own functions, since the   name mangling will apply to both the definition and use sites, but for builtin functions it obviously   isn't what we want.
This change makes it so that we demangle the name of an instrinsic function just enough so that we can   extract the original simple name, and make a call using that.

These changes do nor provide 100% of what we need when translating to GLSL, so the cross-compile-entry-point test still hasn't been flipped over to use the IR (even though that is the test case I've been using to develop these changes).

AppVeyor didn't pick up this PR, so I will close and re-create.


shopify graphql admin api Message: slice doesn't exist in any of 1 places to unmarshal, Locations: [], Extensions: map[code:graphql_decode_error

I am following the Shopify GraphQL Admin API documentation on Orders here:
https://shopify.dev/docs/api/admin-graphql/2024-07/queries/orders
My first 3 retrieved orders work without an error. Then when retrieving again I get this error:
Message: slice doesn't exist in any of 1 places to unmarshal, Locations: [], Extensions: map[code:graphql_decode_error]
Here my my schema:
	var q struct {
		Orders struct {
			Edges []struct {
				Cursor string
				Node   struct {
					ID                       string
					Test                     bool
					Name                     string
					Email                    *string
					DisplayFinancialStatus   string
					DisplayFulfillmentStatus string
					ReturnStatus             string
					Note                     string
					ClientIP                 string
					Closed                   bool
					ClosedAt                 *time.Time
					CancelledAt              *time.Time
					CustomAttributes         []struct {
						Key   string
						Value string
					}
					Customer struct {
						Email string
					}
				}
			}
			PageInfo struct {
				EndCursor   string
				HasNextPage bool
			}
		} `graphql:"orders(first: $first, after: $after)"`
	}

Here is the WithDebug(true) schema response stored in the graphql.Errors object:
{
	"data": {
		"orders": {
			"edges": [
				{
					"cursor": "x==",
					"node": {
						"id": "gid://shopify/Order/x",
						"test": false,
						"name": "#1004",
						"email": null,
						"displayFinancialStatus": "PAID",
						"displayFulfillmentStatus": "UNFULFILLED",
						"returnStatus": "NO_RETURN",
						"note": "unfulfilled",
						"clientIp": "x",
						"closed": false,
						"closedAt": null,
						"cancelledAt": null,
						"customAttributes": [],
						"customer": null
					}
				},
				{
					"cursor": "x==",
					"node": {
						"id": "gid://shopify/Order/x",
						"test": false,
						"name": "#1005",
						"email": null,
						"displayFinancialStatus": "REFUNDED",
						"displayFulfillmentStatus": "FULFILLED",
						"returnStatus": "NO_RETURN",
						"note": "fulfilled then refunded (not returned)",
						"clientIp": "x",
						"closed": true,
						"closedAt": "2024-08-29T02:07:04Z",
						"cancelledAt": null,
						"customAttributes": [],
						"customer": null
					}
				},
				{
					"cursor": "x==",
					"node": {
						"id": "gid://shopify/Order/x",
						"test": false,
						"name": "#1006",
						"email": null,
						"displayFinancialStatus": "PAID",
						"displayFulfillmentStatus": "FULFILLED",
						"returnStatus": "IN_PROGRESS",
						"note": "fulfulled and return in progress",
						"clientIp": "x",
						"closed": false,
						"closedAt": null,
						"cancelledAt": null,
						"customAttributes": [],
						"customer": null
					}
				}
			],
			"pageInfo": {
				"endCursor": "x==",
				"hasNextPage": false
			}
		}
	},
	"extensions": {
		"cost": {
			"requestedQueryCost": 8,
			"actualQueryCost": 8,
			"throttleStatus": {
				"maximumAvailable": 2000.0,
				"currentlyAvailable": 1992,
				"restoreRate": 100.0
			}
		}
	}
}

I noticed that extensions was included in the response and assumed that the error was related so I attempted to add this structure at the root of the query which failed, then at the orders level of the query which failed:
Extensions struct {
	Cost struct {
		RequestedQueryCost int64
		ActualQueryCost    int64
		ThrottleStatus     struct {
			MaximumAvailable   int64
			CurrentlyAvailable int64
			RestoreRate        int64
		}
}

Extensions did not solve the error. Probably because it does not contain a slice.
I tried with and without pointers on multiple different optional object types and it didn't seem to make a difference either.
This issue may be related to #139
It works fine with QueryRaw and json.Unmarshal.

First, the extensions field is an optional response. To get that data you need to use a custom option (docs).
I can't reproduce this issue locally. Maybe the server randomly returns an inconsistent response structure so the decoder can't parse the response.
If it's possible you can try again with this branch https://github.com/hasura/go-graphql-client/pull/141/files to see if the issue can be fixed
go get github.com/hasura/go-graphql-client@fix-unexpected-array-deserialization-error


Image not rendering in PDF doc.

Hm, I thought I got that working on the branches build before the template stuff got merged to master. Probably a versioning issue; my local build still works fine. I'll poke at it tomorrow.


Add method get_device_info

This PR adds a get_device_info method that returns a Python dictionary parsed from a descriptor XML file (dmr/ddd.xml).
Some of the values that can be extracted from it are: deviceType, friendlyName, manufacturer, modelName, modelNumber and UDN (a unique identifier).
It also fixes #28 by preventing the variable res from being referenced before assignment after try...except statements.
@florianholzapfel did I put xmltodict in the right field inside setup.py?

thank you!


Add romanian translation

Language to Add
Romanian (RO)
Confirmation of Intent

[X] I confirm I'm offering to help translate for this new language via Crowdin.

Hi @om226,
Thanks for offering to translate BookStack into Romanian. I have now enabled this language option in Crowdin:
https://crowdin.com/project/bookstack/ro
Note, I may remove this option again if progress is minimal after some time.


[FEATURE] Update twitter logo to X

Feature Description
Update the logo from bird to X
Possible Implementation
I can remove the old logo and write the code for new X logo.
Have you spent some time checking if this feature request has been raised before?

[X] I checked and didn't find a similar issue

Have you read the Contributing Guidelines?

[X] I have read the Contributing Guidelines

Are you willing to submit a PR?
Yes, I am willing to submit a PR!

Please assign this issue to me

This repository does not contain the source code for the website, closing this as invalid.


Empty new sheet created from selected rows when using duckdb backend

cat << EOF > /tmp/test.csv
col_one,col_two,col_three
first,second,third
fourth,fifth,sixth
EOF
pip install vdsql
pip install duckdb
pip install 'ibis-framework[duckdb]'

Downloaded duckdb cli and unzipped from https://github.com/duckdb/duckdb/releases/download/v0.3.4/duckdb_cli-osx-universal.zip

./duckdb my.duckdb
create table ihub as select * from '/tmp/test.csv';
Ctrl-d to exit
vdsql my.duckdb

|f       to select rows with 'f' in them

"        to create a new sheet from selected rows

Notice the table is empty

This works in version v2.12dev


Add ContravariantDerivation for cats.Show to examples

Adds the implicits required to derive cats.Show type classes to the examples project and also adds a runnable test in the tests project.

Thank you for your work on this! I've just finished cleaning it up and merging it!


VSCode crashes every night

I'm working daily with VSCode and usually left it opened during night.
Most of the time, when unlocking my computer, I find out VSCode has crashed:

What can I do to help track down the problem ?
I'm using VSCode 0.10.6 (but I had the problem with previous versions as well) on Windows 10 x64.

#508


"Sturu" is listed in the drop-down menu

Description:
When user writes "Sturu" the location appears in the drop-down menu next to the comune and the county witch is a part according to the law
Precondition:
The website is up an running.

Step 1
Write in the search bar "Sturu"

Expected results
The location appears in the drop-down menu as "Sturu, Alba (Arieșeni)"


Adds encoding support to ShapeFileLayers

pyshp Reader allow us to set what type of encoding should be used when reading a shape file. Geoplotlib wrapper does not contain this parameters which are very useful. This PR adds this features to the wrapper and uses the same default values from pyshp when they are not provided by the users.

See: https://github.com/GeospatialPython/pyshp/blob/master/shapefile.py

thanks!


More cleaning

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

6 of 6 (100.0%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.04%) to 36.724%

Totals

Change from base Build<PHONE_NUMBER>:
-0.04%

Covered Lines:
5257

Relevant Lines:
14315

💛  - Coveralls


Support Mozilla TTS engine

Hi, Mozilla TTS sounds awesome, and I think it would be a good engine addition to talkey.

That's actually very interesting. The inverse of their DeepSpeech dataset? I didn't know it exists.

Sorry, I liked the STT, here is their TTS, they are both based on the Common Voice datasets

I have to say, that voice is a really good quality. Installation is huge, but not difficult. It seems like using it as a HTTP service would be easiest?

I wasn't aware that they had their HTTP service (if I understood you well). I would personally prefer to self host it for privacy concerns, but I can see why the regular user would prefer not to install things and rely on existent services.
If supporting both options is not much work, that would be awesome :)

When you install it you have the tts library which takes a long time to startup, and tts-server service which provides an http api.
It's self hosted in both cases.
Either would work, but deploying the service on a more powerful server would give faster speech results, for example.

I see, then the HTTP API server suits my case perfectly.


How to avoid tinycolor2 dependency when using a custom Loader ?

In the documentation, it's written :

tinycolor2 is a peer dependency of hoc-react-loader. It handles color picking for the default loading indicator. You don't have to install it if you use your own loading indicator.

But if I do import loader from 'hoc-react-loader', it crash if I don't have tinycolor2 as dependency. (I am using my own custom loader)
I have to import it like that import from 'hoc-react-loader/build/core' to avoid tinycolor2 dependency.
But if the build structure change, I will have a problem with that kind of import.
How could we import hoc-react-loader as default without having tinycolor2 dependency ?

see #91


Update features ibm_catalog.json

Description
Makes the list of features parallel (start with verb).
Merges into PR #459
Release required?

[x] No release
[ ] Patch release (x.x.X)
[ ] Minor release (x.X.x)
[ ] Major release (X.x.x)

Release notes content

Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
/run pipeline

Checklist for reviewers

[ ] If relevant, a test for the change is included or updated with this PR.
[ ] If relevant, documentation for the change is included or updated with this PR.

For mergers

Use a conventional commit message to set the release level. Follow the guidelines.
Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
Use the Squash and merge option.

@ocofaigh pushed an update. Tried to fix the monitoring/AT feature.

anything else, @ocofaigh?

@ocofaigh if still not correct, just commit your change here and merge.


Convert projects to PCL

Tried to create the main Synology PCL but some .NET references are not ready to be ported like System.ComponentModel.DataAnnotations, System.ComponentModel and System.Diagnostics.StackTrace

Use the PCL branch for the implementation.
The PCL is an hard way but a multiplatform project can be an alternative but the nuspec must be rewritten and I don't know how the dependencies works with the multiplatform solution

All projects are converted to PCL but Visual Studio 2015 Update 2 gives error on the AnyCPU configuration but it create the dll and AppVeyor doesn't build.

Everything works, but the nuget package must be tested with pcl and non-pcl projects


ImportError: No module named tensorflow after installing from sources

I installed TF from sources because I do not have an internet access. I used @damienmg tricks to replace git repositories by internal sources for eigen, six, gemmlowp, re2, libpng and jpegsvrc.
Finally the line bazel build -c opt //tensorflow/cc:tutorials_example_trainer compiled successfully (however there were several warnings of index subscript above limits and comparison between signed and unsigned (I figure it is because it is a beta version of eigen)).
And I ran the example bazel-bin/tensorflow/cc/tutorials_example_trainer
It ran and the end line was :
000002/000005 lambda=2.000000 x =[0.894427 -0.447214] y =[1.788854 -0.894427]
However when I try to run python wherever import tensorflow fails with error no module named tensorflow (I am using anaconda if it is important and when I ran the configure the path for python was correct).
Where do you think I got it wrong ?

My mistake I did not indeed install it through pip yet therefore the result

My mistake I did not indeed install it through pip yet therefore the result


WIP: fix some formatting and first idea for sending hostINfo to hub

My first idea on how to solve ticket DEV-361.
Also includes format fixes from goformat.
Copied over some dependencies from cagent and put into borrowed.go for now.
Feedback for the two TODOs would be nice.

@thorstenkramm Do we need a detailed system info as separate fields(the same way it is done in cagent) or just some basic info, like uname&fqdn?

Updated based on internal discussion:

hostInfo will only be sent once to the hub
in error case all errors will be sent and the partially retrieved information will also be transmitted


[Skill Template][TypeScript] Create Skill Template project structure

Description

Update Skill-Template folder structure (C# and TS)
Create TS project structure
Add simple logic to the generator
Implement TSLint
Add Skill Template TS documentation

Related to #941
Testing Steps

Go to AI/templates/Skill-Template/src/typescript/generator-botbuilder-skill/generators/app/templates
Check the project structure, should be similar to C# solution

Checklist

[x] I have updated related documentation

These changes were already added in #950 (merged)


dotnet command not found

Problem encountered on https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install
Operating System: macos
I installed .Net core using dotnet-sdk-3.1.101-osx-x64.pkg. When i tried dotnet command in cmd i am getting -bash: dotnet: command not found. I restarted terminal but no use.
mac os : Mojave version 10.14.6

issue resolved ...


Migrate to package:web from dart:html

Feature description
https://dart.dev/interop/js-interop/package-web
../../../.pub-cache/hosted/pub.dev/datadog_flutter_plugin-2.5.0/lib/datadog_flutter_pl
ugin_web.dart:12:8: Error: Dart library 'dart:html' is not available on this platform.
import 'dart:html' as html show window;

When I try build to wasm, It's not working because of dart:html.
Flutter team recommend package:web instead of dart:html.
Proposed solution
No response
Other relevant information

I've made the initial changes for this migration, but it needs additional testing and I need to determine if this requires a major version bump (as it puts our minimum Dart version at 3.3.0 (Flutter 3.19+).  We still have serval users on Dart < 3.3, so this would potentially break updates for them.

@fuzzybinary Thank you for your support!
After merge PR #617  to develop branch, I will check in my project.

This is fixed in 2.7.0, which now has a minimum Dart target of 3.3


bug14: Another change

Removing. Used to demonstrate how to fix multiple issues as separate pull requests.


Fixes audit warnings after upgrading populations-react

@mklewandowski Can I ping you on this to confirm that the new dependencies build without warning for you?


Removing InvalidVpcId Not Found error from terminal codes

Issue #, if available: 1362
Description of changes:

Removed InvalidVpcId.NotFound from terminal codes for VpcEndpoint resource as 'NotFound' errors should not be included in terminal codes as per prior discussions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

/lgtm


Testnet's execution difference at block 4516236

Transaction 22ad5bb3f147e493857d5354764ea6f9e3ba7435f4fee60a63dbf4ca5315b627, ours:
{
   "result" : {
      "txid" : "0x22ad5bb3f147e493857d5354764ea6f9e3ba7435f4fee60a63dbf4ca5315b627",
      "executions" : [
         {
            "stack" : [
               {
                  "type" : "Integer",
                  "value" : "1"
               }
            ],
            "vmstate" : "HALT",
            "contract" : "0x55a55620682b43a8539852b93cd2c792c8b4df94",
            "notifications" : [],
            "gas_consumed" : "1.518",
            "trigger" : "Application"
         }
      ]
   },
   "jsonrpc" : "2.0",
   "id" : 1
}

Theirs:
{
   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : {
      "txid" : "0x22ad5bb3f147e493857d5354764ea6f9e3ba7435f4fee60a63dbf4ca5315b627",
      "executions" : [
         {
            "trigger" : "Application",
            "stack" : [],
            "vmstate" : "FAULT",
            "gas_consumed" : "0.183",
            "notifications" : [],
            "contract" : "0x55a55620682b43a8539852b93cd2c792c8b4df94"
         }
      ]
   }
}

It's failed very early on, so it's something quite simple, though strange.

Mainnet:
file BlockStorage_3200000/dump-block-3167000.json: block 3166082, changes number mismatch: 9 vs 13

Testnet also fails to synchronize state roots, even though 22ad5bb3f147e493857d5354764ea6f9e3ba7435f4fee60a63dbf4ca5315b627 now works exactly the same way (something happened to previous transcations).


[$1000] Double-tapping on an existing emoji reaction sends multiple API requests

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

On Account A, open a chat and react to any message with an emoji.
On Account B, open the same chat and find the message with the emoji reaction.
On Account B, double-click on the emoji reaction that you added from Account A.

Expected result:
The emoji reaction should toggle between added and removed. Only one API request should be sent per click
Actual result:
The emoji reaction remains added after double-clicking. Multiple API requests are sent per click
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[ ] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.3.5
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/43996225/234349063-40ae9c1c-7123-4da4-ae6a-52d452d3bd65.mp4
https://user-images.githubusercontent.com/43996225/234349079-4347e867-67fb-48ed-a8a1-21b049c060d7.mp4
Expensify/Expensify Issue URL:
Issue reported by: @nathan-mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1682247959692439
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01f007b9fd26168fd7
Upwork Job ID:<PHONE_NUMBER>408948736
Last Price Increase: 2023-05-30

Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Bug0 Triage Checklist (Main S/O)

[ ] This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
[ ] This bug is not a duplicate report (check E/App issues and #expensify-bugs)

If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead

[ ] This bug is reproducible using the reproduction steps in the OP. S/O

If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
If the reproduction steps aren't clear and you determine the correct steps, please update the OP.

[ ] This issue is filled out as thoroughly and clearly as possible

Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.

[ ] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Yup, this is odd: https://drive.google.com/file/d/1_4hEFTXBd781XpDNDIv7J0f4KWbjZh3X/view?usp=sharing

Job added to Upwork: https://www.upwork.com/jobs/~01f007b9fd26168fd7

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

Triggered auto assignment to @yuwenmemon (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

Thanks @hoangzinh!
@yuwenmemon @twisterdotcom https://github.com/Expensify/App/pull/18122 is about creating a new button component and preventing multiple clicks. So it makes sense to hold this and try the above proposal.

Sounds good - place a hold on this and switched it to Weekly

Still on hold.

Hey @twisterdotcom just tested on newest release android native (v1.3.14-14) and I can still reproduce the bug. I will attach a video.  https://github.com/Expensify/App/assets/111440031/7f778af7-d1cf-4312-9899-e39ea5393ca7

@twisterdotcom Yes! I'll start with reviewing the proposal from @hoangzinh.

How are we doing here?

No Melv. @hoangzinh is on the case.

I think that we should put this on hold for now https://expensify.slack.com/archives/C049HHMV9SM/p1685714808977889?thread_ts=1685548338.234339&cid=C049HHMV9SM
https://github.com/Expensify/App/issues/16506

Issue is still on HOLD

Still on HOLD

Still on hold.

I can't reproduce this anymore. Can anyone else?

Yeah I just retested and this issue is for sure no longer reproducible.


ARROW-13002: [C++] Add a check for the utf8proc's version in CMake

It adds a function in CMake to retrieve the used version of the utf8proc library and sets a required version to be used by CMake.
The PR complements the 10468 one, that fixed the bug related to broken builds in Ubuntu 18.04

@github-actions crossbow submit test-ubuntu-18.04-cpp-static test-ubuntu-18.04-cpp

@github-actions crossbow submit test-ubuntu-18.04-cpp-static test-ubuntu-18.04-cpp

@kou I applied all suggestions you made.

@github-actions autotune

Could you fix CMake format error by python3 run-cmake-format.py with cmake-format 0.5.2?
Or could you enable "Allow edits by maintainers" for this pull request?

@kou The option to allow the maintainers to edit is not being shown in this PR, I think it is because our fork is from an organization.
I ran the run-cmake-format.py, but the error is still appearing. I will try to update the cmake-format dependency.

I think that you didn't use cmake-format 0.5.2. Could you confirm your cmake-format version?

@kou Here is the cmake-format version:
$ cmake-format -v
$ 0.6.13

pip3 uninstall cmake-format
pip3 install 'cmake_format==0.5.2'

@kou Thanks for your help! I update my cmake-format version and run the python script. Let check if now it will execute without errors in build.