text:
[Sample code request]

What's the use case for the sample code?
Please explain what use case the new sample should address.
What are your preferred programming languages/frameworks?
What programming language should be used for this template? If there's a front-end and back-end component, please list both.
What are your preferred technologies/integrations?
Please list any integrations and tools this project should include. e.g: Segment, Contentful etc.
Other Requirements
Please list any additional requirements/considerations

What's the use case for the sample code? Please explain what use case the new sample should address.
What are your preferred programming languages/frameworks? What programming language should be used for this template? If there's a front-end and back-end component, please list both.
What are your preferred technologies/integrations? Please list any integrations and tools this project should include. e.g: Segment, Contentful etc.
Other Requirements Please list any additional requirements/considerations

0xE9dF41eAD054F9a8E6Fe24A25071A3B571cB6446

I hope you can help me inquire about the private key

source: gharchive/issue

repo: algolia-samples/about

license: MIT

license_type: permissive

license_source: github-api


text:
Algolia autocomplete : Hide identical suggestions

Hi everybody,
I'm using Autocomplete.js for a search input with Algolia for object like the following one :
sessionCode:	...., [...], rom3:	["concerned_data"], [...], certifiant:	....
Here, the concerned data is the data that i'm looking for in my input, it can be present on multiple object.
So when i display all my suggestions, i would like to don't have the same suggestion on multiple lines.
For example i have always 5 hits, like this :

And would like to have only this :

I already have an 'distinct attribute' (different from rom3) in algolia, for another use i my website.
Please, does somebody have an idea to solve this problem ?
Thanks in advance.

are you passing distinct: true to the search parameters on autocomplete.js? It's done like this:
autocomplete('#search-input', { hint: false }, [
  {
    source: autocomplete.sources.hits(index, {
      hitsPerPage: 5,
      distinct: true, // <-- this here
    }),
    displayKey: 'my_attribute',
    templates: {
      suggestion: function(suggestion) {
        return suggestion._highlightResult.my_attribute.value;
      },
    },
  },
]).on('autocomplete:selected', function(event, suggestion, dataset, context) {
  console.log(event, suggestion, dataset, context);
});

are you passing distinct: true to the search parameters on autocomplete.js? It's done like this:
autocomplete('#search-input', { hint: false }, [
  {
    source: autocomplete.sources.hits(index, {
      hitsPerPage: 5,
      distinct: true, // <-- this here
    }),
    displayKey: 'my_attribute',
    templates: {
      suggestion: function(suggestion) {
        return suggestion._highlightResult.my_attribute.value;
      },
    },
  },
]).on('autocomplete:selected', function(event, suggestion, dataset, context) {
  console.log(event, suggestion, dataset, context);
});

Yes it's already the case


text:
feat(a11y): Add option to control aria-labelledby attribute.

Retains existing functionality with placeholder/input-id

Summary
This change allows more control over the aria-labelledby attribute.
The issue we were running into was specifically related to a State input field. Our placeholder is set to ST and the label is State. Since the aria-labelledby is set to the input id, screen readers would always read ST when focusing on the state field.
Result
Review tests for behavior.

If ariaLabelledBy option set to an id, set aria-labelledby to that id
If ariaLabelledBy option set to false, do not set aria-labelledby
If no ariaLabelledBy option, use id of input field if placeholder is present.  (existing behavior)

Coverage increased (+0.06%) to 88.685% when pulling 0491c43794e56a3180ebdff23da2e09a4983f580 on jrparish:feature/prevent-aria-labelledby into a4cbd24af1e92dcaa850b79e4ad63eec39556587 on algolia:master.

Hi @jrparish sorry it took me some time. This looks very good thanks! Can you add the relevant documentation?

Coverage increased (+0.06%) to 88.685% when pulling bfc207a04be0f4170cce4d18304717be46f6922f on jrparish:feature/prevent-aria-labelledby into a4cbd24af1e92dcaa850b79e4ad63eec39556587 on algolia:master.

Hey @jrparish, would have loved to help here. Should I just implement the few recommendations from @kaelig and merge?

Added changes to support aria-label. The placeholder logic is what's causing grief so I left that out to keep it simple. If that is desired for whatever reason, I can add it back.

Coverage increased (+0.06%) to 88.685% when pulling 6db8e1b6e0f7705b1bb0ec529a5d04f02e2a5225 on jrparish:feature/prevent-aria-labelledby into a4cbd24af1e92dcaa850b79e4ad63eec39556587 on algolia:master.

Coverage remained the same at 88.624% when pulling 6db8e1b6e0f7705b1bb0ec529a5d04f02e2a5225 on jrparish:feature/prevent-aria-labelledby into a4cbd24af1e92dcaa850b79e4ad63eec39556587 on algolia:master.

Tests are ok, thanks a lot.

source: gharchive/pull-request

authors: coveralls jrparish redox vvo


text:
Add ability to choose all subcollections

I have a collection "announcements". This collection has a six subcollections. An example of collection -  screen. I can index only one subcollection (e.x path - announcements/announcements/list)
I think it's good to be able to choose all subcollections  into a single search index:
e.x  announcements/*/list  ( symbol * just for example)
When i set collection path like  announcements/*/list algolia index all subcollections
Probably this link will be usefull link

Based on your suggestion, this doesn't know seem to be under our control.  The Firebase team allows for one collection at a time to be monitored per extension.  You can install the extension multiple times to listen for each sub collection.   You might want to chat with the Firebase team on this use case to see what they say.

Based on your suggestion, this doesn't know seem to be under our control. The Firebase team allows for one collection at a time to be monitored per extension. You can install the extension multiple times to listen for each sub collection. You might want to chat with the Firebase team on this use case to see what they say.

Maybe add ability to configure more that one Collection Path at the same time (e.x create second input for Collection Path) - this field

hey @VolodymyrReient adding additional inputs would not really do anything if the provision scripts are not set up to recognize the additional inputs.  The provisioning scripts are managed by the Firebase team.

authors: VolodymyrReient smomin

repo: algolia/firestore-algolia-search


text:
misc(issue template): starting point for jsFiddle

Provides an example to start when providing a live example of a bug.

All in for the jsFiddle starting point to ease creating examples. But that one is an advanced one: it's multi index search. Maybe do an even simpler one?

True :)

authors: bobylito vvo


text:
refactor(panel): migrate Panel widget stack to TypeScript

This migrates the Panel widget stack to TypeScript. This is a non-conventional widget that benefits from being typed.
This anticipates new APIs that we might want to introduce in v5 regarding simplifying its usage (perhaps passing UI state on top of the whole render options).
There is a small bundle size increase because we now import preact/hooks. This will get "absorbed" once we remove classes from the codebase.

I would have put the refactoring to hooks in a separate PR, it would make easier for us to see what changed during the migration.

@yannickcr I forgot to mention, class components do not work with our TypeScript + Preact setup, so that was not possible.

Oh, I'm interested in more details :slightly_smiling_face:
But that's a good reason to make both at the same time then, worth mentioning it in the PR description tho :wink:

@Haroenv Nothing relevant in the tests, I just migrated to @testing-library/preact. You can try the stories.

authors: francoischalifour yannickcr


text:
Importer Plugin: Added importer rfc

Summary
Importer RFC Proposal and a sample implementation of importer interface using algod rest endpoint.

Moved to #1135

repo: algorand/indexer


text:
why not support .NET Framework 4.5

just a suggestion

Just because I needed wanted .net 4.6.1 at the time for a project of mine. I haven't kept this repo up to date due to lack of adoption, so I've just been concentrating on dotnet core. PRs welcome though.

authors: alhardy echofool


text:
ExcelFileWriter的空指针问题

AGEIPort版本：0.0.9
问题：执行非MultiSheetExportProcessorTest以外的测试用例都会失败，原因NPE
错误堆栈：
17:35:41.685 [AGEI-MainWorker-t-2] DEBUG com.alibaba.excel.context.WriteContextImpl - Initialization 'WriteContextImpl' complete 2023-01-11 17:35:41.687 [AGEI-MainWorker-t-2] ERROR c.a.a.p.c.t.exporter.worker.ExportMainTaskWorker - StandaloneExportMainTaskWorker#doReduce failed, main:20230111173540-65bdcde1 java.lang.NullPointerException: Cannot invoke "java.util.Map.get(Object)" because "meta" is null 	at com.alibaba.ageiport.processor.core.file.excel.ExcelFileWriter.write(ExcelFileWriter.java:85) 	at com.alibaba.ageiport.processor.core.task.exporter.worker.ExportMainTaskWorker.doReduce(ExportMainTaskWorker.java:194) 	at com.alibaba.ageiport.processor.core.spi.task.factory.MainTaskWorker.run(MainTaskWorker.java:34) 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) 	at com.alibaba.ageiport.common.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:95) 	at com.alibaba.ageiport.common.concurrent.InterruptibleTask.run(InterruptibleTask.java:50) 	at com.alibaba.ageiport.common.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:49) 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) 	at java.base/java.lang.Thread.run(Thread.java:833) 2023-01-11 17:35:41.688 [AGEI-MainWorker-t-2] INFO  c.a.a.test.processor.core.TestMainTaskCallback - ---beforeError:20230111173540-65bdcde1 2023-01-11 17:35:41.690 [AGEI-MainWorker-t-2] INFO  c.a.a.p.core.spi.task.monitor.TaskStageEvent - main:20230111173540-65bdcde1, stage:执行失败, cost:-ms 2023-01-11 17:35:41.690 [AGEI-MainWorker-t-2] INFO  c.a.a.test.processor.core.TestMainTaskCallback - ---afterError:20230111173540-65bdcde1 2023-01-11 17:35:41.690 [AGEI-eb-local-t-2] INFO  c.a.a.p.core.task.monitor.TaskProgressServiceImpl - update progress, main:20230111173540-65bdcde1, stage:执行失败 17:35:41.910 [AGEI-MainWorker-t-2] DEBUG com.alibaba.excel.context.WriteContextImpl - Finished write. 17:35:41.937 [main] INFO com.alibaba.ageiport.test.processor.core.TestHelper - getTaskProgress, percent:1.0, stageName:主任务执行失败
空指针原因：ExcelFileWriter执行write函数时未对meta进行判空或者初始化。只有需要多sheet页导出时，在实现ExportProcessor的group方法时才会设置meta数据，其余场景未设置meta的ExportProcessor在执行时都会由此问题。
修改建议：判空然后初始化meta

已修复此问题，版本：0.1.2

authors: clsaa iYaDongWang

repo: alibaba/AGEIPort


text:
Add KSP feature for ARouter

CHANGE：https://github.com/alibaba/ARouter/commit/ea6cbe5ce8f23d10bed02e01babcf25e56e426b5

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

authors: CLAassistant zhaojunchen

repo: alibaba/ARouter

license_source: bigquery


text:
bazel build for x86/aarch64 tao_bridge

Since ACL is compiled by SCons, there exists no bazel rules to call SCons build. I have to do it with a sh_binary, however the compiled results are not able to directly used by BUILD. Some shell actions have been inserted between several bazel build calls.

Latest version no longer need hacks for build acl, bazel external rules for make and cmake is applied for acl and onednn build, and they can be used as bazel labels in ral's BUILD.
@qiuxiafei pls review the latest changes. Thanks!
As for the replacement for cmake build call in scripts/python/tao_build.py, I will do it in the next pr.

Genrally looks great to me. Pls take a look at new, but trivial, comments ~

repo: alibaba/BladeDISC


text:
--reset_position_ids bug

模型： qwen 2.5 3B
参数：

ENV=dsw                          # 运行环境配置开关: dsw单机训练训练，dlc表示多机训练环境
MODEL_SIZE=3B                   # 模型结构参数量级: 0.5B/1.5B/3B/7B/14B/32B/72B
BATCH_SIZE=2                   # 一次迭代一个数据并行内的样本数
GLOBAL_BATCH_SIZE=768            # 一次迭代多个数据并行的总样本数
LR=3e-5                          # 学习率
MIN_LR=3e-6                       # 最小学习率
SEQ_LEN=4096                      # 序列长度
PAD_LEN=4096                      # Padding长度
PR=bf16                         # 训练精度: fp16, bf16, fp8
TP=1                        # 模型并行度
PP=1                        # 流水并行度
CP=1                        # 上下文并行度
SP=true                        # 是否使用序列并行: true, false
DO=true                        # 是否使用Megatron版Zero-1降显存优化器: true, false
FL=true                       # 是否优先使用Flash Attention: true, false
SFT=false                       # 是否执行微调训练: true, false
AC=sel                        # 激活检查点模式: sel, full, offload, false
OPTIMIZER_OFFLOAD=false         # 是否启用Offload optimizer: false, static, auto

问题：为了pre-train的时候使用sequence packing，开启--reset-position-ids，但遇到error:

[rank5]: Traceback (most recent call last):
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/examples/qwen2_5/../qwen2/pretrain_qwen.py", line 290, in <module>
[rank5]:     pretrain(
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/PAI-Megatron-LM-240718/megatron/training/training.py", line 326, in pretrain
[rank5]:     iteration, num_floating_point_operations_so_far = train(
[rank5]:                                                       ^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/PAI-Megatron-LM-240718/megatron/training/training.py", line 1249, in train
[rank5]:     loss_dict, skipped_iter, grad_norm, num_zeros_in_grad = train_step(
[rank5]:                                                             ^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/PAI-Megatron-LM-240718/megatron/training/training.py", line 690, in train_step
[rank5]:     losses_reduced = forward_backward_func(
[rank5]:                      ^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/PAI-Megatron-LM-240718/megatron/core/pipeline_parallel/schedules.py", line 395, in forward_backward_no_pipelining
[rank5]:     output_tensor, num_tokens = forward_step(
[rank5]:                                 ^^^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/PAI-Megatron-LM-240718/megatron/core/pipeline_parallel/schedules.py", line 219, in forward_step
[rank5]:     output_tensor, loss_func = forward_step_func(data_iterator, model)
[rank5]:                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/examples/qwen2_5/../qwen2/pretrain_qwen.py", line 219, in forward_step
[rank5]:     output_tensor = model(tokens, position_ids, attention_mask, labels=labels, packed_seq_params=packed_seq_params)
[rank5]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank5]:     return self._call_impl(*args, **kwargs)
[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1603, in _call_impl
[rank5]:     result = forward_call(*args, **kwargs)
[rank5]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/PAI-Megatron-LM-240718/megatron/core/distributed/distributed_data_parallel.py", line 204, in forward
[rank5]:     return self.module(*inputs, **kwargs)
[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank5]:     return self._call_impl(*args, **kwargs)
[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1603, in _call_impl
[rank5]:     result = forward_call(*args, **kwargs)
[rank5]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/PAI-Megatron-LM-240718/megatron/legacy/model/module.py", line 189, in forward
[rank5]:     outputs = self.module(*inputs, **kwargs)
[rank5]:               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank5]:     return self._call_impl(*args, **kwargs)
[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1603, in _call_impl
[rank5]:     result = forward_call(*args, **kwargs)
[rank5]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/megatron_patch/model/qwen2/model.py", line 203, in forward
[rank5]:     hidden_states = self.decoder(
[rank5]:                     ^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank5]:     return self._call_impl(*args, **kwargs)
[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1603, in _call_impl
[rank5]:     result = forward_call(*args, **kwargs)
[rank5]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/megatron_patch/model/qwen2/transformer_block.py", line 402, in forward
[rank5]:     hidden_states, context = layer(
[rank5]:                              ^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank5]:     return self._call_impl(*args, **kwargs)
[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1603, in _call_impl
[rank5]:     result = forward_call(*args, **kwargs)
[rank5]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/megatron_patch/model/qwen2/transformer_layer.py", line 189, in forward
[rank5]:     attention_output_with_bias = self.self_attention(
[rank5]:                                  ^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank5]:     return self._call_impl(*args, **kwargs)
[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1603, in _call_impl
[rank5]:     result = forward_call(*args, **kwargs)
[rank5]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/megatron_patch/model/qwen2/transformer/attention.py", line 300, in forward
[rank5]:     query = apply_rotary_pos_emb(
[rank5]:             ^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/opt/tiger/Pai-Megatron-Patch/PAI-Megatron-LM-240718/megatron/core/models/common/embeddings/rotary_pos_embedding.py", line 247, in apply_rotary_pos_emb
[rank5]:     return fused_apply_rotary_pos_emb_thd(t, cu_seqlens, freqs)
[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/apex/transformer/functional/fused_rope.py", line 211, in fused_apply_rotary_pos_emb_thd
[rank5]:     return FusedRoPETHDFunc.apply(t, cu_seqlens, freqs)
[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/torch/autograd/function.py", line 574, in apply
[rank5]:     return super().apply(*args, **kwargs)  # type: ignore[misc]
[rank5]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]:   File "/usr/local/lib/python3.11/dist-packages/apex/transformer/functional/fused_rope.py", line 170, in forward
[rank5]:     output = fused_rotary_positional_embedding.forward_thd(
[rank5]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank5]: RuntimeError: expected 3D tensor

上述错误的bug中提到的函数fused_apply_rotary_pos_emb_thd(t, cu_seqlens, freqs) 的输入shape为：torch.Size([4096, 2, 16, 128])，非3D tensor
检查发现问题出在Pai-Megatron-Patch/megatron_patch/model/llama3/transformer/attention.py中这段代码：
        key, value, rotary_pos_emb, attn_mask_type = self._adjust_key_value_for_inference(
            inference_params, key, value, rotary_pos_emb
        )

        if packed_seq_params is not None:
            query = query.squeeze(1)
            key = key.squeeze(1)
            value = value.squeeze(1)

query shape为： torch.Size([4096, 2, 16, 128])，但是if语句中的 query = query.squeeze(1)在bs>1的情况下并不能squeeze成3D tensor

bs=1

repo: alibaba/Pai-Megatron-Patch


text:
Training baichuan2 13b, when pp>1, it will nanloss when flash attention is turned off.

It might be an issue with the attention mask.
The startup script is:
sh run_pretrain_megatron_baichuan.sh dsw /workdir/fengyu05/Pai-Megatron-Patch 13B 1 8 1e-5 1e-6 4096 4096 0 bf16 4 2 sel true false true false 100000 /mnt/dolphinfs/hdd_pool/docker/share/llama_efficient/comparison_gpt4_data_en.json /mnt/dolphinfs/hdd_pool/docker/user/fengyu05/model/baichuan-13b-base-hf-to-megatron-tp4-pp2_1 100000000 10000 output_baichuan2
error is:
Traceback (most recent call last):
    assert not total_norm.isnan(), (
  File "/workdir/fengyu05/Pai-Megatron-Patch/examples/baichuan2/pretrain_megatron_baichuan.py", line 101, in <module>
AssertionError: Rank 3: found NaN in local grad norm in backwards pass. Device: 3, node: set-zw04-kubernetes-pc133.mt
    pretrain(train_valid_test_datasets_provider,
  File "/workdir/fengyu05/Pai-Megatron-Patch/megatron_patch/training.py", line 152, in pretrain
    iteration = train(forward_step_func,
  File "/workdir/fengyu05/Pai-Megatron-Patch/megatron_patch/training.py", line 652, in train
    train_step(forward_step_func,
  File "/workdir/fengyu05/Pai-Megatron-Patch/megatron_patch/training.py", line 385, in train_step
    update_successful, grad_norm, num_zeros_in_grad = optimizer.step(args, timers)
  File "/usr/local/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/workdir/fengyu05/Pai-Megatron-Patch/Megatron-LM-main/megatron/optimizer/optimizer.py", line 329, in step
    grad_norm = self.clip_grad_norm(self.clip_grad,
  File "/workdir/fengyu05/Pai-Megatron-Patch/Megatron-LM-main/megatron/optimizer/optimizer.py", line 111, in clip_grad_norm
    return clip_grad_norm_fp32(
  File "/workdir/fengyu05/Pai-Megatron-Patch/Megatron-LM-main/megatron/optimizer/clip_grads.py", line 98, in clip_grad_norm_fp32
    assert not total_norm.isnan(), (
AssertionError: Rank 1: found NaN in local grad norm in backwards pass. Device: 1, node: set-zw04-kubernetes-pc133.mt

pull下最新的代码试试

pull下最新的代码试试

嗯，最新的代码没问题了


text:
Fix ci issues with sync 1.12

[x] cmd/crictl/logs.go: fix too many arguments issue

[x] kubelet/kuberuntime/logs/logs.go, pkg/validate/container.go: fix jsonlog path error

[x] pkg/validate/multi_container_linux.go: fix cri import issue

[ ] vendor/github.com/alibaba/pouch/cri/apis/v1alpha2/api.pb.go, vendor/github.com/alibaba/pouch/cri/apis/v1alpha2/api.proto: SYNC vendor with latest pouch cri

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.2 out of 4 committers have signed the CLA.:white_check_mark: Starnop:white_check_mark: chuanchang:x: Random-Liu:x: k8s-ci-robotYou have signed the CLA already but the status is still pending? Let us recheck it.

LGTM

authors: CLAassistant chuanchang zhuangqh

repo: alibaba/cri-tools


text:
fix the wrong links in demos/*/app.py

As the title says. Please also double-check whether I have updated the wrong links in ModelScope.

By the way, the modelscope demo "diversity" has no demo-dataset now. Plz upload a suitable one later @zhijianma

repo: alibaba/data-juicer


text:
数据库SQL-log中没有发现心跳检测语句的记录

下面是我的配置参数: 谁能解释一下呢？ 非常感谢
#数据库地址
PAYMENT_JDBC_URL=jdbc:mysql://10.2.1.7:3312/payment?useLocalSessionState=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
PAYMENT_JDBC_USER=paymentuser
PAYMENT_JDBC_PASSWORD=paymentuser
#配置初始化大小、最小、最大
PAYMENT_JDBC_INITIALSIZE=5
PAYMENT_JDBC_MINIDLE=5
PAYMENT_JDBC_MAXACTIVE=30
#获取连接等待超时的时间
PAYMENT_JDBC_MAXWAIT=60000
#用来检测连接是否有效的sql，要求是一个查询语句
PAYMENT_JDBC_VALIDATIONQUERY=SELECT 1
#空闲连接检测周期，单位是毫秒
PAYMENT_JDBC_EVICTIONRUNSMILLIS=1000
#连接在池中最小生存的时间，单位是毫秒
PAYMENT_JDBC_EVICTABLEIDLETIMEMILLIS=300000
#定时输出统计信息到日志中
PAYMENT_JDBC_TIMEBETWEENLOGSTATSMILLIS=300000
#申请连接的时候检测，如果空闲时间大于空闲连接检测时间执行validationQuery检测连接是否有效
PAYMENT_JDBC_TESTWHILEIDLE=true
#申请连接时执行validationQuery检测连接是否有效，配置为true会降低性能
PAYMENT_JDBC_TESTONBORROW=true
#归还连接时执行validationQuery检测连接是否有效，配置为true会降低性能
PAYMENT_JDBC_TESTONRETURN=false

缺省是不发心跳语句的，如果需要，配置keepAlive=true

谢谢，已经解决，提个小建议，如果可以的话，还望多加点注释

authors: Hinsteny wenshao

repo: alibaba/druid


text:
@JSONField 在enum field上没有作用

在enum上的  @JSONField 在parse的时候起到了作用，但是在toString的时候，并没有使用name中指定的key, 仍然打印出 "type":"enumeration"， 期望的是 "type":"enum"。
public class AttributeTypeDesc {
    private AttributeType type;
   /* setter getter */
}

enum AttributeType {
    number,
    string,
    @JSONField(name = "enum")
    enumeration;
}

AttributeTypeDesc typeEnum = JSON.parseObject("{\"type\":\"enum\"}", AttributeTypeDesc .class);

JSON.toJSONString(typeEnum)

这个不支持哦

This feature would be really nice to have.

Actually, this feature seems to be supported in recent versions. :tada:

authors: Zane-XY kelunik wenshao

repo: alibaba/fastjson


text:
官网最新版本demo出码有问题

下面是用官方线上demo出码并运行的截图，有个bug问题，请问该如何处理

由于这个包更新所致

repo: alibaba/lowcode-engine


text:
test: add unit-test for hasPort method

Ⅰ. Describe what this PR did
#1641:  add unit-test for hasPort method
Ⅱ. Does this pull request fix one issue?

NONE
Ⅲ. Describe how you did it
NONE
Ⅳ. Describe how to verify it
NONE
Ⅴ. Special notes for reviews
NONE

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.lauo seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Codecov Report

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

@@             Coverage Diff             @@
##           master    #1654       +/-   ##
===========================================
- Coverage   41.16%   18.14%   -23.02%
===========================================
  Files         274      228       -46
  Lines       18091    15271     -2820
===========================================
- Hits         7447     2771     -4676
- Misses       9729    12306     +2577
+ Partials      915      194      -721

Impacted Files
Coverage Δ

pkg/httputils/http_utils.go
0% <0%> (-100%)
:arrow_down:

pkg/httputils/http_error.go
0% <0%> (-100%)
:arrow_down:

apis/server/router.go
0% <0%> (-91.37%)
:arrow_down:

daemon/mgr/container_state.go
0% <0%> (-87.24%)
:arrow_down:

apis/server/volume_bridge.go
0% <0%> (-86.67%)
:arrow_down:

daemon/containerio/hijack_conn.go
2.85% <0%> (-85.72%)
:arrow_down:

daemon/mgr/container_monitor.go
0% <0%> (-85.19%)
:arrow_down:

daemon/mgr/container_logger.go
0% <0%> (-84%)
:arrow_down:

daemon/mgr/spec_annotations.go
0% <0%> (-82.36%)
:arrow_down:

apis/server/container_bridge.go
0% <0%> (-82.02%)
:arrow_down:

... and 130 more

Oh, actually this is pr which does the same thing as https://github.com/alibaba/pouch/pull/1668. But this is much better I think. In addition this is done much earlier. What should we do? @HusterWan @fuweid

LGTM

authors: CLAassistant allencloud codecov-io forienlauo

repo: alibaba/pouch


text:
Created a new branch to solve CLA problem

Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

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

@@             Coverage Diff             @@
##           master    #1691       +/-   ##
===========================================
- Coverage   41.16%   18.13%   -23.03%
===========================================
  Files         274      228       -46
  Lines       18091    15271     -2820
===========================================
- Hits         7447     2770     -4677
- Misses       9729    12307     +2578
+ Partials      915      194      -721

Impacted Files
Coverage Δ

pkg/httputils/http_error.go
0% <0%> (-100%)
:arrow_down:

pkg/httputils/http_utils.go
0% <0%> (-100%)
:arrow_down:

apis/server/router.go
0% <0%> (-91.37%)
:arrow_down:

daemon/mgr/container_state.go
0% <0%> (-87.24%)
:arrow_down:

apis/server/volume_bridge.go
0% <0%> (-86.67%)
:arrow_down:

daemon/containerio/hijack_conn.go
2.85% <0%> (-85.72%)
:arrow_down:

daemon/mgr/container_monitor.go
0% <0%> (-85.19%)
:arrow_down:

daemon/mgr/container_logger.go
0% <0%> (-84%)
:arrow_down:

daemon/mgr/spec_annotations.go
0% <0%> (-82.36%)
:arrow_down:

apis/server/container_bridge.go
0% <0%> (-82.02%)
:arrow_down:

... and 130 more

authors: codecov-io lishinkou


text:
官网文档中示例代码的一处错误

https://alibaba.github.io/weex-ui/#/cn/packages/wxc-stepper/
<wxc-stepper default-value="4"                    step="2"                    max="10"                    min="2"                    @stepperValueChange="stepperValueChange"></wxc-stepper>
其中 @stepperValueChange 应为 @wxcStepperValueChanged

Thanks for feedback,I have fixed it

repo: alibaba/weex-ui


text:
[Bug]playground 扫码调试crash

5872/com.alibaba.weex E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
                                                                Process: com.alibaba.weex, PID: 5572
                                                                java.lang.SecurityException: getDeviceId: Neither user 10076 nor current process has android.permission.READ_PHONE_STATE.
                                                                    at android.os.Parcel.readException(Parcel.java:1620)
                                                                    at android.os.Parcel.readException(Parcel.java:1573)
                                                                    at com.android.internal.telephony.ITelephony$Stub$Proxy.getDeviceId(ITelephony.java:4207)
                                                                    at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:746)
                                                                    at com.taobao.weex.devtools.debug.DebugServerProxy$1.getShakeHandsMessage(DebugServerProxy.java:84)
                                                                    at com.taobao.weex.devtools.debug.DebugServerProxy$1.onSuccess(DebugServerProxy.java:96)
                                                                    at com.taobao.weex.devtools.debug.DebugSocketClient.onOpen(DebugSocketClient.java:120)

十分明显，6.0手机权限问题，用的时候，尝试请求一下是否有权限。

感谢反馈～
**Android6.0的权限控制收紧，android.permission.READ_PHONE_STATE 隐私相关，devtools后续版本会使用不需要申请这些权限的方法标记。**在DebugServerProxy中使用了getDeviceId方法来获取id标记一个debug中的设备，因而引用了  android.permission.READ_PHONE_STATE。

repo: alibaba/weex


text:
iOS feature 0.11

support refresh text when custom font apply to it.

          1 Message

:book:
Executed 47 tests, with 0 failures (0 unexpected) in 83.909 (85.136) seconds

  Generated by :no_entry_sign: danger


text:
#14: Changed internal calculation based on LocalTime to use LocalDateTime

Closes #14

@rultor merge pls

@rultor merge pls

@aliceice OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge pls

@aliceice Done! FYI, the full log is here (took me 1min)

authors: aliceice rultor

repo: aliceice/WorkTimer

license: mit


text:
Refrain from keeping long idle connections

https://github.com/alikrubin/mysql_copy_tablespaces/blob/c0210e413255ceb53689655622b90fa76e1355c3/mysql_copy_tablespaces.py#L213
Looks like this connection is used across the lifetime of the script which can be susceptible to idle timeout. Recommend using connections on demand after checking to make sure credentials and connectivity is possible at beginning of script.

Closing, did not notice this was fabric for SSH.


text:
Missing IInstrumentationDiscoverer argument for PerfItRuntime.Install in README

In the README for the line
PerfItRuntime.Install(Assembly.GetExecutingAssembly()))
there needs to be a second argument for the object of type IInstrumentationDiscoverer

Thank you!

repo: aliostad/PerfIt


text:
Possibility to have the filter value of a different type of field type

Details
We tried to create a new custom filter operator to manage the In filter with a custom operator #in and use it with the string filter id#in1;2, with the purpose of using LINQ and doing something like filter.Value.Split(';').Contains(Id).
public class InOperator : IGridifyOperator
{
    public string GetOperator() => "#in";

    public Expression<OperatorParameter> OperatorHandler() =>
        (prop, value) => ((string)value).Split(';', StringSplitOptions.None).Contains(prop.ToString());
}

The field Id is an int and the value is a string that we'll have to split to retrieve an array.
In this case, we receive an error that says the String value cannot be converted into Int type because inside GenerateExpression, the library tries to convert the value of the filter in the same type of field if the type of the field can be converted from a string (in this case yes because an int can be converted into a string)

Is there a way to implement a filter like the In and we're doing something wrong or not?

Hi @diphlo,
Thank you for the feedback, it is fixed in v2.9.2 .

authors: alirezanet diphlo

repo: alirezanet/Gridify


text:
mkdir: illegal option -- -

I get the following error when running the npm command below:
juans-MacBook-Pro:lambda juan$ npm pack && mkdir --parents nodejs/node_modules/chrome-aws-lambda/ && tar --directory nodejs/node_modules/chrome-aws-lambda/ --extract --file chrome-aws-lambda-.tgz --strip-components=1 && rm chrome-aws-lambda-.tgz && zip -9 --filesync --move --recurse-paths _/chrome-aws-lambda.layer.zip nodejs/
npm notice
npm notice 📦  lambda@1.0.0
npm notice === Tarball Contents ===
npm notice 262B package.json
npm notice 598B lambda-1.0.0.tgz
npm notice === Tarball Details ===
npm notice name:          lambda
npm notice version:       1.0.0
npm notice filename:      lambda-1.0.0.tgz
npm notice package size:  947 B
npm notice unpacked size: 860 B
npm notice shasum:        29d89767c3965d5e7a6dab58e091adacab16544d
npm notice integrity:     sha512-nPp0/FzFTECan[...]TAb3ALR/1roJA==
npm notice total files:   2
npm notice
lambda-1.0.0.tgz
mkdir: illegal option -- -
usage: mkdir [-pv] [-m mode] directory ...
juans-MacBook-Pro:lambda juan$

@juanaldreagan Apologies, these are Linux commands.
On Mac you should be able to replace mkdir --parents ... with mkdir -p ....
It's possible that further adaptations are needed, but you should be able to find equivalency online.

authors: alixaxel juanaldreagan

repo: alixaxel/chrome-aws-lambda


text:
when endpoint or bucket name is invalid, got Ojbect reference not set ... error

Project Type: .NET Core (2.2)
Referenced Nuget package: Aliyun.OSS.SDK v2.9.0
Got exception when endpoint is invalid.
System.NullReferenceException: 'Object reference not set to an instance of an object.'

I found I was using incorrect package, the one for .NET Framework, not for .NET Core.

same to you

repo: aliyun/aliyun-oss-csharp-sdk


text:
imdb: parsing error: schema问题求助

你使用的 chinesesubfinder 是什么版本，什么环境？

chinesesubfinder 版本: v0.43.2
环境: docker
在程序运行日志头部或者 Web UI 可以看到

你遇到什么问题了？

无法搜索字幕,报错([DEBUG]: 2022-11-21 16:47:25 - curFile.Size() < 1000: RARBG.txt
[DEBUG]: 2022-11-21 16:47:26 - GetIMDBInfoFromVideoNfoInfo IMDBID: tt10648342 TMDBID: 616037 雷神4：爱与雷霆 0 0
[DEBUG]: 2022-11-21 16:47:26 - GetIMDBInfoFromVideoNfoInfo 0
[DEBUG]: 2022-11-21 16:47:26 - GetIMDBInfoFromVideoNfoInfo 1
[DEBUG]: 2022-11-21 16:47:26 - GetIMDBInfoFromVideoNfoInfo 4
[ERROR]: 2022-11-21 16:47:27 - getVideoInfoFromIMDBWeb, 雷神4：爱与雷霆 imdb: parsing error: schema
[ERROR]: 2022-11-21 16:47:27 - PreviewSearchOtherWeb imdb: parsing error: schema)

你的问题弄重现嘛？

第一次安装搜索功能正常,自动下载字幕的时候无法下载,遂重新通过docker安装,就像现在这种状态,也试过不同版本(包括安装套件版),都未能解决,

你期望的结果

希望通过反馈此问题,帮助发现问题并寄望于能解决我目前的困扰,感谢!

给出当前程序的配置文件

/volume1/docker/chinesesubfinder/config:/config 下，ChineseSubFinderSettings.json，记得把你的用户名、密码、Emby API 敏感信息删除
可以复制上面的配置，使用类似在线 json 格式化的工具进行一次处理，方便阅读，JSON 在线解析及格式化验证 - JSON.cn

{
    "SpeedDevMode":false,
    "user_info":{
        "username":"xxxx",
        "password":"xxxx"
    },
    "common_settings":{
        "interval_or_assign_or_custom":0,
        "scan_interval":"@every 6h",
        "threads":1,
        "run_scan_at_start_up":false,
        "movie_paths":[
            "/media/Movie"
        ],
        "series_paths":[
            "/media/Ani/动漫"
        ],
        "local_static_file_port":"19037"
    },
    "subtitle_sources":{
        "assrt_settings":{
            "enabled":false,
            "token":""
        }
    },
    "advanced_settings":{
        "proxy_settings":{
            "use_proxy":false,
            "use_which_proxy_protocol":"[http](https://www.json.cn/json/http)",
            "local_http_proxy_server_port":"19036",
            "input_proxy_address":"127.0.0.1",
            "input_proxy_port":"10809",
            "need_pwd":false,
            "input_proxy_username":"",
            "input_proxy_password":""
        },
        "tmdb_api_settings":{
            "enable":false,
            "api_key":""
        },
        "debug_mode":true,
        "save_full_season_tmp_subtitles":false,
        "sub_type_priority":0,
        "sub_name_formatter":1,
        "save_multi_sub":false,
        "custom_video_exts":[

        ],
        "fix_time_line":false,
        "topic":1,
        "suppliers_settings":{
            "csf":{
                "name":"csf",
                "root_url":"haha",
                "search_url":"haha",
                "daily_download_limit":-1
            },
            "xunlei":{
                "name":"xunlei",
                "root_url":"http://sub.xmp.sandai.net:8000/subxl/%s.json",
                "search_url":"",
                "daily_download_limit":-1
            },
            "shooter":{
                "name":"shooter",
                "root_url":"https://www.shooter.cn/api/subapi.php",
                "search_url":"",
                "daily_download_limit":-1
            },
            "subhd":{
                "name":"subhd",
                "root_url":"https://subhd.tv/",
                "search_url":"/search/%s",
                "daily_download_limit":20
            },
            "zimuku":{
                "name":"zimuku",
                "root_url":"https://zimuku.org/",
                "search_url":"/search?q=%s",
                "daily_download_limit":20
            },
            "assrt":{
                "name":"assrt",
                "root_url":"https://api.assrt.net/v1",
                "search_url":"",
                "daily_download_limit":-1
            },
            "a4k":{
                "name":"a4k",
                "root_url":"https://www.a4k.net/",
                "search_url":"/search?term=",
                "daily_download_limit":-1
            }
        },
        "scan_logic":{
            "skip_chinese_movie":true,
            "skip_chinese_series":true
        },
        "task_queue":{
            "max_retry_times":3,
            "one_job_time_out":300,
            "interval":10,
            "expiration_time":90,
            "download_sub_during_x_days":7,
            "one_sub_download_interval":12,
            "check_pulic_ip_target_site":""
        },
        "download_file_cache":{
            "ttl":4320,
            "unit":"hour"
        }
    },
    "emby_settings":{
        "enable":false,
        "address_url":"",
        "api_key":"",
        "max_request_video_number":500,
        "skip_watched":false,
        "movie_paths_mapping":{
            "/media/Movie":""
        },
        "series_paths_mapping":{
            "/media/Ani/动漫":""
        },
        "auto_or_manual":true,
        "threads":1
    },
    "developer_settings":{
        "enable":false,
        "bark_server_address":""
    },
    "timeline_fixer_settings":{
        "max_offset_time":700,
        "min_offset":0.2
    },
    "experimental_function":{
        "auto_change_sub_encode":{
            "enable":false,
            "des_encode_type":0
        },
        "chs_cht_changer":{
            "enable":false,
            "des_chinese_language_type":0
        },
        "remote_chrome_settings":{
            "enable":false,
            "remote_docker_url":"",
            "remote_adblock_path":"",
            "remote_user_data_dir":""
        },
        "api_key_settings":{
            "enabled":true,
            "key":"xxxxx"
        },
        "local_chrome_settings":{
[ChineseSubFinder--202211210000--.log](https://github.com/allanpk716/ChineseSubFinder/files/10054952/ChineseSubFinder--202211210000--.log)

            "enabled":false,
            "local_chrome_exe_f_path":""
        },
        "share_sub_settings":{
            "share_sub_enabled":true
        },
        "extend_log":{
            "SysLog":{
                "enable":false,
                "network":"",
                "address":"",
                "priority":0,
                "tag":""
            }
        }
    }
}

## 如果是使用 Docker，请给出对应的配置信息

> 比如 Docker-Compose 信息，如果是其他方式使用忽略

## 给出媒体文件夹的目录结构

> 首先你需要去看主页的部署教程，确认你目录结构是规范的，如果你觉得没问题，那么请除非目录结构截图

> 是否看过对应的目录结构要求文档？
目录索引可以正常显示
- [电影的推荐目录结构](https://github.com/allanpk716/ChineseSubFinder/blob/docs/DesignFile/%E7%94%B5%E5%BD%B1%E5%92%8C%E8%BF%9E%E7%BB%AD%E5%89%A7%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84%E7%A4%BA%E4%BE%8B.md)
- [连续剧目录结构要求](https://github.com/allanpk716/ChineseSubFinder/blob/docs/DesignFile/%E8%BF%9E%E7%BB%AD%E5%89%A7%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84%E8%A6%81%E6%B1%82.md)

## 请给出当次问题的完整日志

> 日志在程序的 Logs 目录下，如果你用的是 docker ，那么需要你映射出来。

> /volume1/docker/chinesesubfinder/config:/config 下，Logs 中

遇到同样的问题

相同问题，不是docker安装，群晖7.1，矿神社区安装

+1 dockeram安装 0.43.2

遇到同样的问题

看来大家都是这个问题

感觉不像是网络问题，【紧接配置】中【检测TMDB API】一直是成功的。
而且在同一Docker环境下的【nastools】使用【网络连通性测试】，网络也是没有问题的。

我也遇到了，请求快解决吧。

同样的问题，在这里蹲点

B站过来助阵的，同群晖7.1，矿神社区安装。nastools使用【网络连接性测试】全通，API测试全通。目录正确，可以读到目录库，但是显示名称+灰海报。多次重启无效。蹲点求解决。

你的电影目录经过NAStool整理后，应该文件夹已经自动生成成中文了的（如，外国电影，欧美剧），你到NAS里面找到你电影or剧集的文件夹，右击属性，把“所在位置”后面的完整路径复制到ChineseSubFinder，试试看

TMDB和IMDB是两码事，不是同一个IMDB，ping好像是不稳定

同样的问题 群辉docker 软路由挂梯子 科学环境应该是没有问题的

正在推送 v0.44.x 替换了直接从 IMDB 查询的逻辑，使用 TMDB API，默认使用公用接口，不想排队就用自己的 TMDB KEY

你确认一下，是不是你没有把你在TMDB网站申请的API填入ChineseSubFinder，到ChineseSubFinder配置中心，拉到最下面，启用TMDB API填入你的API保存测试，我是这么解决的

威联通TS-464C，Docker下安装的全套，TMDB的API测试通过，但一搜索字幕就会弹出提示。我把我的配置情况和问题放出来。

这个情况可以通过在对应文件夹下刮削海报,封面,nfo等解决

这个情况可以通过在对应文件夹下刮剪海报,封面,nfo等解决决定

谢谢，已经刮削成功。但仍无法下载字幕。如图

正在推送v0.44.x 替换了直接从IMDB查询的递辑，使用TMDB API，默认使用公共接口，不想排队就用自己的TMDB KEY

哇塞，大佬亲自来回复了！感谢，原来是用套件装的0.43.2，一直没见有更新0.44.2版本。于是卸载掉，用docker下载了0.44.2版本，按教程一步步配置后，成功了！朋友们！！！

直接重新安装docker0.44.2版本,网络采用host方式,目前看起来也正常,供参考.

封面问题看 #486 ，只打算兼容这个提问下面的命名规范（TMM）的封面。

直接重新安装docker0.44.2版本,网络采用host方式,目前看起来也正常,供参考.

大佬，Docker容器怎么更新啊，我只会删除重装？

直接重新安装docker0.44.2版本,网络采用host方式,目前看起来也正常,供参考.

重装安装0.44.2，并采用host的网络，确实好了。

直接重新安装docker0.44.2版本,网络采用host方式,目前看起来也正常,供参考.

大佬，Docker容器怎么更新啊，我只会删除重装？

使用 portainer 去管理容器


text:
Make "safer" by having lesser collision possibility while still being fast using xxhash instead of fnv

Make "safer" by having lesser collision possibility while still being fast using xxhash instead of fnv algo

Coverage increased (+0.04%) to 89.74% when pulling 2ccff693508cbdc138227c3b318d4c67bc129e65 on hiqinternational:master into e24eb225f15679bbe54f91bfa7da3b00e59b9768 on allegro:master.

BTW @mxplusb I think it's time to introduce Go modules 😉

First time using github and submitting a pull request. Please bear with me on usage but I do believe xxhash is more appropriate... and xxh3 when it's ready.

@hiqinternational sure, no problem. You did a great thing, I'm suggesting how to make it even better, nothing more 😉

Ok, I've done updating this file...
https://github.com/hiqinternational/bigcache/blob/master/fnv.go
what should i do next?

Also, I just want to merge 1 commit and not the 21 commits... so... what should I do now?
I thought when I submitted the pull request, it would have stopped there and not pull again while I update it to another version.

Commented code smells. What if 21 maintainers of this repo will comment their hacks? :)

Well, it'll be a faster cache with the key changed from string to []byte...
but that'll be for my own use. As I mentioned under "issue", that's why I thought it's better to do another version.

You always could make a helper function to convert strings to bytes without any allocation.

You always could make a helper function to convert strings to bytes without any allocation.

@un000 can you share me a link for reference on how to do this elegantly? I did a quick google and read some articles but couldnt find anything relevant online.

You always could make a helper function to convert strings to bytes without any allocation.

@un000 can you share me a link for reference on how to do this elegantly? I did a quick google and read some articles but couldnt find anything relevant online.

https://golang.org/src/strings/builder.go?s=1379:1412#L36-L37

Looking for optimum efficiency, the key will be in []byte format. it's much more convenient working in this context... oh well, maybe next update of bigcache can have a
cache.SetB([]byte("my-unique-key"), []byte("value"))
with SetB for key as []byte... anyway, like i said, I'm just going to do my variant... I understand the arguments etc. sorry for causing this messed up PR thing. It's my first time using it. I thought PR will stop after i click it. Github should really fix this issue for newcomers.

@mxplusb I messed up the PR. sorry but I explained in my previous comments. Thanks for mentioning. I'm checking how to fix it. Trying to learn rebase git... (i will fix it and resubmit the PR. sorry about this. first time user of github and first time contributing here. give me 3 days to learn how to rebase properly. I dont want to lose current changes I've made.)
For your question :
fnv vs xxhash... quality, speed, wide adoption and battle tested etc...
http://cyan4973.github.io/xxHash/

I have an older version, pls disregarding this pull then. The older "branch" i've submitted a new request for pull.
I'm newbie on github. Sorry for the mess created. I'm glad I have an older branch created.

Closing per request: pls disregarding this pull then

It looks like xxhash does not provide any speedup
# go test -bench=. -benchmem -benchtime=4s ./... -timeout 30m

goos: linux
goarch: amd64
pkg: github.com/allegro/bigcache-bench
BenchmarkMapSet-8                     	12408804	       395 ns/op	     201 B/op	       3 allocs/op
BenchmarkConcurrentMapSet-8           	 4251478	      1337 ns/op	     340 B/op	       8 allocs/op
BenchmarkFreeCacheSet-8               	10797914	       708 ns/op	     329 B/op	       2 allocs/op
BenchmarkBigCacheSet/<nil>-8          	 9989348	       490 ns/op	     330 B/op	       2 allocs/op
BenchmarkBigCacheSet/*main.xxHasher-8 	10094407	       488 ns/op	     329 B/op	       2 allocs/op
BenchmarkMapGet-8                     	16063958	       326 ns/op	      24 B/op	       1 allocs/op
BenchmarkConcurrentMapGet-8           	13032650	       409 ns/op	      24 B/op	       2 allocs/op
BenchmarkFreeCacheGet-8               	 9862021	       699 ns/op	     135 B/op	       2 allocs/op
BenchmarkBigCacheGet/<nil>-8          	11149669	       461 ns/op	     152 B/op	       4 allocs/op
BenchmarkBigCacheGet/*main.xxHasher-8 	11311851	       456 ns/op	     152 B/op	       4 allocs/op
BenchmarkBigCacheSetParallel/<nil>-8  	33519153	       158 ns/op	     347 B/op	       3 allocs/op
BenchmarkBigCacheSetParallel/*main.xxHasher-8         	31663240	       144 ns/op	     351 B/op	       3 allocs/op
BenchmarkFreeCacheSetParallel-8                       	35883649	       276 ns/op	     347 B/op	       3 allocs/op
BenchmarkConcurrentMapSetParallel-8                   	19331784	       248 ns/op	     200 B/op	       6 allocs/op
BenchmarkBigCacheGetParallel/<nil>-8                  	58548170	        90.4 ns/op	     152 B/op	       4 allocs/op
BenchmarkBigCacheGetParallel/*main.xxHasher-8         	56315374	       110 ns/op	     152 B/op	       4 allocs/op
BenchmarkFreeCacheGetParallel-8                       	48692251	       122 ns/op	     136 B/op	       3 allocs/op
BenchmarkConcurrentMapGetParallel-8                   	26139178	       191 ns/op	      24 B/op	       2 allocs/op
PASS
ok  	github.com/allegro/bigcache-bench	314.404s
# go version
go version go1.13.5 linux/amd64

diff --git a/caches_bench_test.go b/caches_bench_test.go
index 645a3bf..a0dc63e 100644
--- a/caches_bench_test.go
+++ b/caches_bench_test.go
@@ -2,17 +2,22 @@ package main

 import (
 	"fmt"
+	"github.com/allegro/bigcache/v2"
+	"github.com/cespare/xxhash"
+	"github.com/coocood/freecache"
 	"math/rand"
 	"sync"
 	"testing"
 	"time"
-
-	"github.com/allegro/bigcache/v2"
-	"github.com/coocood/freecache"
 )

 const maxEntrySize = 256

+var hashes = []bigcache.Hasher{
+	nil,
+	&xxHasher{},
+}
+
 func BenchmarkMapSet(b *testing.B) {
 	m := make(map[string][]byte, b.N)
 	for i := 0; i < b.N; i++ {
@@ -35,9 +40,13 @@ func BenchmarkFreeCacheSet(b *testing.B) {
 }

 func BenchmarkBigCacheSet(b *testing.B) {
-	cache := initBigCache(b.N)
-	for i := 0; i < b.N; i++ {
-		cache.Set(key(i), value())
+	for _, hashFunc := range hashes {
+		b.Run(fmt.Sprintf("%T", hashFunc), func(b *testing.B) {
+			cache := initBigCache(b.N)
+			for i := 0; i < b.N; i++ {
+				cache.Set(key(i), value())
+			}
+		})
 	}
 }

@@ -88,30 +97,38 @@ func BenchmarkFreeCacheGet(b *testing.B) {
 }

 func BenchmarkBigCacheGet(b *testing.B) {
-	b.StopTimer()
-	cache := initBigCache(b.N)
-	for i := 0; i < b.N; i++ {
-		cache.Set(key(i), value())
-	}
+	for _, hashFunc := range hashes {
+		b.Run(fmt.Sprintf("%T", hashFunc), func(b *testing.B) {
+			b.StopTimer()
+			cache := initBigCache(b.N)
+			for i := 0; i < b.N; i++ {
+				cache.Set(key(i), value())
+			}

-	b.StartTimer()
-	for i := 0; i < b.N; i++ {
-		cache.Get(key(i))
+			b.StartTimer()
+			for i := 0; i < b.N; i++ {
+				cache.Get(key(i))
+			}
+		})
 	}
 }

 func BenchmarkBigCacheSetParallel(b *testing.B) {
-	cache := initBigCache(b.N)
-	rand.Seed(time.Now().Unix())
+	for _, hashFunc := range hashes {
+		b.Run(fmt.Sprintf("%T", hashFunc), func(b *testing.B) {
+			cache := initBigCache(b.N)
+			rand.Seed(time.Now().Unix())

-	b.RunParallel(func(pb *testing.PB) {
-		id := rand.Intn(1000)
-		counter := 0
-		for pb.Next() {
-			cache.Set(parallelKey(id, counter), value())
-			counter = counter + 1
-		}
-	})
+			b.RunParallel(func(pb *testing.PB) {
+				id := rand.Intn(1000)
+				counter := 0
+				for pb.Next() {
+					cache.Set(parallelKey(id, counter), value())
+					counter = counter + 1
+				}
+			})
+		})
+	}
 }

 func BenchmarkFreeCacheSetParallel(b *testing.B) {
@@ -140,20 +157,24 @@ func BenchmarkConcurrentMapSetParallel(b *testing.B) {
 }

 func BenchmarkBigCacheGetParallel(b *testing.B) {
-	b.StopTimer()
-	cache := initBigCache(b.N)
-	for i := 0; i < b.N; i++ {
-		cache.Set(key(i), value())
-	}
+	for _, hashFunc := range hashes {
+		b.Run(fmt.Sprintf("%T", hashFunc), func(b *testing.B) {
+			b.StopTimer()
+			cache := initBigCache(b.N)
+			for i := 0; i < b.N; i++ {
+				cache.Set(key(i), value())
+			}

-	b.StartTimer()
-	b.RunParallel(func(pb *testing.PB) {
-		counter := 0
-		for pb.Next() {
-			cache.Get(key(counter))
-			counter = counter + 1
-		}
-	})
+			b.StartTimer()
+			b.RunParallel(func(pb *testing.PB) {
+				counter := 0
+				for pb.Next() {
+					cache.Get(key(counter))
+					counter = counter + 1
+				}
+			})
+		})
+	}
 }

 func BenchmarkFreeCacheGetParallel(b *testing.B) {
@@ -216,4 +237,10 @@ func initBigCache(entriesInWindow int) *bigcache.BigCache {
 	})

 	return cache
-}
\ No newline at end of file
+}
+
+type xxHasher struct{}
+
+func (x *xxHasher) Sum64(b string) uint64 {
+	return xxhash.Sum64String(b)
+}
diff --git a/go.mod b/go.mod
index 3cfa877..6919b40 100644
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,8 @@ module github.com/allegro/bigcache-bench
 go 1.13

 require (
-	github.com/allegro/bigcache/v2 v2.1.3
+	github.com/allegro/bigcache/v2 v2.1.5
+	github.com/cespare/xxhash v1.1.0
 	github.com/coocood/freecache v1.1.0
+	github.com/stretchr/testify v1.3.0 // indirect
 )
diff --git a/go.sum b/go.sum
index 9e49384..166af46 100644
--- a/go.sum
+++ b/go.sum
@@ -2,6 +2,8 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE
 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
 github.com/allegro/bigcache/v2 v2.1.3 h1:8g6YBowSY3qw5+7OFy41EPNmM58slrMrX39Di41XE0M=
 github.com/allegro/bigcache/v2 v2.1.3/go.mod h1:NE2LouLwhvFzJ55Wtx2x8uaOHfj4G19RRGPC8Kz3UUA=
+github.com/allegro/bigcache/v2 v2.1.5 h1:CYH3BbGbUl7f38JHgTFXjuLqiompn4BVPSQ9vOiB+LA=
+github.com/allegro/bigcache/v2 v2.1.5/go.mod h1:FppZsIO+IZk7gCuj5FiIDHGygD9xvWQcqg1uIPMb6tY=
 github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
 github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
 github.com/coocood/freecache v1.1.0 h1:ENiHOsWdj1BrrlPwblhbn4GdAsMymK3pZORJ+bJGAjA=

Sure, it’a not the bottleneck

authors: coveralls cristaloleg hiqinternational janisz mxplusb un000

repo: allegro/bigcache


text:
Clicks on slider does not change output picture

Clicks event on slider does not change output image zoom, only drag
but when you click on slider and then drag the input image the zoom change applies.
Here are my settings
Photo

Upoad picture

							</div>
						</div>

@dilbatch which browser(+version) do you use?

I've tried on firefox, mozila both on PC and Android mobile

for example - Firefox 57.0.2 (64-bit) on Windows
and crome - Version 63.0.3239.84 (Official Build) (64-bit)
Just to specify the mouse click events on slider - slide event on slider works - which helps
But under the chrome of my android mobile - the events of slider are even limited and can really crop the image

@dilbatch we release recently v1.2.1 which also aims to resolve slider issues. So, please please check it again with new version.

authors: dilbatch orif-jr

repo: allenRoyston/ngCroppie


text:
Error trying to open generated scene in Unity.

I tried to follow this guide to view the generated scene in Unity.
Here is what I have in Unity once I open the ai2thor project:

Then, I attempted to run python connect_to_unity.py --scene a_living_room-2024-04-06-11-58-33-174468/a_living_room.json but encountered the following errors.
Any suggestions?
Traceback (most recent call last):
  File "/Users/zhao/miniconda3/envs/holodeck/lib/python3.9/site-packages/ai2thor/wsgi_server.py", line 48, in queue_get
    res = que.get(block=True, timeout=queue_get_timeout_per_try)
  File "/Users/zhao/miniconda3/envs/holodeck/lib/python3.9/queue.py", line 179, in get
    raise Empty
_queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/zhao/Documents/Holodeck/connect_to_unity.py", line 14, in <module>
    controller = Controller(
  File "/Users/zhao/miniconda3/envs/holodeck/lib/python3.9/site-packages/ai2thor/controller.py", line 545, in __init__
    self.start(
  File "/Users/zhao/miniconda3/envs/holodeck/lib/python3.9/site-packages/ai2thor/controller.py", line 1548, in start
    self.last_event = self.server.receive(timeout=self.server_start_timeout)
  File "/Users/zhao/miniconda3/envs/holodeck/lib/python3.9/site-packages/ai2thor/wsgi_server.py", line 281, in receive
    return queue_get(
  File "/Users/zhao/miniconda3/envs/holodeck/lib/python3.9/site-packages/ai2thor/wsgi_server.py", line 62, in queue_get
    raise TimeoutError(
TimeoutError: Could not get a message from the queue after 600 attempts

got this work now

got this work now

Hello, may I ask how you resolved this issue? I am currently encountering the same error.

Hi, I followed the instructions at https://github.com/allenai/Holodeck#load-the-scene-in-unity closely and managed to get it working. I forgot to do step 3 in my first try.
Zhening

Hi, I followed the instructions at https://github.com/allenai/Holodeck#load-the-scene-in-unity closely and managed to get it working. I forgot to do step 3 in my first try.
Zhening

Thank you for your reply. I have completed everything as instructed, but I am still encountering the error mentioned above.

Hi, I was using a Mac and had no problem following the instructions given by the author. Maybe @ the author team for support?

authors: Aoihigashi ZheningHuang

repo: allenai/Holodeck


text:
bug during data loading (and tests)

I was fiddling around with the data loading (trying to get my own prefetching algorithm in there) when I realized something. According to your README, partial sentences and LSTM states are shared between batches, as well as within batches, as far as I can see.
Now, following this and given 3 sentences ['the unknown .', 'th .', 'the'] (straight from test_data.py) I would expect the sentences to be batched like this (with unroll_steps=3, batch_size=2):

[
   [ '<S>', 'the', 'unknown' ],      # [ 0, 3, 2 ]
   [ '.', '<S>', 'th' ],             # [ 4, 0, 2 ]
]
[
   [ '.', '<S>', 'the' ]             # [ 4, 0, 3 ]
   [ '<S>', 'the', 'unknown' ],      # [ 0, 3, 2 ]
]

(I omitted </S> since you remove it from the input as well.)
However, your code produces (and the tests verify) the following batches:

[
   [ '<S>', 'the', 'unknown' ],      # [ 0, 3, 2 ]
   [ '<S>', 'th', '.' ],             # [ 0, 2, 4 ]
]
[
   [ '.', '<S>', 'the' ]             # [ 4, 0, 3 ]
   [ '<S>', 'the', 'unknown' ],      # [ 0, 3, 2 ]
]

The second sentence is wedged between the first half of the first sentence, and the second half.
Now no matter whether the state is kept within the batch or not, this seems to produce a buggy input. Either it scrambles the state within the first sentence or drops the second sentence from the first batch's state.
Is this a plain old bug, or is there some deeper meaning to this?

Each row of the batches is treated independently by the model as one long sequence with separate states, they are not combined across rows in the batch.  As the sentences are shuffled during training, the model will learn to reset its internal state at each <S> so very little state is carried over from sentence to sentence, making this a non-issue in practice.  Also consider that in a real dataset, the number of sentences is typically much larger then the batch size, so repeating sentences across rows in the same batch rarely, if ever, occurs.

Ah, yes, I forgot that you guys shuffled the sentences. That changes things.
Thank you for your quick answer!

authors: matt-peters tsteffek

repo: allenai/bilm-tf


text:
v1.0 NLP backend for definition extraction

A commit for the entire NLP backend for definition extraction is planned under nlp/definition_extraction. The commit includes every script for training and testing the model using different versions of transformer architectures.
v1.0 includes following features:

[x] Preprocessed data (W00) and 10-fold cross-validation splits used in our experiment
[x] Joint CRF transformer model using Huggingface's transformer
[x] Incorporation of syntactic features (POS tags, head node in dependency parse, noun/verb phrases, entities, acronyms)
[x] Heuristic filters
[ ] Documentation

Closing this because we all agreed with making a separate repository for NLP backend system.

repo: allenai/scholar-reader


text:
rxnorm linker doesn't work with multiprocessing?

Hi, I'm getting an error trying to run nlp.pipe with n_processes > 1, I think because the pickling that multiprocessing does under the hood interacts poorly with nmslib.dist.FloatIndex, which the rxnorm entity linker requires and does not seem picklable.
Minimal code:
import spacy
import scispacy
from scispacy.linking import EntityLinker

TEXTS = ["Hello! This is document 1.", "And here's doc 2."]

if __name__ == '__main__':
  nlp = spacy.load("en_core_sci_sm")
  nlp.add_pipe("scispacy_linker", config={"resolve_abbreviations": True,
                                          "linker_name": "rxnorm"})
  for doc in nlp.pipe(TEXTS, n_process=2):
    print(doc)

Running with Python 3.8.5 gives me:
Traceback (most recent call last):
  File "./mwerror.py", line 13, in <module>
    for doc in nlp.pipe(TEXTS, n_process=2):
  File ".../python3.8/site-packages/spacy/language.py", line 1479, in pipe
    for doc in docs:
  File ".../python3.8/site-packages/spacy/language.py", line 1515, in _multiprocessing_pipe
    proc.start()
  File ".../python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File ".../python3.8/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File ".../python3.8/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File ".../python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File ".../python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File ".../python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File ".../python3.8/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle 'nmslib.dist.FloatIndex' object

Note I don't get an error with n_process=1, presumably because multiprocessing is not invoked.
I also do not get this error if I don't include the linker pipe (i.e. comment out the add_pipe() line above).
Thanks! This lib is great!

Hey, seems like it works as expected (i.e. doesn't crash) on linux? Error above was from running on OSX 10.14.6.
(FYI I suspect it might something to do with multiprocessing using spawn rather than fork by default on OSX as of py3.8 [ https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods ] but IDK)

Interesting, not sure off the top of my head. Leaving this open for now, let me know if you happen to resolve anything. At a minimum, you could do the parallelization yourself, but ideally it would work with spacy's parallelization.

I actually initially tried doing the parallelization myself with joblib, calling nlp() inside the parallelized code, and it gave me the same error as the spacy nlp.pipe snippet I posted.
Will let you know if I come across anything, but it seems to work fine on linux fwiw.

repo: allenai/scispacy


text:
Log format matching problem

20170608130017 222.94.248.183 xfzdl2.haowanyou.com /PalaceM2_cn_cn/S180039901/HttpRoot/1.2.2/31.pkg?17060807 236388 120 2 206 NULL 54 "NULL" "0-" GET HTTP/1.1 hit
20170608130157 	117.169.78.10 xfzdl2.haowanyou.com /PalaceM2_cn_cn/S180049901/HttpRoot/1.2.6/2.pkg?17060807 770998 1465 1046 206 NULL 75 "NULL" "0-" GET HTTP/1.1 hit

goaccess -f qcloudcdn.log --log-format='%d%t %h %v %U %b %~ %~ %s %R %T "%u" "%~" %H %~' --date-format='%Y%m%d' --time-format='%H%M%S' -d -a > test.html
I use this order to analyze the generated html, no content, please help to see if it is wrong, Tks

This should do it:
goaccess access.log --log-format='%x %h %v %U %b %^ %^ %s %R %L "%u" %^ %m %H %^' --date-format=%Y%m%d%H%M%S --time-format=%Y%m%d%H%M%S

The problem has been resolved, thank you very much for your reply, TKS

authors: Kinganmi allinurl

repo: allinurl/goaccess


text:
impr topic id style and pattern

Closes: #XXX
What is the purpose of the change

Add a description of the overall background and high level changes that this PR introduces

(E.g.: This pull request improves documentation of area A by adding ....)
Testing and Verifying
(Please pick one of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added unit test that validates ...
Added integration tests for end-to-end deployment with ...
Extended integration test for ...
Manually verified the change by ...

Documentation and Release Note

[ ] Does this pull request introduce a new feature or user-facing behavior changes?

Where is the change documented?

[ ] Specification (x/{module}/README.md)
[ ] Allora documentation site docs.allora.network source code at: https://github.com/allora-network/docs
[ ] Code comments?
[ ] N/A

there was one test that was saying "this function should not fail just return nil" and another expecting it to fail when nil. unsure why this wasn't tripped before... but ultimately changed to safely return nil data when args not found (when no network loss bundle found at inputted block)

repo: allora-network/allora-chain


text:
[Bug]  WASM compilation failure with alloy due to mio & blst for a bundler target

Component
other
What version of Alloy are you on?
alloy v0.6.4
Operating System
macOS (Apple Silicon)
Describe the bug
When trying to compile my project Pipegate for the wasm32-unknown-unknown target with wasm-pack, I encounter error caused by the mio & blst crates. mio seems to be included via alloy-transport via tokio. I have already refactored my code for conditional dependencies and change for wasm target, alloy is the dependency which seems to be causing this.
The issue occurs in there scenarios:

wasm-pack build --target=bundler

Both mio and blst fail

wasm-pack build

Only blst fail

The code I am executing this on can be found here on wasm branch
Error Logs
Some errors have detailed explanations: E0308, E0412, E0425, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `mio` (lib) due to 47 previous errors
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: blst@0.3.13: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: blst@0.3.13: 1 error generated.

error: failed to run custom build command for `blst v0.3.13`

Environment

rustc 1.82.0
wasm-pack 0.12.1

I can share the full log or dependency tree if required

any reason why you cannot disable these features?

i couldn't figure out which features to include for wasm compatiblity, and i was using alloy-transport where mio comes in from as well, so figured that wouldn't help.
will try again to selectively import the features I need

That worked, thanks! I disabled the default-features and explicitly selected these features ["contract","signer-local","provider-http","reqwest"]
One small suggestion: it would be helpful to have a WASM compatibility mentioned somewhere in the docs for the features, as it could save some time for others working with it

repo: alloy-rs/alloy


text:
Slow rendering time when browsing repositories

We introduced a bunch of new features to improve browsing repositories. With #52 we are reaching a limit because rendering time gets excessively slow:
[info] GET /redrabbit/elixir
[info] Sent 200 in 2880ms

Now elixir is quite a big repository with >15.800 commits.
Neverless, the current implementation is rendering the page around 1.000 slower than before.
Each time we want to render a tree, we have to

Create a commit history stream (with :pathspec option) starting at the given revision.
Find the first commit for each tree-entry from the history stream.
Render each tree entry and associated commit message and timestamp.

The slow part here is definitely 2). The new GitRekt.GitAgent.tree_entries_with_commits/3 is responsible for fetching tree-entries and their associated commits in one pass.
Because this operation is by design very inefficient, it can take forever if the tree in question contains lots of entries. Taking even longer if the entry's last commit is old.

First step for improving performances would be to refactor tree_entries_with_commits/3 and try to optimise things there.
If that doesn't bring enough, we will have to let the browser load tree entries commits asynchronously via GraphQL.

When showing a tree such as git-limo/apps/gitrekt containing 7 tree entries, we have to go through 134 commits to resolve all entries.
Here's a basic output log to better understand:
parse 7 tree entries
1 match
1 match
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/Makefile", "apps/gitrekt/c_src", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/Makefile", "apps/gitrekt/c_src", "apps/gitrekt/config", "apps/gitrekt/test"]
1 match
1 match
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/.gitignore", "apps/gitrekt/config", "apps/gitrekt/test"]
1 match
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
no match for ["apps/gitrekt/config", "apps/gitrekt/test"]
1 match
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
no match for ["apps/gitrekt/config"]
1 match

And here the newly :telemetry implemented logs for GitRekt.GitAgent....
Rendering GitGud.Web.CodebaseController.show/2 in 2674ms.

Counting total amount of commits (SQL) takes 69.3ms
Retrieving tree entries and associated commits takes 2585.6 ms
Each other action take no more than a few µs.

[info] GET /redrabbit/elixir
[debug] Processing with GitGud.Web.CodebaseController.show/2
  Parameters: %{"repo_name" => "elixir", "user_login" => "redrabbit"}
  Pipelines: [:browser]
[debug] QUERY OK source="users" db=0.3ms
SELECT u0."id", u0."login", u0."name", u0."primary_email_id", u0."public_email_id", u0."bio", u0."location", u0."website_url", u0."avatar_url", u0."inserted_at", u0."updated_at" FROM "users" AS u0 WHERE (u0."id" = $1) [1]
[debug] QUERY OK source="repositories" db=0.5ms
SELECT r0."id", r0."owner_id", r0."name", r0."public", r0."description", r0."inserted_at", r0."updated_at", r0."pushed_at", u1."id", u1."login", u1."name", u1."primary_email_id", u1."public_email_id", u1."bio", u1."location", u1."website_url", u1."avatar_url", u1."inserted_at", u1."updated_at" FROM "repositories" AS r0 INNER JOIN "users" AS u1 ON u1."id" = r0."owner_id" LEFT OUTER JOIN "maintainers" AS m2 ON r0."id" = m2."repo_id" WHERE (u1."login" = $1) AND (r0."name" = $2) AND (((r0."public" = TRUE) OR (r0."owner_id" = $3)) OR (m2."user_id" = $4)) ["redrabbit", "elixir", 1, 1]
[debug] [Git Agent] empty?() executed in 230 µs
[debug] [Git Agent] head() executed in 65 µs
[debug] [Git Agent] peel(<GitRef:refs/heads/master>, :commit) executed in 111 µs
[debug] [Git Agent] tree(<GitCommit:ec14cb67>) executed in 48 µs
[debug] [Git Agent] references("refs/heads/*") executed in 49 µs
[debug] [Git Agent] references("refs/tags/*") executed in 61 µs
[debug] [Git Agent] peel(<GitRef:refs/heads/master>, :commit) executed in 27 µs
[debug] QUERY OK source="commits" db=69.3ms
SELECT count(c0."oid") FROM "commits" AS c0 INNER JOIN commits_dag_desc($1, $2) AS f1 ON c0."oid" = f1."oid" [4, <<236, 20, 203, 103, 99, 161, 65, 19, 137, 178, 3, 125, 204, 5, 246, 113, 101, 33, 223, 117>>]
[debug] [Git Agent] tree_entries_with_commits(<GitRef:refs/heads/master>) executed in 2585.588 ms
[debug] [Git Agent] message(<GitCommit:ae8502d8>) executed in 2 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:ae8502d8>) executed in 8 µs
[debug] [Git Agent] message(<GitCommit:88037483>) executed in 2 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:88037483>) executed in 6 µs
[debug] [Git Agent] message(<GitCommit:45862f84>) executed in 2 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:45862f84>) executed in 6 µs
[debug] [Git Agent] message(<GitCommit:c93cd33e>) executed in 13 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:c93cd33e>) executed in 4 µs
[debug] [Git Agent] message(<GitCommit:5aa31f4a>) executed in 1 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:5aa31f4a>) executed in 3 µs
[debug] [Git Agent] message(<GitCommit:1d170281>) executed in 1 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:1d170281>) executed in 3 µs
[debug] [Git Agent] message(<GitCommit:786a3d2a>) executed in 1 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:786a3d2a>) executed in 3 µs
[debug] [Git Agent] message(<GitCommit:786a3d2a>) executed in 1 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:786a3d2a>) executed in 4 µs
[debug] [Git Agent] message(<GitCommit:1c914f13>) executed in 2 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:1c914f13>) executed in 5 µs
[debug] [Git Agent] message(<GitCommit:5f502d0b>) executed in 1 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:5f502d0b>) executed in 3 µs
[debug] [Git Agent] message(<GitCommit:d4f8d419>) executed in 2 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:d4f8d419>) executed in 5 µs
[debug] [Git Agent] message(<GitCommit:9f03c38d>) executed in 1 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:9f03c38d>) executed in 5 µs
[debug] [Git Agent] message(<GitCommit:b98c5acf>) executed in 2 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:b98c5acf>) executed in 5 µs
[debug] [Git Agent] message(<GitCommit:b98c5acf>) executed in 1 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:b98c5acf>) executed in 6 µs
[debug] [Git Agent] message(<GitCommit:b98c5acf>) executed in 1 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:b98c5acf>) executed in 4 µs
[debug] [Git Agent] message(<GitCommit:25972a4a>) executed in 2 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:25972a4a>) executed in 4 µs
[debug] [Git Agent] message(<GitCommit:ec14cb67>) executed in 2 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:ec14cb67>) executed in 5 µs
[debug] [Git Agent] message(<GitCommit:e18d46f6>) executed in 2 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:e18d46f6>) executed in 4 µs
[debug] [Git Agent] tree_entry(<GitTree:a41dbaf9>, {:path, "README.md"}) executed in 5 µs
[debug] [Git Agent] tree_entry_target(<GitTreeEntry:README.md>) executed in 189 µs
[debug] [Git Agent] blob_content(<GitBlob:066a356b>) executed in 12 µs
[info] Sent 200 in 2674ms

Rendering GitGud.Web.CodebaseController.blob/2 in 931ms.
Here the GitRekt.GitAgent.tree_entry_with_commit/2 takes 924.18ms...
[info] GET /redrabbit/elixir/blob/master/.formatter.exs
[debug] Processing with GitGud.Web.CodebaseController.blob/2
  Parameters: %{"path" => [".formatter.exs"], "repo_name" => "elixir", "revision" => "master", "user_login" => "redrabbit"}
  Pipelines: [:browser]
[debug] QUERY OK source="users" db=0.4ms
SELECT u0."id", u0."login", u0."name", u0."primary_email_id", u0."public_email_id", u0."bio", u0."location", u0."website_url", u0."avatar_url", u0."inserted_at", u0."updated_at" FROM "users" AS u0 WHERE (u0."id" = $1) [1]
[debug] QUERY OK source="repositories" db=0.5ms
SELECT r0."id", r0."owner_id", r0."name", r0."public", r0."description", r0."inserted_at", r0."updated_at", r0."pushed_at", u1."id", u1."login", u1."name", u1."primary_email_id", u1."public_email_id", u1."bio", u1."location", u1."website_url", u1."avatar_url", u1."inserted_at", u1."updated_at" FROM "repositories" AS r0 INNER JOIN "users" AS u1 ON u1."id" = r0."owner_id" LEFT OUTER JOIN "maintainers" AS m2 ON r0."id" = m2."repo_id" WHERE (u1."login" = $1) AND (r0."name" = $2) AND (((r0."public" = TRUE) OR (r0."owner_id" = $3)) OR (m2."user_id" = $4)) ["redrabbit", "elixir", 1, 1]
[debug] [Git Agent] revision("master") executed in 968 µs
[debug] [Git Agent] tree_entry_with_commit(<GitCommit:ec14cb67>, ".formatter.exs") executed in 924.185 ms
[debug] [Git Agent] tree_entry_target(<GitTreeEntry:.formatter.exs>) executed in 490 µs
[debug] [Git Agent] author(<GitCommit:88037483>) executed in 21 µs
[debug] QUERY OK source="users" db=0.5ms queue=0.5ms
SELECT u0."id", u0."login", u0."name", u0."primary_email_id", u0."public_email_id", u0."bio", u0."location", u0."website_url", u0."avatar_url", u0."inserted_at", u0."updated_at" FROM "users" AS u0 INNER JOIN "emails" AS e1 ON e1."user_id" = u0."id" WHERE ((e1."verified" = TRUE) AND (e1."address" = $1)) ["jose.valim@plataformatec.com.br"]
[debug] [Git Agent] committer(<GitCommit:88037483>) executed in 8 µs
[debug] [Git Agent] message(<GitCommit:88037483>) executed in 1 µs
[debug] [Git Agent] commit_timestamp(<GitCommit:88037483>) executed in 4 µs
[debug] [Git Agent] blob_content(<GitBlob:5af4d505>) executed in 2 µs
[info] Sent 200 in 931ms

First step for improving performances would be to refactor tree_entries_with_commits/3 and try to optimise things there.

Done a few things here and there but no big improvements.

If that doesn't bring enough, we will have to let the browser load tree entries commits asynchronously via GraphQL.

We now have new GraphQL query functions for fetching tree entries from a revision.
query {
  user(login:"redrabbit") {
    repo(name:"git-limo") {
      revision(spec:"master") {
        treeEntryWithLastCommit(path:"README.md") {
          commit {
            message
            timestamp
          }
      	}
      }
    }
  }
}

Offloading the load to an asynchronous Javascript query offers a much better browsing experience.

repo: almightycouch/gitgud


text:
RtAudio input stops after ~7 seconds, when output is not opened

I'm having trouble with the basic audio input example.  The audio input callback stops being called after about 7 seconds.  Some notes:

This occurs with both WASAPI and DirectShow audio APIs.
It doesn't matter which audio device I use.
The exact time duration before failure varies from run to run, slightly, as does the number of times the input callback is called.
DirectShow devices fail 1-2 seconds sooner than WASAPI devices, even if the same physical device is used.
Changing the frame size option will change the number of times the callback is called, but will not change the time duration or number of bytes received.  That is, if I double the frame size, the callback is called about half the number of times, but the total time duration and byte count is about the same.
Changing the sample format option of course changes the number of bytes I receive, but the number of times the callback is called is not changed, and neither is the total time duration.
I'm not using an audio output.  Input only.
The error callback is never called.
None of the RtAudioStreamFlags have any impact on this problem.
Windows 10 x64.  Node.js 18.3.0.  Audify 1.7.1.

Any thoughts as to the cause of this and how it can be solved?

The problem also occurs on Node.js v16.15.1.

I've found that this problem doesn't occur as long as I have an output running too.  It seems rtAudio.write() must be called regularly for the input to work.
Using null for the output options doesn't work, because calls to .write() cause a crash.

I have almost the same exact same issue on Linux with PulseAudio. Based on your workaround I implemented a very dumb way of dealing with it after some experimentation.
// Start the stream
rtAudio.start();
setTimeout(() => {
    try {
        rtAudio.write(null);
    } catch {
        console.log("RTAudio fixed, enjoy your stream.");
    }
})

Calling it once without setTimeout does not work. Putting it in setTimeout and the default 0ms timeout will make it work. I did not have to call it anymore after this.

I found out that it's not really related with the write method, you can actually isStreamOpen or isStreamRunning methods to keep it running. It almost feels like a reference counter or something that goes to zero if you don't reference it. I'm pretty sure it's about the C++ implementation of the binding.

Actually, even this worked for me:
//  Not even calling the foo function, just declaring it.
const foo = () => {
    recorder.isStreamOpen() // keeps the recorder stream running.
}

It's a Schrödinger's stream: if nobody is measuring if it's open or not, it declines to collapse its superposition into a concrete state of existence 🤣

authors: 00000o1 TibixDev bradisbell hamitzor

repo: almoghamdani/audify


text:
Replace argonaut + argonaut-shapeless by jsoniter-scala

The latter doesn't allocate intermediate JSON ASTs in particular, which should speed things up.

Seems that made the CI quite flakey :|

repo: almond-sh/almond


text:
基于webrtc的录制权限问题

getUserMedia 权限问题，这个可以处理吗？

具体是什么问题，我记得在 chrome 启动的时候，就已经把所有的权限开到最大了

具体是什么问题，我记得在 chrome 启动的时候，就已经把所有的权限开到最大了

Failed to GetUserMedia NotFoundError 8 Requested device not found DOMException: Requested device not found
Media access NotFoundError: Requested device not found.
浏览器报这个错误

Failed to GetUserMedia NotFoundError 8 Requested device not found DOMException: Requested device not found
Media access NotFoundError: Requested device not found.
浏览器报这个错误

https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia

https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia

这个有点奇怪，目前代码里并没有使用到 getUserMedia 这个方法，可以提供复现的环境(docker images / dockerfile)么

这个有点奇怪，目前代码里并没有使用到 getUserMedia 这个方法，可以提供复现的环境(docker images / dockerfile)么

应该是我们这边webrtc发起授权本地摄像头和麦克风导致的

应该是我们这边webrtc发起授权本地摄像头和麦克风导致的

那报错是正常的，因为 rebirth 是运行在docker里的，肯定是没有 摄像头和麦克风的，去申请的时候，就会报错。

那报错是正常的，因为 rebirth 是运行在docker里的，肯定是没有 摄像头和麦克风的，去申请的时候，就会报错。


text:
[BUG] В настройках виджетов в "Режим торгов" не отображается борд по активной бумаге

Опишите баг
При выборе бумаги из "Блоттер" или "Все инструменты"  - в настройках виджетов не отобразится борд по активному инструменту. Хотя для некоторых виджетов - поле "Режим торгов" помечено как обязательное (например, для "Тех. анализа"):

Причем, при выборе бумаги из "Выбор инструмента" в запросе прописывается параметр instrumentGroup (https://api.alor.ru/md/v2/Securities/MOEX/SBER?instrumentGroup=TQBR), который подставляется в поле "Режим торгов" в виджеты по бумагам и все отображается корректно, поле  "Режим торгов" не пустое.
Воспроизведение

Создать виджет "Тех анализ".
Зайти в настройки виджета, перейти в "Продвинутые".
Перейти на бумагу из "Блоттера" или "Выбор инструмента".
Проверить заполнение поля "Режим торгов".

Среда.
Windows 10
Google Chrome v120
Ожидаемое поведение
В поле "Режим торгов" отображается борд, который указан в круглых скобках в шапке виджета рядом с тикером:

Скриншоты
No response
Дополнительная информация
No response
Правила

[X] Я согласен следовать правилам

При выборе из блоттера и всех инструментов у инструмента НЕТ БОРДА. потому он и не отображается.
В заголовке отображается дефолтный борд, который получается дополнительно по инструменты вместе с его названием.
В настройках отображается фактический выбор. А фактический выбор такой, что у инструмента НЕТ борда.
Борд это ОПЦИОАНЛЬНОЕ ПОЛЕ, оно и не должно отображаться везде и всюду.
Борд во всех инструментах доступен только когда столбец был добавлен в таблицу.
В блоттере борд доступен из заявок, стоп-заявок и сделок. Из позиций борда нет

Посмотрел по виджетам, в новом релизе убрали пометку обязательного поля (*) в настройках виджетов (как было на скрине вверху). Поэтому теперь выглядит корректно, поле с бордами опциональное. Думаю, можно закрыть задачу.

repo: alor-broker/Astras-Trading-UI


text:
[BUG] Выбор инструмента. Некорректный поиск по некоторым тикерам

Опишите баг
Поиск в виджете по тикерам из одного символа и некоторых из двух (C, F, J, M, Y, Z, CC, DD, AA) отрабатывает некорректно.
Воспроизведение

Открыть виджет "Выбор инструмента"
Выполнить поиск по одному из указанных тикеров.
Выбрать инструмент.

Среда.

ОС Windows 10
Браузер Chrome
Версия 100.0.4896.127

Ожидаемое поведение
Корректный поиск по всем тикерам
Скриншоты
No response
Дополнительная информация
No response
Правила

[ ] Я согласен следовать правилам

Ну либо вы можете искать по названию компании. Для того же T это будет AT&T в поиске.

Наверное, не так выразился. Поиск-то как раз происходит, но когда выбираешь такую бумагу, то результат отображается другой. Хотя стакан, например, переключается нормально.
Пример:

Набираю в поиске "FORD"
Находится "F". Выбираю
Результат "FTI"

Понял вас. Смог воспроизвести. Посмотрим.


text:
Remove id from db.json file

I am not sure that where id field from db.json was used in the application but is that possible to get rid of using that field? Looks like it is making noise and creating lots of conflicts between pull requests when one of them is merged. Basically, wondering if id field is really used, if not I am going to remove it and raise a PR. Otherwise my suggestion is generate id dynamically in the code.

I agree with your suggestion. Updating the id through the db creates a lot of trouble when new issues and PRs come in. I will take care of him. Thank you for your feedback. ⚡

You can use the solution below if you want, I couldn't raise PR as I don't have any experience with Reach, didn't want to break anything :)
import db from '../../assets/db.json';

generateId(db);

function generateId(json) {
    json.forEach((item, index) => {
        item.id = ++index;
    });
    return json;
}

authors: alpercun volkanto

repo: alpercun/fancy-macbook-app


text:
Display app suggester at the app card

We can display the app suggester on the app card like that. 👇
With this implementation, we can encourage people to suggest apps and we can increase the number of suggesters and apps.

Example image:

We can add suggested by to look like this design.

closes #25

authors: alpercun hasantezcan


text:
Fix order of arguments in forms macros

The order of arguments in all the forms macros was causing this error in the tests:
File "app/templates/macros/forms.html", line 29, in template
    {% macro textbox(field, value='', service_data) -%}
TemplateSyntaxError: non-default argument follows default argument

Can we add a default value to the service_data argument instead, since it's not really used by most macros. Also the key, object, value order is slightly unusual.

I've re-ordered the arguments to make the order key, value, object.
I looked at leaving service_data out of the macros that didn't use it but this caused type errors in jinja. Looking into this it seems unnamed arguments sent in are only added to the kwargs and varargs variables if either of them are used in the macro (see these points in the source code: catch_kwargs: L426, L431). Also see http://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros#answers-header for an example of this usage.

:+1:

authors: allait tombye


text:
handle_s3_sns: url-unquote s3 key sent to us in SNS events

https://trello.com/c/l2On3zPU
Turns out s3 key is url-quoted in SNS events. who knew?

The s3 key provides information about the bucket and object involved in the event. The object key name value is URL encoded. For example, "red flower.jpg" becomes "red+flower.jpg" (Amazon S3 returns "application/x-www-form-urlencoded" as the content type in the response).

https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html
Also improve the tests to use a weirder key name.

Very clever.
None of my standard fonts had that one ;)


text:
Add trailing slashes to URLs

This URL works:
https://preview.development.digitalmarketplace.service.gov.uk/buyers-guide
This URL doesn't work:
https://preview.development.digitalmarketplace.service.gov.uk/buyers-guide/
We need to support both because the existing app uses URLs with trailing
slashes, which users may have bookmarked.
That we standardise on having trailing slashes in our URLs. If we go
with this option then Flask handles the redirects for us.

The alternative would be something like the following, but it doesn't feel as clean:
@app.before_request
def remove_trailing_slash():
    if request.path != '/' and request.path.endswith('/'):
        return redirect(request.path[:-1])

Bring thy reckons.

This seems the neatest way of doing things, although I'm not mad on the trailing slashes.

We've changed our minds. Going to default to slashless URLs. Will close this and open a separate PR.

authors: TheDoubleK quis


text:
Hide submission document urls

Hide the document URL for uploaded G7 submission documents
Ralph suggested that document upload and draft section view pages
should show "A document was uploaded" instead of the info URL for
uploaded G7 documents.
Since we use the same macros and toolkit templates for both live
and submission services (and there's no easy way to split them
that I can think of) this adds an additional check to the upload
macros that checks if the document is attached to a submission
draft (by checking that the URL starts with an "info" URL prefix).
Also removes quotes from the "service copied" message

:+1:

authors: allait quis


text:
Move ODS module from briefs-frontend and add general DownloadFileView

Summary
The briefs-frontend has a module to help construct ODS files. We now need to make ODSs in the buyer-frontend for service shortlist downloads, so let's move it to utils.
I've also added a generic DownloadFileView that is subclassed in the buyer-frontend (and should be reasonably compatible with the briefs-frontend download view, which I will put up in a separate PR later). This draws out the duplication from the view and lets the subclass only implement the logic and structure required for the csv/ods files, while the parent handles receiving the request and returning the response. Hooks are included for the start and end of the request to allow further logic to be executed at these stages (the shortlist download needs to record the action if the response succeeds).
Bumps version to 28.6.0.
Blocked by

[x] Need to write tests for the DownloadFileView.

Required by
https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/615
https://github.com/alphagov/digitalmarketplace-briefs-frontend/pull/32
Other associated PRs
https://github.com/alphagov/digitalmarketplace-api/pull/656
~~https://github.com/alphagov/digitalmarketplace-apiclient/pull/98~~
~~https://github.com/alphagov/digitalmarketplace-frameworks/pull/473~~
Ticket
https://trello.com/c/igRhA3Bt/711-shortlist-file-download

I think the abstract class implementation is objectively fine, but it seems an awful lot of hard work to do something relatively straightforward.

Ready for final sign-off @galund

authors: risicle samuelhwilliams

repo: alphagov/digitalmarketplace-utils