The kfo-PDF files for testing need to be copied using "binmode"…

…or Windows will introduce "\r\n". The following is an example for errors logged during running the tests after they failed, which were fixed after adding "binmode" for copying the files.
qpdf: selecting --keep-open-files=n
qpdf: processing 001-kfo.pdf
WARNING: 001-kfo.pdf: file is damaged
WARNING: 001-kfo.pdf (offset 556): xref not found
WARNING: 001-kfo.pdf: Attempting to reconstruct cross-reference table

Thanks! As soon as CI is green, I will merge.

I wonder why this doesn't fail for me. Anyway, it definitely appears to be a correct change.

I must admit I'm not using plain MSYS2 to run the tests, but instead what is included in the Windows distribution of GIT. While I'm pretty sure it's MSYS2 as well, or at least parts of it, binmode-stuff might simply be Windows-native for me, while non-Windows even on Windows for you.

Yes, your theory is probably right. So I could potentially make this mistake again and not notice, but your change is clearly an improvement, so assuming it doesn't introduce other problems (and I can't imagine that it would), I think it's a good change.


CI fix attempt

@olydis,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target_ead6684a-6856-4197-881d-b9bc9ce7dfc7/pull/1 is merged into live branch.
Auto archive content to https://github.com/OPS-E2E-PPE/docs-archive-test-target_ead6684a-6856-4197-881d-b9bc9ce7dfc7.git

Docs Build status updates of commit 6512b55:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Archive_master_2019-09-25-11-45-56 has been deleted or has been force pushed: fatal: Couldn't find remote ref Archive_master_2019-09-25-11-45-56

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.


Style change of HamburgerMenu elements in Custom.xaml has no effect (Windows AU SDK)

If I change for example 'NavAreaBackground' in Custom.xaml, it has no effect in the app because in HamburgerPublicMethods.cs the style will be curiously overwritten:
this.SetIfNotSet(NavAreaBackgroundProperty, Colors.DimGray.ToSolidColorBrush());

With the old Win10 TH2 and TH2 SDK there were no problems.

Good catch @revan1199. Keep researching. I will be out of touch for a few days.

I tried to unterstand it, it seems that there are a problem with DependencyProperty. The DependencyProperty has the status "UnsetValue", even if it set in Custom.xaml via setter.
The DependencyPropertys at "HamburgerMenu.PublicProperties.xaml" looks right for me, under Win10 TH2 it works nice. Is this a AU Bug?


tfsec: 0.63.1 -> 1

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/tfsec/versions.
meta.description for tfsec is: "Static analysis powered security scanner for terraform code"
meta.homepage for tfsec is: "https://github.com/aquasecurity/tfsec"
meta.changelog for tfsec is: ""
Updates performed

Version update

To inspect upstream changes

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
/nix/store/ff9izw406wlns9p9yhims31si2pyfny7-tfsec-1/bin/tfsec passed the binary check.
/nix/store/ff9izw406wlns9p9yhims31si2pyfny7-tfsec-1/bin/tfsec-docs passed the binary check.
/nix/store/ff9izw406wlns9p9yhims31si2pyfny7-tfsec-1/bin/tfsec-checkgen passed the binary check.
/nix/store/ff9izw406wlns9p9yhims31si2pyfny7-tfsec-1/bin/tfsec-pr-lint passed the binary check.
/nix/store/ff9izw406wlns9p9yhims31si2pyfny7-tfsec-1/bin/external passed the binary check.
0 of 5 passed binary check by having a zero exit code.
5 of 5 passed binary check by having the new version present in output.
found 1 with grep in /nix/store/ff9izw406wlns9p9yhims31si2pyfny7-tfsec-1
found 1 in filename of file in /nix/store/ff9izw406wlns9p9yhims31si2pyfny7-tfsec-1

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
1 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
tfsec

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/ff9izw406wlns9p9yhims31si2pyfny7-tfsec-1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A tfsec https://github.com/r-ryantm/nixpkgs/archive/a44d4d57addaa45581d9b87ba1013584d058d080.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/ff9izw406wlns9p9yhims31si2pyfny7-tfsec-1
ls -la /nix/store/ff9izw406wlns9p9yhims31si2pyfny7-tfsec-1/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

tfsec

Maintainer pings
cc @fabaff @marsam for testing.

@GrahamcOfBorg eval


add see also link to docs endpoint description

closes #1738

Coverage increased (+0.03%) to 78.461% when pulling 1a3fb3ec225cd7b371556f24a3cab0579e74d3b2 on abemassry:docs-see-also-object-links into 4ff525a5ee1b875091889aa89f3acab8faafd1ec on linode:develop.

Coverage remained the same at 78.435% when pulling ed62b72403cd855c66f83f54d1588957e68bd37b on abemassry:docs-see-also-object-links into 4ff525a5ee1b875091889aa89f3acab8faafd1ec on linode:develop.

See also section now no longer appears.

@eatonphil works for me, I'll have to take a look at your machine

Changes Unknown when pulling 4de8374e8fc509c3755a8b3a94f3590e41e64ec9 on abemassry:docs-see-also-object-links into ** on linode:develop**.

Coverage remained the same at 78.158% when pulling cb071ab542db768d4ce33667ef76ae511ddf2b9d on abemassry:docs-see-also-object-links into f647cc2edc5e92023c8ab88ee90abe5046550f98 on linode:develop.


Jesse: Watch olipopflavors.com

Jesse requests the watch of the watch_keyword olipopflavors\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

Approved by Nisse Engström in Charcoal HQ


Show image picker when Uri is not provided

A common use case is to first start a chooser to select the file to crop and then call the CropImage.activity(uri) method. It would be great if we can include the file selection as a part of the cropping flow.
For example if the image Uri is not provided, it should start a chooser and then automatically start the cropper once the file is selected. Essentially this is quite same as moving part of the quick-start MainActivity into the main library.

can't be done because of how start activity for result works in android.

This I believe should be quite easy by introducing another activity
in-between when the Uri is null. The getIntent method would check the Uri
and use the PickerActivity class instead of CropActivity. The
PickerActivity would onActivityResult success start the CropActivity.
Alternate method would be to call the CropImage.startPickImageActivity()
from onCreate of CropImageActivity instead of  setImageUriAsync() when Uri
is null and do the setImageUriAsync in onActivityResult when we get the
response from picker.
I had done this with an older version of library. Will be doing again with
latest version.
If you would be interested in this, I can send a pull request when ready.
Thanks.

Definitely interested, PR would be awesome!
Couple of points:

Must be backward compatible, prefer adding new method than changing the behavior of existing one unless upgrade path is very clear to existing users.
Make sure you handle Android 6 new security scheme, requestPermissions stuff.
If you can also make it work for fragments that would be great.

Good luck,
Thank you.

Sent a PR. Seems to work for me with the permissions.
Not tested with fragments, but it should probably work as no change should interfere with caller fragment.
Thanks.

available in 2.4.0, thx


Add properties not accessible from get.sh to testenv.properties

Issue: #2916
Get the properties which are only accessible from the build.xml files, and add them to testenv.properties.

Close this issue as the PRs are delivered.


System.IO.FileLoadException - assembly RhythmRevit - AdWindows

When using Revit 2021 and your latest Package, we get a notification.
It actually made Dynamo less stable. So hopefully it's an easy fix.
System.IO.FileLoadException
Dynamo has detected a conflict with a dependency and may be unstable. If any issues are detected, please uninstall addins or packages and contact the provider.
While loading assembly RhythmRevit, Version=2<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null, Dynamo detected that the dependency AdWindows, Version=2<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null was already loaded with an incompatiable version. It is likely that another Revit Addin has loaded this assembly, please try uninstalling other Addins, and starting Dynamo again. Dynamo may be unstable in this state.
It is likely one of the following assemblies loaded the incompatible version:
UIFrameworkInterop, UIFramework, UIFrameworkServices, AdApplicationFrame, FabricationPartBrowser, RevitAPIUI, Autodesk.Revit.CloudRendering.Application, ConnectedDesktopUI, ContentDelivery

perhaps this is part of our problem?

Thanks for the reply. And for your Package! We have been enjoying it for years.
I normally ignore the notifications. But this combination was strange. And Dynamo crashed. So I thought it was a good idea to give feedback. And about the first problem, hopefully the Dynamo team is able to prevent unimportant notifications in future.


500 error in tests

I have installed the latest package version, but I got this error when trying to do a test on v2 that does not exist and v1 is exist

I guess the issue is with the binding

@mbpcoder have any updates here?

@mbpcoder have any updates here?

What is your Laravel version?


Added automated greetings

Have designed a workflow which will greet user on their email and in the issue raising chat for raising a issue or PR
Please check and merge it and add hacktoberfest label.
Resolved issues
#18

Hey @MitulSonagara can you please authorize it.

@harish08102004 Good job.. thank you for contribution


[WIP] Travis Fixes

Fixes intermittent errors on Travis that were a result of race conditions.
We now trigger a kernelInfo on restart, to ensure we get a response back.

Fixed by #42.


Performance Regression: LMCache Slower than CacheBlend on TTFT with Same Dataset

Describe the bug
In my tests comparing LMCache and CacheBlend on the same dataset, I found that LMCache performs slower in terms of TTFT (Time To First Token) compared to CacheBlend, even though both configurations use the same hardware (A100-80GB). This behavior is unexpected, and I'm trying to understand the cause of the performance drop with LMCache.
To Reproduce
Steps to reproduce the behavior:

Set up LMCache with the configuration below and CacheBlend with default settings on the same machine (A100-80GB).
Use the "inputs" dataset from CacheBlend and run it with LMCache.
Compare the TTFT results between LMCache and CacheBlend.
Observe that TTFT on LMCache is generally slower than on CacheBlend.

Expected behavior
I expected the performance (TTFT) of LMCache to be either the same as or faster than CacheBlend when using the same dataset and hardware setup.
Desktop (please complete the following information):

OS: [e.g. Ubuntu 22.04]
Browser: N/A
Version: N/A

Additional context
Here are the configuration details for LMCache I used:
chunk_size: 256
local_device: "cuda"

# Enables KV blending
enable_blending: True

# Whether retrieve() is pipelined or not
pipelined_backend: True

Both LMCache and CacheBlend were tested on the same device (A100-80GB).
LMCache is expected to optimize KV retrieval with blending enabled, so it’s unclear why its TTFT is slower than CacheBlend’s.
Could you help identify why LMCache might be performing worse than CacheBlend under these conditions? Any insights would be appreciated.

Hey @xhx1022 , thanks for submitting the issue. By comparing to "CacheBlend", are you referring to this github repo https://github.com/YaoJiayi/CacheBlend?

Hey @xhx1022 , thanks for submitting the issue. By comparing to "CacheBlend", are you referring to this github repo https://github.com/YaoJiayi/CacheBlend?

Hi @ApostaC , thanks for your response. Yes, I am referring to this repository: CacheBlend.
For example, when I replicated the blend_musique.py experiment, my code was as follows:
import lmcache_vllm
import torch
from lmcache_vllm.blend_adapter import (append_separator,
                                        combine_input_prompt_chunks)
from lmcache_vllm.vllm import LLM, SamplingParams
import json
import numpy as np
from transformers import AutoTokenizer
from utils import load_dataset, normalize_question, build_qa_prompt, compute_f1
from pathlib import Path

eval_dataset = load_dataset("inputs/musique_s.json")

llm = LLM(model="/mnt/sdb/home/xhx/models/Mistral-7B-Instruct-v0.2", gpu_memory_utilization=0.8,
          #tokenizer=tokenizer,
          )
tokenizer = AutoTokenizer.from_pretrained("/mnt/sdb/home/xhx/models/Mistral-7B-Instruct-v0.2")
llm.set_tokenizer(tokenizer)

prefix_prompt = "You will be asked a question after reading several passages. Please directly answer the question based on the given passages. Do NOT repeat the question. The answer should be within 5 words..\nPassages:\n"
query_prompt = "\n\nAnswer the question directly based on the given passages. Do NOT repeat the question. The answer should be within 5 words. \nQuestion:"

ttft_blend = []
ttft_full = []
f1_blend = []
f1_full = []

def precompute_kv(text_chunk, llm):
    sampling_params_prefix = SamplingParams(temperature=0.0,
                                            max_tokens=1)
    text_chunk = append_separator(text_chunk)
    llm.generate([text_chunk], sampling_params_prefix)

i = 0
for ex in eval_dataset:
    # if i == 20:
    #     break
    answers = ex["answers"]
    doc_prompts, q_prompt = build_qa_prompt(ex, query_prompt)

    print("-------------- Pre-computing KV cache for the chunks -------------------")
    # Concatenate old KVs
    for chunk in doc_prompts:
        precompute_kv(chunk, llm)

    print("Running the real query here!")
    sampling_params = SamplingParams(temperature=0, max_tokens=32)
    user_prompt = [prefix_prompt]
    user_prompt.extend(doc_prompts)
    user_prompt.append(q_prompt)
    user_prompt = combine_input_prompt_chunks(user_prompt)
    output = llm.generate(user_prompt, sampling_params)
    res = output[0].outputs[0].text
    print(f"Cached generation: {res}")
    ttft = output[0].metrics.first_token_time-output[0].metrics.first_scheduled_time
    print(f"TTFT with cache: {ttft}")
    ttft_blend.append(ttft)
    f1 = max([compute_f1(res, answer, tokenizer) for answer in answers])
    f1_blend.append(f1)
    i += 1

print("---------------Result Summary---------------------")
print(f"TTFT with cache: {np.mean(ttft_blend)}")
print(f"F1 with cache: {np.mean(f1_blend)}")

# Graceful exit
lmcache_vllm.close_lmcache_engine()

the config is
chunk_size: 256
local_device: "cuda"

# Enables KV blending
enable_blending: True

# Whether retrieve() is pipelined or not
pipelined_backend: False

Due to the large dataset causing errors, I set the number of iterations to 20.
Here are the results:
# ---------------Result Summary---------------------
# TTFT with cache: 0.1629036545753479
# F1 with cache: 0.3101577302158697

However, the results from CacheBlend are as follows:
# ---------------Result Summary---------------------
# k = 20
# TTFT with cache: 0.12906403541564943
# TTFT with full prefill: 0.5165045738220215
# F1 with cache: 0.4249595543345544
# F1 with full prefill: 0.37796288798920374

Similarly, when I used LMCache to reproduce the code from blend.py, the same error occurred:
[rank0]: Traceback (most recent call last):
[rank0]:   File "/mnt/sdb/home/xhx/projects/vllm/vllm/worker/model_runner_base.py", line 112, in _wrapper
[rank0]:     return func(*args, **kwargs)
[rank0]:   File "/mnt/sdb/home/xhx/projects/lmcache-vllm/lmcache_vllm/vllm_injection.py", line 114, in new_execute_model
[rank0]:     hidden_or_intermediate_states = model_executable(
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:   File "/mnt/sdb/home/xhx/projects/vllm/vllm/model_executor/models/llama.py", line 448, in forward
[rank0]:     model_output = self.model(input_ids, positions, kv_caches,
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:   File "/mnt/sdb/home/xhx/projects/lmcache-vllm/lmcache_vllm/models/llama.py", line 196, in llama_model_forward_with_blend
[rank0]:     hidden_states, residual = layer(
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:   File "/mnt/sdb/home/xhx/projects/lmcache-vllm/lmcache_vllm/models/llama.py", line 151, in llama_decoder_layer_forward_with_blend
[rank0]:     hidden_states = self.self_attn(
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]:   File "/mnt/sdb/home/xhx/projects/lmcache-vllm/lmcache_vllm/models/llama.py", line 124, in llama_attn_forward_with_blend
[rank0]:     q, k, v, attn_metadata = do_blend(
[rank0]:   File "/mnt/sdb/home/xhx/projects/lmcache-vllm/lmcache_vllm/blend_adapter.py", line 290, in do_blend
[rank0]:     blender_output = blend_metadata.blend_executor.blend(
[rank0]:   File "/mnt/sdb/home/xhx/projects/LMCache/lmcache/blend/executor.py", line 195, in blend
[rank0]:     original_positions.to(device=retrieved_k.device,
[rank0]: RuntimeError: CUDA error: an illegal memory access was encountered
[rank0]: CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
[rank0]: For debugging consider passing CUDA_LAUNCH_BLOCKING=1
[rank0]: Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

[rank0]: During handling of the above exception, another exception occurred:

[rank0]: Traceback (most recent call last):
[rank0]:   File "/mnt/sdb/home/xhx/projects/LMCache/LMCache_examples/blend.py", line 42, in <module>
[rank0]:     output = llm.generate(user_prompt, sampling_params)
[rank0]:   File "/mnt/sdb/home/xhx/projects/vllm/vllm/utils.py", line 1036, in inner
[rank0]:     return fn(*args, **kwargs)
[rank0]:   File "/mnt/sdb/home/xhx/projects/vllm/vllm/entrypoints/llm.py", line 348, in generate
[rank0]:     outputs = self._run_engine(use_tqdm=use_tqdm)
[rank0]:   File "/mnt/sdb/home/xhx/projects/vllm/vllm/entrypoints/llm.py", line 715, in _run_engine
[rank0]:     step_outputs = self.llm_engine.step()
[rank0]:   File "/mnt/sdb/home/xhx/projects/vllm/vllm/engine/llm_engine.py", line 1223, in step
[rank0]:     outputs = self.model_executor.execute_model(
[rank0]:   File "/mnt/sdb/home/xhx/projects/vllm/vllm/executor/gpu_executor.py", line 130, in execute_model
[rank0]:     output = self.driver_worker.execute_model(execute_model_req)
[rank0]:   File "/mnt/sdb/home/xhx/projects/vllm/vllm/worker/worker_base.py", line 327, in execute_model
[rank0]:     output = self.model_runner.execute_model(
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
[rank0]:     return func(*args, **kwargs)
[rank0]:   File "/mnt/sdb/home/xhx/projects/vllm/vllm/worker/model_runner_base.py", line 125, in _wrapper
[rank0]:     pickle.dump(dumped_inputs, filep)
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/storage.py", line 1006, in __reduce__
[rank0]:     torch.save(self, b, _use_new_zipfile_serialization=False)
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/serialization.py", line 656, in save
[rank0]:     _legacy_save(obj, opened_file, pickle_module, pickle_protocol)
[rank0]:   File "/home/xhx/softwares/miniconda3/envs/lmcache/lib/python3.10/site-packages/torch/serialization.py", line 800, in _legacy_save
[rank0]:     storage._write_file(f, _should_read_directly(f), True, torch._utils._element_size(dtype))
[rank0]: RuntimeError: CUDA error: an illegal memory access was encountered
[rank0]: CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
[rank0]: For debugging consider passing CUDA_LAUNCH_BLOCKING=1
[rank0]: Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Here is my code
import lmcache_vllm
import torch
from lmcache_vllm.blend_adapter import (append_separator,
                                        combine_input_prompt_chunks)
from lmcache_vllm.vllm import LLM, SamplingParams
import json
import time
from transformers import AutoTokenizer
torch.multiprocessing.set_start_method('spawn')

def precompute_kv(text_chunk, llm):
    sampling_params_prefix = SamplingParams(temperature=0.0,
                                            top_p=0.95,
                                            max_tokens=1)
    text_chunk = append_separator(text_chunk)
    llm.generate([text_chunk], sampling_params_prefix)

llm = LLM(model="/mnt/sdb/home/xhx/models/Mistral-7B-Instruct-v0.2", gpu_memory_utilization=0.9,
          #tokenizer=tokenizer,
          )
tokenizer = AutoTokenizer.from_pretrained("/mnt/sdb/home/xhx/models/Mistral-7B-Instruct-v0.2")
llm.set_tokenizer(tokenizer)

#TODO (Jiayi): fix last len

for sample_idx in range(1,2):
    f = open(f"inputs/{sample_idx}.json")
    ex = json.load(f)
    chunk_num = ex['chunk_num']
    q_prompt = ex['query']
    print("-------------- Pre-computing KV cache for the chunks -------------------")
    # Concatenate old KVs
    doc_prompts = [ex[f'{i}'] for i in range(chunk_num)]
    for doc in doc_prompts:
        precompute_kv(doc, llm)

    doc_prompts.append(q_prompt)
    user_prompt = combine_input_prompt_chunks(doc_prompts)
    sampling_params = SamplingParams(temperature=0, max_tokens=10)
    output = llm.generate(user_prompt, sampling_params)
    print(f"Cached generation: {output[0].outputs[0].text}")
    print(f"TTFT with cache: {output[0].metrics.first_token_time-output[0].metrics.first_scheduled_time}")

Hey @xhx1022 , we are going to release a new version soon (today or tomorrow), and the new version contains some performance optimization.
Can you try it again after the new version is released?

Hey @xhx1022 , we are going to release a new version soon (today or tomorrow), and the new version contains some performance optimization.
Can you try it again after the new version is released?

Ok, looking forward to your update!


[card, cardgroup] React wrapper:  enable border to allow gradient and offset items

Follow onto #5962, #5993 and #6016
The problem
Need the ability to add border gradient applied to card group cards in between cards, beginning in one corner to the other corner without breaking or starting over. Also needs to skip over blank/empty/offset columns.

border images don't work great because we need them in the grid gutter between cards.
things like box shadows don't allow you to add gradients properly.
needs to be applied to the card group as a whole so it has a consistent beginning to end flow.
needs to also be applied to a single card for certain situations.

Possible solution

See the prototype for how I approached it. There maybe a better way, but at least this will kind of demonstrate what we're looking for.
Empty cards for offsetting
Border using padding on card
linear background applied to the card, and card group depending on the effect we're going for.
Gutters in-between two offsets shouldn't exist both horizontally, and vertically
Empty items don't have borders

Additional information

See a prototype exploring some of the different approaches. https://codepen.io/photodow/full/MWpYKmL

Not needed.  All development will be managed under the Content block with L-shaped card group issue  #6288


LumenAI should output plots/tables to the sidebar

As to not crowd the chat.

Not sure I understand this one, plots/tables are the main output of the chat and when screen real estate is most important.

If you expand the sidebar width to 800-1000px, it can be something akin to the artifacts sidebar in Claude.

Think we have this now as part of the explorer UI.


[UNDERTOW-2234] HttpClientSNITestCase fails with last jdk 11.0.18 and 17.0.6

Issue: https://issues.redhat.com/browse/UNDERTOW-2234
The last JDK update resumes the session for the test. Just using a different SSLContext for each test avoids the cache and performs the full negotiation in each method.
PR for master:
PR for 2.2.x: https://github.com/undertow-io/undertow/pull/1436

Thanks @rmartinc !


Error at Start

Every Time I start the  adapter get an error which I get every time the request are done.

parcel.0
2023-10-22 16:07:23.605
error
Error: read ETIMEDOUT

Adapter version 0.0.32

please switch to beta channel and install the latest version

I use 0.0.32. There is no newer version

please switch to iobroker beta release channel

I did, but there is no newer version

@TA2k
All versions that you are currently uploading are only available on npm and need to be installed via admin npm tab. It would make sense to update GitHub once again to the latest version.

Installed from NPM. Not this error. Now I get other errors.


Linker errors with intrinsics due to old builtins

This was originally raised in https://github.com/rp-rs/rp2040-project-template/issues/33
Hasn't been resolved yet, but posting here for greater visibility.
yallxe commented

error: linking with flip-link failed: exit code: 1
|
= note: "flip-link" "-flavor" "gnu" "D:\Dev\rp2040-project-template\target\thumbv6m-none-eabi\release\deps\rp2040_project_template-1198b80032431cff.rp2040_project_template.9c75850d-cgu.0.rcgu.o" "--as-needed" "-L" "D:\Dev\rp2040-project-template\target\thumbv6m-none-eabi\release\deps" "-L" "D:\Dev\rp2040-project-template\target\release\deps" "-L" "D:\Dev\rp2040-project-template\target\thumbv6m-none-eabi\release\build\rp2040-project-template-ff201362c93239a8\out" "-L" "D:\Dev\rp2040-project-template\target\thumbv6m-none-eabi\release\build\cortex-m-edb3200537960378\out" "-L" "D:\Dev\rp2040-project-template\target\thumbv6m-none-eabi\release\build\cortex-m-rt-44339646bd76ccef\out" "-L" "D:\Dev\rp2040-project-template\target\thumbv6m-none-eabi\release\build\defmt-4ae0c0a354199f32\out" "-L" "D:\Dev\rp2040-project-template\target\thumbv6m-none-eabi\release\build\rp2040-pac-6d37e37f505878c4\out" "-L" "C:\Users\yallxe\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\thumbv6m-none-eabi\lib" "-Bstatic" "C:\Users\yallxe\AppData\Local\Temp\rustcxHD7yj\libcortex_m_rt-de909aa96899d9be.rlib" "--start-group" "C:\Users\yallxe\AppData\Local\Temp\rustcxHD7yj\libcortex_m-f1aabfc11535f99f.rlib" "--end-group" "C:\Users\yallxe\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\thumbv6m-none-eabi\lib\libcompiler_builtins-8800918f309bcb9b.rlib" "-Bdynamic" "--eh-frame-hdr" "-znoexecstack" "-L" "C:\Users\yallxe\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\thumbv6m-none-eabi\lib" "-o" "D:\Dev\rp2040-project-template\target\thumbv6m-none-eabi\release\deps\rp2040_project_template-1198b80032431cff" "--gc-sections" "-O1" "--nmagic" "-Tlink.x" "-Tdefmt.x"
= note: rust-lld: error: duplicate symbol: __aeabi_uidivmod

defined at rp2040_project_template.9c75850d-cgu.0
D:\Dev\rp2040-project-template\target\thumbv6m-none-eabi\release\deps\rp2040_project_template-1198b80032431cff.rp2040_project_template.9c75850d-cgu.0.rcgu.o:(.text+0x1)
defined at arm.rs:14 (/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.66/src\arm.rs:14)
compiler_builtins-8800918f309bcb9b.compiler_builtins.14216641-cgu.174.rcgu.o:(.text.__aeabi_uidivmod+0x1) in archive C:\Users\yallxe.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\thumbv6m-none-eabi\lib\libcompiler_builtins-8800918f309bcb9b.rlib

      rust-lld: error: duplicate symbol: __aeabi_idivmod
      >>> defined at rp2040_project_template.9c75850d-cgu.0
      >>>            D:\Dev\rp2040-project-template\target\thumbv6m-none-eabi\release\deps\rp2040_project_template-1198b80032431cff.rp2040_project_template.9c75850d-cgu.0.rcgu.o:(.text+0x35)
      >>> defined at arm.rs:82 (/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.66/src\arm.rs:82)
      >>>            compiler_builtins-8800918f309bcb9b.compiler_builtins.14216641-cgu.174.rcgu.o:(.text.__aeabi_idivmod+0x1) in archive C:\Users\yallxe\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\thumbv6m-none-eabi\lib\libcompiler_builtins-8800918f309bcb9b.rlib

      flip-link: the native linker failed to link the program normally; please check your project configuration and linker scripts

The error mentions flip-link but the error is rust-lld: error: duplicate symbol: __aeabi_uidivmod
There's a fix for this in compiler_builtins-0.1.69 but as listed above it's using (compiler_builtins-0.1.66).

Do you think we can do anything to fix this in rp-hal, or is the ticket more about properly documenting the required versions?

Neither of those reporting the bug specified their compiler versions, makes it hard to know if it was an old compiler issue.
It's both a documentation issue, plus a discovery one (so this issue will form done of the documentation).
Is there an easy way of knowing which compiler-builtins a particular rustc will use? We'll want both minimal stable plus nightly version.

I assume the best way to determine compiler-builtins version is to look at the Cargo.lock file in the rustc repo with each release tag?
In that case, rustc 1.60 is the minimum version if you want to have intrinsics feature enabled.
The version of builtin-intrinsics was bumped in this commit https://github.com/rust-lang/rust/commit/7b8f6ac5ab486d88afc6e80c8491ee5f6b5c4906 so any nightly 2022/02/11 or later should be fine. rustc release 1.60 was 2022/04/07.
So: best guess is this was getting built with an ancient nightly

I think this issue is now resolved, we'll link people here if they report this issue in the future.


source/Main.hx:85: characters 61-65 : Float should be Int, among other things

Describe your problem here.
source/Main.hx:85: characters 61-65 : Float should be Int
source/Main.hx:85: characters 61-65 : ... For optional function argument 'updateFramerate'
source/Main.hx:85: characters 61-65 : ... For function argument 'child'
C:/HaxeToolkit/haxe/lib/flixel-addons/3,1,1/flixel/addons/text/FlxTypeText.hx:8: characters 8-29 : Type not found : flixel.sound.FlxSound
source/PlayState.hx:75: characters 8-22 : Type not found : vlc.MP4Handler
C:/HaxeToolkit/haxe/lib/flixel-addons/3,1,1/flixel/addons/text/FlxTypeText.hx:78: characters 26-34 : Type not found : FlxSound
source/CoolUtil.hx:18: lines 18-141 : ... Defined in this class
C:/HaxeToolkit/haxe/lib/flixel-addons/3,1,1/flixel/addons/effects/chainable/FlxEffectSprite.hx:137: characters 49-58 : flixel.animation.FlxAnimationController has no field numFrames
source/PlayState.hx:1620: characters 13-23 : Type not found : MP4Handler
source/DialogueBox.hx:144: characters 16-22 : flixel.addons.text.FlxTypeText has no field sounds
source/DialogueBox.hx:244: characters 16-25 : flixel.addons.text.FlxTypeText has no field resetText
source/DialogueBox.hx:245: characters 16-21 : flixel.addons.text.FlxTypeText has no field start
source/DialogueBox.hx:246: characters 16-32 : flixel.addons.text.FlxTypeText has no field completeCallback
source/DialogueBox.hx:223: characters 18-22 : flixel.addons.text.FlxTypeText has no field skip
C:/HaxeToolkit/haxe/lib/flixel-addons/3,1,1/flixel/addons/transition/FlxTransitionableState.hx:81: characters 20-30 : Field startOutro is declared 'override' but doesn't override any field
Are you modding a build from source or with Lua?
Source
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
yes, all i've done is center the freeplay menu and added another icon per freeplay song

update:
source/Main.hx:85: characters 61-65 : Float should be Int
source/Main.hx:85: characters 61-65 : ... For optional function argument 'updateFramerate'
source/Main.hx:85: characters 61-65 : ... For function argument 'child'
source/PlayState.hx:75: characters 8-22 : Type not found : vlc.MP4Handler
source/PlayState.hx:1620: characters 13-23 : Type not found : MP4Handler

update 2:
source/Main.hx:85: characters 61-65 : Float should be Int
source/Main.hx:85: characters 61-65 : ... For optional function argument 'updateFramerate'
source/Main.hx:85: characters 61-65 : ... For function argument 'child'

found the issue, if you are having the same issue, go into source/Main.hx and replace line 85 with "addChild(new FlxGame(gameWidth, gameHeight, initialState, framerate, framerate, skipSplash, startFullscreen));" or just remove the zoom argument

found the issue, if you are having the same issue, go into source/Main.hx and replace line 85 with "addChild(new FlxGame(gameWidth, gameHeight, initialState, framerate, framerate, skipSplash, startFullscreen));" or just remove the zoom argument

ok but what about vlc


How to use Pause & Resume on consumer?

I'm using KafkaJS to connect to a Kafka cluster. My consumers are responsible for processing tasks which can fail at some time and succeed after waiting for a duration (for example, 1 hour). Before this duration, any attempt to process any task will result to another failure.
I'm following the guide at  to handle error in my consumer, trying to stop consuming the messages. However, right after an error is thrown, the consumer restarts and consume the error-causing message again.
How can I use Pause & Resume to handle error in this case?

I'm following the guide at to handle error in my consumer, trying to stop consuming the messages.

What guide is this? Typically you don't pause and resume consumers because you have an error in processing. More typical would be to retry the offending message at a later time, either naively by just letting the consumer crash and restart, or in a more sophisticated way by sending the message to a dead letter queue so that the consumer can continue processing other messages in the meantime.

Sorry for the missing link, I read the guide about Pause/Consume at https://kafka.js.org/docs/consuming#pause-amp-resume.
With the lines of
await consumer.run({ eachMessage: async ({ topic, message }) => {
try {
await sendToDependency(message)
} catch (e) {
if (e instanceof TooManyRequestsError) {
consumer.pause([{ topic }])
setTimeout(() => consumer.resume([{ topic }]), e.retryAfter * 1000)
}
    throw e
}

}})
I understand that an error can be thrown after consumer.pause is used. However, this make the consumer crash and restart ( which you suggested ), and the error-causing message is received right again, making consumer.pause has no effect.

@Nevon Is this issue resolved? For my use case, I would need to pause the consumer per message since I have to run an async function per message. But apparently that isn't working...

Pausing and resuming should work, yes, but it's not the right tool to use for processing a message async. All you need to do is not resolve the handler:
await consumer.run({
  eachMessage: async ({ message }) => {
    await someAsyncProcess(message)
  }
})

Do you have a recommendation for if a message was encountered that required awaiting for a very long extended time, hours or even days, before continuing any message consumption?  Is not resolving the handler a viable solution?

Is not resolving the handler a viable solution?

You would need to make sure that heartbeats continued to be sent, otherwise you'll hit the sessionTimeout.  You'll need to use eachBatch() and find some way of calling the heartbeat() function regularly.
If you have a loop that is checking on your condition then you can just include a call to heartbeat().  If you are awaiting on a promise then maybe something like this (untested):
const slowPromise = slowResolvingFunction().then(() => 'done')
while('done' !== await Promise.race([
  new Promise((resolve, reject) => setTimeout(resolve, 3000, 'not done')),
  slowPromise
]) {
  await heartbeat()
}

This was very helpful.  I've done multiple tests using eachBatch heartbeat and it seems to be working well.
Can you think of any risks or concerns for using this strategy for waiting a two week time period?

@t-d-d  @cah-garyraley @tulios : https://cwiki.apache.org/confluence/display/KAFKA/KIP-62%3A+Allow+consumer+to+send+heartbeats+from+a+background+thread A
This seems to be fixed from Kafka Version <IP_ADDRESS>
I have tried with sessionTimeout = 30000
HeartBeat Interval Time = 3000
I have put a sync timer of 100000 (100 seconds) but my consumer is still running fine without any issues.

Using this package with nest js: https://kafka.js.org/docs/getting-started
Please let me know if i missed anything


Fix jitpack

What's new
Nothing
What's fixed
Jitpack
By default, jitpack uses java 8, this PR adds a jitpack.yml that tells it to use java 17

sdkman init and update can be skipped, jitpack does those two steps automatically. Take a look at the renderer jitpack.yml

I've removed these 2 steps

@0x3C50 It looks this is incorrect, as removing this results in a failed build on JitPack.
https://jitpack.io/com/github/Col-E/Recaf/dev4-45a626cce9-1/build.log

@0x3C50 It looks this is incorrect, as removing this results in a failed build on JitPack.
https://jitpack.io/com/github/Col-E/Recaf/dev4-45a626cce9-1/build.log

the build works on renderer. try openjdk?

Ah I see the discrepancy, in renderer the jdk: block is configured rather than relying on sdk update


Focus selected node in scene tree

Sometimes you know you have selected something, but just can't find it in scene tree

new "focus" button

Click to focus on selected item

And if it's collapsed

It'll be expanded for you
It also fixed #428 "in help tab node tree moving away when clicking"

 adolson|laptop, " clicking a node in the scene automatically selects it in the tree"
 doesn't seem like it... ?
<romulox_x> mamarilmanson, it does.  in 2d anyway, since that's what i've got open

TonyMac has quit (Quit: TonyMac)
<romulox_x> does it not do that in 3D?  because that would be a bug, i think
Clean3d has quit (Quit: Leaving.)
<adolson|laptop> I opened the 3D platformer and clicked on the light and it selected it in the tree
 yes... I tried it in godot 1.0
 adolson|laptop, I think I know what is happening... if it's a child and is in collpased(or is it expanded view) in the node tree it does not show up as expected...
<romulox_x> oh, so you want the tree to expand so you can see it selected
<adolson|laptop> that doesn't need a whole new button
<romulox_x> that does seem reasonable, though clicking around might expand all your nicely collapsed areas
<adolson|laptop> maybe an Expand tree on focus preference option
<romulox_x> yeah
<adolson|laptop> either way, that PR has a merge conflict so someone would have to fix it, with or without the added button
<adolson|laptop> I think the button is unnecessary, personally, and it should just be automatic, as it mostly already is
 yes... agree... thumbsup

Just a conversation that might help... :)

What do the @godotengine/user-interface think about this?

Well this PR has over one year and there are conflicts. I just confirmed the issue is still happening, i want the opinion of someone else on usability team, but maybe adding a button just for this will bloat the UI unnecesarily, instead it could be expanded and selected when clicking on the node in scene.
This can be anoying too, because some of us like the scene tree organized and automatic collapse is not nice when selecting the wrong node. And no 2d/spatial nodes can't be selected from editor.
An option could be to allow show/hide this button in the Editor Settings, but hiden features are not features imo, so it should be enabled by default. Opinions?

I tend to agree with @MarianoGnu, I'm not sure this would really be a useful feature, and it would clearly make the UI more cluttered.
Maybe a hotkey that does the same job would be a better alternative.

Not sure how to handle this, but from a usability perspective you shouldn't add a hotkey without a command via the GUI, even if it's inside a menu. So maybe a menu option + the hotkey?

Well there are already quite a few hotkeys that do not match a GUI button, especially in the 2D and 3D viewports; IMO, more than trying to add a button for each of them in the UI, we should implement #2745 :)

But to be honest I don't think the feature discussed here would be very useful anyway.

Maybe pressing the F key both in canvas/3d editor focus the object both in scene tree, and replicate the same use if the f is pressed in the scene tree (currently only focusing if used on editor) if people doesn't like the tree being collapsed it can be remaped to alt+f or added an option to editor settings.

Based on the above discussion, I think we wouldn't use the current proposal (and it has merge conflicts). If someone wants to add a hotkey to find the currently selected node (e.g. F as proposed by @MarianoGnu), please open a new feature request.


Feature Proposal: Organization Readmes

Feature Description
A clone of GitHub organization READMEs. Such a valuable feature built on Gitea.
https://github.com/community/.github/blob/main/profile/README.md
Screenshots
No response

[Found a solution](https://docs.gitea.com/next/usage/profile-readme)


Feature: Two-page view

Feature request: add buttons for two-page view
also, it would be nice to have a button for 100%, and "Page Fit" in the toolbar.

+1

Any work towards this at all in the last ~4 years?

Since there is still some confusion on this, let me clarify this a bit. There has been a work-in-progress pull request for this, but the main problem was that it was a lot of code because the viewer was not as modular at the time as we did not have integration tests for it. We still do not have integration tests for the viewer, so all testing of this must happen manually. It might not seem like it, but this is actually a difficult feature to support. What will happen when the pages are too wide? What will happen with different-sized pages?
This issue is open for a reason. We are still considering it as a useful feature, but someone has to find time to work on this. If anyone is willing to work on this, we first have to have some form of automated testing for the viewer, otherwise the risk of introduction regressions will be large.

+1

Please use GitHub's +1 reaction button instead of adding +1 comments here. Using the +1 reaction button allows us to filter on issues that have many +1's and thus allows us to prioritize issues in a better way.

ok. I used reaction button instead of comment. thanks

I'd like this so I could support the way that I actually think of books.  Back before hypertext, there was a bit of railing at books for being "linear", some people even advocated getting to copies of a book so you could cut them apart and paste-up a giant poster of the entire book.  Their was an early project called "Digital Shakespeare", that had all of his plays encoded in display postscript so you could "fly" over his work.  This is a little too formless for me, so my convention is to think of sets of ten pages, grouped into 5 two-page spreads arranged like the spots on the five face of a die, e.g. thusly:
[0|1]                             [2|3]
``                  [4|5]
[6|7]                             [8|9]
now there is a high level to this to take these and put them into set of hundreds.
The point is I might have a chance to do this and more with pdf.js, but I king of need two page display first.

👍

What I have to do to make you add this feature? WHAT?

The next step is to help add integration tests: #6505

Is there any reason why this feature should be implemented in pdf.js itself? Implementing it in a reader app based on pdf.js is trivial and does not risk messing up the renderer. Let pdf.js handle single pages as it is used to, use two (or more, if needed) canvas elements in whatever geometry desired and fire off.
A simplistic demo took no more than a few minutes to write, based on the pdf.js previous/next example:
https://jsfiddle.net/Yetangitu/1egqfefu/4/

@tfer here's your 'Ludicrous mode' viewer: https://jsfiddle.net/Yetangitu/1egqfefu/4/
(increase scale factor, display on big monitor, profit!)
As far as I can see there is no need for pds.js to support multi-page render, this can be handled adequately on a higher level.

@yurydelendik in what way is this solution confusing? I'm using it to build a PDF viewer for Nextcloud/Owncloud, it works fine.

in what way is this solution confusing?

It does not fit in our demo viewer.

https://jsfiddle.net/Yetangitu/1egqfefu/4/

@Yetangitu Writing custom viewer with dual-page display based on our examples is perfectly fine with me, but that does not like it's a PR we can accept.  Shall we close this issue by referring that your proposed solution above addressed this issue? If not, please explain/show how your code can be applied to the demo viewer.

Please don't close this issue! Countless other issues have been opened and closed with a solution that doesn't address the central issue: PDFjs badly needs a built-in method for 2-page view. Many PDFs, such as journal articles, manuals, etc look fine in 1-page view. But ALL BOOKS, since Gutenberg, are designed to be viewed as L-R layouts. I'm using @Snuffleupagus's PR #3723 on a production site, and while it works well for now, it deserves to be developed further.

@yurydelendik it was not meant to be a complete solution, just as a hint to those people who have been looking for a spread-capable JS PDF viewer for many years. It could be integrated into the demo viewer but that'd take a bit of work. Since the viewer I'm building is meant to look and act (i.e. page horizontally, look as 'book-like' as feasible, etc) like the EPUB-viewer I made earlier it is quite different from the demo viewer so it is not a simple matter of patching the spread-capable bits in.
I do think that this type of functionality belongs in a viewer application, not in the basic PDF decoding/rendering library which is pdf.js, hence my reaction to this pdf.js issue.
I''l release the PDF-capable version of Reader in a few days for those who want to give the concept a try. Since Reader is a Nextcloud/Owncloud app, you'll need to have one of those handy somewhere...

@yurydelendik what is the link to your EPUB-viewer. It would be great if there was a simple JS library that could be included by default to help make it easier for folks to just view EPUB like they currently view PDFs.  Maybe this is a new issue (or new project).

For those looking for a quick clean hack, just add some css magic on (viewer.html):
<style>
#viewer {
  margin-left:20px;
}
div.page {
  float:left;
}
</style>

Set zoom at around 75% (= two page view on my 1440x900 screen)

Is there any reason why this feature should be implemented in pdf.js itself? Implementing it in a reader app based on pdf.js is trivial and does not risk messing up the renderer.

Yes, I agree, i does not need to be in the pdf.js code...

For those looking for a quick clean hack, just add some css magic on (viewer.html)...

Thanks for the work around.
As a sumup, Could someone write an extension that injects @icedman 's workaroud? So that one could toggle 1p/2p view in a single click? I have an extension "Kill Sticky" which injects/modifies the page locally so this should be doable.
Thanks

I think this is a good ieda, Scroll VIew should add tow page in screen！


When the number of nodes is large, the editor window will become stuck

Hi, When the number of nodes is large, the editor window will become stuck and slowly。It already  can't edit the graph node。and open the example graph asset,it also stuck.
I use the version 2021.1.15 of the unity and the 1.3 of graphprocessor。
Have any idea to resolve the problem？

Yeah, I observed a massive slow down with the latest versions too. Apparently it's related to the PropertyFields in the graph, I'm investigating the issue

I have tried to open the graph in the version 2021.2 of unity,It will be a little  better. but also have a little stuck and slowly

Yeah, I observed a massive slow down with the latest versions too. Apparently it's related to the PropertyFields in the graph, I'm investigating the issue

Waiting for repair

in current graph，copy 100+ string node or gameobject node，the graph opration will stuck and slowly，when save asset，open it again，the graph can use quickly

When using a large number of PropertyFields, lag is inevitable. This is because the Bind used by the PropertyField is polled for data updates, increasing the strain on the CPU.
My solution was to switch back to a normal BaseField and manually refresh the node when the data is updated to ensure uniformity of data and view.
Please excuse my very poor English, use deepl to translate


Watermark in QR code when using the default QR Code provider

When using the default QR Code Provider the generated QR code contains a watermark which - at least for me - breaks scanning the code with the Authy app.
image-charts.com recently changed the behaviour regarding the creation of charts/QR codes. As per their website of today:
"QR Codes finaly came out of beta! Free users will have the watermark [..]"
Switching to "QRServerProvider" fixes the problem at hand.

Dangit. So much for image-charts.com. I've had it with online services anyway. I'm considering switching to a composer package so QR generation can be done locally. Any good suggestions?

https://github.com/Bacon/BaconQrCode is pretty flexible, been using it with this library for a while.

As a 'quick fix' I switched to QRServerProvider as default (1.6.7). I am looking into / working on including a 'local' QR code generator.

What about doing it in the frontend? https://davidshimjs.github.io/qrcodejs/

That wouldn't fit the current interface where the "image" (base64 encoded data) is returned. It could be made to work but would require some (breaking) changes.


Inconsistent replacement

const md = markdownit({ typographer:true });
console.log(md.render('---|---'));

Output:

—|---

I'd expect both --- replaced, because there is a symmetry.

AFAIK long dash is allowed at phrase start, and not allowed at phrase end. Anyway, nobody prohibit you to write your own rule.

The same applies to en-dash, too: console.log(md.render('--|--')); // Output:
–|--

I think your samples are artificial (with single char between) and not related to grammar. This can not happen with regular text.


Not working for some time

Well, it's not working for like two years already 😆

Corona avoidance measures are over and they don't have a capacity limit any more, so it's anyways useless


GenerationFinalResponseData is None due to omitted fields

Hi, i would like to be able to get the GenerationFinalResponseData in a 100% certain way, but it seems it is sometimes there and sometimes not.
Im using generate function, so stream should be false anyways. It also appears that if done is true, the final data may still be None.

Hmm this may actually be a bug somewhere, I am looking at the logs of Ollama (im running on a Mac, with ollama serve) and apparently sometimes the prompt token count is shown to be 0. When that happens, I get None for the final data.
Here is an example log with a filled final_data, we can see the prompt had 98 tokens:
{"function":"print_timings","level":"INFO","line":276,"msg":"prompt eval time     =     369.77 ms /    98 tokens (    3.77 ms per token,   265.03 tokens per second)","n_prompt_tokens_processed":98,"n_tokens_second":265.02602934216753,"slot_id":0,"t_prompt_processing":369.775,"t_token":3.7732142857142854,"task_id":3,"tid":"0x1f699e500","timestamp":1715174643}

Here is another log for the same prompt, same settings:
{"function":"print_timings","level":"INFO","line":276,"msg":"prompt eval time     =     206.29 ms /     0 tokens (     inf ms per token,     0.00 tokens per second)","n_prompt_tokens_processed":0,"n_tokens_second":0.0,"slot_id":0,"t_prompt_processing":206.291,"t_token":null,"task_id":65,"tid":"0x1f699e500","timestamp":1715174941}

Now we get 0 tokens, and therefore inf appears for ms per token. When this happens final_data is None.

A-ha, found it: https://github.com/ollama/ollama/issues/3427
Indeed, if the prompt is cached it will omit the field and cause the entire thing to be None on this side.

I would like to propose that we write each field explicitly, instead of #[serde(flatten)].

That issue rings a bell, I think someone already created an issue for that but we thought it was a bug on ollama side. We need to make this field optional then, I'll do that when I get home.

@pepperoni21 I made a quick fix in PR above^

I think I was the one who originally reported this issue here #27 (and also thought it was on Ollama's side as I didn't know about it caching prompts).
@erhant , thank you for the fix... I have read the commit, but I don't understand exactly how that solved the problem.
If you have a few minutes to spare, could you explain how removing serde's flatten and making each field an Option solved it?
Thanks

hi @dezoito, sure!
the thing is when used with flatten, a single missing field in the to-be-flattened nested object causes the entire nested object to fail. below is a demonstration:
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
struct Flattened {
    foo: u32,
    bar: Option<u32>,
    baz: Option<u32>,
}

#[derive(Debug, Serialize, Deserialize)]
struct Nested {
    foo: u32,
    #[serde(flatten)]
    barbaz: Option<NestedInner>,
}

#[derive(Debug, Serialize, Deserialize)]
struct NestedInner {
    bar: u32,
    baz: u32,
}

fn main() {
    const OBJ_NESTED: &str = "{\"foo\": 1, \"bar\": 2, \"baz\": 3}";
    let obj_nested: Nested = serde_json::from_str(OBJ_NESTED).unwrap();
    println!("{:?}", obj_nested);

    const OBJ_FLATTENED: &str = "{\"foo\": 1, \"bar\": 2, \"baz\": 3}";
    let obj_flattened: Flattened = serde_json::from_str(OBJ_FLATTENED).unwrap();
    println!("{:?}", obj_flattened);

    const OBJ_NESTED_MISSING: &str = "{\"foo\": 1, \"bar\": 2}";
    let obj_nested_missing: Nested = serde_json::from_str(OBJ_NESTED_MISSING).unwrap();
    println!("{:?}", obj_nested_missing);

    const OBJ_FLATTENED_MISSING: &str = "{\"foo\": 1, \"bar\": 2}";
    let obj_flattened_missing: Flattened = serde_json::from_str(OBJ_FLATTENED_MISSING).unwrap();
    println!("{:?}", obj_flattened_missing);
}

When we run it, we see the result:
Nested    { foo: 1, barbaz: Some(NestedInner { bar: 2, baz: 3 }) }
Flattened { foo: 1, bar: Some(2), baz: Some(3) }

Nested    { foo: 1, barbaz: None }
Flattened { foo: 1, bar: Some(2), baz: None }

So although bar existed in the 3rd example, since baz didn't exist the entire barbaz failed and we missed the bar data. This was the case with Ollama, as it didnt return one of the fields in the final data, causing the entire thing to be lost.
Perhaps there is a better serde feature that does the fix for this instead of manually flattening the nested Option object to separate Option fields. That I don't know!

Thank you! Much appreciated.


Nan should print error message not server error

This request
locale=en&reverse=true&point=NaN%2CNaN
results in a 500 http error but should be a 400 bad request instead IMO

Thanks for reporting. Will have a look.

Thanks, should be fixed with #26.


MySQL support

Current plan is to add mysql support through https://github.com/aio-libs/aiomysql

Resolved by #37


Gh 1435 federated store get traits

Codecov Report

Merging #1479 into develop will increase coverage by 1.12%.
The diff coverage is 89.74%.

@@              Coverage Diff              @@
##             develop    #1479      +/-   ##
=============================================
+ Coverage      66.58%   67.71%   +1.12%
+ Complexity      1744     1233     -511
=============================================
  Files            721      511     -210
  Lines          23627    17169    -6458
  Branches        2984     2115     -869
=============================================
- Hits           15733    11626    -4107
+ Misses          6686     4710    -1976
+ Partials        1208      833     -375

Impacted Files
Coverage Δ
Complexity Δ

...q/gaffer/federatedstore/FederatedGraphStorage.java
88.5% <100%> (+8.69%)
0 <0> (ø)
:arrow_down:

...gov/gchq/gaffer/federatedstore/FederatedStore.java
94.24% <100%> (+1.38%)
0 <0> (ø)
:arrow_down:

...ration/handler/impl/FederatedGetTraitsHandler.java
75% <75%> (ø)
0 <0> (?)

...chq/gaffer/federatedstore/operation/GetTraits.java
90.47% <90.47%> (ø)
0 <0> (?)

...onutil/iterable/LimitedInMemorySortedIterable.java
47.22% <0%> (-2.78%)
15% <0%> (-1%)

.../src/main/java/uk/gov/gchq/gaffer/graph/Graph.java
57.38% <0%> (ø)
0% <0%> (ø)
:arrow_down:

...fer/flink/operation/handler/GafferMapFunction.java

...er/job/tool/SampleDataAndCreateSplitsFileTool.java

...hq/gaffer/rest/serialisation/RestJsonProvider.java

...gov/gchq/gaffer/rest/service/v1/StatusService.java

... and 213 more

Continue to review full report at Codecov.

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

Closing while changes are made.

I've made some changed and pushed to branch gh-1435-FederatedStore-getTraits-v2. @GCHQDeveloper404 - please can you check if you are happy with the changes.
It looks like this branch is branched off 1430, so 1430 should be merged in first.


UX - Prevent having a rule without category

Hi team,
I changed the URL for https://www.ssw.com.au/rules/keep-PBIs-smaller-than-2-days but I didn't know I needed to manually go and also update it in the category page...
The rule was "categoryless" :)
--

This should be fixed with https://github.com/SSWConsulting/SSW.Rules.Content/pull/237 ... but I would like to prevent this from happening...
Is there a way to automatically inform the user that a rule is not part of any category?

It would also be good to have a list of rules without categories so we can decide what to do with them: Archive OR Add to a category.
E.g. https://www.ssw.com.au/rules/how-to-create-a-rule this rule is for old SharePoint - it has no category, but it is still showing as a normal rule on Google searches... how can we find others like this?


Inconsistent host mounting with docker beta 1.11.2-beta15 on OSX 10.11.5

Output of docker version:
Client:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:20:08 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   56888bf
 Built:        Mon Jun  6 23:57:32 2016
 OS/Arch:      linux/amd64

Output of docker info:
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 114
Server Version: 1.11.2
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 171
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge null host
Kernel Version: 4.4.12-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 6
Total Memory: 49.05 GiB
Name: moby
ID: E6RG:6DQ3:2KKM:CSIF:NGJ5:5LG7:YWJ7:BKJA:YC3N:NCZA:RXGB:73MV
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): true
 File Descriptors: 16
 Goroutines: 40
 System Time: 2016-06-11T20:58:01.244040046Z
 EventsListeners: 1
No Proxy: *.local, 169.254/16
Username: johnt337
Registry: https://index.docker.io/v1/

Additional environment details (AWS, VirtualBox, physical, etc.):
Using AWS environment for S3 related functions, testing on OSX deploying to AWS/CoreOS.
OSX 10.11.5, Docker Beta 1.11.1-beta14 or Docker Beta 1.11.2-beta15
Steps to reproduce the issue:

Pick a folder on your local disk, in my case /data
docker run -it --rm -v /data:/data ubuntu ls -l /data
3. docker run -it --rm -v /Volumes/some_external_ssd/data ubuntu ls -l /data

Describe the results you received:
Placing data on my internal/local disk I could not see its entire contents with -v /data:/data
Describe the results you expected:
To see my data regardless of location, or at least that it would see the local partion and not the remote one.
 I know with virtualbox and vmware I have to share them explicitly.

This is described in the beta documentation
The /Volumes/ and /Users directories are directly accessible, other directories can be accesses by prefixing them with /Mac during the beta, but this may change in future; possibly there'll be a control panel/preference pane to specify which additional directories should be shared.
From the documentation; https://beta.docker.com/docs/mac/osxfs/#namespaces

Much of the OS X file system that is accessible to the user is also available to containers using the -v bind mount syntax. You can share files in /Users, /Volumes, /private, and /tmp directly. For the Beta only, the rest of the user-accessible file system is mounted under /Mac. All other paths used in -v bind mounts are sourced from the Moby Linux VM running the Docker containers, so arguments such as -v /var/run/docker.sock:/var/run/docker.sock should work as expected.

Worked like a charm!
Thanks again!!

Had this same question... what great timing! This helped me, too. Thanks @johnt337 for asking and @thaJeztah for the answer that helped =)

@CWSpear glad I could help 👍


To-do list

https://github.com/nullpomino/nullpomino/wiki/Kitaru-And-The-To-DoList
@Kitaru is this still up to date?

Probably. I don't think any additional items from this list were addressed in mainline Nullpo, especially since most of them were things I personally wanted to work on.


Cannot backprop through mixed (ChainerX and non-ChainerX) backends

A variable with a non-ChainerX backend promotes to a ChainerX array in FunctionNode.apply.  However, chainerx.backward called by Variable.backward etc. ignores non-ChainerX part of the comp graph.
Code to reproduce
import numpy

import chainer
import chainerx

x1 = chainer.Variable(numpy.array(1, numpy.float32))
x2 = chainer.Variable(chainerx.array(2, numpy.float32))
y = 10 * x1 + x2
y.backward()
print(x1.grad)  # should be 10.
print(x2.grad)  # 1.

Error messages, stack traces, or logs
None
array(1., shape=(), dtype=float32, device='native:0')

Closed by #7520.


Error: "'openqaoa' is not a package" when trying to run basic testing

Prerequisites
Before raising this issue, I have already checked that I am:

[x ] running the latest version
[x ] made sure that this issue has not already been filed

Describe the bug
Hello, I am trying to do some basic testing of the openqaoa module. In particular, I am simply going through the initial walkthrough for MinimumVertexCover as described in the docs. I began by successfully cloning the OpenQAOA github file, and then using pip install . to sucessfully install all dependencies. I verified that all dependencies were succesfully installed, including openqaoa.
However, when I run my test file in Python, I get the error:
ModuleNotFoundError: No module named 'openqaoa.utilities'; 'openqaoa' is not a package

and the execution fails.
To Reproduce
Steps to reproduce the behavior:

clone the openqaoa github file
type pip install . or just manually install each required dependency
in the base of the cloned folder, create a file called test.py and paste the following code into it:

import networkx
from openqaoa.problems import MinimumVertexCover

g = networkx.circulant_graph(6, [1])
vc = MinimumVertexCover(g, field=1.0, penalty=10)
qubo_problem = vc.qubo

type python test.py to run the file

Expected behavior
I expect the file to run successfully, not to get the above error.
Additional context
I also tried installing just the openqaoa dependency in a new folder and then running the file there (without cloning the original file), but got the same error.

@robliou, thanks for trying out OpenQAOA and for raising the issue. I tried to reproduce the error you described above by following the To Reproduce. However, I get no errors on following the instructions above. See the attached screenshot below.
Can you please provide more information about your python environment? For instance, your version of python. Also, please verify that the openqaoa was successfully installed. I am not sure what you meant by "just manually install each required dependency", since you also need to install openqaoa package and not just the dependencies.
Let me know if something is still unclear!
FYI, I ran the code on python 3.10 and the main branch of openqaoa.

@robliou I just tried the process on a clean windows 11 install (with python 3.10.11 installed from the microsoft store) and did not encounter the issue.
I think the first step to figure out whether this is a problem with your installation's site packages. To do this all it takes  is for you to create a new environment in the openqaoa folder.
This can be accomplished by the following steps:

Open a terminal window
Go to the openqaoa folder (assuming you already cloned it somewhere): cd \path\to\openqaoa
Create a new environment: python -m venv venv (this will take a while, and create a venv folder
Activate this new venv:
4a. If you are using the standard command prompt type: venv\Scripts\activate.bat
4b. If you are using powershell you need to make sure your signing policy is adequate, first run Set-ExecutionPolicy RemoteSigned then .\venv\Scripts\Activate.ps1
Make sure that your environment is active, a (venv) will appear in front of your prompt
Run the pip install . command (your new environment is without packages at this stage, we need to reinstall everything)
Test if you can run your script within this environment

Please let me know if this fixes the issue. If that's the case, I'm afraid your site-packages might be the issue, and you might want to consider cleaning everything up to start fresh.
Heppy thoughts!

@voidburn
Hello!
I appreciate your prompt response. I just followed your suggestions to a T:

... but am still getting the same error:

Note that after trying this, I went ahead and deleted the entire openQAOA folder, re-cloned from github, and then re-followed the steps above. However, the outcome is the same.
Is it possible that this package doesn't support python version 3.10.4?

@robliou It was worth a try! I'm going to find the installer for python 3.10.4 and try with that version. Meanwhile a couple of things you can try on your end:

Delete the venv, recreate it but this time upgrade pip: python -m pip install --upgrade pip before running pip install . just in case something was not properly built with the older version.
Upgrade to python 3.10.11 or downgrade to 3.9 (any install method should work, just make sure when you invoke python --version from the command line you get the expected new one)

This process of elimination (starting from the more obvious possible causes) will help us zero in on the actual culprit. Thank you for your help!
Let me know if changing the python version helps.

@voidburn
Thanks for your suggestions! I tried both methods, including upgrading to python 3.10.11, as well as upgrading the pip installer.
Then deleted venv file and re-cloned and re-installed.

Still the same issue... :( :( Weird, huh?

I had no luck reproducing it even with python 3.10.4 (https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe):
I tried both without upgrading pip before the install, and with the new version. It still runs your test.py without issues:
import networkx
from openqaoa.problems import MinimumVertexCover

g = networkx.circulant_graph(6, [1])
vc = MinimumVertexCover(g, field=1.0, penalty=10)
qubo_problem = vc.qubo

This is very weird!

@robliou Can you try and rename your file from openqaoa.py to test.py and try again?

Hmmm this looks weird. My suspicion might be there is something funky going on with the python install, maybe something to do with the paths. Other than @voidburn 's suggestion in renaming the openqaoa.py file to something else like test.py.
Can you try the following command:
python -c "import os, sys; print(os.path.dirname(sys.executable))"

This should give us a clue on where the python path you're using is coming from.
If the path in the venv and outside of the environment is the same, that might be the first clue that something strange is going on at the python install level.
Also possible solution would be to uninstall python locally and try installing python through the windows store. That seemed to fixed some issues in the python install itself when people had issues with missing packages.
Let me know if any of these worked or could help us with a possible lead! :)

@robliou Can you try and rename your file from openqaoa.py to test.py and try again?

Gave that a shot, also didn't work (I can see what you're trying to test with this; it so happens I have another file called openqaoa.py that is attempting to use the MaximumCut module from openqaoa.problems.problem:

@shahidee44
OK, so tried both methods suggested. Here are the results:

On my work laptop, uninstalled Python 3.10.11 and then downloaded from Microsoft store and installed. Then ran test.py again. Got the same error.

Ran the command line you suggested above, and got the following result:

It looks like the same path as before, but with \venv\Scripts appended.
Is this indicative of a broader issue?
Thanks,

@voidburn @shahidee44
Interestingly enough, it appears somewhere along the way, the original error for the original test.py file got cleared out. By running this code:
import networkx
from openqaoa.problems import MinimumVertexCover

g = networkx.circulant_graph(6, [1])
vc = MinimumVertexCover(g, field=1.0, penalty=10)
qubo_problem = vc.qubo

from openqaoa import QAOA

#Create the QAOA
from openqaoa import QAOA

q = QAOA()
q.compile(qubo_problem)
q.optimize()

print('this is q', q)

I can now get the following output:

Which I guess is a step in the right direction? After all, my intent is to see whether I can use OpenQAOA to solve MaxCut questions. Running the suggested code for the MaxCut problem, however, still returns an error similar to our original one:
max_cut_suggested.py
import numpy as np
import networkx as nx
#from openqaoa.utilities import plot_graph

# Generating a graph of nodes

G = nx.generators.fast_gnp_random_graph(n=6, p=0.6, seed=42)

from openqaoa.utilities import plot_graph
plot_graph(G)

from openqaoa.problems.problem import MaximumCut

maxcut_prob = MaximumCut(G)
maxcut_qubo = maxcut_prob.qubo

maxcut_qubo.hamiltonian.expression

Very interesting, and thanks for posting the suggestion!
Based on my limited understanding, I looked up 'package name collision issue', and it appears it may be the result of when a file name is the same as a package name (in this case openqaoa)?
However, in my file, I've changed the file named openqaoa.py to max_cut_suggested.py,

but am still getting this error:

Perhaps there is a conflict between my project name and the module name? Therefore, I changed my project name from openqaoa to openqaoa_file, but the error still did not go away:

Perhaps my understanding of what a package name collision issue means is incorrect. Could you please explain further where I may be going wrong here?
Thanks,

@robliou Once installed in your environment openqaoa will be available everywhere, try moving your test files to a dedicated folder under you projects\python one, see if that actually gets rid for good of these issues first! Working from within the openqaoa cloned folder should only be done if you intend to contribute fixes or new code to it.
If this doesn't fix the maxcut problem please let us know, in which case we should close this issue and you can open another one specifically for that, since we've established that the main topic of this one has been figured out and solved.
Thanks!

@voidburn
Will do, and thanks for helping to solve the initial issue. At least we got one down!


remove_from_index functionality

Hey Team,
Can I expect removal of index functionality any time soon?
I'm really in need of this.

I'd say this is medium priority at the moment. No particularly tough to add so it'd be a very welcome contribution, but there are a few things I need to get to beforehand. Tagging as help wanted for now!


fix(middleware_factory): Annotate lambda_handler_decorator with a return type

Issue #, if available: #1060
Description of changes:
This is two versions of typing lambda_handler_decorator more accurately for #1060, to ensure that middleware using it have a type. They end up with type Callable[..., Any] but that's better than nothing.
The first commit 937e6fe tries to be more accurate via overloads and protocols, but it doesn't work as written, and I cannot quite work out why. The errors below demonstrate the issues. It's potentially resolvable with 3.10's ParamSpec (I'm not sure typing_extensions depended upon for 3.8 and 3.8?):
Errors
aws_lambda_powertools/utilities/validation/validator.py:12:2: error: No overload variant of "lambda_handler_decorator" matches argument type "Callable[[Callable[..., Any], Union[Dict[Any, Any], str], Any, Optional[Dict[Any, Any]], Optional[Dict[Any, Any]], Optional[Dict[Any, Any]], Optional[Dict[Any, Any]], str, Optional[Dict[Any, Any]]], Any]"  [call-overload]
aws_lambda_powertools/utilities/validation/validator.py:12:2: note: Possible overload variants:
aws_lambda_powertools/utilities/validation/validator.py:12:2: note:     def lambda_handler_decorator(decorator: _FactoryDecorator) -> _HandlerDecorator
aws_lambda_powertools/utilities/validation/validator.py:12:2: note:     def lambda_handler_decorator(decorator: None = ..., trace_execution: Optional[bool] = ...) -> Callable[[_FactoryDecorator], _HandlerDecorator]
aws_lambda_powertools/utilities/parser/parser.py:14:2: error: No overload variant of "lambda_handler_decorator" matches argument type "Callable[[Callable[[Any, LambdaContext], EventParserReturnType], Dict[str, Any], LambdaContext, Type[Model], Optional[Type[Envelope]]], EventParserReturnType]"  [call-overload]
aws_lambda_powertools/utilities/parser/parser.py:14:2: note: Possible overload variants:
aws_lambda_powertools/utilities/parser/parser.py:14:2: note:     def lambda_handler_decorator(decorator: _FactoryDecorator) -> _HandlerDecorator
aws_lambda_powertools/utilities/parser/parser.py:14:2: note:     def lambda_handler_decorator(decorator: None = ..., trace_execution: Optional[bool] = ...) -> Callable[[_FactoryDecorator], _HandlerDecorator]
aws_lambda_powertools/utilities/idempotency/idempotency.py:20:2: error: No overload variant of "lambda_handler_decorator" matches argument type "Callable[[Callable[[Any, LambdaContext], Any], Dict[str, Any], LambdaContext, BasePersistenceLayer, Optional[IdempotencyConfig], KwArg(Any)], Any]"  [call-overload]
aws_lambda_powertools/utilities/idempotency/idempotency.py:20:2: note: Possible overload variants:
aws_lambda_powertools/utilities/idempotency/idempotency.py:20:2: note:     def lambda_handler_decorator(decorator: _FactoryDecorator) -> _HandlerDecorator
aws_lambda_powertools/utilities/idempotency/idempotency.py:20:2: note:     def lambda_handler_decorator(decorator: None = ..., trace_execution: Optional[bool] = ...) -> Callable[[_FactoryDecorator], _HandlerDecorator]
aws_lambda_powertools/utilities/data_classes/event_source.py:8:2: error: No overload variant of "lambda_handler_decorator" matches argument type "Callable[[Callable[[Any, LambdaContext], Any], Dict[str, Any], LambdaContext, Type[DictWrapper]], Any]"  [call-overload]
aws_lambda_powertools/utilities/data_classes/event_source.py:8:2: note: Possible overload variants:
aws_lambda_powertools/utilities/data_classes/event_source.py:8:2: note:     def lambda_handler_decorator(decorator: _FactoryDecorator) -> _HandlerDecorator
aws_lambda_powertools/utilities/data_classes/event_source.py:8:2: note:     def lambda_handler_decorator(decorator: None = ..., trace_execution: Optional[bool] = ...) -> Callable[[_FactoryDecorator], _HandlerDecorator]
aws_lambda_powertools/utilities/batch/base.py:156:2: error: No overload variant of "lambda_handler_decorator" matches argument type "Callable[[Callable[..., Any], Dict[Any, Any], Dict[Any, Any], Callable[..., Any], BasePartialProcessor], Any]"  [call-overload]
aws_lambda_powertools/utilities/batch/base.py:156:2: note: Possible overload variants:
aws_lambda_powertools/utilities/batch/base.py:156:2: note:     def lambda_handler_decorator(decorator: _FactoryDecorator) -> _HandlerDecorator
aws_lambda_powertools/utilities/batch/base.py:156:2: note:     def lambda_handler_decorator(decorator: None = ..., trace_execution: Optional[bool] = ...) -> Callable[[_FactoryDecorator], _HandlerDecorator]
aws_lambda_powertools/utilities/batch/sqs.py:179:2: error: No overload variant of "lambda_handler_decorator" matches argument type "Callable[[Callable[..., Any], Dict[Any, Any], Dict[Any, Any], Callable[..., Any], Optional[Any], bool, Optional[Any]], Any]"  [call-overload]
aws_lambda_powertools/utilities/batch/sqs.py:179:2: note: Possible overload variants:
aws_lambda_powertools/utilities/batch/sqs.py:179:2: note:     def lambda_handler_decorator(decorator: _FactoryDecorator) -> _HandlerDecorator
aws_lambda_powertools/utilities/batch/sqs.py:179:2: note:     def lambda_handler_decorator(decorator: None = ..., trace_execution: Optional[bool] = ...) -> Callable[[_FactoryDecorator], _HandlerDecorator]

Checklist

[x] Meet tenets criteria
[x] Update tests
[x] Update docs
[x] PR title follows conventional commit semantics

Breaking change checklist

RFC issue #:

[ ] Migration process documented
[ ] Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Codecov Report

Merging #1066 (665e0bb) into develop (2a3ff9a) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #1066      +/-   ##
===========================================
- Coverage    99.96%   99.96%   -0.01%
===========================================
  Files          119      119
  Lines         5365     5338      -27
  Branches       612      612
===========================================
- Hits          5363     5336      -27
  Partials         2        2

Impacted Files
Coverage Δ

...ws_lambda_powertools/middleware_factory/factory.py
100.00% <100.00%> (ø)

aws_lambda_powertools/utilities/batch/base.py
99.20% <0.00%> (-0.02%)
:arrow_down:

aws_lambda_powertools/logging/logger.py
100.00% <0.00%> (ø)

aws_lambda_powertools/tracing/tracer.py
100.00% <0.00%> (ø)

aws_lambda_powertools/metrics/metrics.py
100.00% <0.00%> (ø)

aws_lambda_powertools/logging/formatter.py
100.00% <0.00%> (ø)

...s_lambda_powertools/utilities/parser/models/sns.py
100.00% <0.00%> (ø)

..._lambda_powertools/utilities/feature_flags/base.py
100.00% <0.00%> (ø)

...lambda_powertools/utilities/parser/models/apigw.py
100.00% <0.00%> (ø)

... and 5 more

Continue to review full report at Codecov.

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

Thanks a lot @huonw !! Question: Do we lose type signature with the current solution? e.g., create a decorator with a given type annotation on a key-value param, call it using an incorrect type and let mypy detect it.
The way I solved this for Tracer (similar, not the same) on preserving the function signature types is using AnyCallableT - This ... works similar to ParamSpec that's available in future version.
Instead of using overload, could you try with AnyCallableT only? I can have a look at this after we fix some bugs in Logger.

I think this is an strict improvement over the current code (i.e. nothing is being lost): the middlewares used to be completely untyped, while now they're at least Callable[..., Any], and thus the handlers they're used on are typed Any.
Are you proposing something like def lambda_handler_decorator(decorator: Optional[AnyCallableT] = None, trace_execution: Optional[bool] = None) -> AnyCallableT. Unfortunately I don't think that'll work quite right, because the type of decorator is different to the return value: decorator has arguments handler, event and context (and kwargs), while the value returned by lambda_handler_decorator just has arguments handler (and kwargs). Let me know if I'm misunderstanding the behaviour here.

If your current Callable type is helping preserve the type signature (not being done today), then we should stop here and merge \o/!
The AnyCallableT suggestion was for the first layer (like Tracer, Logger, Metrics decorators), it wouldn't work for the second one for reasons you called out - hence the thought to experiment as that wasn't the final solution.
Let me know the answer to the types as I'm not entirely sure I understood. If types aren't being preserved with the latest commit, we can experiment other ways (typing from my phone again, need to think of other ways still)

Ah, I see. I think that may be tricky and/or require manual casts at each use site of the decorator:
from typing import Any, Callable, cast

AnyCallable = Callable[..., Any]
def base_decorator(f: AnyCallable) -> AnyCallable:
    return f

@base_decorator
def my_decorator(g: AnyCallable) -> AnyCallable:
    return g

my_decorator = cast(Callable[[AnyCallable], AnyCallable], my_decorator)

There's quite a few downsides of this:

requires manually specifying the type at each site
using Callable directly like this still doesn't get the type correct right (doesn't distinguish between @decorator like the above and the partially applied version with kwargs @decorator(foo=1) def f() ...: it'd be restricted to only one or the other), although one could probably define an appropriate protocol
some tools may complain about having two declarations of my_decorator too (one via the decorator, and one via the cast

On balance, and especially because these decorators are designed for handlers (i.e. functions that typically aren't used elsewhere in library code), I feel the minimal Any-based approach is the best immediate solution.

Just ran --strict and: Found 842 errors in 73 files (checked 125 source files) - will definitely look into it later. For now, I'll test a custom middleware with an additional kwarg to check whether Mypy can detect it with the new type annotation, then merge ;)

Nah, spent the last two hours and while I made headwinds towards identifying kwargs in a non-strict mode, I hit a dead end with too few arguments later - Adding the patch as ZIP and the sample code I used, in case you know a solution.
Otherwise, I'll take this opportunity to fix a doc typo as part of this PR and then merge.

factory.patch.zip
Sample code used
from typing import Any, Callable, Dict, List, Optional

from aws_lambda_powertools.middleware_factory import lambda_handler_decorator

@lambda_handler_decorator
def obfuscate_sensitive_data(
    handler: Callable[..., Any], event: Dict[str, Any], context: Any, fields: Optional[List[str]] = None
) -> Any:
    # Obfuscate email before calling Lambda handler
    if fields:
        for field in fields:
            if field in event:
                event[field] = "REDACTED"

    return handler(event, context)

@obfuscate_sensitive_data(fields=10)
def lambda_handler(event: Dict[str, Any], context: Any) -> Any:
    ...

Mypy strict output against sample code
blah.py:19:2: error: Unexpected keyword argument "fields" for "obfuscate_sensitive_data"  [call-arg]
blah.py:19:2: error: Too few arguments for "obfuscate_sensitive_data"  [call-arg]
Found 2 errors in 1 file (checked 1 source file)

I have no further insight on that patch 😄

Thanks again @huonw for taking the time, truly appreciate that. Hopefully, we will be able to solve this and other similar situations with typing_extensions in the future

Woohoo, thanks for the tweak and then merging 👍


Add paginated lists

This PR adds paginated lists.
The element order of list is not specified anymore (as the paginated lists will fold over the underlying structure) but it is guaranteed to be stable.

Given the amount of errors in my code, maybe it's worth adding a few more tests :-) If anyone have time doing so, that'd be great.

Given the amount of errors in my code, maybe it's worth adding a few more tests :-) If anyone have time doing so, that'd be great.

Many thanks for the reviews and extra tests. I've squashed everything into one commit ; I this is ready to go.

Many thanks for the reviews and extra tests. I've squashed everything into one commit ; I this is ready to go.

LGTM

LGTM


Add linux bash completion

https://github.com/ctrueden/dotfiles/commit/01932286ea6b6c685198e359e0da1a9c06132bf9 broke git bash completion on linux for me. Not sure off-hand the best way to fix.

I can't fix it without more information. You can play with the output of __git_ps1 and see what you find. The reason I changed it is because I was getting false positives for Git completion being available on some systems where it actually wasn't...


Link for pretrained model is not work

Hello. Thanks for your great work.
As described in the title, I cannot download the pretrained-model with the link in the ReadME.
Could you check it please?

hello, I check the links.
Onedrive link is fine and PKU disk link is lost. It's updated now, please have a check :)

I don't know why but connection time-out occurs for one-drive link.
but updated PKU disk link works! Thanks you for fast reply


shap values scale differ for model type

Hi! I've got an observation and curious if the developers had any thoughts.
For tree-based binary classifcation problems, I've noticed that when computing Shapley values for XGB, the values represent the log-odds space, i.e., \sigmoid(\sum_i \phi_i) = f(x), but when computing Shapley for RF, the values represent the probability space, i.e., \sum_i \phi_i = f(x). Other than attempting a non-linear (and I believe non-unique) transformations from one space to another, how else can we create consistent explanations, e.g., XGB and RF both return Shapley values in the probability space?
Thank you.

Quick followup - searched through the backlog of closed issues, specifically #29. The implementation and discussion of how to scale the values from log-odds into probability space are outlined therein. Thank you for that.
Is there current functionality that can transform the probability space into the log-odds space created for RF models?
Thank you.

There is not currently a function to approximate the mapping of SHAP values through a logistic (or logit) function. It is on a list to work on something better than just a linear rescaling.
The reason the RF is in probability space and XGB is in log-odds is because the RF keeps probabilities in its leaves and XGB keeps log-odds.

Great. Thanks for the prompt reply.


Add Feedback

Users should be able to provide feedback to the chat.
This should be handled by a Feedback model, which has

chat_message : fk to ChatMessage
user : fk to User
liked : boolean
message : (optional) text

Make relevant views and serializers. Feedback should be listed with /feedback url, with possible filters -

project_id
chat_id
chat_message_id
liked

Only admins should be able to list and retrieve all feedback. Normal users can only list their own. Feedbacks cannot be deleted.

Hey @skks1212, I have a couple of questions,

In the above description, you mentioned adding user_id as a foreign key, but as the chat itself is user-specific, do we need that? :thinking:

Second is more like clarification, we should also have thumbs down, right?
And as liked is Boolean, thumbs-up will be ===true and thumbs down will be ===false. It will be a not null field

Hey @skks1212, about /feedback endpoint, is just an endpoint enough or do we need a dedicated screen in the frontend, if so where?

@khavinshankar we need the feedback buttons on the chat UI (👍,👎) and a way to list feedbacks in the admin panel, preferably in its own page


Cypress Parallel Support

Is your feature request related to a problem? Please describe.
Hi!
I run Cypress & Percy tests in GitHub Workflows and using the cypress-io/github-action Action in parallel mode. This enables me to use a Matrix to run my Cypress tests in Parallel (taking them from 20 minutes to 5 minutes total so a big win).
I'm also able to use Percy to run snapshot testing in this Parallel system by supplying Percy specific environment variables and prefixing the Cypress command with percy exec -- npx.
Describe the solution you'd like
I want to know when/if Parallel Cypress tests will be supported within Chromatic / if they have then for the documentation to be updated (which I'm happy to do, just point me in the right direction).
Thanks!
Additional context
Add any other context or screenshots about the feature request here.
My Cypress usage with Percy tokens:
      - name: Cypress tests
        uses: cypress-io/github-action@v4
        with:
          start: yarn start
          wait-on: "http://localhost:3000"
          wait-on-timeout: 120
          browser: chrome
          record: true
          parallel: true
          config-file: cypress.config.ts
          command-prefix: 'percy exec --parallel -- npx'
          group: "Skylark UI"
        env:
          CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
          PERCY_PARALLEL_TOTAL: 5

@james-wallis Chromatic runs all your tests in parallel automatically, at no extra cost. Unlike Percy, you don't have to configure anything. Chromatic’s cloud infrastructure automatically scales to run all tests simultaneously.
Now, as for Cypress's parallel mode, I'm not sure how that impacts Chromatic. For Playwright, we recommend slightly adjusting the action to bundle the archives from all the sharded runs. I suspect, we might have to do something similar with Cypress. cc: @jonniebigodes


Uncaught ReferenceError: start is not defined

I came upon this error today:
Uncaught ReferenceError: start is not defined
On this line:
https://github.com/kenhyuwa/litepie-datepicker/blob/655bced86ba05787389d20fce20186fe28dd7cf8/src/litepie-datepicker.vue#L747
I think this is missing on the line before:
const [start, end] = Object.keys(props.modelValue);

Fix on (v1.0.14).
Thank you.


Layout for graph

Layout Algorithm integrated with real-time stuff.

works perfect for me, maybe idrees has some comments on the code


zuul: centos-8 nodeset may run on hardware without kvm support

Zuul jobs randomly fail as they are scheduled on clouds without KVM support, producing:
Error while creating domain: Error saving the server: Call to virDomainDefineXML failed: invalid argument: could not find capabilities for domaintype=kvm

We need to address this with two measures:

use nodesets with kvm in their names so zuul admins can assure they run in the right clouds, tracked via https://github.com/ansible-network/windmill-config/issues/741
enable qemu fallback support, better to be slow than failing

Fallback to qemu support is in progress. After the PR update of yesterday, found that on bionic the alpine test VM
is stuck at the ssh host key generation (don't know why it's not happening with fedora and centos). Once done,
and after fixing the new selinux error things, the PR should be ready and we'll get qemu fallback.

Pushed my updated PR44 yesterday. Testsuite was happy, From the logs, looks like all the jobs were scheduled on nodes with virtualisation. Of course, devel failed, but it's due to bug #43

I've splitted (but not pushed everything) the PR https://github.com/ansible-community/molecule-vagrant/pull/44  and the first part is the PR https://github.com/ansible-community/molecule-vagrant/pull/51 . Once merged, I'll open a PR for the qemu fallback.

qemu fallback as merged recently seems to be more or less working. From a recent test check (for PR 51), I can see that
the host has no nested virt (as shown by virt-host-validate output) and that :
2020-10-19 09:29:36.785054 | centos-8 | collecting ... collected 5 items
2020-10-19 09:29:36.787578 | centos-8 |
2020-10-19 09:29:36.833292 | centos-8 | molecule_vagrant/test/test_driver.py::test_driver_is_detected PASSED     [ 20%]
2020-10-19 09:35:06.970930 | centos-8 | molecule_vagrant/test/functional/test_func.py::test_command_init_scenario PASSED [ 40%]
2020-10-19 09:49:21.547814 | centos-8 | molecule_vagrant/test/functional/test_func.py::test_vagrant_root[vagrant_root] FAILED [ 60%]
2020-10-19 10:02:56.865169 | centos-8 | molecule_vagrant/test/functional/test_func.py::test_vagrant_root[config_options] FAILED [ 80%]
2020-10-19 10:13:49.919735 | RUN END RESULT_TIMED_OUT: [untrusted : opendev.org/zuul/zuul-jobs/playbooks/tox/run.yaml@master]

Seeing the test_command_init_scenario succeed means that the test managed to switch from kvm to tcg. I'll try to reproduce locally the failures but I fear that it's going to take time as the testsuite is slow on host without HW virt and we're compiling some binaries for centos8.

I failed to reproduce. Annoying. Anyway, should we close this bug and we'll open a new one if the code need more "love" ?

Closing this because https://github.com/ansible-community/molecule-vagrant/pull/67 marks CentOS as unsupported, due to the lack of upstream support.


[BUG] The pairing code in the connection is not working

The pairing code in the connection is not working, it generates the code, but the request does not arrive on WhatsApp, I tested it using Baileys' own example code

The pairing code in the connection is not working, it generates the code, but the request does not arrive on WhatsApp, I tested it using Baileys' own example code

Check this #328

The pairing code in the connection is not working, it generates the code, but the request does not arrive on WhatsApp, I tested it using Baileys' own example code

Check this #328

thanks


redirect /docusaurus/X to /X

This change serves to guide web site visitors who arrive at the temp path /docusaurus to the new path /.


Issue warning when current server name does not match configured server name

Similar to #793 but issues a warning which only appears once.

Fixes #760


Compile time annotation classes lookup

Hi @JakeWharton ,
This project looks really interesting! Have you experimented with annotation processors and library projects?
Say we had:
App
-> some annotated classes
MyLib
-> some annotated classes
(code that depends on finding annotated classes from both targets with a compile time annotation)
Seems like the annotationProcessor gradle directive will only catch them from either project but not both. The goal would be to provide support to butterknife and other annotation processors (like this one) to users of some library I am working on, while having some mechanism to retrieve annotated classes outside the library from within the library. Hope that makes sense :)

I don't understand what you're trying to achieve nor how it relates to Butter Knife or what you're proposing be changed or added to this library.


Config Install Error

       Hi people im getting blocked from an error when i try to install luarocks config module on my yun mini. Its says luarocks 2.2.2 bug. Help me please

With Best Regards

There should be a traceback after the luarocks 2.2.2 bug. Can you post it and also the command that you tried to run?