Local rate limiting using descriptors not taking effect

Description:
We have an envoy route_config configured to provide a local rate limit of 1 token per minute, with a refill value of 1.
Using actions and descriptors, we are attempting to configure a higher rate limit when a request has a header of x-product which matches the value in the descriptor. This rate limit is set to 10 tokens per minute with a refill value of 10. Regardless of whether the header is present on the request, the local rate limit is applied, not the token_bucket settings in the descriptor.
We would expect for the descriptor token_bucket rate limit to be applied, not the one on the route.
Repro steps:
We are running Envoy on Centos7, using version 1.18 and the configuration file provided below.
The request we are using to test the descriptor rate limit is curl -vv -k  https://<IP_ADDRESS>:7443/ -H "x-product: product123"
Config:
    "static_resources": {
        "listeners": [
            {
                "name": "listener_secure",
                "address": {
                    "socket_address": {
                        "address": "<IP_ADDRESS>",
                        "port_value": 7443
                    }
                },
                "filter_chains": [
                    {
                        "filters": [
                            {
                                "name": "envoy.filters.network.http_connection_manager",
                                "typed_config": {
                                    "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
                                    "stat_prefix": "ingress_http",
                                    "http_filters": [
                                        {
                                            "name": "envoy.filters.http.wasm",
                                            "typed_config": {
                                                "@type": "type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm",
                                                "config": {
                                                    "name": "my_plugin",
                                                    "root_id": "my_root_id",
                                                    "vm_config": {
                                                        "vm_id": "my_vm_id",
                                                        "runtime": "envoy.wasm.runtime.v8",
                                                        "code": {
                                                            "local": {
                                                                "filename": "/usr/lib/test/wasm/filters/http_key_validation/main.go.wasm"
                                                            }
                                                        },
                                                        "allow_precompiled": true
                                                    }
                                                }
                                            }
                                        },
                                        {
                                            "name": "envoy.filters.http.local_ratelimit",
                                            "typed_config": {
                                                "@type": "type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit",
                                                "stat_prefix": "local_rate_limit"
                                            }
                                        },
                                        {
                                            "name": "envoy.filters.http.router"
                                        }
                                    ],
                                    "route_config": {
                                        "name": "local_route",
                                        "virtual_hosts": [
                                            {
                                                "name": "local_service",
                                                "domains": ["*"],
                                                "routes": [
                                                    {
                                                        "match": {
                                                            "prefix": "/"
                                                        },
                                                        "route": {
                                                            "cluster": "service_api"
                                                        },
                                                        "typed_per_filter_config": {
                                                            "envoy.filters.http.local_ratelimit": {
                                                                "@type": "type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit",
                                                                "stat_prefix": "local_rate_limit",
                                                                "token_bucket": {
                                                                    "max_tokens": 1,
                                                                    "tokens_per_fill": 1,
                                                                    "fill_interval": "60s"
                                                                },
                                                                "filter_enabled": {
                                                                    "runtime_key": "local_rate_limit_enabled",
                                                                    "default_value": {
                                                                        "numerator": 100,
                                                                        "denominator": "HUNDRED"
                                                                    }
                                                                },
                                                                "filter_enforced": {
                                                                    "runtime_key": "local_rate_limit_enforced",
                                                                    "default_value": {
                                                                        "numerator": 100,
                                                                        "denominator": "HUNDRED"
                                                                    }
                                                                },
                                                                "descriptors": [
                                                                    {
                                                                        "entries": [
                                                                            {
                                                                                "key": "client_product",
                                                                                "value": "product123"
                                                                            }
                                                                        ],
                                                                        "token_bucket": {
                                                                            "max_tokens": 5,
                                                                            "tokens_per_fill": 5,
                                                                            "fill_interval": "60s"
                                                                        }
                                                                    },
                                                                    {
                                                                        "entries": [
                                                                            {
                                                                                "key": "client_product",
                                                                                "value": "productXyz"
                                                                            }
                                                                        ],
                                                                        "token_bucket": {
                                                                            "max_tokens": 7,
                                                                            "tokens_per_fill": 7,
                                                                            "fill_interval": "60s"
                                                                        }
                                                                    }
                                                                ],
                                                                "response_headers_to_add": [
                                                                    {
                                                                        "append": false,
                                                                        "header": {
                                                                            "key": "x-local-rate-limit",
                                                                            "value": "true"
                                                                        }
                                                                    }
                                                                ],
                                                                "stage": 0
                                                            }
                                                        }
                                                    }
                                                ],
                                                "rate_limits": [
                                                    {
                                                        "stage": 0,
                                                        "actions": [
                                                            {
                                                                "request_headers": {
                                                                    "header_name": "x-product",
                                                                    "descriptor_key": "client_product"
                                                                }
                                                            }
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    "access_log": [
                                        {
                                            "name": "envoy.access_loggers.file",
                                            "typed_config": {
                                                "@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
                                                "path": "/dev/stdout",
                                                "log_format": {
                                                    "text_format": "[%START_TIME%][access_log] {\"method\":\"%REQ(:METHOD)%\",\"path\":\"%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%\",\"protocol\":\"%PROTOCOL%\",\"responseCode\":\"%RESPONSE_CODE%\",\"responseFlags\":\"%RESPONSE_FLAGS%\",\"bytesReceived\":\"%BYTES_RECEIVED%\",\"bytesSent\":\"%BYTES_SENT%\", \"duration\": \"%DURATION%\", \"upstreamServiceTime\": \"%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%\",\"xForwardedFor\": \"%REQ(X-FORWARDED-FOR)%\",\"userAgent\": \"%REQ(USER-AGENT)%\",\"correlationId\": \"%REQ(X-REQUEST-ID)%\",\"authority\": \"%REQ(:AUTHORITY)%\",\"upstreamHost\": \"%UPSTREAM_HOST%\"}\n"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        ],
                        "transport_socket": {
                            "name": "envoy.transport_sockets.tls",
                            "typed_config": {
                                "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext",
                                "common_tls_context": {
                                    "tls_certificates": [
                                        {
                                            "certificate_chain": {
                                                "filename": "/mnt/secure/ssl/service.crt"
                                            },
                                            "private_key": {
                                                "filename": "/mnt/secure/ssl/service.key"
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    }
                ]
            }
        ],
        "clusters": [
            {
                "name": "service_api",
                "connect_timeout": "30s",
                "type": "LOGICAL_DNS",
                "dns_lookup_family": "V4_ONLY",
                "load_assignment": {
                    "cluster_name": "service_api_management",
                    "endpoints": [
                        {
                            "lb_endpoints": [
                                {
                                    "endpoint": {
                                        "address": {
                                            "socket_address": {
                                                "address": "httpbin.org",
                                                "port_value": 80
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    ]
                }
            }
        ]
    },
    "admin": {
        "access_log_path": "/dev/null",
        "address": {
            "socket_address": {
                "address": "<IP_ADDRESS>",
                "port_value": 9901
            }
        }
    }
}

You need to put rate limits into route since there is no automatic fallback to virtual host rate limits. See this field https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-routeaction. I got bitten by this, too.

You need to put rate limits into route since there is no automatic fallback to virtual host rate limits. See this field https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-routeaction. I got bitten by this, too.

@kyessenov should we have auto fallback or at least an option?

@kyessenov should we have auto fallback or at least an option?

This is a really easy mistake to make, since it's just one extra indent in YAML.
One way might be to add VH rate limit options into local rate limit config.

This is a really easy mistake to make, since it's just one extra indent in YAML.
One way might be to add VH rate limit options into local rate limit config.

@kyessenov We tried moving the rate limit config into route as you suggested, which has worked for us. Thank you for your help.
We were previously following this documentation: https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/local_rate_limit_filter#using-rate-limit-descriptors-for-local-rate-limiting, which appears to place it where we had it. Is this incorrect, or have I misunderstood something?

@kyessenov We tried moving the rate limit config into route as you suggested, which has worked for us. Thank you for your help.
We were previously following this documentation: https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/local_rate_limit_filter#using-rate-limit-descriptors-for-local-rate-limiting, which appears to place it where we had it. Is this incorrect, or have I misunderstood something?

One way might be to add VH rate limit options into local rate limit config. Unfortunately, default might need to be changed to override instead of replace eventually.

Yeah I would add this config option. If we think the default might change I would probably just define a new enum for the local rate limit case.

One way might be to add VH rate limit options into local rate limit config. Unfortunately, default might need to be changed to override instead of replace eventually.

Yeah I would add this config option. If we think the default might change I would probably just define a new enum for the local rate limit case.

Yes, the documentation is incorrect. I think we need a follow up to implement VH rate limit overrides. The code is just not present for local rate limit to fallback onto virtual host.

Hi, local rate limiting with descriptors is not taking effect for the configuration bellow. I'm expecting that when a requests has a "user-agent: agent123" or header "hello: world" or ":path: /jobs" the request will be rate limited after two requests are made within 60s. However, the requests are only rate limited when all the tokens in the default token bucket are consumed. It works when I only have one descriptor and one rate limit action.
{
     "route_config": {
      "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
      "name": "inbound|8080||",
      "virtual_hosts": [
       {
        "name": "inbound|http|8080",
        "domains": [
         "*"
        ],
        "routes": [
         {
          "match": {
           "prefix": "/"
          },
          "route": {
           "cluster": "inbound|8080||",
           "timeout": "0s",
           "rate_limits": [
            {
             "actions": [
              {
               "request_headers": {
                "header_name": "user-agent",
                "descriptor_key": "agent"
               }
              },
              {
               "request_headers": {
                "header_name": "hello",
                "descriptor_key": "hello"
               }
              },
              {
               "request_headers": {
                "header_name": ":path",
                "descriptor_key": "path"
               }
              }
             ]
            }
           ],
           "max_stream_duration": {
            "max_stream_duration": "0s",
            "grpc_timeout_header_max": "0s"
           }
          },
          "decorator": {
           "operation": "my-app.default.svc.cluster.local:8080/*"
          },
          "typed_per_filter_config": {
           "envoy.filters.http.local_ratelimit": {
            "@type": "type.googleapis.com/udpa.type.v1.TypedStruct",
            "type_url": "type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit",
            "value": {
             "stat_prefix": "http_local_rate_limiter",
             "token_bucket": {
              "max_tokens": 10,
              "tokens_per_fill": 10,
              "fill_interval": "60s"
             },
             "filter_enabled": {
              "default_value": {
               "numerator": 100
              },
              "runtime_key": "local_rate_limit_enabled"
             },
             "filter_enforced": {
              "default_value": {
               "numerator": 100
              },
              "runtime_key": "local_rate_limit_enforced"
             },
             "response_headers_to_add": [
              {
               "header": {
                "key": "x-local-rate-limit",
                "value": "true"
               },
               "append": false
              }
             ],
             "descriptors": [
              {
               "entries": [
                {
                 "key": "agent",
                 "value": "agent123"
                }
               ],
               "token_bucket": {
                "max_tokens": 2,
                "tokens_per_fill": 2,
                "fill_interval": "60s"
               }
              },
              {
               "entries": [
                {
                 "key": "hello",
                 "value": "world"
                }
               ],
               "token_bucket": {
                "max_tokens": 2,
                "tokens_per_fill": 2,
                "fill_interval": "60s"
               }
              },
              {
               "entries": [
                {
                 "key": "path",
                 "value": "/jobs"
                }
               ],
               "token_bucket": {
                "max_tokens": 2,
                "tokens_per_fill": 2,
                "fill_interval": "60s"
               }
              }
             ]
            }
           }
          },
          "name": "default"
         }
        ]
       }
      ],
      "validate_clusters": false
     },
     "last_updated": "2023-09-08T06:19:31.233Z"
    }

I'm using envoy 1.26.x through Istio 1.18.x.


Add basic end page content

This adds the basic content for the transactions completion step.
Will need to be expanded to include the practice where the user
registered and the contact details for that practice.
Todo

[x] Add link destinations
[x] Add donor registration link (need to check with @Demotive if we'll be adding this first)

Not going to add donor registration at this stage.


Fix links in Readme

Signed-off-by: Sebastian Malton<EMAIL_ADDRESS>fixes #6436

+1 for no ride-alongs :)


inference

Can produce trt but there will be a prompt
"Warning: Encountered known unsupported method torch.Tensor.new_zeros"
But during the test, it prompted a problem.
"[TensorRT] ERROR: (Unnamed Layer* 204) [ElementWise]: dimensions not compatible for elementwise
[TensorRT] ERROR: shapeMachine.cpp (285)-Shape Error in operator(): broadcast with incompatible dimensions
[TensorRT] ERROR: Instruction: CHECK_BROADCAST 167 100
Traceback (most recent call last):
File "demo/inference.py", line 61, in
main()
File "demo/inference.py", line 31, in main
result = inference_detector(trt_model, image_path, cfg_path, args.device)
File "/home/nie/mmdetection2trt/mm2trt/mmdet2trt/apis/inference.py", line 39, in inference_detector
result = model(tensor)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch2trt/torch2trt.py", line 394, in forward
shape = tuple(self.context.get_binding_shape(idx))
ValueError: len() should return >= 0"

In mmdetection2trt/mm2trt/mmdet2trt/apis/inference.py 　 line 39　 could  not  konw 　 "result = model(tensor)"

Hi,
Thanks for using my repo.
In most case this warning is not a big deal, just ignore it.
Could you share the model and convert/inference script with me? Let me see what is wrong with the inference.

@grimoire
Yes, you did a great job.
The model uses a very simple retinanet, let me give you an order.
”Python demo/inference.py ./000000004765.jpg /home/nie/TXT/onnx_mmdet/configs/retinanet/retinanet_r50_fpn_1x_coco.py /home/nie/TXT/onnx_mmdet/retinanet_r50_fpn_1x_coco_20200130e.rt2398 ./9mmdet.
Below is the code I generated
"Import numpy as np
import tensorrt
import torch
from mmdet2trt import mmdet2trt
from mmdet2trt.apis.inference import init_detector
from mmdet2trt.apis.inference import inference_detector
cfg_path="/home/nie/pkg/mmdetection/configs/retinanet/retinanet_r50_fpn_1x_coco.py"
weight_path="/home/nie/pkg/mmdetection/retinanet_r50_fpn_1x_coco_20200130-c2398f9e.pth"
image_path="./000000004765.jpg"
save_path="/home/nie/mmdetection2trt/mm2trt/mm.pth"
engine_path = "/home/nie/mmdetection2trt/mm2trt/mm.engine"
opt_shape_param=[
[
[1,3,320,320], # min shape
[1,3,1280,1280], # optimize shape
[1,3,1344,1344], # max shape
]
]
max_workspace_size=1<<30 # some module need large workspace, add workspace size when OOM.
trt_model = mmdet2trt(cfg_path, weight_path, opt_shape_param=opt_shape_param, fp16_mode=True, max_workspace_size=max_workspace_size)
torch.save(trt_model.state_dict(), save_path)
trt_model = init_detector(save_path)
num_detections, trt_bbox, trt_score, trt_cls = inference_detector(trt_model, image_path, cfg_path, "cuda:0")
with open(engine_path, mode='wb') as f:
f.write(model_trt.state_dict()['engine'])"
But it always reports errors in this place
"Shape = tuple(self.context.get_binding_shape(idx))"
I am thinking about what might be causing it. Is my script wrong?

@grimoire
I printed something and reported an error
"Batch_size: 1
output_names: 4
output_names: output_0
output_names: output_1
output_names: output_2
output_names: output_3
idx: 1
[TensorRT] ERROR: (Unnamed Layer* 197) [ElementWise]: dimensions not compatible for elementwise
[TensorRT] ERROR: shapeMachine.cpp (285)-Shape Error in operator(): broadcast with incompatible dimensions
[TensorRT] ERROR: Instruction: CHECK_BROADCAST 80 50
context.get_binding_shape(idx): (0)
[TensorRT] ERROR: (Unnamed Layer* 197) [ElementWise]: dimensions not compatible for elementwise
[TensorRT] ERROR: shapeMachine.cpp (285)-Shape Error in operator(): broadcast with incompatible dimensions
[TensorRT] ERROR: Instruction: CHECK_BROADCAST 80 50
Traceback (most recent call last):
File "mm2trt.py", line 24, in
num_detections, trt_bbox, trt_score, trt_cls = inference_detector(trt_model, image_path, cfg_path, "cuda:0")
File "/home/nie/mmdetection2trt/mm2trt/mmdet2trt/apis/inference.py", line 39, in inference_detector
result = model(tensor)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch2trt/torch2trt.py", line 404, in forward
shape = tuple(self.context.get_binding_shape(idx))
ValueError: len() should return >= 0
"

@manhongnie
Hi
Your code works fine on me (official retinanet, and image from coco).
I guess the torch2trt you are using is not the latest one, right? In https://github.com/grimoire/torch2trt_dynamic/blob/master/torch2trt/torch2trt.py
shape = tuple(self.context.get_binding_shape(idx)) is line 394.
Try pull the latest one from https://github.com/grimoire/torch2trt_dynamic.

@grimoire
No, I used the latest version, but it was unsuccessful. I guess I don’t know about torch2trt, so there should be problems with my script. Can you provide your script?

@manhongnie

@grimoire
I checked the input tensor size is (1, 3, 800, 800), I'm checking it again to see

@grimoire
This is the information I printed
"(mla) nie@nie0315:~/mmdetection2trt/mm2trt$ python mm2trt.py
/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/setuptools/distutils_patch.py:26: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
"Distutils was imported before Setuptools. This usage is discouraged "
cls_score: torch.Size([1, 720, 77, 77])
bbox_pred: torch.Size([1, 36, 77, 77])
cls_score: torch.Size([1, 720, 39, 39])
bbox_pred: torch.Size([1, 36, 39, 39])
cls_score: torch.Size([1, 720, 20, 20])
bbox_pred: torch.Size([1, 36, 20, 20])
cls_score: torch.Size([1, 720, 10, 10])
bbox_pred: torch.Size([1, 36, 10, 10])
cls_score: torch.Size([1, 720, 5, 5])
bbox_pred: torch.Size([1, 36, 5, 5])
cls_score: (1, 720, 77, 77)
bbox_pred: (1, 36, 77, 77)
cls_score: (1, 720, 39, 39)
bbox_pred: (1, 36, 39, 39)
cls_score: (1, 720, 20, 20)
bbox_pred: (1, 36, 20, 20)
cls_score: (1, 720, 10, 10)
bbox_pred: (1, 36, 10, 10)
cls_score: (1, 720, 5, 5)
bbox_pred: (1, 36, 5, 5)
Warning: Encountered known unsupported method torch.Tensor.new_zeros
tensor: tensor([[[[1.1015, 1.1015, 1.1015, ..., 1.1358, 1.1358, 1.1358],
[1.1187, 1.1015, 1.1015, ..., 1.1358, 1.1358, 1.1358],
[1.1187, 1.1187, 1.1015, ..., 1.1358, 1.1358, 1.1358],
...,
[1.0673, 1.0673, 1.0673, ..., 1.1015, 1.0844, 1.0844],
[1.0673, 1.0673, 1.0673, ..., 1.1015, 1.1015, 1.1015],
[1.0673, 1.0673, 1.0673, ..., 1.1015, 1.1015, 1.1015]],
     [[1.1331, 1.1331, 1.1331, ..., 1.1681, 1.1681, 1.1681],
      [1.1506, 1.1331, 1.1331, ..., 1.1681, 1.1681, 1.1681],
      [1.1506, 1.1506, 1.1331, ..., 1.1681, 1.1681, 1.1681],
      ...,
      [1.0980, 1.0980, 1.0980, ..., 1.1331, 1.1331, 1.1331],
      [1.0980, 1.0980, 1.0980, ..., 1.1331, 1.1331, 1.1331],
      [1.0980, 1.0980, 1.0980, ..., 1.1331, 1.1331, 1.1331]],

     [[1.2457, 1.2457, 1.2457, ..., 1.2805, 1.2805, 1.2805],
      [1.2457, 1.2457, 1.2457, ..., 1.2805, 1.2805, 1.2805],
      [1.2631, 1.2631, 1.2457, ..., 1.2805, 1.2805, 1.2805],
      ...,
      [1.2108, 1.2108, 1.2108, ..., 1.2457, 1.2457, 1.2457],
      [1.2108, 1.2108, 1.2108, ..., 1.2457, 1.2457, 1.2457],
      [1.2108, 1.2108, 1.2108, ..., 1.2457, 1.2457, 1.2457]]]],
   device='cuda:0')

img_metas: [DataContainer({'filename':'./000000004765.jpg','ori_filename':'./000000004765.jpg','ori_shape': (612, 612, 3),'img_shape': (800, 800 , 3),'pad_shape': (800, 800, 3),'scale_factor': array([1.3071896, 1.3071896, 1.3071896, 1.3071896], dtype=float32),'flip': False,'flip_direction': None, ' img_norm_cfg': {'mean': array([123.675, 116.28, 103.53 ], dtype=float32),'std': array([58.395, 57.12, 57.375], dtype=float32),'to_rgb': True}}) ]
scale_factor: [1.3071896 1.3071896 1.3071896 1.3071896]
scale_factor: tensor([1.3072, 1.3072, 1.3072, 1.3072], device='cuda:0')
batch_size: 1
output_names: 4
output_names: output_0
output_names: output_1
output_names: output_2
output_names: output_3
idx: 1
[TensorRT] ERROR: (Unnamed Layer* 197) [ElementWise]: dimensions not compatible for elementwise
[TensorRT] ERROR: shapeMachine.cpp (285)-Shape Error in operator(): broadcast with incompatible dimensions
[TensorRT] ERROR: Instruction: CHECK_BROADCAST 39 50
context.get_binding_shape(idx): (0)
[TensorRT] ERROR: (Unnamed Layer* 197) [ElementWise]: dimensions not compatible for elementwise
[TensorRT] ERROR: shapeMachine.cpp (285)-Shape Error in operator(): broadcast with incompatible dimensions
[TensorRT] ERROR: Instruction: CHECK_BROADCAST 39 50
Traceback (most recent call last):
File "mm2trt.py", line 27, in
num_detections, trt_bbox, trt_score, trt_cls = inference_detector(trt_model, image_path, cfg_path, "cuda:0")
File "/home/nie/mmdetection2trt/mm2trt/mmdet2trt/apis/inference.py", line 39, in inference_detector
result = model(tensor)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch2trt/torch2trt.py", line 404, in forward
shape = tuple(self.context.get_binding_shape(idx))
ValueError: len() should return >= 0
"

@manhongnie
I see. The input data is fine.
The shape = tuple(self.context.get_binding_shape(idx)) is still in line 404, did you switch back to the old torch2trt?
If your gpu is gtx2080ti or gtx2070s, could you share the generated pth to me by google drive or some other netdisk?

@grimoire
My graphics card is a 2080 super. I solved the problem. The input size is fixed, and only 800*800 can be set, otherwise an error will be reported if it fails to match. But I encountered a new problem, my cuda reported an error, suggesting illegal memory. What type of graphics card is yours?
"[TensorRT] ERROR: writeArchive.cpp (130)-Cuda Error in writeGlob: 700 (an illegal memory access was encountered)
[TensorRT] ERROR: Parameter check failed at: ../builder/cudnnBuilderUtils.cpp::~ScopedCudaStream::72, condition: cudaStreamDestroy(mStream) failure.
[TensorRT] ERROR: FAILED_ALLOCATION: std::exception
Traceback (most recent call last):
File "mm2trt.py", line 31, in
f.write(trt_model.state_dict()['engine'])
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch/nn/modules/module.py", line 706, in state_dict
hook_result = hook(self, destination, prefix, local_metadata)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch2trt/torch2trt.py", line 365, in _on_state_dict
state_dict[prefix +'engine'] = bytearray(self.engine.serialize())
TypeError:'NoneType' object is not iterable
"

@manhongnie
The repo has been tested on 2080ti, 2070 super, jetson tx2, jetson nano.
It is strange that the model should support dynamic input shape. (That is the reason why I folk torch2trt_dynamic from nvidia/torch2trt), are you sure that the result is right?

@grimoire
Not sure, because my code hasn't run through, an error is reported, illegal memory, I don't know why there is such an error, is it related to this?
"
context.get_binding_shape(idx): (1,)
"
All errors are here
"Num_detections: Traceback (most recent call last):
File "mm2trt.py", line 33, in
print("num_detections: ",num_detections,"\n")
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch/tensor.py", line 162, in repr
return torch._tensor_str._str(self)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch/_tensor_str.py", line 315, in _str
tensor_str = _tensor_str(self, indent)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch/_tensor_str.py", line 213, in _tensor_str
formatter = _Formatter(get_summarized_data(self) if summarize else self)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch/_tensor_str.py", line 84, in init
value_str ='{}'.format(value)
File "/home/nie/anaconda3/envs/mla/lib/python3.7/site-packages/torch/tensor.py", line 418, in format
return self.item().format(format_spec)
RuntimeError: CUDA error: an illegal memory access was encountered
"
All my code
"Import numpy as np
import tensorrt
import torch
from mmdet2trt import mmdet2trt
from mmdet2trt.apis.inference import init_detector
from mmdet2trt.apis.inference import inference_detector
import cv2
from os.path import expanduser
home = expanduser("~")
cfg_path="/home/nie/pkg/mmdetection/configs/retinanet/retinanet_r50_fpn_1x_coco.py"
weight_path="/home/nie/pkg/mmdetection/retinanet_r50_fpn_1x_coco_20200130-c2398f9e.pth"
image_path="./000000004765.jpg"
save_path="/home/nie/mmdetection2trt/mm2trt/mm.pth"
engine_path = "/home/nie/mmdetection2trt/mm2trt/mm.engine"
opt_shape_param=[
[
[1,3,320,320], # min shape
[1,3,800,800], # optimize shape
[1,3,1344,1344], # max shape
]
]
max_workspace_size=1<<30 # some module need large workspace, add workspace size when OOM.
trt_model = mmdet2trt(cfg_path, weight_path, opt_shape_param=opt_shape_param, fp16_mode=True, max_workspace_size=max_workspace_size)
torch.save(trt_model.state_dict(), save_path)
trt_model = init_detector(save_path)
#img = cv2.imread(image_path)
#img = cv2.resize(img,(800,800))
#cv2.imwrite(image_path, img)
num_detections, trt_bbox, trt_score, trt_cls = inference_detector(trt_model, image_path, cfg_path, "cuda:0")
#print(num_detections, trt_bbox, trt_score, trt_cls)
print("num_detections: ",num_detections,"\n")
print("trt_bbox: ",trt_bbox,"\n")
print("trt_score: ",trt_score,"\n")
print("trt_cls: ",trt_cls,"\n")
with open(engine_path, mode='wb') as f:
f.write(trt_model.state_dict()['engine'])"
Do I need to send you the pth file?
My GPU has the same computing power as 2080 tier. The theory shouldn’t be a problem. Did I fail to do a good job, or did you update it?

@manhongnie
You can send the pth ,mmdet2trt/torch2trt code, test script or anything related to me, I will try.
It might take some time.
You can create a new conda enviroment, deploy every thing needed and see if it works (especially torch2trt_dynamic).

@grimoire
Okay, I will recreate an environment for testing, can you send me your tensorrt model?

@manhongnie
here it is. The model is created on 2080ti. Trt might do some optimization based on device, so I can not promise this model works on your device.
https://drive.google.com/file/d/1Q6x_iHa0H7O1cgB3Q_jWVC049Qz6e6oO/view?usp=sharing

@grimoire
What system are you using?

@manhongnie
Ubuntu18.04
python 3.7
pytorch 1.4.0
cuda 10.0
gpu driver 440
tensorrt <IP_ADDRESS>
You can test in a new docker

sorry, seems I have restrict the download of the share file. It is unlocked now.
By the way, I have done a lot of updates on torch2trt_dynamic/amirstan_plugin and this repo. include some bug fixing. try again and see if it works on your side.

the same error with me


SystemChrome.setSystemUIChangeCallback not functioning in Gesture-based Navigation Mode on Redmi devices

Steps to reproduce
Steps to Reproduce:

Enable Gesture-based Navigation Mode on Redmi Device:

Go to Settings > Additional Settings > Full-screen display.
Choose Full-screen gestures as the navigation mode.

Implement SystemChrome.setSystemUIChangeCallback Functionality in a Flutter App:

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() async {
  await SystemChrome.setSystemUIChangeCallback(
      (systemOverlaysAreVisible) async {
    print(systemOverlaysAreVisible);
  });

  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('System UI Change Callback Issue'),
        ),
        body: Center(
          child: Text('System UI Change Callback Issue Demo'),
        ),
      ),
    );
  }
}

Observe the Behavior of the Callback Function in Gesture-based Navigation Mode:

Run the Flutter app on the Redmi device with gesture-based navigation mode activated.
Observe whether the SystemChrome.setSystemUIChangeCallback function responds or monitors system UI changes when switching between apps or interacting with system UI elements in gesture-based navigation mode.

Expected results
The SystemChrome.setSystemUIChangeCallback should effectively monitor changes in system UI when the gesture-based navigation mode is active, just as it does in the navigation bar with buttons mode.
Actual results
The SystemChrome.setSystemUIChangeCallback function does not respond or monitor system UI changes when the gesture-based navigation mode is enabled on Redmi devices. It works as expected only in the navigation bar with physical buttons mode.
Code sample
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() async {
  await SystemChrome.setSystemUIChangeCallback(
      (systemOverlaysAreVisible) async {
    print(systemOverlaysAreVisible);
  });

  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // Your app configuration here
      home: Scaffold(
        appBar: AppBar(
          title: Text('System UI Change Callback Issue'),
        ),
        body: Center(
          child: Text('System UI Change Callback Issue Demo'),
        ),
      ),
    );
  }
}

Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.16.4, on Microsoft Windows [version 10.0.19045.3693], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.3.2)
[√] Android Studio (version 2023.1)
[√] VS Code, 64-bit edition (version 1.76.1)
[√] Connected device (4 available)
[√] Network resources

Hi @AbdeMohlbi.
Thanks for filing this.
I currently don't have a Redmi device to test this. Are you able to check on other Android devices to see if this issue still persists or is specific to Redmi devices?
Also, can you check out https://github.com/flutter/flutter/issues/108855 to see if its somewhat similar/related to the issue you are experiencing?

I'll need some time to test it on my older devices. It seems like the issue might be related to the phone's UI system not sending updates for Flutter, or Flutter not properly interpreting the current gestures in navigation mode.
It is intersting tho how no one on the cummunity has discoverd that issue

The mentioned issue isn't related to what I have here because the colors of the navigation bar and notification bar don't affect the UI changes that should be detected by Flutter in any mode.

Hi @AbdeMohlbi.
Thanks for filing this.
I currently don't have a Redmi device to test this. Are you able to check on other Android devices to see if this issue still persists or is specific to Redmi devices?
Also, can you check out https://github.com/flutter/flutter/issues/108855 to see if its somewhat similar/related to the issue you are experiencing?

Not the same issue tho

Thanks for your response.

I'll need some time to test it on my older devices. It seems like the issue might be related to the phone's UI system not sending updates for Flutter, or Flutter not properly interpreting the current gestures in navigation mode.

Please do help with testing this and share your findings

Thanks for your response.

I'll need some time to test it on my older devices. It seems like the issue might be related to the phone's UI system not sending updates for Flutter, or Flutter not properly interpreting the current gestures in navigation mode.

Please do help with testing this and share your findings

I'm currently using Flutter version 3.16.5 and have observed an intriguing behavior while attempting to swipe the notification bar. Initially, upon the first swipe to view notifications (where the clock typically appears), I noticed a lack of responsiveness. However, upon the second swipe to reveal the complete notification bar, the responsiveness was evident, printing 'true' when detected and 'false' upon disappearance.
This behavior is quite interesting as it appears to detect the notification bar's presence accurately only after the second swipe. I believe this inconsistency might be worth investigating further to ensure a seamless user experience. Any insights or suggestions to address this behavior would be greatly appreciated.

Thanks for your response.
Are these observations on a Redmi device or the other devices you were to test on?
Also, it would be really helpful if you could share screen records and device information of the test devices.


Init empty jqXHR array fails since is not defined in Bridge.jQuery

Init empty jqXHR array fails since is not defined in Bridge.jQuery
Steps To Reproduce
https://deck.net/9f174d825b3b5bdc7c3aa6398c76262a
public class Program
{
    public static void Main()
    {
        jqXHR[] deferreds = { };
    }
}

Expected Result
code runs fine

Actual Result
System.Exception: TypeError: Cannot read property 'jqXHR' of undefined
    at Function.Main (https://deck.net/RunHandler.ashx?h=1804941215:9:65)
    at https://deck.net/resources/js/bridge/bridge.min.js?16.8.2:7:40150
    at HTMLDocument.i (https://deck.net/resources/js/bridge/bridge.min.js?16.8.2:7:5505)
    at i (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js:2:27151)
    at Object.add [as done] (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js:2:27450)
    at n.fn.init.n.fn.ready (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js:2:29515)
    at n.fn.init (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js:2:24945)
    at n (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js:2:405)
    at Object.ready (https://deck.net/resources/js/bridge/bridge.min.js?16.8.2:7:5568)
    at https://deck.net/resources/js/bridge/bridge.min.js?16.8.2:7:40129

Hi @kcudnik – Can you post this issue in the Frameworks repo?
https://github.com/bridgedotnet/Frameworks/issues

Done https://github.com/bridgedotnet/Frameworks/issues/78


⚠ Bofrost.at has degraded performance

In 77c3bec, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1473 ms

Resolved: Bofrost.at performance has improved in ea23be4 after 6 minutes.


Error loading libxorgxrdp.so

xrdp version
0.10.1-1
Detailed xrdp version, build options
xrdp 0.10.1
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2024 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --prefix=/usr
      --sysconfdir=/etc
      --libexecdir=/usr/lib
      --localstatedir=/var
      --sbindir=/usr/bin
      --with-systemdsystemunitdir=/usr/lib/systemd/system
      --enable-jpeg
      --enable-tjpeg
      --enable-fuse
      --enable-fdkaac
      --enable-opus
      --enable-rfxcodec
      --enable-mp3lame
      --enable-pixman
      --enable-painter
      --enable-vsock
      --enable-ipv6
      --enable-pam-config=arch
      --enable-rdpsndaudin
      --with-imlib2
      CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/joro/build/xrdp/src=/usr/src/debug/xrdp -flto=auto
      LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto
      CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/home/joro/build/xrdp/src=/usr/src/debug/xrdp -flto=auto

  Compiled with OpenSSL 3.4.0 22 Oct 2024

I'm trying to reuse an existing X session started by a DM. My xrdp.ini looks like this:
[xrdp1]
name=Xorg
; lib=libxup.so
lib=/lib/xorg/modules/libxorgxrdp.so
param=-display :1
username=ask
password=ask
port=-1
code=20

I use the full path to the library, just to make sure it's found. I get the same error if I use just the library name. From /var/log/xrdp.log:
[ERROR] xrdp_wm_log_msg: error loading /lib/xorg/modules/libxorgxrdp.so specified in xrdp.ini, please add a valid entry like lib=libxrdp-vnc.so or similar

I'm on Arch linux and my xorgxrdp version is 0.10.2-3
Operating system & version
Arch linux
Installation method
dnf / apt / zypper / pkg / etc
Which backend do you use?
Xorg
What desktop environment do you use?
xfce4
Environment xrdp running on
physical machine, integrated Intel GPU
What's your client?
remmina
Area(s) with issue?
Other
Steps to reproduce
On a current Arch installation:

get xrdp and xorgxrdp from AUR
make the packages and install them
start xrdp (systemctl start xrdp)
connect with remmina from another machine

✔ Expected Behavior
I'm expecting to connect to a running Xorg session.
❌ Actual Behavior
I get a window with an error message that there is an error loading libxorgxrdp.so
Anything else?
No response

Why do you want to do such a thing? lib=libxup.so should work.
It is not an expected usage and you don't need to do that. Get back to lib=libxup.so.

libxup will start a new X session. I want to reuse an existing one in order to access my running programs.

libxorgxrdp.so is not designed to do such a thing so it is natural the wrong configuration shows an error.

@gtellalov - you can connect to an existing xrdp session. You cannot connect to an X session which is started by another DM.
Your options for this (that I am aware of) are:-

Run x11vnc in your DM session and connect to it over xrdp using the VNC protocol between xrdp and the desktop.
Use a desktop-specific service to share an existing desktop (X11 or Wayland) over the RDP port. GNOME contains 'GNOME remote desktop' (GRD) for this. KDE Plasma contains KRDP, although this is a newer feature and I've never tried it myself.

Will either of these satisfy you use case(s)?


Change to LGPL or MIT or BSD

Change License to Permissive ones. GPL-3.0 would require the application based on it to also be GPL-3.0.

okay I 'll

@haptome When?

@prateekmedia the project license id now MIT


pull request for e2e test at 01/24/2017 21:15:10

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Update time in review to account for changes in labels

this also removed the "closed per day" line since it just added too much noise.
The value here is allowing contributed an ETA about how long their PR could take

Codecov Report

Merging #84 (e8f5c9b) into main (0d5f8e0) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #84   +/-   ##
=======================================
  Coverage   40.81%   40.81%
=======================================
  Files          15       15
  Lines         566      566
=======================================
  Hits          231      231
  Misses        321      321
  Partials       14       14

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Small QOL change needed when using Buildalyzer F#

forgot to remove this in the previous PR's

👍 thanks for continuing to support the F# functionality, and sorry for the delay! I'm looking to get another release out ASAP once the PR backlog is cleared.


feat: metrics

Pull Request Test Coverage Report for Build<PHONE_NUMBER>6
Details

30 of 41 (73.17%)  changed or added relevant lines in 1 file are covered.
13 unchanged lines in 1 file lost coverage.
Overall coverage increased (+4.4%) to 72.308%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

ginapp.go
30
41
73.17%

Files with Coverage Reduction
New Missed Lines
%

ginapp.go
13
72.31%

Totals

Change from base Build<PHONE_NUMBER>0:
4.4%

Covered Lines:
94

Relevant Lines:
130

💛  - Coveralls


[CT-2397] Resolve versions model clobbering

Describe the bug
When you have versioned models, the collapsed DAG view selects all the models because it selects by name and cannot differentiate between version.
collapsed view

expanded view

Steps To Reproduce
View a model that has multiple versions in the collapsed view.
Expected behavior
Only the single model with the ~corerct~ correct version is displayed.
Additional context
See #411 for other version related changes.

I believe we ended up fixing this in https://github.com/dbt-labs/dbt-docs/pull/411!


Promise rejection handler not applied to the fetch Promise

See Steps
Steps to reproduce the behavior:
fetch('https://baddomainblah')
.then(a => a.json())
.then(data => console.log(data))
.catch(e => console.error('ERROR?!!',e))
Will fail with unhandled exception because the catch is only applied the the promise returned by the second then()
The same code works properly on ES6 in browsers.
This will solve it but is incorrect
fetch('https://baddomainblah')
.catch(e => console.error('ERROR?!!',e))
.then(a => a.json())
.then(data => console.log(data))
Expected behavior
rejection handler is called on exception
Your Environment
Doesn't matter. Happens everywhere with every version.

Ooops  sorry.  This ended up being an internal gateway helping by redirecting a DNS failure to a friendly page that failed the JSON parse.   The actual bug was something else.


Remove backup_vault_recovery_points output

what

removed backup_vault_recovery_points as an output, as it is not affected by resource changes

why

Noisy output with little use

/test all

/test all


:lipstick: Added margin to cards

Added Left and Right margin to cards to improve UI as discussed in #27

Hi! Thanks @shubhraagarwal for the pull request! I'll merge it once the site is up and running again!

@all-contributors please add @shubhraagarwal for design


[2.0] Modularize repo and build time speedup

[x] Adding lerna
[ ] Extracting packages

@prateekbh I think we should consider adding https://github.com/wip/app to not accidentally merge WIP PRs. I see me pressing that big green button by accident...

Failed pictures (0): failed-pictures.zip

:postbox: Posted by artipost.io, through Travis build 441013772, for commit 01ce16f.

Failed pictures (0): failed-pictures.zip

:postbox: Posted by artipost.io, through Travis build 441015887, for commit 279b61d.

Failed pictures (0): failed-pictures.zip

:postbox: Posted by artipost.io, through Travis build 441142868, for commit 10884d8.

Failed pictures (0): failed-pictures.zip

:postbox: Posted by artipost.io, through Travis build 441143324, for commit 79adf2a.

Failed pictures (25): failed-pictures.zip

:postbox: Posted by artipost.io, through Travis build 441271964, for commit 2315176.

@prateekbh right now I've shortened the build time from 5:41 run and 6:41 total to 3:07 run and 4:04 total.
Things I've changed:

yarn instead of npm
Ubuntu 14.04 instead of OSX
foxr and Firefox instead of puppeteer and Chrome
http and serve-static instead of serve

I hope you are okay with that

Failed pictures (50): failed-pictures.zip

:postbox: Posted by artipost.io, through Travis build 441374864, for commit d6a9bb0.

Failed pictures (0): failed-pictures.zip

:postbox: Posted by artipost.io, through Travis build 441379758, for commit 4f4348d.

Failed pictures (0): failed-pictures.zip

:postbox: Posted by artipost.io, through Travis build 441380443, for commit d8f5de1.

@cromefire I am good with the changes except that I am a little skeptical about removing puppeteer.

Right now we are running faster even with narrow enabled, which got never implemented.
foxrs API is quite similar to puppeteer.
We could save another few seconds, when the animations wouln't be there, but right now, we have to wait on their completion.

If you whant to see it in action grab https://github.com/prateekbh/preact-material-components/pull/1090/commits/2a8491e37b1db38af5443fc6254c2bd15cf5d550 and run
yarn install
yarn build
cd docs
yarn install
SHOW_FIREFOX=true yarn test

It will open Firefox in not headless mode so you can see, what it does (You need Firefox installed and images produced in not headless mode are invalid).

15 down, 15 to go, I'm half way there, just porting and splitting the components

@prateekbh I think there is nothing against bundling the 4 Tab* components into one package, is there?

@cromefire I guess that'd be fine

@cromefire can we merge this as is?
So that I have some base to help and pitch in the work... We'll fix tests as we go

No I'm still working on it I should have more time in the next days. The tests should be fixed automatically once I migrated everything and fixed the links for the docs.

~ 3 hours of work left

Gotcha, thanks for this gigantic effort do take your time

we have @preact-material as well.

Might be nice

looking good! nice work Chromefire.


Add support for numpy v2

Recommend merging #128 first. There's lots of build system updates there that will likely address some or all of the build failures here.

Thanks for blazing the path on numpy 2 @jim22k! The changes in this PR have been added to #128. Closing.


Directly open Google Play even using openStore: false

Hi, I'm having trouble using your package. Following your documentation, I have used:
await LaunchApp.isAppInstalled(androidPackageName: 'xxxxxxx');
I have used different apps to see if they were saved and in all cases the result has been false.
I'm sure I spelled the package name right because with the LaunchApp.openApp method, it opens the correct page on google play to install the app I'm trying to open with the package.
I have also tried to find packages like com.chrome.android, also being installed as the one I try to open.

hello @lmta1, can you give code sample you have used and also try once in real device and see if you have same issue

Facing the same issue.
final isAppInstalled = await LaunchApp.isAppInstalled(
androidPackageName: 'com.app.debug'
);
It's always returning false and redirecting to playstore even though the app is installed on the phone.
Package name is correct, rechecked multiple times.
Checked on real device and emulator both. Working fine for iOS.

Facing the same issue, did you guys find any solution @lmta1 @TusharFA?

@vd-37 @TusharFA  @lmta1 got it to work on my device by adding some parameters inside my AndroidManifest.xml:

       <--- added this
<application
.
.
.

          <--- added this
       <--- added this

god bro!!

@vd-37 @TusharFA @lmta1 got it to work on my device by adding some parameters inside my AndroidManifest.xml:
    package="com.example.flutter_application">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />       <--- added this
   <application
.
.
.
    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
        <category android:name="android.intent.category.HOME"/>          <--- added this
        <category android:name="android.intent.category.DEFAULT"/>       <--- added this
    </intent-filter>```

this solved my problem thanks


I see in your code you're directly loading ImageNet dataset into a numpy array, does it mean you have a super large memory server, say 256GB? As to my knowledge ImageNet data is around 150GB large. Can you share why you're using .cvs form of imagenet data?
Appreciate for any response.
Thank you.

@concerttttt Sorry for my late response. 🙏🏻
I recorded absolute paths of ImageNet images with csv format before training. So I loaded mini-batch images using generator (tf.data) during training, NOT loading whole images.


Create a dashboard to display agreed team metrics

Brief
By the end of the cycle we should have agreed the first iteration of team metrics, and built a dashboard which can be viewed by the team and those external to the team.
The metrics should include:

2 or 3 availability metrics (following a common approach, as far as possible)
one value metric
one support/operational metric

The dashboard should:

be accessible in a single location
show the performance over the financial year to date
be up-to-date within the last fortnight

Epic lead
TBD
Driving role(s)
Developer, product manager
### Tasks
- [ ] Add a draft title or issue reference here

SMT want some kind of availability that's common across the products.

Pay is using payment acceptance rates, probably something on here https://payments.statuspage.io/#.

Notify provide uptime and 100% of messages sent within 10 seconds.

We could share availability for Netlify (GOV.UK Design System website) and npm (GOV.UK Frontend).

Value metrics

npm download
number of services using the Design System
number organisation using the Design System
community membership (total subscribers to mailchimp)

Nice to have?

% of services using which major version of Frontend. e.g V4, V5

Support / operational metrics, @kellylee-gds do you think we should zendesk? or is there anything else you can think of?

@trang-erskine I think Zendesk is a better metric than GitHub or Slack (at least until we begin proper backlog moderation)


PRD: [JB] Users can export chats

Description:
As a user, I want to see and export my Cody chat history so that I can understand/share the prompts and responses from my interactions with Cody.
Objectives:
Make it easy to see and share the prompts and responses from my interactions with Cody.
### Acceptance Criteria:
- [ ] https://github.com/sourcegraph/jetbrains/issues/405

Design Tasks:
### Design Tasks
- [ ] Add a draft title or issue reference here

Engineering Tasks:
### Engineering Tasks
- [ ] Add a draft title or issue reference here

Related Docs:

PRD: Cody Chat and Commands

Oh, I just noticed that this issue isn't scheduled for the February release (change was made 4 days ago). However, for some reason, this issue ended up on our board (https://github.com/orgs/sourcegraph/projects/381/views/15, likely due to imprecise query).
Unassigning.

BTW Cody's history is maintained in the cody_history.xml configuration file so it's not JSON. If this task is solely for our debugging purposes, I don't see the point in writing specific code that exports to the same JSON schema as the one presented in VS Code. If a user encounters an error and sends us that XML, it will be totally enough (or even better, because we will be able to easily reproduce issues locally by simply replacing this file with our local config).
@taylorsperry, do I understand this issue correctly? What's the motivation for this user story? Would it be okay if we provide export options for original XML files?


eslint-plugin-query: @tanstack/query/exhaustive-deps is triggered for a type used in an instanceof call.

Describe the bug
I've got a query that's using instanceof to ensure that my API client is returning the expected type. The ESLint plugin is flagging this type as an unused dependency, even though that makes no sense.
Your minimal, reproducible example
Included in "Steps to reproduce"
Steps to reproduce
Note that this is using jotai-tanstack-query and this is all in TypeScript, but I assume that's irrelevant.
This reproduces the problem directly:
class SomeBaseResponse {}
class SomeResponse extends SomeBaseResponse {}

function someCall(): SomeBaseResponse {
  return new SomeResponse();
}

export const someQuery = atomWithSuspenseQuery(() => ({
  queryKey: ["someQuery"],
  queryFn: () => {
    const result = someCall();

    if (result instanceof SomeResponse) {
      return result;
    }

    throw new Error("Failed to get something");
  }
}));

The ESLint plugin then gives the following error for the queryKey line:

error  The following dependencies are missing in your queryKey: SomeResponse  @tanstack/query/exhaustive-deps

Expected behavior
I'd expect the plugin to understand that the typename being used isn't a dependency and so not flag it.
How often does this bug happen?
Every time
Screenshots or Videos

Platform

OS: macOS 14.4.1
Browser: Irrelevent
IDE: VSCode
Plugin versions:

"@tanstack/eslint-plugin-query": "^5.28.11",
"eslint": "^8.57.0",

Tanstack Query adapter
react-query
TanStack Query version
5.32.0
TypeScript version
5.4.5
Additional context
No response

@Newbie012 can you take a look please ?

Should be fixed once https://github.com/TanStack/query/pull/7419 is merged


Vendor in latest Buildah

Signed-off-by: TomSweeneyRedHat<EMAIL_ADDRESS>Title says it all.

Changes LGTM.
While parsing through the diff, I noticed y'all are using libnetwork's resolvconf package in Buildah. We ended up copying it into Libpod because trying to vendor it was bringing in somewhere around 50k lines of code; if you've managed to import it for Buildah without doing that, we should delete our local copy and swap to the vendored one once this merges.

Let's go back and copy it into buildah and then revendor it into libpod, removing that vendor.

No, it's worth using the vendored one if I aren't including massive amounts
of unnecessary code, and that seems to be the case. I'd just as soon merge
this and delete the local implementation we have.
On Mon, Apr 15, 2019, 05:34 Daniel J Walsh<EMAIL_ADDRESS>wrote:

Let's go back and copy it into buildah and then revendor it into libpod,
removing that vendor.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/containers/libpod/pull/2931#issuecomment-483180121,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHYHCDlz0Fr_R5R9BHg10sWOHBKPunJWks5vhEeggaJpZM4cuwu_
.

bot, retest this please

Had to change a few tests  due to the way layers now works.
Prior:
# podman build -t foobar.com/before:latest --layers=false -f ~/Dockerfile .
STEP 1: FROM docker.io/library/alpine:latest
Getting image source signatures
Copying blob bdf0201b3a05 done
Copying config cdf98d1859 done
Writing manifest to image destination
Storing signatures
STEP 2: COMMIT containers-storage:[overlay@/var/lib/containers/storage+/var/run/containers/storage:overlay.mountopt=nodev]foobar.com/before:latest
Getting image source signatures
Copying blob a464c54f93a9 skipped: already exists
Copying blob 1dbcab28ce46 done
Copying config 559fd5095f done
Writing manifest to image destination
Storing signatures
--> 559fd5095ff8fe0d03e4dd4789623681e67e0513f2abd525bd08432dd634f6c6
STEP 3: COMMIT foobar.com/before:latest@sha256:7999747fab75d4e9ab42be4cff7d5ea666b58863b53fefedcf471625b54f1a7e

# podman images
REPOSITORY                 TAG      IMAGE ID       CREATED         SIZE
foobar.com/before          latest   559fd5095ff8   4 seconds ago   5.8 MB
docker.io/library/alpine   latest   cdf98d1859c1   6 days ago      5.8 MB

New:
# podman build -t foobar.com/before:latest --layers=false -f ~/Dockerfile .
STEP 1: FROM docker.io/library/alpine:latest
Getting image source signatures
Copying blob bdf0201b3a05 done
Copying config cdf98d1859 done
Writing manifest to image destination
Storing signatures
STEP 2: COMMIT foobar.com/before:latest
--> cdf98d1859c1beb33ec70507249d34bacf888d59c24df3204057f9a6c758dddb

# podman images
REPOSITORY                 TAG      IMAGE ID       CREATED      SIZE
docker.io/library/alpine   latest   cdf98d1859c1   6 days ago   5.8 MB
foobar.com/before          latest   cdf98d1859c1   6 days ago   5.8 MB

Note the image ids are now the same.
@nalind, please verify this is expected, I believe it is.

@TomSweeneyRedHat yes, when there are no instructions we don't create a new layer.  This is going to require some changes to code that assumes that every image has more layers than an image that it's based on, which has not always been the case for images built using docker build.

Happy Green Test buttons

/lgtm


Question - tabler.css in npm package

currently tabler.css is in /static/css folder which is not included in https://npmjs.com/package/@ubeac/svelte package.
@pournasserian should we include it in npm package?
or you have plan to create another package for themes?
or maybe another reason/solution.

We should create another package later.


Issue with PowerBi Dashboard

Hi Guys,
I am having trouble getting the PowerBi dashboard to connect to the sharepoint lists / tables
I have followed the instructions to the letter and entered the Sharepoint lists GUID ID, account has full permission to the site, however it just will not have it.
Expression error: The key didnt match any rows in the table
Clicking "Go to Error" and edit settings opens up the resource navigator and i can select the table that way, however it just loads it briefly then errors again. Any ideas?

many thanks

By looking at the error, I presume it might that the GUIDs to the SP list is wrong or some of the columns which might be referenced in the Power BI do not exist.

Check the GUIDs of all the SP lists if they are correct
Check if you have all the columns as mentioned in the deployment-guide/data-sources

Closing this as we have not received an update. Please reopen , if the issue persists


:bug: FIX: Rename Chinese locales to identifiers used in sphinx

Sphinx-build is using zh_CN and zh_TW to identifiy simplified and tradtional Chinese, while the translations in sphinx-book-theme are using zh-cn and zh-tw, respectively. This leads to partially translated documents where either the sphinx or the sphinx-book-theme are using the correct translation.
See https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-internationalization
Fixes #433

I'll merge this in as I think that it fixes the bug, but @awvwgk if it does not then please ping me in an issue and we can iterate from there!


⚠ ClamAV has degraded performance

In fa4da65, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 263 ms

Resolved: ClamAV performance has improved in d4f3f54.


[Feature Request] Direct-click "Save to playlist" button

Youtube previously had the "Save to playlist" button directly accessible, however, they've recently buried it in a submenu now, requiring multiple clicks.
Would it be possible to add the ability for this button to be made directly clickable? And perhaps also the option to hide/remove the "Clip" and "Thanks" buttons, which clutter up the interface.

The "Save to playlist" button and others appear with a large screen resolution.

Unfortunately, I don't know how to cheat youtube scripts to move buttons or change them to another screen size.
As for scripting various page elements, this is a great extension:
https://chrome.google.com/webstore/detail/khncfooichmfjbepaaaebmommgaepoid
I will try to find other scripts. And see how they work.  But it's a crutch

This script (now non-working now) pushed me to one of the solutions
if you are satisfied with such a solutions, I will implement it

"Buttons without labels" - this plugin will appear in the next release


Process::Status: What is a normal exit?

normal_exit?
Process::Status has a method normal_exit? which "Returns true if the process terminated normally."
The method documentation doesn't clarify what "terminated normally" means exactly. On Unix systems it corresponds to WIFEXITED; on Windows it's always true.
Following the definition of WIFEXITED, "terminated normally" means "by calling exit(3) or _exit(2),  or  by returning from main()" (citing man 2 wait on Ubuntu).
ExitReason::Normal
Process::ExitReason::Normal also represents a "normal" process exit. However, on Windows it does not correspond to Status#normal_exit?:
status = Process::Status.new(LibC::STATUS_CONTROL_C_EXIT)
status.normal_exit?      # => true
status.exit_code.normal? # => false

This is very irritating: Two strongly related API methods use the same term ("normal") with apparently different meanings.
The documentation for ExitReason::Normal further clarifies:

On Unix-like systems, this implies Process::Status#normal_exit? is true.
On Windows, only exit statuses less than 0x40000000 are assumed to be reserved for normal exits.

So it explicitly mentions the relation to Status#normal_exit?, but oddly only for Unix.
The description for Windows contradicts the observed behaviour for #normal_exit?: LibC::STATUS_CONTROL_C_EXIT > 0x40000000, so it should not be considered a normal exit.
signal_exit?
The related method #signal_exit? returns (mostly[^1]) the inverse #normal_exit. It's documentation describes it as "Returns true if the process was terminated by a signal." On Unix systems that corresponds to WIFSIGNALED; on Windows it's always false.
Both methods are well defined, but they're only meaningful on Unix systems.
So I'm also wondering about the general usefulnes. #signal_exit? is clearly a very platform-specific. It cannot be used on Windows, but the concepts expressed via signals are also present on Windows, just using a different mechanism. #signal_exit? exposes an implementation detail of the Unix interface.
Perhaps we could replace it with a portable alternative that relates to the general concept of an abnormal exit instead of tying it to the signal mechanism.
Conclusion
We need a clear, unique definition of what is considered a "normal exit".
That means we must either align normal_exit? and ExitReason::Normal, or rename at least on of them.
The definition of ExitReason::Normal makes a lot of sense to me, and its implementation even on Windows corrsponds to the definition of "normal termination" on Unix.
So I think we should adjust #normal_exit? to be equivalent to exit_reason.normal?. It would essentially be just a convenience short cut, but it certainly makes sense to have that in the API, not just for backwards compatibility.
This would of course consitute a breaking change, but only on Windows which is still in an unsupported state.
Extra
Some additional enhancements for consideration:

Deprecate #signal_exit?
Introduce a new method #abnormal_exit? with an implementation equivalent to !normal_exit? as convenient replacement for #signal_exit?. The behaviour would be identical on Unix, but also reflect the corresponding concepts on Windows.
Introduce a new method ExitReason#abnormal? with an implementation equivalent to !normal? which is a convenient summary for all reasons that are not Normal.

[^1]: The only exception is exit status 0x7f which is neither normal_exit? nor signal_exit?.

I looked a bit more into the odd case of the exit status 0x7f on Unix, which Process::Status consideres neither a normal nor a signal exit.
This is in accordance with the glibc definition of WSIGNALED. But in musl libc WSIGNALED(0x7f) is true. So there's some differences.
Apparently treating 0x7f not as a signal exit is a Unix legacy and not actually correct on all systems. On MIPS architecture it actually seems to be a signal.^1 Not sure if glibc headers are different for MIPS.
The musl implementation seems to simplify things a bit while still being correct (arguably, even more correct because of MIPS semantics).
I suppose it is another argument for removing signal_exit that we don't have to worry about such details.

Makes sense, including the bonus :+1:
Let's follow musl on 0x7f (consider a signal) :+1:
Note that the documentation uses the word abnormal to define ExitReason::Aborted ... so its description should be fixed, maybe:

The process exited due to an abort request.

Closed by  #15255


Add small-scale wind & update solar PV and industry efficiency sliders

This pull request contains four adjustments of and additions to the front-end:

Move solar PV electricity generation sliders from Demand to Supply --> Renewable electricity;
Removes slides 'Solar panels' under Demand --> Households and Demand --> Buildings;
Updates Industry efficiency improvement sliders to 'overall efficiency improvement' instead of 'efficiency improvement/year';
Add a 'land use of solar and wind' visual and table, including two sliders to distribute existing onshore inland wind capacity between large-scale and small-scale turbines.

Additionally, as a part of feature 1, the solar thermal slider for buildings and households has now been labeled as 'auxiliary water heating technology'. Closes #4125 ?
Issues to check:

[ ] Color scheme of the land use of solar and wind chart: are the colors suitable?
[ ] Are translations of chart and table labels consistent and suitable?
[ ] How to properly round the data in the table? The decimal specifications I have added do not seem to work.

Updates Industry efficiency improvement sliders to 'overall efficiency improvement' instead of 'efficiency improvement/year';

a. For other metals this seems to have been forgotten in ETModel.

b. For food, the distinction between electricity and heat efficiency is not made clear in the labels.

c. In food, paper and other, the Dutch translation for Heat seems to be missing.

d. I doubt whether including "target year" and "doeljaar" are terms that resonate with our users. I would rather change the group unit from "%" to something like "% change", remove the "(annual)" in the slider group, and then explain the function of the sliders in the slider text. This is my personal preference however.
e. The number of decimals has gone from 1 (0.0%) to 0 (0%) with the sliders update. Is this intentional?

f. I do not understand why the addition "large-scale" is made only for the offshore solar PV plants.

g. There seems to be a minor mistake in the slider text for Solar PV buildings, where "here" is repeated twice.


Moving block header posting in a specific routine

Describe the Issue
We currently post block headers in the watch inbound routine for the observer client. This is confusing. This logic should be moved into it's own routine.
Eventually we refactor the code to have a routine that will read for new blocks, then pass the block data to inbound and postBlockHeader routines

Closing since not considered for the time being. Keeping the EPIC open for tracking.


Simplify and deduplicate multigraph handling in PyGraph

This commit simplifies and deduplicates the PyGraph method definitions
that add edges to the graph object. When reviewing the multigraph=False
path to debug an issue I found that the PyGraph code around edge
handling was duplicated between every method that adds edges and also
was needlessly returning a PyResult. This commit abstracts the edge
adding to an inner private method that does the multigraph flag handling
and also drops the PyResult return as these functions can't raise an
error. The return type for the functions which add multiple edges is
also updated to be an EdgeIndices object for a faster return time.

Oh, I should probably add an upgrade release note about changing the return type for add_edges_from*

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

25 of 25 (100.0%)  changed or added relevant lines in 3 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.008%) to 98.207%

Files with Coverage Reduction
New Missed Lines
%

src/shortest_path/all_pairs_dijkstra.rs
1
99.27%

Totals

Change from base Build<PHONE_NUMBER>:
0.008%

Covered Lines:
11066

Relevant Lines:
11268

💛  - Coveralls

Oh, that's a good catch it is assuming it's a contiguous sequence which is a faulty assumption with removals. I'm wondering if we either should try to fill all the holes in the indices in a case like this, or just raise an exception if nodes have been removed from the graph and document this as a limitation with extend_from_edge_list. Do you want to push a PR to address it?
I actually was just looking at the edge list I used in the test as an input with a PyDigraph with multigraph=False that I misread as PyGraph (before morning coffee) and was trying to figure out how both (2, 0) and (0, 2) were in the undirected graph's edge list.


Last reset missing

The sensors are working flawlessly, but the energy panel can’t display them correctly because they don’t seem to reset at midnight. This is the error message I get from the Energy panel:
The following entities have state class 'measurement' but 'last_reset' is missing:
sensor.solis_local_daily_generation
The reported figures are therefore cumulative instead of daily. Am I missing something here? The plots in your example show the Energy tab working correctly.

I had the same issue. I was getting a negative spike every midnight.
Also my custom calculations of energy bought and sold were messy - most likely because of very less frequent updates during nights when there was is production.
So I ended up encapsulating solarman_total_production into a utility meter and with this new entity it works perfectly:
utility_meter:
  daily_energy_generated:
    source: sensor.solarman_total_production
    name: Daily energy production
    cycle: daily

I had the same issue but resolved it a different way. I'm using a Solis Inverter and the solis_hybrid.yaml file, but the same should apply for the other makes yaml files.....all you need to do is find the "daily generation" in the file and change the state_class from measurement to total_increasing as below. Once done, restart HA and those warnings should be gone. Hope that helps!
 - group: Generation    items:      - name: "Daily Generation"       class: "energy"       state_class: "total_increasing"       uom: "kWh"       scale: 0.1       rule: 1       registers: [33035]       icon: 'mdi:solar-power'


invenio-cli check-requirements issue for docker-compose v2

Package version (if known): 1.0
Describe the bug
The version output of docker-compose has changed, so check-requirements doesn't work
Steps to Reproduce

Install docker-compose v2 (packaged with the latest docker desktop release)
Type invenio-cli check-requirements --development
See error 'Checking Docker Compose version...
Pre requisites not met.
Errors: Docker Compose minor version missmatch. Got 0 expected 17'

Expected behavior
Version check should handle changes to docker-compose version output.
Additional context
invenio-cli expects the output of docker-compose --version to be like docker-compose version 1.27.4, build 4484c46d9d\n, but in version 2.0 the output is like `Docker Compose version v2.0.0-rc.2'. Not sure if that format will change once it's off the rc stage.

Can verify that newer docker-compose versions don't have the v prefix in the version string, and invenio-cli check-requirements --development is happy:
 docker-compose --version
Docker Compose version 2.4.1

$ invenio-cli check-requirements --development
Checking pre-requirements...
Checking Python version...
Python version OK. Got 3.8.12.
Checking Pipenv is installed...
Pipenv OK. Got version 2022.4.21.
Checking Docker version...
Docker version OK. Got 20.10.14.
Checking Docker Compose version...
Docker Compose version OK. Got 2.4.1.
Checking ImageMagick version...
ImageMagick version OK. Got 7.1.0.
Checking Node version...
Node version OK. Got 14.19.1.
All requisites are fulfilled.

Maybe we can "relax" the regex a bit, so that it would also handle future potential vs.


Enhance the Cart

Description
1.image url store
2.fetch img
3.style the cart
Related Issues
#1124

Closes #1124

Type of PR

[x] Bug fix
[x] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)
before:

after:

Checklist

[x] I have gone through the contributing guide
[x] I have updated my branch and synced it with project main branch before making this PR
[x] I have performed a self-review of my code
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[x] I have commented my code, particularly in hard-to-understand areas.

Additional context:
[Include any additional information or context that might be helpful for reviewers.]

@sunny0625 ,review it and merged with with level

@sunny0625 ,please merged it with level

@khushi-joshi-05,please merged it and alos give the responsed
if you dont give response then i complaint in gssoc
if you merged this PR with level label then i solve next issue

@Varsani2520 Look we have to respond to many PRs and issues and responding to all at same time isn't possible so keep patience.


Import files from Google Spreadsheet

Thank you very much for the plugin, I was waiting for someone to do something like this.
Is it possible to somehow import a google spreadsheet document into the plugin?
I have tried copying and pasting, but it only pastes the values, not the formulas.

Yup, all that is in the plan. Depends on how much interest this plugin gets.

This is one plugin that I'll be happy to donate to if you give it love :)

Import and Export Function: https://github.com/ljcoder2015/obsidian-excel


Fix error on creating nameless actor - [merged]

In GitLab by @mclemente on Nov 13, 2023, 16:28
Merges beta -> master
Supersedes !30.

In GitLab by @mclemente on Nov 13, 2023, 16:28
mentioned in commit fa5ac6a2a13a8ec22342188f4053628a59340e41


Useage?

How do I use this?
Thanks!

Three options:

Put the dump.cfm into any folder and add that path via ColdFusion Admin section for custom tags.
Put the dump.cfm into your project folder and utilize Application.cfc's this.customTagPaths.
Put the dump.cfm in the folder you want to use it in.


BuildStartedOn

For local build the starting time of the generation of provenace is ok. But for a remote build env. we need to use the actual commit time when the build started, it can be found in the build context (github etc..)

This could be done, but its no easy way. As for the github object it depend on the event and whats the input in the event. So as stated in the slsa demo: https://github.com/slsa-framework/github-actions-demo/blob/61c6bcd61d42e8b1656e57469182eb38f2b0e9db/create_provenance.go#L58
Could be we can generate our own "starting point" but it need to be discussed first.
Closing the PR for now.

closing this for now.


(Pressure) Buttons can become out of sync

I managed to de-sync button and door. This should not be possible.
In this case the door should be open on standing on the button and it should be closed when walking off.

Its simple to re-create this by stepping on/off a plate very quick

made some changes in DoorWall.gd, doesn't happen anymore @themangomago


The problem about "SparseConvNet  " when I "bash develop.sh"

when I "bash develop.sh"(SparseConvNet)  .  The problem following appeared:
(I run this in CUDA10.0,Ubuntu 16.04)
" " "
running develop
running egg_info
creating sparseconvnet.egg-info
writing sparseconvnet.egg-info/PKG-INFO
writing dependency_links to sparseconvnet.egg-info/dependency_links.txt
writing top-level names to sparseconvnet.egg-info/top_level.txt
writing manifest file 'sparseconvnet.egg-info/SOURCES.txt'
package init file 'sparseconvnet/SCN/init.py' not found (or not a regular file)
reading manifest file 'sparseconvnet.egg-info/SOURCES.txt'
writing manifest file 'sparseconvnet.egg-info/SOURCES.txt'
running build_ext
building 'sparseconvnet.SCN' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/sparseconvnet
creating build/temp.linux-x86_64-3.6/sparseconvnet/SCN
/usr/local/cuda/bin/nvcc -I/home/htl/.conda/envs/py36/include -I/home/htl/second.pytorch-1.0/second/SparseConvNet/sparseconvnet/SCN/ -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/TH -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/htl/.conda/envs/py36/include/python3.6m -c sparseconvnet/SCN/cuda.cu -o build/temp.linux-x86_64-3.6/sparseconvnet/SCN/cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -Xcompiler -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=SCN -D_GLIBCXX_USE_CXX11_ABI=0
gcc -pthread -B /home/htl/.conda/envs/py36/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/htl/.conda/envs/py36/include -I/home/htl/second.pytorch-1.0/second/SparseConvNet/sparseconvnet/SCN/ -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/TH -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/htl/.conda/envs/py36/include/python3.6m -c sparseconvnet/SCN/sparseconvnet_cuda.cpp -o build/temp.linux-x86_64-3.6/sparseconvnet/SCN/sparseconvnet_cuda.o -std=c++11 -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=SCN -D_GLIBCXX_USE_CXX11_ABI=0
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from sparseconvnet/SCN/sparseconvnet_cuda.cpp:29:0:
sparseconvnet/SCN/CPU/Convolution.cpp: In function ‘at::Tensor rule_index_select(at::Tensor, Int, Int*)’:
sparseconvnet/SCN/CPU/Convolution.cpp:12:50: error: invalid initialization of reference of type ‘const c10::TensorOptions&’ from expression of type ‘at::DeprecatedTypeProperties’
auto target = at::empty({nRules, n}, src.type());
^
In file included from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/ATen.h:11:0,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from sparseconvnet/SCN/sparseconvnet_cuda.cpp:14:
/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/Functions.h:3642:22: note: in passing argument 2 of ‘at::Tensor at::empty(c10::IntArrayRef, const c10::TensorOptions&)’
static inline Tensor empty(IntArrayRef size, const TensorOptions & options) {
^
In file included from sparseconvnet/SCN/sparseconvnet_cuda.cpp:29:0:
sparseconvnet/SCN/CPU/Convolution.cpp:13:29: error: expected primary-expression before ‘>’ token
auto t_ptr = target.data();
^
sparseconvnet/SCN/CPU/Convolution.cpp:13:31: error: expected primary-expression before ‘)’ token
auto t_ptr = target.data();
^
error: command 'gcc' failed with exit status 1
Traceback (most recent call last):
File "examples/hello-world.py", line 8, in
import sparseconvnet as scn
ModuleNotFoundError: No module named 'sparseconvnet'
" " "
I will appreciated if you could reply.

You may need to add template:
auto t_ptr = target.template data<T>();

The SparseConvNet is deprecated in this project. please open issue in SparseConvNet repo instead of in this repo.

Thank you.
two error have been solved.but the last error still appear.
"  " "
running develop
running egg_info
creating sparseconvnet.egg-info
writing sparseconvnet.egg-info/PKG-INFO
writing dependency_links to sparseconvnet.egg-info/dependency_links.txt
writing top-level names to sparseconvnet.egg-info/top_level.txt
writing manifest file 'sparseconvnet.egg-info/SOURCES.txt'
package init file 'sparseconvnet/SCN/init.py' not found (or not a regular file)
reading manifest file 'sparseconvnet.egg-info/SOURCES.txt'
writing manifest file 'sparseconvnet.egg-info/SOURCES.txt'
running build_ext
building 'sparseconvnet.SCN' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/sparseconvnet
creating build/temp.linux-x86_64-3.6/sparseconvnet/SCN
/usr/local/cuda/bin/nvcc -I/home/htl/.conda/envs/py36/include -I/home/htl/second.pytorch-1.0/second/SparseConvNet/sparseconvnet/SCN/ -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/TH -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/htl/.conda/envs/py36/include/python3.6m -c sparseconvnet/SCN/cuda.cu -o build/temp.linux-x86_64-3.6/sparseconvnet/SCN/cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -Xcompiler -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=SCN -D_GLIBCXX_USE_CXX11_ABI=0
gcc -pthread -B /home/htl/.conda/envs/py36/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/htl/.conda/envs/py36/include -I/home/htl/second.pytorch-1.0/second/SparseConvNet/sparseconvnet/SCN/ -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/TH -I/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/htl/.conda/envs/py36/include/python3.6m -c sparseconvnet/SCN/sparseconvnet_cuda.cpp -o build/temp.linux-x86_64-3.6/sparseconvnet/SCN/sparseconvnet_cuda.o -std=c++11 -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=SCN -D_GLIBCXX_USE_CXX11_ABI=0
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from sparseconvnet/SCN/sparseconvnet_cuda.cpp:29:0:
sparseconvnet/SCN/CPU/Convolution.cpp: In function ‘at::Tensor rule_index_select(at::Tensor, Int, Int*)’:
sparseconvnet/SCN/CPU/Convolution.cpp:12:50: error: invalid initialization of reference of type ‘const c10::TensorOptions&’ from expression of type ‘at::DeprecatedTypeProperties’
auto target = at::empty({nRules, n}, src.type());
^
In file included from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/ATen.h:11:0,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from sparseconvnet/SCN/sparseconvnet_cuda.cpp:14:
/home/htl/.conda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/Functions.h:3642:22: note: in passing argument 2 of ‘at::Tensor at::empty(c10::IntArrayRef, const c10::TensorOptions&)’
static inline Tensor empty(IntArrayRef size, const TensorOptions & options) {
^
error: command 'gcc' failed with exit status 1
Traceback (most recent call last):
File "examples/hello-world.py", line 8, in
import sparseconvnet as scn
ModuleNotFoundError: No module named 'sparseconvnet'
" " "
I will open issue in the other repo.But I would appreciated if you could help me for the last error.Thank you.

change line
auto target = at::empty({nRules, n}, src.type());

to this?
auto target = at::empty({nRules, n}, at::TensorOptions().dtype(src.dtype()));

Thank you.
this problem have been finished.
Thank you once more.


Use BytesRefBuilderTermAttributeImpl instead of BytesTermAttributeImpl for BytesRefBuilderTermAttribute

I believe that it was a copy-paste mistake to put BytesTermAttributeImpl as an implementation of BytesRefBuilderTermAttribute.
After this patch, the problem described here was solved.
@gustavonalle

Yes, this was misplaced. Merged, thanks!


Fix problem with Range bytes and multiple hosts via redirect

First of all thank you so much for this amazing library!
I'm attempting to download files from a host that uses a CDN. The host only acts as a resolver, so every response will be a redirect to the appropriate CDN resource. Now, imagine a file is only partially downloaded, and grab is attempting to resume. It will send a HEAD request to the host, which will redirect to the CDN, and the CDN will say that it supports partial downloads (Range). Grab will then proceed to send a GET request with Range header to the host, which returns 404 because it does not support Range - it was the CDN that advertised support for it. The correct scenario here, in my opinion, is to remember the redirect destination during The HEAD operation, and use that for future requests. This is what this CR achieves, in 2 lines of code :)

It seems my automated GitHub tests broke some time ago. Do all tests pass for this diff?

Seems so.
root@grab# go test ./...
ok      github.com/cavaliercoder/grab   2.554s
ok      github.com/cavaliercoder/grab/bps       0.037s
?       github.com/cavaliercoder/grab/cmd/grab  [no test files]
ok      github.com/cavaliercoder/grab/grabtest  0.180s
?       github.com/cavaliercoder/grab/grabui    [no test files]

Love it. Thank you for submitting this diff!


Approve PR only when all issues are below threshold severity

This will fix #95
These changes will modify default behavor which should be discussed.
If there are consumers who want PR to be approved when there are zero issues, then additional threshold value should be added. Something like sonar.stash.reviewer.approval.issue.severity.threshold
However, this can be leveraged by lowing down sonar.stash.task.issue.severity.threshold
My opinion is to keep number of settings as low as possible and NOT to add any additional thresholds. Approving a PR as soon as there are no issue-tasks left looks quite natural so I'd stay with that as default behavior.

Hi @kzaikin, thanks for this!
FYI #95 is for a different usecase. In the SonarQube WebUI you can define lots of conditions when to accept the state of a project. Unfortunately this is not yet evaluated for preview builds.
To be honest I would prefer to have the preview functionality from SonarQube side than to implement all kinds of conditions in the plugin.
Do you have an urgent to use this new setting on your end or would you be fine with waiting for SonarSource to implement this on their side?

@t-8ch I have a dozen teams inside my company waiting for this change
I think we can modify the code to use Sonar's quality gates later, as soon as quality gates are available in preview analysis

@kzaikin Fair enough.
I would prefer a dedicated setting though. (In the hope of being able to delete it soon...)
It would also be nicer to have a comparator implementation for severities, so we do not have to pass around lists of strings...

@kzaikin I implemented a version of this in #141.
Would this cover your usecase?

Superseeded by #141


Cucumber favicon

🤔 What's changed?

Introduced a favicon, using the Cucumber logo

⚡ What's your motivation?

Branding and visual identity
Easier to identify from tabs

🏷 What kind of change is this?

:bank: Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behaviour)

♻ Anything particular you want feedback on?

📋 Checklist:

[x] I agree to respect and uphold the Cucumber Community Code of Conduct

Nice one!