Allow multiple process per device

Running multiple replicas of a model on each device can speed up inference. However, accelerate currently does not seem to support this. Setting num_processes to a value larger than the number of available devices results in an error (for CUDA: "invalid device ordinal").
What does this PR do?
Makes sure that the device index is always valid by taking the remainder upon division by device_count(), hence allowing multiple processes to run on each device by setting num_processes to a multiple of device_count().
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[x] Did you read the contributor guideline,
Pull Request section?
[ ] Was this discussed/approved via a Github issue or the forum? Please add a link
to it if that's the case.
[ ] Did you make sure to update the documentation with your changes? Here are the
documentation guidelines, and
here are tips on formatting docstrings.
[ ] Did you write any new necessary tests?

Who can review?
@muellerzr @BenjaminBossan @SunMarc

Thanks for the PR. Do you have an example code snippet that produces the error you mentioned?

@BenjaminBossan
I adapted the stable diffusion example from the docs:
from accelerate import PartialState
from diffusers import DiffusionPipeline
import torch

pipe = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
distributed_state = PartialState()
pipe.to(distributed_state.device)

# Assume two processes
with distributed_state.split_between_processes(["a dog", "a cat", "a snail", "a hedgehog"]) as prompt:
    print(f"Running {prompt} on process {distributed_state.process_index}, device {distributed_state.device}")
    result = pipe(prompt).images
    result[0].save(f"{prompt[0]}.png")

Command:
CUDA_VISIBLE_DEVICES=0,1 accelerate launch --num-processes 4 distributed_inference.py

Error:
[rank3]: Traceback (most recent call last):
[rank3]:   File "/home/ondrej/proj/accelerate/distributed_inference.py", line 6, in <module>
[rank3]:     distributed_state = PartialState()
[rank3]:                         ^^^^^^^^^^^^^^
[rank3]:   File "/home/ondrej/proj/accelerate/src/accelerate/state.py", line 280, in __init__
[rank3]:     self.set_device()
[rank3]:   File "/home/ondrej/proj/accelerate/src/accelerate/state.py", line 790, in set_device
[rank3]:     torch.cuda.set_device(self.device)
[rank3]:   File "/home/ondrej/mambaforge/envs/accelerate/lib/python3.11/site-packages/torch/cuda/__init__.py", line 399, in set_device
[rank3]:     torch._C._cuda_setDevice(device)
[rank3]: RuntimeError: CUDA error: invalid device ordinal
[rank3]: CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
[rank3]: For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
[rank3]: Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

[rank2]: Traceback (most recent call last):
[rank2]:   File "/home/ondrej/proj/accelerate/distributed_inference.py", line 6, in <module>
[rank2]:     distributed_state = PartialState()
[rank2]:                         ^^^^^^^^^^^^^^
[rank2]:   File "/home/ondrej/proj/accelerate/src/accelerate/state.py", line 280, in __init__
[rank2]:     self.set_device()
[rank2]:   File "/home/ondrej/proj/accelerate/src/accelerate/state.py", line 790, in set_device
[rank2]:     torch.cuda.set_device(self.device)
[rank2]:   File "/home/ondrej/mambaforge/envs/accelerate/lib/python3.11/site-packages/torch/cuda/__init__.py", line 399, in set_device
[rank2]:     torch._C._cuda_setDevice(device)
[rank2]: RuntimeError: CUDA error: invalid device ordinal
[rank2]: CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
[rank2]: For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
[rank2]: Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

W0706 11:17:44.554000<PHONE_NUMBER>62496 torch/distributed/elastic/multiprocessing/api.py:851] Sending process 4070667 closing signal SIGTERM
W0706 11:17:44.555000<PHONE_NUMBER>62496 torch/distributed/elastic/multiprocessing/api.py:851] Sending process 4070670 closing signal SIGTERM
W0706 11:17:44.555000<PHONE_NUMBER>62496 torch/distributed/elastic/multiprocessing/api.py:851] Sending process 4070671 closing signal SIGTERM
E0706 11:17:45.083000<PHONE_NUMBER>62496 torch/distributed/elastic/multiprocessing/api.py:826] failed (exitcode: 1) local_rank: 3 (pid: 4070672) of binary: /home/ondrej/mambaforge/env
s/accelerate/bin/python3.11

With this patch, it outputs:
Running ['a dog'] on process 0, device cuda:0
Running ['a snail'] on process 2, device cuda:0
Running ['a hedgehog'] on process 3, device cuda:1
Running ['a cat'] on process 1, device cuda:1

Thanks for providing the example. I wonder if it could be adapted as a unit test on a multi GPU runner, assuming we want to proceed with the PR as is. I'll let @muellerzr decide this.

assert device in ("cpu", "cuda", "mlu", "npu", "xpu")

I think this line can safely be removed, as it's covered by the ValueError a few lines above.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

That makes me a bit hesitant to push this in, since generally users will likely want to do .gather() on all the outputs after inference. How are you collecting the outputs from the model to a centralized location?

I just save the files to a directory as in the example in the docs. I agree it would be better to have support for gather...
Related discussions I found:

https://github.com/pytorch/ignite/issues/2139
https://discuss.pytorch.org/t/reusing-a-gpu-by-multiple-distributed-processes/137394

I get the same set of failed tests for main and this branch:
FAILED tests/deepspeed/test_deepspeed.py::DeepSpeedConfigIntegration::test_autofill_comm_buffers_dsconfig_config_with_hidden_size - deepspeed.ops.op_builder.builder.CUDAMismatc
hException: >- DeepSpeed Op Builder: Installed CUDA version 10.1 does not match the version torch was compiled with 12.1, unabl...
FAILED tests/deepspeed/test_deepspeed.py::DeepSpeedConfigIntegration::test_autofill_comm_buffers_dsconfig_config_with_hidden_sizes - deepspeed.ops.op_builder.builder.CUDAMismat
chException: >- DeepSpeed Op Builder: Installed CUDA version 10.1 does not match the version torch was compiled with 12.1, unabl...
FAILED tests/deepspeed/test_deepspeed.py::DeepSpeedConfigIntegration::test_prepare_deepspeed_custom_optimizer_custom_scheduler - deepspeed.ops.op_builder.builder.CUDAMismatchEx
ception: >- DeepSpeed Op Builder: Installed CUDA version 10.1 does not match the version torch was compiled with 12.1, unabl...
FAILED tests/deepspeed/test_deepspeed.py::DeepSpeedConfigIntegration::test_prepare_deepspeed_custom_optimizer_deepspeed_scheduler - deepspeed.ops.op_builder.builder.CUDAMismatc
hException: >- DeepSpeed Op Builder: Installed CUDA version 10.1 does not match the version torch was compiled with 12.1, unabl...
FAILED tests/test_accelerator.py::AcceleratorTester::test_get_state_dict_from_offload_use_pytorch - ValueError: cannot mmap an empty file
FAILED tests/test_accelerator.py::AcceleratorTester::test_get_state_dict_from_offload_use_safetensors - ValueError: cannot mmap an empty file
FAILED tests/test_accelerator.py::AcceleratorTester::test_save_model_offload_use_pytorch - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_accelerator.py::AcceleratorTester::test_save_model_offload_use_safetensors - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_accelerator.py::AcceleratorTester::test_save_sharded_model_use_pytorch - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_accelerator.py::AcceleratorTester::test_save_sharded_model_use_safetensors - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_cpu_offload - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_cpu_offload_with_unused_submodules - RuntimeError: weight should contain 5 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_disk_offload - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_disk_offload_with_unused_submodules - RuntimeError: weight should contain 5 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_dispatch_model - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_dispatch_model_and_remove_hook - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_dispatch_model_copy - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_dispatch_model_force_hooks - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_dispatch_model_multi_devices - RuntimeError: weight should contain 5 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_dispatch_model_with_non_persistent_buffers - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_dispatch_model_with_unused_submodules - RuntimeError: weight should contain 5 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_dispatch_model_with_unused_submodules_multi_device - RuntimeError: weight should contain 5 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_init_empty_weights - NotImplementedError: Cannot copy out of meta tensor; no data!
FAILED tests/test_big_modeling.py::BigModelingTester::test_load_checkpoint_and_dispatch - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_load_checkpoint_and_dispatch_multi_device - RuntimeError: weight should contain 5 elements not 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_load_checkpoint_and_dispatch_multi_device_with_unused_submodules - RuntimeError: weight should contain 5 elements not
 0
FAILED tests/test_big_modeling.py::BigModelingTester::test_load_checkpoint_and_dispatch_with_unused_submodules - RuntimeError: weight should contain 5 elements not 0
FAILED tests/test_cli.py::AccelerateLauncherTester::test_accelerate_test - RuntimeError: 'accelerate test' failed with returncode 1                                 [8592/45802]
FAILED tests/test_cli.py::ModelEstimatorTester::test_gated - AssertionError: GatedRepoError not raised : Repo for model `meta-llama/Llama-2-7b-hf` is gated
FAILED tests/test_examples.py::FeatureExamplesTests::test_checkpointing_by_epoch - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_fi
le=/tmp/tmpyq6p0qhv/default_config.yml examples/by_feature/checkpointing.py --...
FAILED tests/test_examples.py::FeatureExamplesTests::test_checkpointing_by_steps - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_fi
le=/tmp/tmpyq6p0qhv/default_config.yml examples/by_feature/checkpointing.py --...
FAILED tests/test_examples.py::FeatureExamplesTests::test_cross_validation - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_file=/tm
p/tmpyq6p0qhv/default_config.yml examples/by_feature/cross_validation.py...
FAILED tests/test_examples.py::FeatureExamplesTests::test_ddp_comm_hook - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_file=/tmp/t
mpyq6p0qhv/default_config.yml examples/by_feature/ddp_comm_hook.py --...
FAILED tests/test_examples.py::FeatureExamplesTests::test_distributed_inference_examples_phi2 - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launc
h --config_file=/tmp/tmpyq6p0qhv/default_config.yml examples/inference/distributed/phi2.py`...
FAILED tests/test_examples.py::FeatureExamplesTests::test_distributed_inference_examples_stable_diffusion - accelerate.test_utils.testing.SubprocessCallException: Command `acce
lerate launch --config_file=/tmp/tmpyq6p0qhv/default_config.yml examples/inference/distributed/stable_d...
FAILED tests/test_examples.py::FeatureExamplesTests::test_early_stopping - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_file=/tmp/
tmpyq6p0qhv/default_config.yml examples/by_feature/early_stopping.py` ...
FAILED tests/test_examples.py::FeatureExamplesTests::test_gradient_accumulation - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_fil
e=/tmp/tmpyq6p0qhv/default_config.yml examples/by_feature/gradient_accumulati...
FAILED tests/test_examples.py::FeatureExamplesTests::test_load_states_by_epoch - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_file
=/tmp/tmpyq6p0qhv/default_config.yml examples/by_feature/checkpointing.py --...
FAILED tests/test_examples.py::FeatureExamplesTests::test_load_states_by_steps - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_file
=/tmp/tmpyq6p0qhv/default_config.yml examples/by_feature/checkpointing.py --...
FAILED tests/test_examples.py::FeatureExamplesTests::test_local_sgd - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_file=/tmp/tmpyq
6p0qhv/default_config.yml examples/by_feature/local_sgd.py` faile...
FAILED tests/test_examples.py::FeatureExamplesTests::test_multi_process_metrics - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_fil
e=/tmp/tmpyq6p0qhv/default_config.yml examples/by_feature/multi_process_metri...
FAILED tests/test_examples.py::FeatureExamplesTests::test_pippy_examples_bert - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_file=
/tmp/tmpyq6p0qhv/default_config.yml examples/inference/pippy/bert.py` faile...
FAILED tests/test_examples.py::FeatureExamplesTests::test_pippy_examples_gpt2 - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_file=
/tmp/tmpyq6p0qhv/default_config.yml examples/inference/pippy/gpt2.py` faile...
FAILED tests/test_examples.py::FeatureExamplesTests::test_pippy_examples_t5 - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_file=/t
mp/tmpyq6p0qhv/default_config.yml examples/inference/pippy/t5.py` failed ...
FAILED tests/test_examples.py::FeatureExamplesTests::test_profiler - accelerate.test_utils.testing.SubprocessCallException: Command `accelerate launch --config_file=/tmp/tmpyq6
p0qhv/default_config.yml examples/by_feature/profiler.py` failed...
FAILED tests/test_grad_sync.py::SyncScheduler::test_gradient_sync_gpu_multi - RuntimeError: 'accelerate launch --num_processes=2 --monitor_interval=0.1 /home/ondrej/proj/accele
rate/src/accelerate/test_utils/scripts/test_sync.py' failed with returnco...
FAILED tests/test_hooks.py::HooksModelTester::test_add_remove_hook_fx_graph_module - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_hooks.py::HooksModelTester::test_align_devices_as_cpu_offload - AssertionError: assert device(type='cuda', index=0) == device(type='cpu')
FAILED tests/test_hooks.py::HooksModelTester::test_align_devices_as_model_parallelism - AssertionError: assert device(type='cuda', index=0) == device(type='cpu')
FAILED tests/test_hooks.py::HooksModelTester::test_attach_align_device_hook_as_cpu_offload - AssertionError: assert device(type='cuda', index=0) == device(type='cpu')
FAILED tests/test_hooks.py::HooksModelTester::test_attach_align_device_hook_as_cpu_offload_with_weight_map - AssertionError: assert device(type='cuda', index=0) == device(type=
'cpu')
FAILED tests/test_hooks.py::HooksModelTester::test_no_grad_in_hook - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_hooks.py::HooksModelTester::test_post_forward_hook_is_executed - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_hooks.py::HooksModelTester::test_pre_forward_hook_is_executed - RuntimeError: weight should contain 4 elements not 0
FAILED tests/test_kwargs_handlers.py::KwargsHandlerTester::test_ddp_comm_hook - RuntimeError: 'accelerate launch --num_processes=2 --monitor_interval=0.1 /home/ondrej/proj/acce
lerate/src/accelerate/test_utils/scripts/test_ddp_comm_hook.py' failed with...
FAILED tests/test_kwargs_handlers.py::KwargsHandlerTester::test_ddp_kwargs - RuntimeError: 'accelerate launch --num_processes=2 --monitor_interval=0.1 /home/ondrej/proj/acceler
ate/tests/test_kwargs_handlers.py' failed with returncode 1
FAILED tests/test_modeling_utils.py::ModelingUtilsTester::test_compute_module_sizes - AssertionError: assert defaultdict(<..._tracked': 8}) == {'': 236, 'ba...cked': 8, ...}
FAILED tests/test_modeling_utils.py::ModelingUtilsTester::test_get_balanced_memory - AssertionError: assert {0: 200, 1: 200} == {0: 187, 1: 200}
FAILED tests/test_modeling_utils.py::ModelingUtilsTester::test_infer_auto_device_map_with_buffer_check_and_multi_devices - assert 1 == 0
FAILED tests/test_modeling_utils.py::ModelingUtilsTester::test_infer_auto_device_map_with_tied_weights - AssertionError: assert OrderedDict([...tchnorm', 1)]) == {'layer1': 0,.
..ear1': 1, ...}
FAILED tests/test_modeling_utils.py::ModelingUtilsTester::test_load_checkpoint_in_model_disk_offload - ValueError: cannot mmap an empty file
FAILED tests/test_offload.py::OffloadTester::test_offload_state_dict - ValueError: cannot mmap an empty file
FAILED tests/test_offload.py::OffloadTester::test_offload_weights_loader - ValueError: cannot mmap an empty file
==================================================== 63 failed, 235 passed, 40 skipped, 519 warnings in 1153.61s (0:19:13) =====================================================

Great sounds good! Thanks for the improvement!


Support for additional disks, big nodes, update channel and Parallels

Create big nodes

In addition to the normal nodes, you can
also add additional nodes with a larger
memory/cpu configuration.
$num_big_instances = 1
$vm_big_memory = 8192
$vm_big_cpus = 2

Additional disks

Each node can be configured with additional disks.
$node_disks = 3
$disk_size = 10 # in GB

Specify the coreos update channel:
$update_channel = "alpha"
Also add .virtualbox/ to .gitignore
Add Parallels support

Set the memory size and number of cpus for Parallels,
as well as setting the download path.

Change Vagrant file config.vm.provider order
so that VirtualBox is first, which makes it
the default provider (assuming it works), and
the util.rb reflects that assumption.  In general,
setting VAGRANT_DEFAULT_PROVIDER is the best way
to be deterministic about what provider is used.

Github isn't updating this PR with additional commits.  I'm going to close this PR and create a new one.


Start / Stop motor service

Hi,
I have added two ros services to start and stop the lidar motor.
I have just modified the serial driver to set/unset DTR bit and create two ros services with std_srvs/Empty type.
I have only implemented the driver for linux architecture, it need to be done for win32.
I think this feature is quite interesting for energy saving and for noise reduction.
Best regards.

I really like this improvement: it can be really useful in order to save energy when laser scan is not needed,

Thanks for your contribute.


New version: Mozilla.Firefox.ESR.sq version 128.4.0

Created by 🥟 Dumplings.
Microsoft Reviewers: Open in CodeFlow

@wingetbot run


Update name-statement.md

fixing camel case

Docs Build status updates of commit d0e8440:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

Language/Reference/User-Interface-Help/name-statement.md
:bulb:Suggestion
View
Details

Language/Reference/User-Interface-Help/name-statement.md

Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Select: the arrow issue

When you click on the single select field, the components gets focused, the list opens, and the arrow moves down. When you click again, the list closes, but the component stays focused, and the arrow does not move back to pointing down.
Fix: the arrow should move back to pointing down when the list closes. The arrow must be tied to the list opening and closing, not whether the component is focused or not.

this is also fixed already


Update how-to-publish.md

updated images with new design and remove some notes that does not apply
Description

image/page update with relevant info

Fixes

Nice job @ceoger !


Confusion about the normal region of the generated image

"while the remaining region is consistent with the input anomaly-free sample" is mentioned in the first paragraph of the Method section of the paper, but in the generated images you provided, the normal region is not consistent with the anomaly-free samples. For example, for the white background part of the bottle, all the background part of anomaly-free samples are white (255, 255, 255), while the generated images you provide are not. In the capsule, the logo(actavis) of the generated image is also blurry and distorted than the real one, just like the generated one.
Could you answer my question? Thank you very much!

In the final process of generation, if mask is used to directly replace the normal region with the original anomaly-free image, the authenticity may be improved. Is that right?

Yes, this may be better. First of all this is not possible with diffusion models, because you have to encode the images with stable diffusion encoder.

Yes this may be a good approach, but this can not be done with latent diffusion models.

In the final process of generation, if mask is used to directly replace the normal region with the original anomaly-free image, the authenticity may be improved. Is that right?

hi，你把这个想法实现了吗？ (if mask is used to directly replace the normal region with the original anomaly-free image)。我将他生成的mask部分的img区域重新粘贴会ori，发现效果很差。我怀疑它是否只是简单将mask合成到mvtec中good图像内，并没有用到diffusion，我还没找到代码中将mask与good合成的部分。

模型生成如上图

我将mask对应img的部分区域(即上图取mask区域将其贴到ori上)

模型生成的mask

上图是ori
可以发现效果并不好
可以说如果模型对于这种缺陷不识别的话，那么生成的img(anomaly)也无法通过repalce region的方式来增强对比。
import os
import cv2
import numpy as np

# 设置文件夹路径
image_dir = '/data/generated_dataset/carpet/thread/image'
mask_dir = '/data/generated_dataset/carpet/thread/mask'
ori_dir = '/data/generated_dataset/carpet/thread/ori'
output_dir = './output/thread'

# 确保输出文件夹存在
os.makedirs(output_dir, exist_ok=True)

# 获取所有文件名
image_files = os.listdir(image_dir)

for image_file in image_files:
    # 构建文件路径
    image_path = os.path.join(image_dir, image_file)
    mask_path = os.path.join(mask_dir, image_file)
    ori_path = os.path.join(ori_dir, image_file)
    output_path = os.path.join(output_dir, image_file)

    # 读取图像和掩码
    image = cv2.imread(image_path)
    mask = cv2.imread(mask_path, cv2.IMREAD_GRAYSCALE)  # 读取为灰度图
    ori = cv2.imread(ori_path)

    # 确保掩码和原始图像尺寸一致
    if mask.shape[:2] != ori.shape[:2]:
        print(f"Mask and original image size mismatch for {image_file}. Skipping.")
        continue

    # 获取掩码中不为零的区域
    masked_region = np.where(mask != 0)

    # 裁剪 image 中掩码对应部分
    crop = image[masked_region]

    # 将裁剪部分粘贴到 ori 对应位置
    ori[masked_region] = crop

    # 保存结果
    cv2.imwrite(output_path, ori)

print("操作完成！")

这个是我对这个想法的简单实现。也许您提到的方法并不是这个意思，我们可以多讨论讨论如何解决这个小缺陷不明显的问题。


Correct build phases and script for 3 targets

Unable to build the dev app on local dev environment
Staging app not building

app should build on local as well as app centre for all 3 targets

Fixed but not merged to dev branch yet.


asset: Add Asset versioning support - V1

Fixes https://github.com/lightninglabs/taproot-assets/issues/392.

This PR is now part 1 of 3ish for actually bumping the asset version.
This includes the new fields in the Asset struct, without being populated, new encoders/decoders, the new TLV numbers + record funcs, and rejection of unknown asset versions before they are used in an MS-SMT.
One piece missing is rejection of unknown assets for RPC inputs.

Removed the DB changes for assets, and made GroupKeyReveal a struct vs. flat byte array. Updated TLV numbers and reverted the changes to the asset struct.
IIUC the only DB change needed is a new field to store the actual group key tapscript root? @Roasbeef

IIUC the only DB change needed is a new field to store the actual group key tapscript root? @Roasbeef

Yep, I think so. Also see this comment on if we want to also store the script leaf information in the DB as well, if we assume the caller would do that: https://github.com/lightninglabs/taproot-assets/pull/381#discussion_r1279988255. If the latter, then we may need to expose some more utility RPCs to allow the caller to create a valid minting witness for their chosen part (so the give us the control block, etc).

Following offline discussion, the current plan is:

Keep the group key as 33-byte, since TapTweak won't guarantee even parity for the final tweaked key. This also simplifies key handling in the DB overall.

(This requires a BIP update).

Adapt the asset DB tables to move away from storing the minting witness in the asset_group_sigs table, and instead store in the asset_witness table or a new table like group_witnesses. We should end up with no duplication of the minting witnesses, and queries to fetch these witnesses shouldn't be a large change.

Ok, this has been updated to meet the discussed changes:

Tweaked group key is back to 33 bytes.
Better godoc comments explaining the tweaking process.
New DB table to store witnesses for asset group reissuance, that stores a tapscript root and an arbitrary witness stack.
Updates to other DB logic to maintain current functionality.

AFAICT, those DB updates went well (unit tests on SQLite passing), but there is some mistake in the change to the asset group info view. The new UpsertAssetGroupWitness query should also be better tested.
The error caused by the view update:
CREATE VIEW key_group_info_view AS
SELECT
sig_id, gen_asset_id, tapscript_root, witness_stack, tweaked_group_key,
       raw_key, key_index, key_family
FROM asset_group_sigs sigs
JOIN asset_group_witnesses witnesses
       ON sigs.witness_id = witnesses.witness_id
JOIN asset_groups groups
       ON sigs.group_key_id = groups.group_id
JOIN internal_keys keys
       ON keys.key_id = groups.internal_key_id
WHERE sigs.gen_asset_id IN (SELECT gen_asset_id FROM genesis_info_view);
(details: ERROR: relation "asset_group_witnesses" does not exist (SQLSTATE 42P01))
Test:       	TestSelectCommitment/asset_with_key_group

Ok, I renamed asset_group_sigs.genesis_sig to witness_stack and added a tapscript_root field to asset_groups. The length for tapscript_root is not enforced at the DB level, but GroupKeyReveal.TapscriptRoot is [32]byte and not []byte so I think that's fine for now.
IMO we can defer other DB field renaming once we actually add support for non-sig witnesses in another PR.
I added test coverage for UpsertAssetGroupKey and the helpers that serialize and parse witnesses. I also updated the proof encode/decode to fix some pointer issues.
Right now we only insert an empty tapscript root, since we only support single signatures as witnesses. That functionality should be deferred to a follow-up PR.

Ok, the PR has been updated to try and replace the group sig field with a witness, and add the witness and Tapscript root to the GroupKey struct. The problem as-is is that the nil-ness behavior for the sig as *schnorr.Signature and a similar use with wire.TxWitness / [][]byte are different.
Specifically, both fields are BLOB NOT NULL in the DB. While the sig is just converted to []byte with Serialize(), we use the TLV encode/decode for witnesses here, which IIUC means that an uninitialized witness and an initialized but empty witness will serialize differently.
Separately from the encoding of a nil vs. empty witness, currently the parsing of a signature from a witness is currently possibly too strict, since an empty witness may not always be an error case. For example, in some of the Universe subsystem, we may load or store a GroupKey with the sig unset, simply because it isn't relevant at that point and/or was validated earlier.
One option for adding more consistency for storing the witness, is to actually have the field as just BLOB, and then check for both a nil or empty witness when parsing a stored witness instead of failing in case of a nil witness.

I took this PR over while @jharveyb is absent. Spoke to @Roasbeef and the intention is to merge this to the v0-3-0-staging branch while not 100% working. For example the unit and integration tests will only work again once we actually add the group key signature as the asset witness in the minting proof.
But I think the PR is in a state where it is mostly complete for a first part and we can work towards fixing everything on this staging branch.

Going to merge this into the v0-3-0-staging branch now so we can continue building on top. Can always fix remaining issues later on that branch.


Disk cache for webview needs to be manually cleared

Looks like the default behavior of WKWebView is the cache to disk, which is not ideal if you're using it to view image galleries and so forth. It doesn't seem like it clears the disk cache either.
WebViewScreenSaver may need to switch off disk caching completely or figure out a way to stop that from happening.
https://developer.apple.com/library/mac/documentation/WebKit/Reference/WKWebViewConfiguration_Ref/index.html#//apple_ref/occ/instp/WKWebViewConfiguration/websiteDataStore

How can one manually clear the cache while we wait for this?

After running Webviewscreensaver on my Mac OS 10.12.6 without a problem for a long time I am now having an issue.  The Nightscout page can not be loaded when selected as screensaver. It shows the Nightscout loading page with message "connecting to server" and it freezes there.Previously that was not the case. I have tried uninstalling the app and clearing the cache from Safari and Chrome. I have also searched ~/Library/Caches and delated all found related files however I am still missing something since after reinstalling, the app picks up the Nightscout page address on its own. This mean I did not successfully cleared all of the cache. Any help how to clear the cache?

We have a button now (v2.1) in the options panel to clear cache and other data.
Check it out and get back to us.

We have a button now (v2.1) in the options panel to clear cache and other data.
Check it out and get back to us.

Many thanks for your reply. I have tried v2.1 and have clicked button to clear the cache and history however still my problem is there. Nothing has apparently changed with my issue with new version. If I set my nightscout page clock view as a screensaver then webviewscreensaver displays it without any problem, however if I set my default nightscout home page as a screen saver then It shows the Nightscout loading page with message "connecting to server" and it freezes there.
How to reset or clear configuration tied to the macOS defaults system? I hope I am making sense with my problem and the question. Thank you for your help.

In regards to your specific use-case, please see my reply in #62


Bump up x11 dependency to v2.0.0

@bors-servo: r+

:pushpin: Commit c999720 has been approved by jdm

:hourglass: Testing commit c999720 with merge 4569e30...

:sunny: Test successful - travis


Unexpected token 'export' from formdata-node when using openai/shims/node

Confirm this is a Node library issue and not an underlying OpenAI API issue

[X] This is an issue with the Node library

Describe the bug
Issues experienced while running unit tests in our nodejs backend.
I first encountered the fetch is not defined bug, which led me to https://github.com/openai/openai-node/issues/304 and was able to move past the issue with import 'openai/shims/node'
But now I'm receiving the following errors:
    Details:

    /Users/person/Developer/repos/my-apis/node_modules/formdata-node/lib/esm/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export * from "./FormData.js";
                                                                                ^^^^^^

    SyntaxError: Unexpected token 'export'

      4 | import 'formdata-polyfill'
      5 | import 'whatwg-fetch'
    > 6 | import 'openai/shims/node'
        | ^
      7 |
      8 | import joi from 'joi'
      9 | import OpenAI from 'openai'

      at Runtime.createScriptFromCode (node_modules/jest-config/node_modules/jest-runtime/build/index.js:1505:14)
      at Object.<anonymous> (node_modules/openai/src/_shims/node-runtime.ts:5:1)
      at Object.<anonymous> (node_modules/openai/src/shims/node.ts:4:1)

I've also added
/**
 * @jest-environment jsdom
 */
import 'formdata-polyfill'
import 'whatwg-fetch'

But I'll still get the same SyntaxError: Unexpected token 'export' error.
I've updated the transformIgnorePatterns value to include "/node_modules/(?!formdata-node)" as well as "/node_modules/(?!openai/node/shims)" and many combinations. Still no luck.
yarn v1.22.4
typescript v5.1.6
jest v29.7.0
To Reproduce
yarn add openai
I've been able to reproduce it with as little as just the imports.
Add the following imports to a file that has unit tests (or a logic/utils file used by a file being tested)
import 'openai/shims/node'

import OpenAI from 'openai'

run the tests on that file
Code snippets
No response
OS
macOS
Node version
Node v16.20.0 (also tested with v18.19.0 same results)
Library version
openai v4.20.0

Can you share tsconfig, package.json, and jest config?
If you are using @jest-environment jsdom, there's a good chance that you actually want to use import 'openai/shims/node' and add a global fetch polyfill, for example with undici, instead. But it depends on your setup.

I did use openai/shims/node which got me past the fetch error.
Here's the tsconfig.json file:
// tsconfig.json
{
    "compilerOptions": {
        /* Basic Options */
        //"incremental": true,                   /* Enable incremental compilation */
        "target": "es2019" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
        "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
        // "lib": [],                             /* Specify library files to be included in the compilation. */
        "allowJs": true /* Allow javascript files to be compiled. */,
        "checkJs": false /* Report errors in .js files. */,
        "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
        "declaration": true /* Generates corresponding '.d.ts' file. */,
        "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
        "sourceMap": true /* Generates corresponding '.map' file. */,
        // "outFile": "./",                       /* Concatenate and emit output to single file. */
        // "outDir": "./dist",                        /* Redirect output structure to the directory. */
        "rootDir": "." /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
        "composite": true /* Enable project compilation */,
        // "tsBuildInfoFile": "./",               /* Specify file to store incremental compilation information */
        // "removeComments": true,                /* Do not emit comments to output. */
        // "noEmit": true,                        /* Do not emit outputs. */
        // "importHelpers": true,                 /* Import emit helpers from 'tslib'. */
        // "downlevelIteration": true,            /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
        // "isolatedModules": true,               /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */

        /* Strict Type-Checking Options */
        // "strict": true,                           /* Enable all strict type-checking options. */
        // "noImplicitAny": true,                 /* Raise error on expressions and declarations with an implied 'any' type. */
        "strictNullChecks": true /* Enable strict null checks. */,
        "strictFunctionTypes": true /* Enable strict checking of function types. */,
        "strictBindCallApply": true /* Enable strict 'bind', 'call', and 'apply' methods on functions. */,
        "strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */,
        "noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
        "alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */,

        /* Additional Checks */
        // "noUnusedLocals": true,                /* Report errors on unused locals. */
        // "noUnusedParameters": true,            /* Report errors on unused parameters. */
        // "noImplicitReturns": true,             /* Report error when not all code paths in function return a value. */
        // "noFallthroughCasesInSwitch": true,    /* Report errors for fallthrough cases in switch statement. */

        /* Module Resolution Options */
        "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
        "baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
        "paths": {
            /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
            "@fictiv/*": ["./packages/*"]
        },
        // "rootDirs": [],                        /* List of root folders whose combined content represents the structure of the project at runtime. */
        "typeRoots": [
            "node_modules/@types"
        ] /* List of folders to include type definitions from. */,
        // "types": [],                           /* Type declaration files to be included in compilation. */
        "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
        "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
        // "preserveSymlinks": true,              /* Do not resolve the real path of symlinks. */
        // "allowUmdGlobalAccess": true,          /* Allow accessing UMD globals from modules. */

        /* Source Map Options */
        // "sourceRoot": "",                      /* Specify the location where debugger should locate TypeScript files instead of source locations. */
        // "mapRoot": "",                         /* Specify the location where debugger should locate map files instead of generated locations. */
        // "inlineSourceMap": true                /* Emit a single file with source maps instead of having a separate file. */,
        // "inlineSources": true,                 /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */

        /* Experimental Options */
        // "experimentalDecorators": true,        /* Enables experimental support for ES7 decorators. */
        // "emitDecoratorMetadata": true,         /* Enables experimental support for emitting type metadata for decorators. */

        /* Advanced Options */
        "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
        "resolveJsonModule": true,
        "skipLibCheck": true
    },
    "exclude": [
        "**/node_modules/**/*",
        "**/dist/**/*",
        "./_templates/**/*",
        "./bin/**",
        "./coverage/**",
        "./eslint-custom-rules/**",
        "./babel.config.js"
    ]
}

And here's package.json which includes the jest config (I removed scripts and other private info)
// package.json
{
    "version": "1.0.0",
    "license": "UNLICENSED",
    "private": true,
    "workspaces": [
        "packages/*",
        "services/*"
    ],
    "jest": {
        "preset": "ts-jest",
        "collectCoverageFrom": [
            "services/**/*.{js,ts,tsx}",
            "packages/**/*.{js,ts,tsx}"
        ],
        "transform": {
            "^.+\\.(ts|tsx)$": [
                "ts-jest",
                {
                    "isolatedModules": true
                }
            ]
        },
        "coveragePathIgnorePatterns": [
            "/node_modules/",
            "/db/",
            "/dist/",
            "__mocks__",
            "__tests__",
            "test-helpers/",
            "/.build/",
            "packages/static-data/"
        ],
        "moduleNameMapper": {
            "~/graphql-server/(.*)$": "<rootDir>/services/graphql-server/src/$1",
            "~/zip-file-service/(.*)$": "<rootDir>/services/zip-file-service/src/$1",
            "~/zapier-events/(.*)$": "<rootDir>/services/zapier-events/src/$1",
            "~/kinesis-monitoring/(.*)$": "<rootDir>/services/kinesis-monitoring/src/$1",
            "^uuid$": "uuid"
        },
        "transformIgnorePatterns": [
            "/node_modules/(?!jest-when|formdata-node)"
        ],
        "testPathIgnorePatterns": [
            "<rootDir>/dist/",
            "/dist/",
            "/node_modules/",
            "/.build/",
            "<rootDir>/*/.*/__tests__/test-helpers"
        ],
        "moduleDirectories": [
            "node_modules",
            "src"
        ],
        "moduleFileExtensions": [
            "ts",
            "tsx",
            "js",
            "jsx",
            "json"
        ],
        "modulePathIgnorePatterns": [
            "<rootDir>/services/src/*/.*/__mocks__",
            "/dist/"
        ],
        "testEnvironment": "node",
        "setupFilesAfterEnv": [
            "<rootDir>/packages/lib-test-helpers/src/unitTestSetup.js"
        ],
        "reporters": [
            "default",
            "jest-junit"
        ],
        "coverageReporters": [
            "text",
            "html"
        ],
        "snapshotSerializers": [
            "<rootDir>/node_modules/@whoaa/jest-mock-knex/serializer"
        ],
        "roots": [
            "<rootDir>",
            "<rootDir>/packages/",
            "<rootDir>/services/"
        ],
        "testTimeout": 300000
    },
    "jest-junit": {
        "outputDirectory": "./reports",
        "outputName": "jest.xml"
    },
    "devDependencies": {
        "@aws-sdk/client-s3": "~3.379.1",
        "@pdftron/pdfnet-node": "^9.2.0",
        "@types/aws-lambda": "^8.10.85",
        "@types/bunyan": "^1.8.6",
        "@types/express": "^4.17.2",
        "@types/express-serve-static-core": "^4.17.1",
        "@types/jest": "~27.4.1",
        "@types/jsforce": "^1.11.0",
        "@types/jsonwebtoken": "^7.2.7",
        "@types/lodash": "^4.14.133",
        "@types/node": "~13.7.0",
        "@types/puppeteer": "~5.4.3",
        "@typescript-eslint/eslint-plugin": "^5.61.0",
        "@typescript-eslint/parser": "^5.61.0",
        "@whoaa/jest-mock-knex": "^1.20.0",
        "add": "^2.0.6",
        "apollo-cache-inmemory": "^1.1.12",
        "apollo-client": "^2.2.8",
        "apollo-link": "^1.2.1",
        "apollo-link-http": "^1.5.3",
        "aws-sdk": "~2.1374.0",
        "brfs": "^2.0.2",
        "chalk": "^2.4.1",
        "concurrently": "^6.5.1",
        "copy-webpack-plugin": "^9.0.0",
        "db-migrate": "^0.11.13",
        "db-migrate-pg": "^1.2.2",
        "delay": "^4.3.0",
        "dogapi": "^2.8.4",
        "eslint": "~8.47.0",
        "eslint-config-prettier": "~8.5.0",
        "eslint-import-resolver-custom-alias": "~1.3.2",
        "eslint-plugin-fictiv-apis": "file:./eslint-custom-rules",
        "eslint-plugin-import": "~2.28.1",
        "eslint-plugin-jest": "~27.2.3",
        "eslint-plugin-no-only-tests": "~3.1.0",
        "eslint-plugin-node": "~11.1.0",
        "eslint-plugin-prettier": "~5.0.0",
        "eslint-plugin-react": "~7.33.2",
        "eslint-plugin-simple-import-sort": "~10.0.0",
        "expect-more-jest": "~5.5.0",
        "graphql": "^15.5.1",
        "graphql-fields": "^1.0.2",
        "graphql-tools": "^4.0.7",
        "jest": "~29.7.0",
        "jest-junit": "~16.0.0",
        "jest-when": "~3.5.1",
        "js-yaml": "~4.1.0",
        "json-loader": "^0.5.4",
        "lerna": "~6.6.2",
        "mock-knex": "~0.4.10",
        "mockdate": "^3.0.2",
        "node-loader": "^2.0.0",
        "node-loader-relative": "^0.0.3",
        "nodemon": "^3.0.1",
        "nope-sorry": "^1.0.0",
        "npm-conf": "^1.1.3",
        "prettier": "^3.0.2",
        "quick-lru": "^4.0.1",
        "raw-loader": "^0.5.1",
        "rimraf": "^3.0.1",
        "serverless": "~3.34.0",
        "serverless-http": "~3.2.0",
        "serverless-offline": "~12.0.4",
        "serverless-package-python-functions": "^0.7.0",
        "serverless-plugin-git-variables": "^5.2.0",
        "serverless-webpack": "~5.13.0",
        "stripe": "^12.6.0",
        "supertest": "^6.3.3",
        "transform-loader": "^0.2.4",
        "ts-jest": "^29.1.1",
        "ts-loader": "^9.2.6",
        "ts-node": "^10.9.1",
        "typescript": "~5.1.6",
        "utility-types": "^3.10.0",
        "webpack": "~5.82.0",
        "webpack-node-externals": "~3.0.0",
        "yaml-jest": "~1.2.0",
        "yargs": "^17.3.1",
        "yarn": "^1.21.1",
        "yml-loader": "^2.1.0"
    },
    "resolutions": {
        "pg": "^8.11.1",
        "brfs": "^2.0.2"
    },
    "dependencies": {
        "@opensearch-project/opensearch": "^2.0.0",
        "@easypost/api": "^5.10.1",
        "ajv": "^6.12.3",
        "analytics-node": "6.2.0",
        "apollo-server-express": "^3.12.0",
        "aws-sdk": "~2.1374.0",
        "aws-opensearch-connector": "^1.1.0",
        "axios": "~1.6.2",
        "base64-url": "^2.0.0",
        "bluebird": "^3.5.0",
        "bunyan": "^1.8.10",
        "bunyan-middleware": "^1.0.1",
        "cli": "^1.0.1",
        "cognito-express": "~3.0.2",
        "cookie-parser": "1.4.5",
        "cors": "^2.8.3",
        "dataloader": "^1.4.0",
        "decimal.js": "^7.2.0",
        "dotenv": "^4.0.0",
        "dynamodb-data-types": "^3.0.0",
        "dynamodb-migrations": "^0.0.10",
        "express": "^4.18.2",
        "express-jwt-authz": "^1.0.0",
        "graphql": "^15.5.1",
        "graphql-tools": "^4.0.7",
        "graphql-apollo-errors": "^2.0.3",
        "graphql-custom-types": "^1.5.1",
        "graphql-extensions": "^0.10.10",
        "graphql-resolve-batch": "^1.0.2",
        "graphql-type-json": "^0.3.1",
        "helmet": "^4.1.1",
        "i18n-iso-countries": "6.0.0",
        "is-uuid": "^1.0.2",
        "joi": "17.2.1",
        "jsforce": "^1.11.1",
        "jsonwebtoken": "9.0.0",
        "jsx-pdf": "whoaa512/jsx-pdf#58feebf",
        "knex": "^0.21.21",
        "libphonenumber-js": "^1.9.44",
        "lodash": "^4.17.21",
        "moment": "~2.29.4",
        "moment-timezone": "~0.5.37",
        "nocache": "^2.1.0",
        "odoo-connect": "https://github.com/fictiv/odoo-connect.git#v1.3.0",
        "openai": "3.3.0",
        "p-iteration": "^1.1.8",
        "p-map": "^2.1.0",
        "p-props": "^2.0.0",
        "p-reduce": "^1.0.0",
        "pdfmake": "^0.2.7",
        "pdf-merger-js": "^4.3.0",
        "pg": "^8.11.1",
        "postal-codes-js": "2.4.0",
        "psl": "1.8.0",
        "raven": "^2.6.0",
        "@sentry/node": "5.15.4",
        "source-map-support": "^0.4.15",
        "stripe": "^8.154.0",
        "url-join": "^4.0.0",
        "uuid": "^2.0.1",
        "jwks-rsa": "^2.0.5",
        "json2csv": "6.0.0-alpha.2",
        "qrcode": "^1.5.1",
        "@sideway/address": "4.1.2",
        "xml-js": "1.6.11",
        "xml2js": "~0.6.2",
        "vwo-node-sdk": "^1.62.0",
        "whatwg-fetch": "3.6.19",
        "tough-cookie": "^4.1.3",
        "request": "^2.88.2"
    }
}

Ah I'm so sorry, I meant openai/shims/web not openai/shims/node in that case.

To be clear, this was being used in a backend nodeJS environment. Would I still want to use the web shim?

Yes, you can as long as you have access to the global fetch function – it'll just use that. However, file uploads will require you to also polyfill FormData, File, and other classes – I think undici exposes these.

I first encountered the fetch is not defined bug, which led me to #304 and was able to move past the issue with import 'openai/shims/node'

I also encountered the same problem with:

node: 20.10.0
openai: 4.24.1
jest: 29.4.2
testEnvironment: 'node'

I managed to get the tests working by first removing the line import 'openai/shims/node' again.
Then, to fix the "ReferenceError: fetch is not defined" error, I did the following:

Install undici as devDependency (6.2.1 in my case)
Add the following to a jest.setup.js file (see https://github.com/mswjs/msw/discussions/1934#discussioncomment-7874204):

//jest.setup.js
const { TextDecoder, TextEncoder, ReadableStream } = require("node:util")

Object.defineProperties(globalThis, {
    TextDecoder: { value: TextDecoder },
    TextEncoder: { value: TextEncoder },
    ReadableStream: { value: ReadableStream },
})

const { Blob, File } = require("node:buffer")
const { fetch, Headers, FormData, Request, Response } = require("undici")

Object.defineProperties(globalThis, {
    fetch: { value: fetch, writable: true },
    Blob: { value: Blob },
    File: { value: File },
    Headers: { value: Headers },
    FormData: { value: FormData },
    Request: { value: Request },
    Response: { value: Response },
})

Reference this setup in the jest.config.js:

//jest.config.js
module.exports = {
    setupFilesAfterEnv: ['./jest.setup.js'],
    ...other config
}

Right on @RobertHaslinger, nailed it. I just needed Request and Response in my case, but great fix.


I trained PV_RCNN on my GPU, but it failed to reach the test accuracy in the paper

I trained PV_RCNN on my GPU, but it failed to reach the test accuracy in the paper. There's a 3 percent difference in AP_R11.How should I train to be as close to the paper level as possible?

Maybe you should use the test code to test for every epoch and see the tensorboard curve. Because there always be sharp change of val performance on KITTI.
You can see the relevant discussion at #189 #314


Write "a Summary of July 2022 Retrospective"

Outline

Introduction
Goals & Metrics
The Sickest Seven
Other Takeaways
Respins
Summary

Closed via https://github.com/adoptium/blog.adoptium.net/pull/182


Add option of inserting data by hash rather than an array

Add ability to insert data by hash values rather than arrays
Checklist

[x] Bumped version tag in lib/egis/version.rb
[x] Added changes summary to CHANGELOG

@lkieda one thing, I think it would be good to mention in upload_table method's documentation that you can use hashes as well


Added a new favicon image

Added a new favicon

Bro, thanks for the pr but I am not changing favicon now. @rishi-bhardvaj


outputFilename

The JSON File defines the outputFilename correctly:
{"layout":"1. A4 Querformat","outputFilename":"Druck","outputFormat":"pdf","attributes":{"title":"Mein Titel","map":{"dpi":200,"projection":"EPSG:25832","center":[385000,5530000],"scale":500,"layers":[{"baseURL":"https://geo4.service24.rlp.de/wms/shade.fcgi","opacity":0.25,"type":"WMS","layers":["rp_shade10m"],"imageFormat":"image/png","customParams":{"TRANSPARENT":"true"}},{"baseURL":"https://sgx.geodatenzentrum.de/wms_topplus_open","opacity":1,"type":"WMS","layers":["web"],"imageFormat":"image/png","customParams":{"TRANSPARENT":"true"}}]},"scale":"1:500"}}:
but the file the browser gives back will be not overwrited in "Druck.pdf". It is the same filename as in the directory itself:
example:
https://masterportal.service24.rlp.de/portale/zus_finder/printer/print/report/f10e5ff3-b4eb-4d66-be47-c2c14fd09fb1@de96c402-0332-462b-8ba2-db0d9b60070e
Is this an configuration problem?

You probably have defined it in the config.yaml, it's taken in priority...

In the yaml file there ist no options configured for using uuid as filename. The suffix will also not be written.
Example:
  #===========================================================================
  4. A3 Querformat: !template
  #===========================================================================
    reportTemplate: a3_querformat.jrxml
    attributes:
      title: !string {}
      scale: !string {}
      map: !map
        maxDpi: 400
        dpiSuggestions: [72, 96, 120, 400]
        width: 1121
        height: 675
        zoomLevels: !zoomLevels
          scales: [500, 1000, 2000, 2500, 5000, 10000, 25000, 50000, 100000, 250000]
      scalebar: !scalebar
        width: 140
        height: 30
        default:
          barSize: 2
          type: bar
          align: left
          intervals: 4
          lineWidth: 1
          font: Helvetica
          fontSize: 8
      overlayLayers: !staticLayers
        default:
          layers:
            - type: "grid"
              numberOfLines: [0, 0]
              labelColor: rgba(0,0,0,0)
              haloColor: rgba(0,0,0,0)
    processors:
    - !addBackgroundLayers
      inputMapper:
          overlayLayers: staticLayers
          map: map
    - !reportBuilder # compile all reports in current directory
      directory: '.'
    - !createMap {}
    - !createScalebar {}

Your config is partial and don't contain the part where it can be defined, example of definition:
https://github.com/mapfish/mapfish-print/blob/313c4136cd078ccf09e5a3159d4ee43c9f19842e/core/src/test/resources/org/mapfish/print/servlet/config-email-s3.yaml#L3

I test your config, but without positive result.
proxies:
  - !proxy
    scheme: http
    host: proxy.rlp
    port: 8080

outputFilename: config_test_outputname-${yyyy}

templates:
 #===========================================================================
  4. A3 Querformat: !template
  #===========================================================================
    reportTemplate: a3_querformat.jrxml

..........

Is it perhaps a proxy-problem.
Everthing of the print is fine - only the filename and the suffix will not be written correctly.
https://masterportal.service24.rlp.de/portale/zus_finder/printer/print/report/e1912600-6f41-452d-a570-0a887d389c50@79f851f4-5a8a-41fe-a774-422d71bd7c2e


Appending two anonymous records together

Is it possible to provide a function which appends two anonymous records (which contain different fields) together?

Yes, it used to have a concatenation function, but it has been removed when I changed the implementation to use SmallArray. Do you think that function is useful? I've never needed it

I am writing benchmarks of different anonymous records libraries so I don't have any direct need for it if you don't want to include it in the API.

Concatenation function is actually quite handy when using your library for plain extensible products.
I'm using extensible to pass a bunch of otherwise unrelated dependencies through my code. I have a bunch of small functions that require different services and need to combine them.   Then I actually create extensible product filled with anything I might ever need and just pass it to my combined functions.
When actually creating that extensible product, concatenation gets quite useful! Please consider adding it to future releases.

Shipped v0.4.5. Thanks @anton-dessiatov !


New version: Nvidia.CUDA version 12.3

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[x] Does your manifest conform to the 1.5 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Note: https://github.com/microsoft/winget-pkgs/pull/98333#issuecomment-1457455620

@wingetbot waivers Add Validation-Shell-Execute


TruckersMP Not Working

I did the same process that two weeks ago has not worked Notes:
I reinstalled the OS
Success! App '227300' fully installed.
** DEBUG **  Updating mod files
** DEBUG **  No files to download
./truckersmp-cli -eup -n netinho1109 -vv -g  -o  -x   46,50s user 6,93s system 26% cpu 3:22,86 total
manoel@archlinux ~/truckersmp-cli (git)-[master] % ./truckersmp-cli -esp -vv -g "/home/manoel/.local/share/Steam/steamapps/common/Euro Truck Simulator 2" -o "/home/manoel/.local/share/Steam/steamapps/common/Proton 5.0" -x "/home/manoel/.local/share/Steam/steamapps/compatdata/227300"
** DEBUG **  No moddir set, setting to default
** INFO **  Mod directory: /home/manoel/.local/share/truckersmp-cli/TruckersMP
** INFO **  AppID/GameID: 227300 (ets2)
** INFO **  Game directory: /home/manoel/.local/share/Steam/steamapps/common/Euro Truck Simulator 2
** INFO **  Prefix: /home/manoel/.local/share/Steam/steamapps/compatdata/227300
** INFO **  Proton directory: /home/manoel/.local/share/Steam/steamapps/common/Proton 5.0
** DEBUG **  Updating mod files
** DEBUG **  No files to download
** DEBUG **  Starting game with Proton
** DEBUG **  Starting Steam...
** DEBUG **  Steam should now be up and running and the user logged in.
** INFO **  Steam installation directory: /home/manoel/.local/share/Steam
** INFO **  Startup command:
SteamGameId=227300
SteamAppId=227300
STEAM_COMPAT_DATA_PATH=/home/manoel/.local/share/Steam/steamapps/compatdata/227300
STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/manoel/.local/share/Steam
PROTON_USE_WINED3D=0
PROTON_NO_D3D11=1
LD_PRELOAD=/home/manoel/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so
/usr/bin/python3 /home/manoel/.local/share/Steam/steamapps/common/Proton 5.0/proton
run
/home/manoel/truckersmp-cli/truckersmp_cli/truckersmp-cli.exe /home/manoel/.local/share/Steam/steamapps/common/Euro Truck Simulator 2 /home/manoel/.local/share/truckersmp-cli/TruckersMP
** INFO **  Proton output:
ERROR: ld.so: object '/home/manoel/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/manoel/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
esync: up and running.
Wine cannot find the FreeType font library.  To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
http://www.freetype.org
Setting breakpad minidump AppID = 227300
Steam_SetMinidumpSteamID:  Caching Steam ID:<PHONE_NUMBER>5254865 [API loaded no]
pid 147572 != 147571, skipping destruction (fork without exec?)

Does /home/manoel/truckersmp-cli/truckersmp_cli/truckersmp-cli.exe exist?

I didn't find this file.
What I found there was the following: init.py  proton.json pycache

Duplicate of #88
https://github.com/lhark/truckersmp-cli#build


Thanks for you great job! Can this clip-count model to replace the clip part of stable diffusion for strengthen the sd's Count ablilty?

Hi, thanks for your comment. Personally, I would say that it is possible to use a text-guided object counting model to help SD generate images with the correct object count. However, I think directly replacing the "CLIP part" of SD may not work well. As far as I know, SD utilizes the pre-trained CLIP text encoder to inject text guidance through cross-attention with visual input in a U-Net style backbone. Our model does not aim to improve the text encoder solely, but we depend on the multi-modal synergy to achieve advanced text-guided counting ability. So, I believe both visual and text knowledge should be utilized to guide the SD model.
Moreover, I believe this paper is most relevant to your question, which utilizes a reference-less counting model to improve diffusion models to produce the correct object count given the input prompt.

thanks again！unfortunately your suggested paper is not open


No image for Fishy Fishy Cross my Ocean

Describe the bug
No image for Fishy Fishy Cross my Ocean
Steps to reproduce the behavior
1.Navigate to https://arcade.makecode.com/gamejam/ocean
Actual behavior
No image for Fishy Fishy Cross my Ocean

Additional context
1.OS: Windows(rs6)
2.arcade version: 1.5.8
3.Microsoft MakeCode version: 6.13.10

Well hmm, the thumb image is still valid...
https://raw.githubusercontent.com/UnsignedArduino/Fishy-Fishy-Cross-my-Ocean/master/.github/makecode/thumb.png

Related commits:

https://github.com/microsoft/pxt-arcade/pull/3181/commits/b4493cfbd1e56f975e0306b29ea27cef8259493c
https://github.com/UnsignedArduino/Fishy-Fishy-Cross-my-Ocean/commit/b786558b97ba4d2cad00e5e3db1b42ca31223443


Fix for OccluderPolygon2D memory leak

Fix for https://github.com/godotengine/godot/issues/53722
RendererCanvasRenderRD::occluder_polygon_set_shape was not freeing index/vertex arrays/buffers because sdf_point_count and line_point_count for OccluderPolygon2D were not being set after initialization.
To fix this, I set line_point_count, and then also added a check to see if the number of lines/points is zero and allow it to free in that case.
I do not know the intent of sdf_point_count, so I have not set that value.

Looks great! The final step before merging is to squash all the commits together so that the whole PR only contains 1 big commit with all your changes. We like to merge one commit at a time to keep the git history clean and navigable.
If you don't know how to do that, we have a helpful tutorial in the official documentation https://docs.godotengine.org/en/latest/community/contributing/pr_workflow.html#the-interactive-rebase

Should be ready at any point, let me know if/when there is anything else I need to do.

Thanks, and congrats on your first merged Godot pull request!


docker-sync

What are your thoughts on using up with docker-sync (http://docker-sync.io/)?
It seems like my up.yml could have a line like:
docker_compose_command: docker-sync-stack start and then more or less treat everything else as the same. I'm fairly new to docker, up, lucky, etc. so I'm wondering if from a more experienced perspective anyone sees an issue with this kind of approach.

Oh well, I guess that doesn't quite make sense. The above would call docker-sync-stack start up which isn't what I want. I guess a fundamental problem is that docker sync calls start when docker compose calls up which is the name of this project...I'm guessing they're not really compatible then.

Yeah, I know a lot more about docker now the above doesn't make sense. Up has been a great addition to the tooling though! Thanks @paulcsmith!

I'm so glad you're finding it useful! And thanks for the feedback!


Add failing test case for issue # 174

Failing test case for #174

Tests now passing on main after fix in #176 .
Thanks @dimatillck !!!


Zappa certify not working. Incompatible ACME endpoints

ACME v2 API no longer has acme/new-reg and acme/new-authz endpoints. Error 404 is being returned!
Context
I followed the guide to associate a Let's Encrypt SSL certificate and validating it using DNS validation but I keep getting 404 errors when registering.

The following functions
register_account()
https://github.com/zappa/Zappa/blob/bef5c5ae9f3551a4c2e0acfcc43f4a65906e8a61/zappa/letsencrypt.py#L230-L236
and
get_cert(...)
https://github.com/zappa/Zappa/blob/bef5c5ae9f3551a4c2e0acfcc43f4a65906e8a61/zappa/letsencrypt.py#L265-L271
make calls to two endpoints that are no longer compatible (Reference) and are therefore returning 404 errors and the process fails.
https://acme-v02.api.letsencrypt.org/directory shows what are the endpoints and neither new-reg nor new-authz are there.
Expected Behavior
zappa certify should complete without errors and successfully certify the SSL certificate.
Actual Behavior
When running zappa certify, the following error keeps popping up:
Error registering: 404 b'404 page not found\n'
Failed to generate or install certificate! :(`

Possible Fix
Update letsencrypt.py to use the correct ACME v2 endpoints. Possibly with the updates from acme-tiny
Steps to Reproduce

run zappa certify
Your Environment

Zappa version used: 0.55.0
Operating System and Python version: Win 11 / Python 3.8.10
The output of pip freeze:

argcomplete==1.12.3
boto3==1.18.11
botocore==1.21.11
certifi==2020.6.20
cffi==1.14.6
cfn-flip==1.2.3
charset-normalizer==2.0.4
click==8.0.1
colorama==0.4.4
ConfigArgParse==1.5.1
durationpy==0.5
Flask==2.2.2
Flask-BasicAuth==0.2.0
Flask-Caching==1.10.1
Flask-Cors==3.0.10
Flask-JWT-Extended==4.4.4
Flask-SQLAlchemy==2.5.1
future==0.18.2
gevent==21.1.2
geventhttpclient==1.4.4
greenlet==1.1.0
hjson==3.0.2
idna==3.2
importlib-metadata==4.12.0
itsdangerous==2.0.1
Jinja2==3.0.1
jmespath==0.10.0
kappa==0.6.0
locust==1.2.2
MarkupSafe==2.1.1
msgpack==1.0.2
pep517==0.11.0
pip-tools==6.2.0
placebo==0.9.0
psutil==5.8.0
pycparser==2.20
PyJWT==2.4.0
PyMySQL==1.0.2
python-dateutil==2.6.1
python-dotenv==0.19.0
python-slugify==5.0.2
pywin32==301
PyYAML==5.4.1
pyzmq==22.1.0
redis==3.5.3
requests==2.28.1
s3transfer==0.5.0
six==1.16.0
SQLAlchemy==1.4.22
swagger-ui-py==22.7.13
text-unidecode==1.3
toml==0.10.2
tomli==1.2.0
tqdm==4.62.0
troposphere==3.1.0
urllib3==1.26.6
Werkzeug==2.2.2
wincertstore==0.2
wsgi-request-logger==0.4.6
zappa==0.55.0
zipp==3.8.1
zope.event==4.5.0
zope.interface==5.4.0

Thanks for the notification, we'll look into support.


Accomodate nbdev v1 users

[ ] make sure on nbdev website there's a very clear indicator of how to upgrade, or how to keep using the old version, including the home page.
[ ] hide_input no longer works from nbdev v1, this has been replaced with #|eval: false
[ ] Throw an error message with clear instrutions when someone tries to use nbdev v2 on a v1 project. We anticipate many people it's will upgrade to nbdev2 and use it on their nbdev1 project

cc: @jph00

Per Hamel, adding more issues attempting to convert anbdev1 project to nbdev2.

nbdev_new doesn't appear to respect the existing nbs_path and creates new notebooks in the root directory. It creates a _quarto.yml file in root and nbs_path. Unsure if both are needed.
nbdev_new doesn't convert tst_flags from nbdev1's pipe format slow|cuda to nbdev2 format slow cuda. The nbdev1 format causes broken pool errors.

Per Hamel, adding more issues attempting to convert a nbdev1 project to nbdev2.

We're not planning to support using nbdev_new to upgrade an existing project. Instead we will endeavor to improve nbdev_migrate where possible -- although it won't be entirely automatic.

Here's the basic steps I took to upgrade ghapi:
# export LIBNAME=...

git rm Makefile
nbdev_migrate_directives
nbdev_export
git add $LIBNAME/_modidx.py
rm -rf docs

shopt -s globstar

perl -pi -e 's/#\|\s*hide_input/#| echo: false/' **/*.ipynb
perl -pi -e 's/#\|\s*hide_output/#| output: false/' **/*.ipynb
perl -pi -e 's/#\|\s*skip/#| eval: false/' **/*.ipynb
perl -pi -e 's/from nbdev.export import notebook2script/from nbdev import nbdev_export/' **/*.ipynb
perl -pi -e 's/notebook2script/nbdev_export/' **/*.ipynb
perl -pi -e 's/#\|?\s*all_slow/#| nbflags skip_showdoc skip_exec/' *.ipynb

rm -f .gitconfig
rm -f .git/hooks/post-merge

cat >>.gitignore <<EOF
_docs/
sidebar.yml
EOF

# change gh pages to gh-pages branch root
# move CNAME file

# change doc_path in settings.ini
# cp styles.css

nbdev_preview


Not working

C:\Users\Administrator\Desktop\KC-Checker-1.4.0>KC-Checker.exe
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x40 pc=0x630618]
goroutine 1 [running]:
KC-Checker/helper.GetBlacklisted()
C:/Users/Administrator/Desktop/KC-Checker-1.4.0/helper/ProxyHelper.go:173 +0xb8
main.main()
C:/Users/Administrator/Desktop/KC-Checker-1.4.0/main.go:18 +0x1e

I will fix that as soon as possible. As a quick work-around you could fix it by deleting every URL in the settings file at "blacklisted".
So it should look like this:
{
"threads": 250,
"retries": 2,
"timeout": 7500,
"keep_alive": true,
"iplookup": "http://api.ipify.org/",
"judges_threads": 3,
"judges_timeout": 5000,
"judges": [
"http://pascal.hoez.free.fr/azenv.php",
"http://azenv.net",
"https://www.cooleasy.com/azenv.php"
],
"blacklisted": [
],
"bancheck": "",
"keywords": [
""
],
"privacy_mode": false,
"copyToClipboard": false,
"autoSelect": {
"http": false,
"https": false,
"socks4": false,
"socks5": false
}
}

This is now fixed with the latest update


add_utils_functions

Add a utils function to support addict can be a decorator.

Coverage decreased (-10.3%) to 89.655% when pulling c4788ebbc4a04afdc5f2138c7f4cccea56aa4b50 on loonghao:add_utils_functions into cf29d47eab24a7d935cb6841d13eac686dcd6e86 on mewwts:master.

Hi @mewwts If you have time please help check it. Thanks and Merry Christmas.

Hi @loonghao, sorry for the way too late response.
If I understand correctly, the purpose of this PR is to create a decorator that will transform the output of a function from a normal dict to an addict Dict?
What is the benefit of that compared to wrapping the function call in a call to addict.Dict like Dict(function_call())?
Thanks!

Hi @mewwts, You are right, this a decorator.
It can be very useful as a decorator. It can be converted to Dict when the function returns a value.
Can support a single dictionary or list dictionary
 @entity_addict
 def hello_entity_addict():
     return {'test_key': 'test_value'}

 entity = hello_entity_addict()
 print entity.test_key

 @entity_addict
 def hello_entity_addict():
     return [{'test_key': 'test_value'}]

 entitys = hello_entity_addict()
 for entit in entitys:
     print entity.test_key

Hey @loonghao, sorry for dropping the ball on this. I think it would be better if you created and maintained a package specifically for this decorator.

Thank you for your suggestion, closing the MR.

Thanks @loonghao, if you end up creating a package, please PR in a section in the bottom of the README where we can point to you project!


npm run build is not working

npm run build shows error with script/ build.js.

in appsettings.json edit
     "bootstrap_calendar": ......
to
    "bootstrap-calendar": "0.2.4",
use node 8

Works fine
My package.json file

We removed "bootstrap_calendar": "https://github.com/xero/bootstrap_calendar.git#1.0.1", from package.json
Consider using yarn if you face errors.
Best regards


Chan Sankaku Complex images giving an "Expired Link - Please reload the site" Image instead of original

What steps will reproduce the problem?
Load any Chan Sankaku Complex image from any search.
I am using a hash key to login with Grabber, and I am unsure if that is required to reproduce. It tests successful.
What is the expected behavior? What do you get instead?
I expect to see the image from the thumbnail. Instead I get an image with the Sankaku Complex logo that states "Expired Link - Please reload the site".
How often does this problem occur? On which sources?
This happens on every image from Chan Sankaku Complex.
What version of the program are you using? On what operating system?
Grabber 5.5.0 on Windows 10 Creator's Update.

same issue

Really hope someone finds a fix on this

Go to https://github.com/Bionus/imgbrd-grabber/issues/997#issuecomment-325124638 issue and read carefully what's written there.

I apologize. I wish I would have known about this ticket. Damn. That's unfortunate. Well, I guess it's just a waiting game then. Has anyone had success editing the limit parameter in the model.xml?

MasterPetrik: I apologize. I wish I would have known about this ticket. Damn. That's unfortunate. Well, I guess it's just a waiting game then. Has anyone had success editing the limit parameter in the model.xml?

I'll close this ticket for now, as it seems to be another blocking method from Sankaku Complex, and I'd rather have a single "main" issue about it.

I apologize. I wish I would have known about this ticket

Don't worry, it's already on the second page of the issues, so it's not obvious. Unfortunately I can't "pin" an issue in Github.


Populate a People Picker with a security group

Category
[X] Question
Please specify what version of the library you are using: [ v2.0 ]
Expected / Desired Behavior / Question
How to insert a security group for Azure in the people picker ?
Observed Behavior
I'm able to retrieve a Security group with a people picker by typing its name. But when it comes to populate a people picker with a security group, i'm unable to do it whether I try populating it with the security group name or Id.
Is there a way to programatically populate a people picker with a security group the same way we would do it with a user ?

Thanks!

@icom50 I just tested this and was able to set a security group as the default selection
My group:

PeoplePicker with default selection

Code (reused one of the test controls from the test web part in this repository):
<PeoplePicker context={this.props.context}
    titleText="People Picker (pre-set global users)"
    principalTypes={[PrincipalType.User, PrincipalType.SharePointGroup, PrincipalType.SecurityGroup, PrincipalType.DistributionList]}
    defaultSelectedUsers={["pmo"]}
    onChange={this._getPeoplePickerItems}
    personSelectionLimit={2}
    ensureUser={true} />

Can you try adding ensureUser={true} to your control?

Oh yes it was juste that, it's work now thanks a lot.


trinary exercism

Thanks @yanick!


[WIP] Limit objects returned by initial waitForUpdatesEx

The initial call to waitForUpdatesEx will return every inventory
item in one call, with very large inventories this can bump up
against the 2min HTTP timeout requiring a number of retries and
an increasing timeout.  The new WaitForUpdatesEx method allows
the caller to specify a maximum number of objects to be returned
by any one waitForUpdatesEx call, which allows us to page through
the initial inventory without needing to increase the timeout.

@miq-bot add-label wip, providers/vmware, refactoring

@roliveri can you review?

@agrare Looks good to me. Will merge once the wip flag is removed.

Thanks @roliveri, just waiting until I can run evm:start to double check with the new config stuff to take it out of WIP.

Try now, #7568 is merged.

@jrafanie I can start the server now but no additional workers (e.g.: the UiWorker and Vmware workers) seem to come up


Loc Automation - Updating ETA of loc job: 109

Loc Automation Updating ETA of loc job: 109

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

jobs/109/info.json
:white_check_mark:Succeeded

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


Add the ability to run scheduled workflow jobs on CI without requiring request

This came up when trying to migrate the Traffic Director workflow to the new CI framework: https://github.com/envoyproxy/envoy-ci-staging/blob/main/.github/workflows/mobile-traffic_director.yml
See https://github.com/envoyproxy/envoy/pull/31405 for attempts to this migration.  _mobile_ci_container.yml requires a request but the Mobile Traffic Director workflow is based on a schedule so the request section doesn't strictly apply.
Disabling the Mobile Traffic Director workflow for now since it's not really super important for the Envoy Mobile project right now, and will re-enable once this bug is resolved.

just looking at this now - its essentially the same problem that mobile-release currently has, so will try and fix this asap - that was already at top of my todos
ive added some additional code paths to accomodate this for now (in dev pr and toolshed), mostly its working altho will take a bit to clear up - once we have it working properly ill try and integrate into existing workflows/actions


Combine console.edit.focus and flow.set.options?

From an end user perspective, it is quite confusing that these two commands exist in different namespaces with slightly different choices. Put different, if I were to edit the query, but I'd only know flow.set (which doesn't support setting anything non-str), I'd assume that there is no other option.

Closing this for now. Please re-open if you have strong thoughts on this!


Fix broken test of ::load_config

Fixes the single broken test

Coverage increased (+0.4%) to 78.311% when pulling f4d68d2386f5a160c79befc87e988170381df4d8 on fix_broken_test into d5356202bd84a01c9232ae27e6dfe7d06d9e28cd on master.

Thanks!


remove :source_ref from ExDoc config option to avoid broken links to github sources

Just a small thing I noticed.
Consider removing the :source_ref configuration option from the ExDoc configuration. Right now ExDoc renders invalid urls to github. When not set, it will render links to the main branch, which works as expected (without the version in the url path).
I don't think it breaks anyhthing else.
Ignore if not appropriate.

Ah nice find, I guess I would have to use a release or something if I want it to link to versions. Thanks!


New-RunAsAccount.ps1 throws exception System.Excpetion

Between Friday 7th and Monday 11th July the below command in the New-RunAsAccount.ps1 file is throwing an Exception on execution.
New-AzureRmADApplication -DisplayName $ApplicationDisplayName -HomePage ("http://" + $applicationDisplayName) -IdentifierUris ("http://" + $KeyId) -KeyCredentials $KeyCredential
Running the above with the -debug command it appears the error coming back is:
Body:
{
  "odata.error": {
    "code": "Request_BadRequest",
    "message": {
      "lang": "en",
      "value": "Key credential end date is invalid."
    },
    "date": "2017-07-11T12:57:05",
    "requestId": "09fb8874-****-****-****00d5698e82ec",
    "values": [
      {
        "item": "PropertyName",
        "value": "None"
      },
      {
        "item": "PropertyErrorCode",
        "value": "InvalidKeyEndDate"
      }
    ]
  }
}

To repo, simply clone the repo and run .\1-DeployAndConfigureAzureResources.ps1 (presuming you already have run .\0-Setup-AdministrativeAccountAndPermission.ps1 previously. Nothing appears to have changed in the repo in this time, hence I can only presume this is something at Azure's end.

Hi Bryan @bmacm,
I just tested it and did not received any error.

New-RunAsAccount.ps1 creates a self-signed certificate, set certificate expiry (by default to 12 months) and use it to create a new AD Application. If you are running script manually then make sure you set the expiry correctly.
**"date": "2017-07-11T12:57:05",**
"requestId": "09fb8874-****-****-****00d5698e82ec",

If the above highlighted date is 'end date' then it might be possible that key credential was using same date as start and end date. Also, I see that you have mentioned - "Between Friday 7th and Monday 11th July". Does that mean you were able to run it before 7th July and after 11th July ? Are you still getting the same error ?

Hi Shabuddin thanks for getting back,
Sorry I should have been more clear. On Friday the 7th everything was working as you describe above, from Monday 11th July onward I am getting the below error.

Adding the -debug flag at the end of the New-AzureRmADApplication command on line 60 of New-RunAsAccount.ps1 gives this output from step 7
We are using the self-signed certificate method, and I have checked the generated certificate has a valid end date which seems to be correct assigned in line 54-55 of the RunAsAccount.ps1 file.
We are using powershell verions

We also updated to yesterdays Azure Modules 4.2.0 release but this does not seem to have made any difference.

Hi @ShabuddinKhan
We have found the issue, my colleague will submit a pull request shortly. The issue seems to be how the scripts are picking up the End Date of the self-signed certification on line 54 of New-RunAsAccount.Ps1 The way in which this script parses to date time via [DateTime] does not take care of localised datetime on a developers PC. Updating this to use the  Get-Date function will deal with locals.
As Friday was the 7th of July i.e 7/7/17 this was not a issue, but from Saturday the 8th the confusion between US and UK date format caused this issue (8/7/17 is not a value date time in the UK, it should be 8/7/17).
Thanks again, and awesome work on this solution - you guys are saving us weeks of scripting effort :-) This is an excellent base sample/POC project for us to start our own efforts.

Hi @bmacm
Yes, I see the difference. Good to know that you have managed to fix the issue. Do submit a pull request so we can test it at our end too.
Cheers!


fix(leadspace): in storybook adding long copy to copy knob led to button being clipped away

Related Ticket(s)
Closes # https://jsw.ibm.com/browse/ADCMS-6664
Description
Adding long text to the leadspace copy knob leads to clipping the text & CTAs.
Issue:

Fixed:

NOTE
There's an apparent bug in all heading/title knobs in all components, when you try to modify it, we get the below error.
I've been trying to debug this error, but with @m4olivei 's help, we found out it's an issue that's been sitting there for a while now, so It would just be very time consuming for the tiny fix that was the original scope of this ticket

@andy-blum This latest commit will address your last comment. Thank you!


Clarification about User model assumptions

First of all please see the discussion in #157.
Also, please consider issues and assumptions I tried to gather the following list:

Djoser assumes that the provided API should work even if User model is customised in many different ways which is still compatible with AbstractBaseUser.
Because of point 1 there should be no direct usages of User.USERNAME_FIELD. It seems to be done correctly in the current code base.
Because of point 1 there should be no direct usages of User.EMAIL_FIELD. In the current code base there are a few of them, e.g. see changes in #157 and also see here and here.
Djoser should provide some abstraction over User.REQUIRED_FIELDS. See #136 and #200.

AbstractBaseUser in Django 1.11 introduced changes making assumptions  that every User will have email field: get_email_field_name.
It indicates that developers acknowledge  wide usage of email field in user model and are incorporating it into base user model. It is quite rare case when someone tries to implement authentication using djoser and with hard requirement not to have email field.

It can be realised with get_username

Agreed.

It need further work to establish consensus and come to best solution.

Let's continue the discussion (if any) about point 4 in #136. I believe that everything else has been resolved and that this issue can be closed @haxoza?


[MRG] clean up network and drive tests

[x] remove drive_event_times() from drives.py and update tests. Edit: note that drives.py will still have _drive_cell_event_times() which now entirely replaces the legacy drive_event_times() function.
[x] set add_drives_from_params=False and define drives explicitly whenever possible in test_network.py
[x] simplify _get_prng() in drives.py

closes #394

Codecov Report

Merging #431 (c3066a4) into master (3bea651) will increase coverage by 0.21%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #431      +/-   ##
==========================================
+ Coverage   88.44%   88.66%   +0.21%
==========================================
  Files          18       18
  Lines        3246     3229      -17
==========================================
- Hits         2871     2863       -8
+ Misses        375      366       -9

Impacted Files
Coverage Δ

hnn_core/__init__.py
100.00% <ø> (ø)

hnn_core/drives.py
98.52% <ø> (+5.75%)
:arrow_up:

hnn_core/network.py
91.70% <ø> (ø)

hnn_core/parallel_backends.py
81.49% <0.00%> (-1.32%)
:arrow_down:

hnn_core/cell.py
97.38% <0.00%> (ø)

hnn_core/network_builder.py
94.31% <0.00%> (+0.07%)
:arrow_up:

hnn_core/extracellular.py
86.76% <0.00%> (+2.70%)
:arrow_up:

Continue to review full report at Codecov.

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

Ready for your review @jasmainak @ntolley! I ended up refactoring the network tests so that they're more unit-like while hopefully retaining all of the original logic. Since this is all maintenance, we probably don't need to add anything to whats_new.rst right?

I think this is ready to go @jasmainak @ntolley @chenghuzi if any of you want to take a look.

we probably don't need to add anything to whats_new.rst right?

correct, I don't think you've changing anything that is user-facing.

Just rebased to get the linkcheck to pass. Ready to mrg pending @ntolley's review.

Looks like merging @ntolley's latest PR didn't create a merge conflict... ready to go whenever you are @jasmainak @ntolley!

Thanks a ton @rythorpe !! Great stuff :partying_face:


dynamic require not supported

i am trying to use this module with react native and expo sdk
once installed the package and imported it i get an error message that dynamic require is not supported
specifically in the index.js file line 47
this.providerObj = require("./providers/"+name);
any help ?
thanks

^^^^^^^^^^^^^^^^^^^^^


Formatting, Refactoring, Proper logging, and Config file support (#8)

I initially just wanted to add the config file support but I ended changing a lot of stuff

added fix for #4

Please split the PR by function or fixes into several different PRs rather than a big one

Please split the PR by function or fixes into several different PRs rather than a big one

Done


Update to compile properly.

We (@nplatis and I) made the proposed changes for Dumpy to compile on an Arch Linux machine. Otherwise, we got the following error:
[  7%] Building CXX object CMakeFiles/Dumpy.dir/src/Utils/FileUtil.cpp.o
In file included from /home/mtsouk/code/Dumpy/src/Utils/../../include/DataStructures/TimeSeries.h:9,
                 from /home/mtsouk/code/Dumpy/src/Utils/FileUtil.cpp:6:
/home/mtsouk/code/Dumpy/src/Utils/../../include/DataStructures/../Const.h: In static member function ‘static void Const::readConfig()’:
/home/mtsouk/code/Dumpy/src/Utils/../../include/DataStructures/../Const.h:161:56: error: incomplete type ‘std::numeric_limits<unsigned int>’ used in nested name specifier
  161 |         int max_series_num = numeric_limits<unsigned>::max() / Const::tsLength;
      |                                                        ^~~
make[2]: *** [CMakeFiles/Dumpy.dir/build.make:90: CMakeFiles/Dumpy.dir/src/Utils/FileUtil.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/Dumpy.dir/all] Error 2
make: *** [Makefile:91: all] Error 2```

Thank you.

Thanks for fixing the problem.

@CaucherWang Thank you for Dumpy!


feat: url field validations added

Task: https://app.asana.com/0/1188592895233593/1199686835850180/f
Steps: Add 'URL' (case-sensitive) in options of the field you want to apply these validations
GIF:

@dti-deploy create instance


Possible bug in kernel calculation

Hi, I think there's a minor bug in kernel calculation in generate_2D_gaussian_splatting function, the line
kernel = torch.exp(z) / (2 * torch.tensor(np.pi, device=device) * torch.sqrt(torch.det(covariance)).view(batch_size, 1, 1))
The 2 * torch(np.pi) term should also be inside the torch.sqrt function  ? Since its a multivariate Gaussian.

I see i missed the rank = 2 , so i think its correct .


AAPT: error: resource style/TextAppearance.AppCompat.Notification.Title not found

Exception throws from
/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml:29
guide me to fix the issue

Hi @ravikarthi,
did you follow the guide to install chat21-android-sdk?
Please, give me more info to help you resolving your issue

Thank you @gab-95.
I have tried again it works. but  I have another issue with an attachment. its shows can not complete upload toast and throw the following exception

E/org.chat21.android.storage.StorageHandler: addOnFailureListener.onFailure: An unknown error occurred, please check the HTTP result code and inner exception for server response.

E/org.chat21.android.ui.messages.activities.MessageListActivity: uploadFile.onUploadFailed: An unknown error occurred, please check the HTTP result code and inner exception for server response.

Have you already enabled storage permission for your app on your device ?

Yes, I have enabled

Yes I have enabled
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

I have given permission to read external storage as I mentioned in the previous comment, then why it throws the exception below

E/StorageException: /storage/emulated/0/1:748979346979:android:65aa18cd22b9064e1e9b96/images/sent/1573283978749.jpg (No such file or directory)

Is there any other permission to enable?

try add this permission
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Thank you @gab-95 for your support. It works.
I have added the above permission in the manifest and as well as I have check self permission in the code itself.
 if (checkSelfPermission(android.Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {

            return ;
        }
        else
        {
            requestPermissions( new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_CODE);
        }

Exception throws from
/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml:29
guide me to fix the issue

I am also getting same issue. Can you please explain me how you did resolve this issue?
Thanks in advance.

Hi @ravikarthi,
did you follow the guide to install chat21-android-sdk?
Please, give me more info to help you resolving your issue

Task :app:processDebugResources FAILED
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/a/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml","position":{"startLine":28}}],"original":"/Users/rensekiangkasa/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml:29: AAPT: error: resource style/TextAppearance.AppCompat.Notification.Title (aka com.example.chat21:style/TextAppearance.AppCompat.Notification.Title) not found.\n    ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/a/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml","position":{"startLine":38}}],"original":"/Users/rensekiangkasa/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml:39: AAPT: error: resource style/TextAppearance.AppCompat.Notification.Time (aka com.example.chat21:style/TextAppearance.AppCompat.Notification.Time) not found.\n    ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/rensekiangkasa/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml","position":{"startLine":49}}],"original":"/Users/a/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml:50: AAPT: error: resource style/TextAppearance.AppCompat.Notification.Info (aka com.example.chat21:style/TextAppearance.AppCompat.Notification.Info) not found.\n    ","tool":"AAPT"}
Pls help fix this issue..

I think you must use the style for this. Maybe you are missing the Style
element in this.
Thanks
On Thu, Jul 2, 2020 at 3:11 PM WillyAdrianus<EMAIL_ADDRESS>wrote:

Hi @ravikarthi https://github.com/ravikarthi,
did you follow the guide to install chat21-android-sdk?
Please, give me more info to help you resolving your issue
Task :app:processDebugResources FAILED
AGPBI: {"kind":"error","text":"Android resource linking
failed","sources":[{"file":"/Users/a/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml","position":{"startLine":28}}],"original":"/Users/rensekiangkasa/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml:29:
AAPT: error: resource style/TextAppearance.AppCompat.Notification.Title
(aka com.example.chat21:style/TextAppearance.AppCompat.Notification.Title)
not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking
failed","sources":[{"file":"/Users/a/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml","position":{"startLine":38}}],"original":"/Users/rensekiangkasa/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml:39:
AAPT: error: resource style/TextAppearance.AppCompat.Notification.Time (aka
com.example.chat21:style/TextAppearance.AppCompat.Notification.Time) not
found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking
failed","sources":[{"file":"/Users/rensekiangkasa/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml","position":{"startLine":49}}],"original":"/Users/a/.gradle/caches/transforms-2/files-2.1/c882fc70aaf140f2e791d1e42a68a62e/jetified-chat21-1.0.15/res/layout/layout_custom_notification.xml:50:
AAPT: error: resource style/TextAppearance.AppCompat.Notification.Info
(aka com.example.chat21:style/TextAppearance.AppCompat.Notification.Info)
not found.\n ","tool":"AAPT"}
Pls help fix this issue..
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/chat21/chat21-android-sdk/issues/37#issuecomment-652903973,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEJNIAR7X4OMKCUZSZWTXPDRZRI5VANCNFSM4JJQXAGA
.

--
Vikas Jain
Mobile Application Developer
404-408, Akshar Stadia, Behind Gurudwara, Bodakdev, Ahemdabad - 380054,
Gujarat, India
Email<EMAIL_ADDRESS>Skype: vikas.jain-plutus
www.plutustec.com

Android resource linking failed
C:\Users\lenevo.gradle\caches\transforms-2\files-2.1\e72831bcfb4d3941f960da6f3132f312\jetified-chat21-1.0.10\res\layout\layout_custom_notification.xml:29: AAPT: error: resource style/TextAppearance.AppCompat.Notification.Title not found.
C:\Users\lenevo.gradle\caches\transforms-2\files-2.1\e72831bcfb4d3941f960da6f3132f312\jetified-chat21-1.0.10\res\layout\layout_custom_notification.xml:39: AAPT: error: resource style/TextAppearance.AppCompat.Notification.Time  not found.
C:\Users\lenevo.gradle\caches\transforms-2\files-2.1\e72831bcfb4d3941f960da6f3132f312\jetified-chat21-1.0.10\res\layout\layout_custom_notification.xml:50: AAPT: error: resource style/TextAppearance.AppCompat.Notification.Info  not found.
I am stuck! Anyone resolved above issue pls provide support.

You must create a new style with the same name. So your code will be free
from errors.
On Thu, Jul 2, 2020 at 4:30 PM HARSH PRASAD<EMAIL_ADDRESS>wrote:

Android resource linking failed
C:\Users\lenevo.gradle\caches\transforms-2\files-2.1\e72831bcfb4d3941f960da6f3132f312\jetified-chat21-1.0.10\res\layout\layout_custom_notification.xml:29:
AAPT: error: resource style/TextAppearance.AppCompat.Notification.Title
not found.
C:\Users\lenevo.gradle\caches\transforms-2\files-2.1\e72831bcfb4d3941f960da6f3132f312\jetified-chat21-1.0.10\res\layout\layout_custom_notification.xml:39:
AAPT: error: resource style/TextAppearance.AppCompat.Notification.Time
not found.
C:\Users\lenevo.gradle\caches\transforms-2\files-2.1\e72831bcfb4d3941f960da6f3132f312\jetified-chat21-1.0.10\res\layout\layout_custom_notification.xml:50:
AAPT: error: resource style/TextAppearance.AppCompat.Notification.Info
http://TextAppearance.AppCompat.Notification.Info not found.
I am stuck! Anyone resolved above issue pls provide support.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/chat21/chat21-android-sdk/issues/37#issuecomment-652938898,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEJNIATFS33JV3NZM56H5D3RZRSD5ANCNFSM4JJQXAGA
.

--
Vikas Jain
Mobile Application Developer
404-408, Akshar Stadia, Behind Gurudwara, Bodakdev, Ahemdabad - 380054,
Gujarat, India
Email<EMAIL_ADDRESS>Skype: vikas.jain-plutus
www.plutustec.com

Thank you @gab-95.
I have solved this issue. but I have another issue with an attachment. its shows can not complete upload toast and throw the following exception

E/org.chat21.android.storage.StorageHandler: addOnFailureListener.onFailure: An unknown error occurred, please check the HTTP result code and inner exception for server response.

E/org.chat21.android.ui.messages.activities.MessageListActivity: uploadFile.onUploadFailed: An unknown error occurred, please check the HTTP result code and inner exception for server response.

How did you resolve the first issue?

Can you open another issue describing you problem?

Can you open another issue describing you problem?

Thank you, I just did.


Kubenet vs Azure CNI and maxium number of nodes

I think this document should be updated to reflect the Azure CNI / Kubenet
Maximum nodes per cluster with Virtual Machine Scale Sets and Standard Load Balancer SKU
With Kubenet = 400 nodes / AKS cluster
With Azure CNI = 1000 nodes / AKS cluster

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

ID: 18e73ba6-a06d-9bc4-fef6-6ece8a166e84
Version Independent ID: a9efcfab-f4c5-969b-4cd4-aa86ebd80534
Content: Limits for resources, SKUs, regions - Azure Kubernetes Service
Content Source: articles/aks/quotas-skus-regions.md
Service: container-service
GitHub Login: @mlearned
Microsoft Alias: mlearned

Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

Thank you @sowsan for the feedback.
The article has been updated to incorporate your feedback.
#please-close


Make syntastic run for only certain filetypes

I apologize if this is in the documentation and I overlooked this, but is there a way to make Syntastic run ONLY on filetypes that I specify? I searched the documentation but I could not find this.
If someone can help me with this, I would love to put this back into the documentation so that other users can find this more easily.

Please see :h 'syntastic_mode_map' and :h :SyntasticToggleMode.