BUG-ID: CLOUDSTACK-8849: Usage job should stop usage generation in ca…

…se of any exception

Hi @yvsubhash, could you make a Jira?
Sorry to ask you, but, why did you remove the tries and catches? It should throw exceptions if that part of the code can be executed, should it not? How did you test it?

@yvsubhash please rebase against latest master and push -f, update on status of your PR
We'll need more information on why we should ignore/stop usage generation, in case we don't handle exception this will not generate usage for other kinds of resources

ACS CI BVT Run
Sumarry:
Build Number 123
Hypervisor xenserver
NetworkType Advanced
Passed=73
Failed=0
Skipped=3
Link to logs Folder (search by build_no): https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
Failed tests:
Skipped tests:
test_vm_nic_adapter_vmxnet3
test_static_role_account_acls
test_deploy_vgpu_enabled_vm
Passed test suits:
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_vpc_vpn.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_service_offerings.py
test_routers_iptables_default_policy.py
test_routers.py
test_reset_vm_on_reboot.py
test_snapshots.py
test_deploy_vms_with_varied_deploymentplanners.py
test_login.py
test_list_ids_parameter.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_regions.py
test_affinity_groups.py
test_network_acl.py
test_pvlan.py
test_volumes.py
test_nic.py
test_deploy_vm_root_resize.py
test_resource_detail.py
test_secondary_storage.py
test_vm_life_cycle.py
test_disk_offerings.py

ACS CI BVT Run
Sumarry:
Build Number 176
Hypervisor xenserver
NetworkType Advanced
Passed=73
Failed=0
Skipped=3
Link to logs Folder (search by build_no): https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
Failed tests:
Skipped tests:
test_vm_nic_adapter_vmxnet3
test_static_role_account_acls
test_deploy_vgpu_enabled_vm
Passed test suits:
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_vpc_vpn.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_service_offerings.py
test_routers_iptables_default_policy.py
test_routers.py
test_reset_vm_on_reboot.py
test_snapshots.py
test_deploy_vms_with_varied_deploymentplanners.py
test_login.py
test_list_ids_parameter.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_regions.py
test_affinity_groups.py
test_network_acl.py
test_pvlan.py
test_volumes.py
test_nic.py
test_deploy_vm_root_resize.py
test_resource_detail.py
test_secondary_storage.py
test_vm_life_cycle.py
test_disk_offerings.py

@rodrigo93
Exception in this part of code should stop further usage generation. Catching it here is suppressing the exception. The fix is tested manually by simulating the scenario
@rhtyd
it is rebased to 4.8

@yvsubhash  Sorry, I disagree with you. The usage server should not stop even an exception is raised.

@ustcweizhou  In case we continue with usage generation, we may miss out some of the records which actually resulted in exception and would in turn lead to wrong usage numbers. stopping after the exception can help in running the usage server once the errors are fixed can result in proper usage generation. May I know the reason for you to think usage generation should not be stopped

@yvsubhash yes, we will miss some records if we skip the exception, but we will miss all others records if we stop the usage server. For me, it is important that usage server will still be running in case of exception.

@ustcweizhou By stopping the usage server, we can fix the records and continue in the next run. If we simply skip we wont come to know abt the records with errors.

@ustcweizhou Do you still have some queries on it?

@yvsubhash Sorry I still disagree with it.

Closing this PR


Demo should be updated to show how to add a label (v1.x)

None of the labels are showing up on the demo page (https://next.mui.wertarbyte.com/#material-ui-password-field) and I can't get them to work with my own attempts either. The demo code has the label prop as "floatingLabelText" which is invalid in MUI 1.x as the new prop is just "label" - neither of these work on the component as is.

There is no label in the Input component, and the password component behaves just like Material-UI's Input component. You can add a label by using a FormControl as shown here.

My confusion stemmed from the fact that the docs state "In addition to the props documented above, the password field supports all props that Material-UI's TextField supports" - the TextField component does support a "label" prop.

@tonymckendry It should be "also supports all props that Material-UI's Input component supports" now, I didn't update it when this was ported for v1.0. Would you like to submit a PR that fixes this? :+1:

PR Submitted! Happy to help.


Manual termination triggerable from outside a running chat

What feature would you like to be added?
A ManualTermination class that can be controlled and triggered from outside a running chat/team.
# custom termination condition, that allows for external manual termination
class ManualTermination(TerminationCondition):
    def __init__(self):
        self._terminated = False
        self.manual_termination_flag = False

    @property
    def terminated(self) -> bool:
        return self._terminated

    async def __call__(self, messages: Sequence[AgentMessage]) -> StopMessage | None:
        if self._terminated:
            raise TerminatedException("Termination condition has already been reached")
        if self.manual_termination_flag:
            self._terminated = True
            return StopMessage(content="Manual termination", source="ManualTermination")
        return None

    async def reset(self) -> None:
        self._terminated = False
        self.manual_termination_flag = False

    def set_manual_termination(self) -> None:
        self.manual_termination_flag = True

Why is this needed?
This is useful for me when implementing an async override termination that can be applied in a different thread for serving chatting backend applications (e.g., in FastAPI).
Hypothetical Usage:
class AgentGroupChat:
    def __init__(self, agents: List[AssistantAgent], termination_condition: TerminationCondition):
        self.agents = agents
        self.termination_flipper = ManualTermination()
        self.termination_condition = termination_condition | self.termination_flipper
        self.team = RoundRobinGroupChat(agents, termination_condition=self.termination_condition)

    async def run_stream(self, task: str):
        stream = self.team.run_stream(task=task)
        messages = []
        async for message in stream:
            messages.append(message)
            print(message)
        return messages

    def set_manual_termination(self) -> None:
        self.termination_flipper.set_manual_termination()

@baseRouter.get("/chat/testing/run_stream")
async def run_stream(request: Request):
    task = "Tell me a one-liner joke."
    agents = [
        create_agent("assistant1", "You are a helpful assistant."),
        create_agent("assistant2", "You are a helpful assistant.")
    ]

    termination_condition = MaxMessageTermination(10) | TextMentionTermination("TERMINATE")
    agent_group_chat = AgentGroupChat(agents, termination_condition)
    # save the agent_group_chat object to the session data
    set_agent_group_chat(get_session_id(request), agent_group_chat)

    res = await agent_group_chat.run_stream(task)
    return {"messages": res}

@baseRouter.get("/chat/testing/send_manual_termination")
async def send_manual_termination(request: Request):
    agent_group_chat = await get_session_agent_group_chat(request)
    if not agent_group_chat:
        raise HTTPException(status_code=404, detail="Agent group chat not found")
    agent_group_chat.set_manual_termination()
    return {"message": "Manual termination sent"}

Good ideas @yiren-liu.
There are two ways to explore the idea of externally terminating an agent run.
The first is a Manual termination message which you reference above, and the second one is the use of a cancellation token
Manual or Externa Termination
@ekzhu and I have chatted about this. There is a PR that was just merged today that adds ExternalTermination.
Let us know if it fits your use case.
Cancellation token
You can create a cancellation_token and pass it to your team.run() method.
from autogen_core.base import CancellationToken

cancellation_token = CancellationToken()
stream = self.team.run_stream(task=task, cancellation_token=cancellation_token)

.....

@baseRouter.get("/chat/testing/send_manual_termination")
async def send_manual_termination(request: Request):
    agent_group_chat = await get_session_agent_group_chat(request)
    if not agent_group_chat:
        raise HTTPException(status_code=404, detail="Agent group chat not found")
    cancellation_token.cancel()

Thanks a lot! This is exactly what I needed, thank you folks!

Excellent!
P.S AutoGen studio update uses the cancellation token to stop runs mid-flight.
https://github.com/user-attachments/assets/dc2b84b0-6302-4f07-b790-e264576bfb1a


Phoenix 1.4 support?

This library sounds like exactly what I'm looking for, but I'm having a bit of trouble getting the setup instructions to work with a new Phoenix 1.4 project. I had a few compile-time errors like this:
== Compilation error in file lib/elm_phx_web/controllers/veil/session_controller.ex == ** (CompileError) lib/elm_phx_web/controllers/veil/session_controller.ex:20: undefined function page_path/2
and
== Compilation error in file lib/[project_name]_web/controllers/veil/session_controller.ex == ** (CompileError) lib/[project_name]_web/controllers/veil/session_controller.ex:39: undefined function user_path/2
Which I think are down to the changes in the routing in 1.4. I managed to fix them by adding the appropriate aliases, but when I boot up mix phx.server, the page at localhost:4000 doesn't seem to show the sign-in link in the top right mentioned in the readme.
I'm also getting a couple of Dialyzer warnings in lib/[project_name]_web/templates/veil/user/form.html.eex:
Function 'form.html'/1 has no local return
and
The call 'Elixir.Phoenix.HTML.Form':form_for(any(),any(),fun((_) -> {'safe',[any(),...]})) will never return since it differs in the 3rd argument from the success typing arguments: any(),any(),maybe_improper_list())
Which I guess may be related to this issue, but are beyond me to work out at the moment.

Thank you - it works nicely now! Sorry it took me so long to confirm - I moved on to other projects and have only just got back to this.


community: Add Cohere Tools Agent

Description: Add Cohere tools agent in order to use tools with cohere and example notebook. Also improves the cohere chat model to support the tools parameters.

Messaged in slack. Let's do this in the new partner package instead of community!

New PR with tools agent in the partner package: https://github.com/langchain-ai/langchain/pull/19555


Using mPCIe TPU in qemu VM

I'm trying to use the mPCIe EdgeTPU, which works perfectly fine in the host system, in a qemu VM and I'm unable to get any of the examples working.
Host System: Ubuntu 20.04
Guest System: Fedora 33 with Python 3.8
I have installed the necessary drivers and tools (edgetpu) after some trial and error, setup the PCI passthrough from Host to Guest system and the Edge TPU device is listed in the Guest system as expected (/dev/apex_0 exists and Coral Edge TPU is listed in lspci call).
But when I'm trying to start one of the examples, I get the following error message:
RuntimeError: Error in device opening (/dev/apex_0)!
and dmesg lists the following errors:
RAM did not enable within timeout (12000 ms)
Error in device open cb: -110

Any help would be appreciated.

@Faoran I can't say for certain since I've never used qemu, however, for most VMs, you'll need to set up passthrough for pcie devices. For instance, with docker, you need something like this (--device /dev/apex_0:/dev/apex_0:
docker run -it --device /dev/apex_0:/dev/apex_0 coral /bin/bash

Here is a reference for qemu: https://unix.stackexchange.com/a/96613

That's exactly how I set up the pcie passthrough (except I've bound the host device to vfio-pci, which is the modern version of pci-stub) and it sadly is not working.
I've already successfully used the passthrough to a docker container, so for me it seems strange that it won't work for qemu.


Failing travis build

@AndreasMadsen out build is failing all of a sudden... do you know if something broke from under us?

Looks like the travis have cleared the sauce lab token, or many zuul have changed the required token name. It should be easily fixed by using following the link.

fixed. As suspected someting was wrong with the travis env.

Thanks!


WIP: Petstore Demo for Finatra

Added modules from the finch project. Currently working on creating "endpoints" / the controller.

:smile: look forward to this :)


Executing docker command

The command I want to run within dsub is a docker command. However, in the default image where the command is executed, docker is not installed. Do you have any tips for running docker within dsub? I have run into trouble running docker within a custom image.
Thanks!

The Google Pipelines API does not support docker-in-docker.
What is the use case you are trying to achieve?

Thank you for your quick response.
I am working on an extensive biomarking project. We have thousands of
independent tasks that we are wanting to execute at scale on the Google
Compute Engine. Each of those tasks need to be executed in a docker
container. We would like to use preemptible nodes if at all possible - I
noted dsub supported this. We originally tried to use the ISB-CGC-pipeline
but they recommended that dsub might prove easier.
Do you have any alternative recommendations?
Thanks so much!
--
Nathan
On Wed, May 31, 2017 at 10:34 AM, mbookman<EMAIL_ADDRESS>wrote:

The Google Pipelines API does not support docker-in-docker.
What is the use case you are trying to achieve?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/googlegenomics/dsub/issues/33#issuecomment-305243667,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbwJHY6hpoV8EGT1-TzFtOoDMJD5EJ2Eks5r_ZaLgaJpZM4Nrwf2
.

I see that I misunderstood your original question:

The command I want to run within dsub is a docker command. However, in the default image where the command is executed, docker is not installed.

dsub with the Pipelines API is intended for scaling up running commands that are packaged in Docker images. Take a look at the examples, which currently include demonstrations of running commands in the default ubuntu image, your own custom scripts, and commands in a custom public image.
Also take a look at the documentation, including the Scripts, Commands, and Docker which provide alternatives for how to package and stage your code.

Great. Thank you for the pointers.
--
Nathan
On Wed, May 31, 2017 at 3:18 PM, mbookman<EMAIL_ADDRESS>wrote:

I see that I misunderstood your original question:
The command I want to run within dsub is a docker command. However, in the
default image where the command is executed, docker is not installed.
dsub with the Pipelines API is intended for scaling up running commands
that are packaged in Docker images. Take a look at the examples
https://github.com/googlegenomics/dsub/tree/master/examples, which
currently include demonstrations of running commands in the default ubuntu
image, your own custom scripts, and commands in a custom public image.
Also take a look at the documentation, including the Scripts, Commands,
and Docker
https://github.com/googlegenomics/dsub/blob/master/docs/code.md which
provide alternatives for how to package and stage your code.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/googlegenomics/dsub/issues/33#issuecomment-305320521,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbwJHez37K1AIq4ox1AuCUV87LLAuacQks5r_dkcgaJpZM4Nrwf2
.


Add async support to routing chains

Add async support for (LLM) routing chains

Add asynchronous LLM calls support for the routing chains. More specifically:

Add async aroute function (i.e. async version of route) to the RouterChain which calls the routing LLM asynchronously
Implement the async _acall for the LLMRouterChain
Implement the async _acall function for MultiRouteChain which first calls asynchronously the routing chain with its new aroute function, and then calls asynchronously the relevant destination chain.

Who can review?

@agola11

@hwchase17 Needs new workflow approval because I had to fix some typing issue. Sry about that.


"Unexpected request: GET .../.html" on Karma tests

When trying to integrate tests into my project, an error in which the views (.html files) are requested happens when I call $httpBackend.flush() in each test. Something likes this:
Error: Unexpected request: GET public/modules/landing/views/landing-consumers.client.view.html
    No more request expected

This issue has been discussed within the UI-router group (see https://github.com/angular-ui/ui-router/issues/212). Did any of you had this and managed to solve?

Dear Potstickers ,
I Have tried same  ode whatever u have mentioned in Karma Configuration file but i am not using any routing in my project .It is Showing an error Like this.Can You Help me in this

Hi,
I am using $routeProvider and i have started facing same issue from 10 days back. same test cases were working before approx 10 days, but when i did fresh installation of all dependencies mentioned in package.json. my all test cases started failing which are dependent on $http service call and also which are based on $watch (basically where $apply() is called manually).
I am getting basically these two types of error -

Error: Unexpected request: GET templates/home.html No more request expected
Error: Unexpected request: GET API_URL No more request expected

It seems that few wrong commits has been made recently on KARMA/JASMINE, which are causing these issues, as mine old code base is working fine, only after installing fresh dependencies these test cases are failing now.
I am using below dependencies -
"devDependencies": {
"angular": "^1.6.5",
"angular-mocks": "^1.6.5",
"angular-route": "^1.6.5",
"browserify-istanbul": "^2.0.0",
"grunt": "^1.0.1",
"grunt-browserify": "^5.0.0",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-karma": "^2.0.0",
"istanbul": "^0.4.5",
"jasmine-core": "^2.6.4",
"karma": "^1.7.0",
"karma-bro": "^0.11.1",
"karma-browserify": "^5.1.1",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.1.0",
"karma-phantomjs-launcher": "^1.0.4"
}
Please help me out.
Thanks!


[meta] It's 2022 now

Maybe it is a good idea to add Robin Kertels to the list of copyrights?

*2023


build(typescript): upgrade compiler to v5.5.x

Brings in size and performance improvements.
Also adds support for some new features such as Ecmascript setters

https://www.infoworld.com/article/3715246/typescript-adds-support-for-ecmascripts-set-methods.html
Fixes #3326
Signed-off-by: Peter Somogyvari<EMAIL_ADDRESS>Pull Request Requirements

[x] Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
[x] Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
[x] Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

[x] Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
[x] Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

Hi @petermetz some CI jobs are failing. I think its because of some other dependencies that have peer dependency typescript, can you upgrade that too? Like one of them is typedoc

Hi @petermetz some CI jobs are failing. I think its because of some other dependencies that have peer dependency typescript, can you upgrade that too? Like one of them is typedoc to 0.26.1

@sandeepnRES Oops, thank you for the tip, I'm working on the fix!

@sandeepnRES I pushed the fixes, jobs are passing now!


Security Fixes JIRA issues 55, 71, and 72

This branch builds off of earlier work by virtualdogbert to correct the CSRF issues and a couple of other outstanding security bugs in the plugin:

CSRF: https://jira.grails.org/browse/GPSPRINGSECURITYUI-55
Password reset locked account bypass: https://jira.grails.org/browse/GPSPRINGSECURITYUI-71
A few XSS vulnerabilities: https://jira.grails.org/browse/GPSPRINGSECURITYUI-72

It looks like the build timed out while downloading the Grails wrapper or something.

I finally got around to configuring Travis CI and reran the build there. It was successful:
https://travis-ci.org/jgibson/grails-spring-security-ui/builds/171548903
I'm guessing that it just failed the first time because of a network hiccup or something.

Closed this PR because the issues have been resolved as part of:
Issue #9: https://github.com/grails-plugins/grails-spring-security-ui/issues/9
PR
PR #82: https://github.com/grails-plugins/grails-spring-security-ui/pull/82


Voice Conversion Coming!

Without Any Retrain! Plz ref. https://github.com/huangxu1991/GPT-SoVITS-VC.
All stay the same except python vc_webui.py
Edited:
Chinese demos: https://github.com/huangxu1991/GPT-SoVITS-VC
English demos: https://github.com/huangxu1991/GPT-SoVITS-VC/blob/main/docs/en/README.md

声音转换/变声/VC 来了，请先按照源项目配置完环境，然后执行 python vc_webui.py。
UI 上传这些：

你想要的目标音色
你想要转换的源音频
源音频对应文本
文本对应语言

一键合成即可。

emmmmm...非常有创意的工作...

emmmmm...非常有创意的工作...

😜

interesting!

Thanks for your amazing work, @huangxu1991  ! I've tested it, and it functions superbly. However, I face an issue – I prefer processing audio directly without adding corresponding text as it results in some word misspelling. Any suggestions on how to address this? Appreciate your assistance in advance!

Thanks for your amazing work, @huangxu1991 ! I've tested it, and it functions superbly. However, I face an issue – I prefer processing audio directly without adding corresponding text, but this will result in some word misspelling. Any suggestions on how to address this? Appreciate your assistance in advance!

Good question!
It happens because semantic ids extracted from RVQ lose text infomation more or less! So explictly providing parallel TEXT as info supplements!

Hi everyone, Chinese & English demos are now available!
Chinese demos: https://github.com/huangxu1991/GPT-SoVITS-VC
English demos: https://github.com/huangxu1991/GPT-SoVITS-VC/blob/main/docs/en/README.md

interesting

无需任何重新训练！请参考。https://github.com/huangxu1991/GPT-SoVITS-VC。 一切都保持不变，除了python vc_webui.py
编辑： 中文演示： https: //github.com/huangxu1991/GPT-SoVITS-VC 英文演示：https://github.com/huangxu1991/GPT-SoVITS-VC/blob/main/docs/en/README.md

为什么我的无法运行呢，我用的是整合包GPT-SoVITS-beta0217下载好您的整合包之后点击python vc_webui.py弹出命令窗口然后立马关闭

消耗任何重新训练！请参考。https://github.com/huangxu1991/GPT-SoVITS-VC。一切都保持不变，除了python vc_webui.py
编辑： 中文演示： https://github.com/huangxu1991/GPT-SoVITS-VC中文演示：https://github.com/huangxu1991/GPT-SoVITS-VC/blob/main/docs/en/README.md

我的无法运行呢，我用的是集成包GPT-SoVITS-beta0217下载好您的集成包之后点击为什么python vc_webui.py弹出命令窗口然后立马关闭

https://github.com/RVC-Boss/GPT-SoVITS/assets/152373957/485c88cf-9ea6-462e-9c20-2ac98094948a
这是运行情况

消耗任何重新训练！请参考。https://github.com/huangxu1991/GPT-SoVITS-VC。一切都保持不变，除了python vc_webui.py
编辑： 中文演示： [https://github.com/huangxu1991/GPT-SoVITS-VC中文演示：https://github.com/huangxu1991/GPT-SoVITS-VC/blob/main/docs/en/README.md](https://github.com/huangxu1991/GPT-SoVITS-VC[中文](https://github.com/huangxu1991/GPT-SoVITS-VC)演示：https://github.com/huangxu1991/GPT-SoVITS-VC/blob/main/docs/en/README.md)

我的无法运行呢，我用的是集成包GPT-SoVITS-beta0217下载好您的集成包之后点击为什么python vc_webui.py弹出命令窗口然后立马关闭

https://github.com/RVC-Boss/GPT-SoVITS/assets/152373957/485c88cf-9ea6-462e-9c20-2ac98094948a 这是运行情况

双击 go-webui.bat 试试呢

大佬，能否在readme.md里面添加一下如何在colab里面使用您的变声功能呢？

可以参考 https://github.com/huangxu1991/GPT-SoVITS-VC 移植到 colab 试试，也欢迎 commit！

Thanks for your VC project!
It's always on processing status when I try it by my own model, and there is no any log output in terminal, and it works when I use the python webui.py. I don't know why it not work. Thanks in advance for your help!
exec env: MacBook Pro, M1 Pro, 16 GB, macOS 14.4.1, Python 3.9.18

I think you need first locate which line the script got stuck

Thanks for your VC project!
It's always on processing status when I try it by my own model, and there is no any log output in terminal, and it works when I use the python webui.py. I don't know why it not work. Thanks in advance for your help! @huangxu1991
Exec Env: MacBook Pro, M1 Pro, 16 GB, macOS 14.4.1, Python 3.9.18

I solved it finally. It works when I turn off the System Network Proxy. 🤷♂

我看作者最近一段时间修复了不少问题，要不大佬你也更新一下代码？😜

Great addition @huangxu1991. I tested it and for simple short audio clip it works great. There's some issue when there's non-speech in between and it messed up the time synchronization of text and audio. Without time stamp, it's not very robust. Is it possible to use subtitle file to guide the inference so any non-speech is not going to desynchronize the later part of the audio clip?

佬你好，运行的时候报错

佬你好，运行的时候报错

多启动几次就成功了，但是上传参考音频明明在3-10s内，但一直报错提示参考音频在3~10秒范围外，请更换！意思是需要被换的音频也必须3-10s吗？

单通道，采样率记得是32khz，测下看看，不行就换16khz，总之是固定的采样率

我看作者最近一段时间修复了不少问题，要不大佬你也更新一下代码？😜

等有时间的吧。。。

Thanks a lot @huangxu1991 , your codes indeed work well!
But I'm little confused about the principle. GPT-SoVITS actually uses an AR model to predict semantic ids. Then the semantic ids are decoded with the RVQ codebook.
In your implementation (similar to SynthesizerTrn.infer()) continuous cnhubert features are directly quantized with RVQ. I believe this means that the RVQ codebook is aligned with cnhubert, in other word GPT predicts cnhubert ids. But I couldn't find related codes initializing SynthesizerTrn.quantizer with cnhubert (maybe with k-means, etc). Did I miss something?


ELF loader audit

Fixes #126. See individual commits for details.
@djwillia Please review.

Hi Mato, there's still a problem. 2**64 is still overflowing: max_value(uint64_t) is 0xffffffffffffffff and not 0x1000000000000), so even if align is a power of two, we will overflow. For example, if align=4096 and paddr+memsz=0xffffffffffffffff-100, then result will be 0.

int main()
{
        unsigned long long align = 4096;
        unsigned long long result = 0xffffffffffffffff - 100;
        printf("%llx\n", (result + (align - 1)) & -align);
}

===> outputs 0

(copying comments from Slack, for the record)
I realise the (x + (a -1 )) & -a) computation can overflow, however if it overflows into anything _dangerous_ it'll get caught by the check here: https://github.com/Solo5/solo5/blob/master/ukvm/ukvm-core.c#L260.
If the final value of _end is bogus but not dangerous, we don't care (garbage in, garbage out!).

(After further discussion.) There is still an edge case here. The guest could potentially supply a value of align that would overflow in such a way that (for example) _end == paddr rendering the following call to mprotect() useless. So the code really needs to use add_overflow() for the alignment computation as well.

Reopened #126 so that I don't forget to address this last point.

@ricarkol Addressed in #129, take a look.


Add /eth/syncing/l2 in dtl

/eth/syncing returns the syncing status, but the design for this allows the replica to sync up before dtl loads all l2 data. Therefore, the syncing always returns false for l2geth.
This PR introduces the new api endpoint /eth/syncing/l2. This returns the actual syncing status, so we can query the actual highest l2 block that needs to be synced and current transaction index that dtl has synced.

Great stuff! Does this go into boba develop too?

Great stuff! Does this go into boba develop too?

Great stuff! Does this go into boba develop too?

Yep!


[Bug] OHIF does not use /rendered enpoint for video in an Orthanc Dicom Server

Describe the Bug
Video reading in OHIF doesn't work if stored in an Orthanc server,
There is a difference in the /metadata API of OHIF dicom server and Orthanc
OHIF server answer is :
         "7FE00010": {             "vr": "OB",             "BulkDataURI": "series/2.25.15054212212536476297201250326674987992/instances/2.25.179478223177027022014772769075050874231/pixeldata.mp4?length=47363258&offset=0"         },
while orthanc is :
  	"7FE00010" :  	{ 		"BulkDataURI" : "https://v2-test.gaelo.fr/dicom-web/studies/1.2.276.0.7230<IP_ADDRESS>.1667589682.1.1719172138.291254/series/1.2.276.0.7230<IP_ADDRESS>.1667589682.1.1719172138.291255/instances/1.2.276.0.7230<IP_ADDRESS>.1667589682.1.1719172138.291256/bulk/7fe00010", 		"vr" : "OB" 	}
OHIF seems to not detect that the content is a video and continue to call /frame/{number} API which are obviously failing, while it should call the rendered api
I don't know if this problem is related to Orthanc which might no follow a standard or if OHIF should have more flexibility ?
Steps to Reproduce

Try to open a video dicom stored in Orthanc

The current behavior
Black viewport
The expected behavior
Video shall be opened in a video reader
OS
Linux
Node version
20
Browser
Chrome latest

nevermind problem seems related to my dicom


DropdownMenuItem does not support use GlobalKey

I'm getting exceptions when using widgets that contain GlobalKeys inside of some widgets, in particular DropdownButton. Am I using it wrong? Based on what I have found on the web, this appears to be the way its supposed to be used.
Here's a simple repro:

code sample
import 'package:flutter/material.dart';

void main() => runApp(GlobalKeyTestApp());

class GlobalKeyTestApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      routes: {
        '/': (context) => TestWidget(),
      },
    );
  }
}

class TestWidget extends StatefulWidget {
  @override
  TestWidgetState createState() => TestWidgetState();
}

class TestWidgetState extends State<TestWidget> {
  List<DropdownMenuItem> items = List<DropdownMenuItem>();

  @override
  Widget build(BuildContext contets) {
    if (items.length == 0) {
      print("BUILD ITEMS (this only happens once)");

      int i = 0;
      while (i < 3) {
        items.add(
          DropdownMenuItem(
            child: KeyedSubtree(
              key: GlobalKey(debugLabel: "item" + i.toString()),
              child:
                Container(
                  child: Text("item " + i.toString())
                ),
              ),
            value: i
          )
        );
        i = i + 1;
      }
    }

    return Scaffold(body:
      DropdownButton(
        hint: Text("hint"),
        items: items,
        onChanged: (value) {
          print("SET TO " + value.toString());
        }
      )
    );
  }
}

Steps to Reproduce
Run the app and click the dropdown. You'll see an exception thrown internally.
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
Duplicate GlobalKeys detected in widget tree.
The following GlobalKeys were specified multiple times in the widget tree. This will lead to parts
of the widget tree being truncated unexpectedly, because the second time a key is seen, the previous
instance is moved to the new location. The keys were:
- [GlobalKey#ceb94 item0]
  [GlobalKey#599b0 item1]
  [GlobalKey#d040d item2]

Expected results:
It not throwing exceptions.
Actual results:
It throws exceptions.

Here's the result of flutter run --verbose
[✓] Flutter (Channel stable, 2.0.4, on Microsoft Windows [Version 10.0.19042.870], locale en-US)
    • Flutter version 2.0.4 at C:\Users\Taha\Code\flutter_stable
    • Framework revision b1395592de (11 days ago), 2021-04-01 14:25:01 -0700
    • Engine revision 2dce47073a
    • Dart version 2.12.2

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.2)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31112.23
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 4.1.0)
    • Android Studio at C:\Users\Taha\Code\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
    • Flutter plugin version 55.0.5
    • Dart plugin version 211.6693.108

[✓] VS Code (version 1.55.1)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[✓] Connected device (4 available)
    • RMX2001 (mobile)  • EUYTFEUSQSRGDA6D • android-arm64  • Android 10 (API 29)
    • Windows (desktop) • windows          • windows-x64    • Microsoft Windows [Version 10.0.19042.870]
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 89.0.4389.114
    • Edge (web)        • edge             • web-javascript • Microsoft Edge 89.0.774.68

! Doctor found issues in 1 category.

(.venv) braxton@pop-os:~/code/flutter_app/bug$ flutter run --verbose
[  +39 ms] executing: uname -m
[  +19 ms] Exit code 0 from: uname -m
[        ] x86_64
[   +7 ms] executing: [/home/braxton/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +3 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 8264cb3e8a797eef39cbcd32bb56fd07790efb7f
[        ] executing: [/home/braxton/snap/flutter/common/flutter/] git tag --points-at 8264cb3e8a797eef39cbcd32bb56fd07790efb7f
[   +6 ms] Exit code 0 from: git tag --points-at 8264cb3e8a797eef39cbcd32bb56fd07790efb7f
[        ] 2.1.0-12.1.pre
[  +23 ms] executing: [/home/braxton/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/dev
[        ] executing: [/home/braxton/snap/flutter/common/flutter/] git ls-remote --get-url origin
[   +2 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +18 ms] Unable to locate an Android SDK.
[   +2 ms] executing: [/home/braxton/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[   +2 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] dev
[  +31 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +40 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +36 ms] Multiple devices found:
[  +32 ms] Linux (desktop) • linux  • linux-x64      • Linux
[        ] Chrome (web)    • chrome • web-javascript • Google Chrome 89.0.4389.114
[        ] [1]: Linux (linux)
[        ] [2]: Chrome (chrome)
[        ] Please choose one (To quit, press "q/Q")
[        ] :
[+5534 ms] 2
[   +6 ms] Skipping pub get: version match.
[  +67 ms] Generating /home/braxton/code/flutter_app/bug/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +56 ms] Launching lib/main.dart on Chrome in debug mode...
[  +65 ms] Updating assets
[  +39 ms] Waiting for connection from debug service on Chrome...
[  +71 ms] <- reset
[   +3 ms] /home/braxton/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/braxton/snap/flutter/common/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root /home/braxton/snap/flutter/common/flutter/bin/cache/flutter_web_sdk/ --incremental
--target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill /tmp/flutter_tools.CUKVSZ/flutter_tool.QDRJAN/app.dill --libraries-spec file:///home/braxton/snap/flutter/common/flutter/bin/cache/flutter_web_sdk/libraries.json --packages
/home/braxton/code/flutter_app/bug/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-root /tmp/flutter_tools.CUKVSZ/flutter_tools.ZBAADP --filesystem-scheme org-dartlang-app --initialize-from-dill
build/c7922d95bf4a2462b75c84a97c312edb.cache.dill.track.dill --platform file:///home/braxton/snap/flutter/common/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk.dill --no-sound-null-safety
[   +7 ms] <- compile org-dartlang-app:/web_entrypoint.dart
[+10607 ms] Waiting for connection from debug service on Chrome... (completed in 10.7s)
[        ] Synced 29.3MB.
[        ] <- accept
[        ] Caching compiled dill
[  +84 ms] Using Google Chrome 89.0.4389.114

[ +121 ms] [CHROME]:
[        ] [CHROME]:DevTools listening on ws://<IP_ADDRESS>:36197/devtools/browser/7f5d7e07-73f0-4be0-9a13-798b92a36127
[ +170 ms] DwdsInjector: Received request for entrypoint at http://localhost:44287/main_module.bootstrap.js
[   +3 ms] MetadataProvider: Loading debug metadata...
[   +7 ms] MetadataProvider: Loaded debug metadata (no sound null safety)
[   +4 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:44287/main_module.bootstrap.js
[ +861 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: false
[ +284 ms] DevHandler: Debug service listening on ws://<IP_ADDRESS>:46709/mqXld0dydsQ=/ws

[   +4 ms] Debug service listening on ws://<IP_ADDRESS>:46709/mqXld0dydsQ=/ws
[        ] Running with unsound null safety
[        ] For more information see https://dart.dev/null-safety/unsound-null-safety
[   +1 ms] 🔥  To hot restart changes while running, press "r" or "R".
[        ] For a more detailed help message, press "h". To quit, press "q".
[+1119 ms] BUILD ITEMS (this only happens once)
[+2095 ms] ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
[        ] The following assertion was thrown while finalizing the widget tree:
[        ] Duplicate GlobalKeys detected in widget tree.
[   +1 ms] The following GlobalKeys were specified multiple times in the widget tree. This will lead to parts
[        ] of the widget tree being truncated unexpectedly, because the second time a key is seen, the previous
[        ] instance is moved to the new location. The keys were:
[        ] - [GlobalKey#aaccd item0]
[        ]   [GlobalKey#d1585 item1]
[        ]   [GlobalKey#33e95 item2]
[        ] This was determined by noticing that after widgets with the above global keys were moved out of
[        ] their respective previous parents, those previous parents never updated during this frame, meaning
[        ] that they either did not update at all or updated before the widgets were moved, in either case
[        ] implying that they still think that they should have a child with those global keys.
[        ] The specific parents that did not update after having one or more children forcibly removed due to
[   +1 ms] GlobalKey reparenting are:
[        ] - Align(alignment: AlignmentDirectional.centerStart, dependencies: [Directionality], renderObject:
[        ] RenderPositionedBox#42fa4 relayoutBoundary=up11 NEEDS-PAINT)
[        ]   Align(alignment: AlignmentDirectional.centerStart, dependencies: [Directionality], renderObject:
[        ] RenderPositionedBox#18a54 relayoutBoundary=up11 NEEDS-PAINT)
[        ]   Align(alignment: AlignmentDirectional.centerStart, dependencies: [Directionality], renderObject:
[        ] RenderPositionedBox#3c2fe relayoutBoundary=up11 NEEDS-PAINT)
[        ] A GlobalKey can only be specified on one widget at a time in the widget tree.
[        ] When the exception was thrown, this was the stack:
[        ] dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 236:49  throw_
[        ] packages/flutter/src/widgets/framework.dart 2896:15                           <fn>
[        ] packages/flutter/src/widgets/framework.dart 2920:16                           finalizeTree
[        ] packages/flutter/src/widgets/binding.dart 877:7                               drawFrame
[        ] packages/flutter/src/rendering/binding.dart 329:5                             [_handlePersistentFrameCallback]
[        ] packages/flutter/src/scheduler/binding.dart 1144:15                           [_invokeFrameCallback]
[        ] packages/flutter/src/scheduler/binding.dart 1082:9                            handleDrawFrame
[        ] packages/flutter/src/scheduler/binding.dart 998:5                             [_handleDrawFrame]
[        ] lib/_engine/engine/platform_dispatcher.dart 931:13                            invoke
[        ] lib/_engine/engine/platform_dispatcher.dart 147:5                             invokeOnDrawFrame
[        ] lib/_engine/engine.dart 262:45                                                <fn>
[        ] ════════════════════════════════════════════════════════════════════════════════════════════════════
[+1063 ms] SET TO 1

flutter doctor
[✓] Flutter (Channel dev, 2.1.0-12.1.pre, on Linux, locale en_US.UTF-8)
    • Flutter version 2.1.0-12.1.pre at /home/braxton/snap/flutter/common/flutter
    • Framework revision 8264cb3e8a (4 weeks ago), 2021-03-10 12:37:57 -0800
    • Engine revision 711ab3fda0
    • Dart version 2.13.0 (build 2.13.0-116.0.dev)

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Linux
    • Chrome (web)    • chrome • web-javascript • Google Chrome 89.0.4389.114

! Doctor found issues in 2 categories.

@braxtonmckee
I suspect that global keys aren't meant to be used this way especially

not to be "moved in the widget tree" paraphrasing the error [...]  the previous instance is moved to the new location
to be used for a State
not to be instantiated inside the build method

a good practice is to let a State object own the GlobalKey, and instantiate it outside the build method

(source)
may I ask what this implementation is meant to accomplish and why needs to use GlobalKey?

This is a minimal repro of a bug that I encountered building a larger app.
If you had state inside of a dropdown item that you wanted to maintain, how
else would you do it?
Finally: given the semantics of the 'GlobalKey', I certainly wouldn't
expect this to blow up, as the widget is not actually being used twice in
the tree.  I would think that as long as you maintain the invariant that
you're not using a GlobalKey more than once in a widget tree, you shouldn't
be penalized for using them.
On Sat, Apr 10, 2021 at 4:15 PM Francesco Iapicca @.***>
wrote:

@braxtonmckee https://github.com/braxtonmckee
I suspect that global keys aren't meant to be used this way especially

not to be "moved in the widget tree" paraphrasing the error [...]
the previous instance is moved to the new location
to be used for a State
not to be instantiated inside the build method

a good practice is to let a State object own the GlobalKey, and
instantiate it outside the build method
(source https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)
may I ask what this implementation is meant to accomplish and why needs to
use GlobalKey?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/80200#issuecomment-817196670,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB6OHBB2OBNRRUWMF3EAUKLTICWW7ANCNFSM42WYZUBQ
.

Hi @braxtonmckee
Thanks for filing the issue

flutter doctor -v
[✓] Flutter (Channel stable, 2.0.4, on Microsoft Windows [Version 10.0.19042.870], locale en-US)
    • Flutter version 2.0.4 at C:\Users\Taha\Code\flutter_stable
    • Framework revision b1395592de (11 days ago), 2021-04-01 14:25:01 -0700
    • Engine revision 2dce47073a
    • Dart version 2.12.2

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.2)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31112.23
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 4.1.0)
    • Android Studio at C:\Users\Taha\Code\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
    • Flutter plugin version 55.0.5
    • Dart plugin version 211.6693.108

[✓] VS Code (version 1.55.1)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[✓] Connected device (4 available)
    • RMX2001 (mobile)  • EUYTFEUSQSRGDA6D • android-arm64  • Android 10 (API 29)
    • Windows (desktop) • windows          • windows-x64    • Microsoft Windows [Version 10.0.19042.870]
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 89.0.4389.114
    • Edge (web)        • edge             • web-javascript • Microsoft Edge 89.0.774.68

! Doctor found issues in 1 category.

[✓] Flutter (Channel master, 2.1.0-13.0.pre.574, on Microsoft Windows [Version 10.0.19042.870], locale en-US)
    • Flutter version 2.1.0-13.0.pre.574 at C:\Users\Taha\Code\flutter_master
    • Framework revision 02efffc134 (2 days ago), 2021-04-10 03:49:01 -0400
    • Engine revision 8863afff16
    • Dart version 2.13.0 (build 2.13.0-222.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.2)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31112.23
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 4.1.0)
    • Android Studio at C:\Users\Taha\Code\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
    • Flutter plugin version 55.0.5
    • Dart plugin version 211.6693.108

[✓] VS Code (version 1.55.1)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[✓] Connected device (4 available)
    • RMX2001 (mobile)  • EUYTFEUSQSRGDA6D • android-arm64  • Android 10 (API 29)
    • Windows (desktop) • windows          • windows-x64    • Microsoft Windows [Version 10.0.19042.870]
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 89.0.4389.114
    • Edge (web)        • edge             • web-javascript • Microsoft Edge 89.0.774.68

! Doctor found issues in 1 category.

This is a minimal repro of a bug that I encountered building a larger app.
If you had state inside of a dropdown item that you wanted to maintain, how else would you do it?

Can you elaborate on what state are you trying to preserve?
Also, if you look into the widget tree when the DropdownButton is tapped, it has 2 instances of each item widget. One in DropdownButton in IndexedStack and other in the DropdownRoute. This is the reason duplicate GlobalKeys are detected.

Hi @werainkhatri,
Thanks for getting back to me.
This is a minimal repro, so maybe it seems contrived, but I'm happy to provide some context if it helps motivate the issue.
In my application, I have a tree of UI widgets that get populated over a socket connection (this is a remote desktop application). I'm mirroring this tree into the widget tree. The GlobalKey abstraction should make it possible for me maintain a 1-1 correspondence between flutter widgets and nodes in my tree as identified by my server.
This is perfect for my use case, since that's exactly how my remoting protocol works. Every node in the tree has a unique identity, and each change to the tree on the server side sends a message to me giving the identity of the changed node and the change itself.  For instance, if a list-view sees its items reordered, I'll receive an update list of ordered child identities.  This should be a perfect analogy to the GlobalKey model: I simply reorder the children in the widget, all of which are identified by GlobalKey objects, and then the rendering layer can reorder them without needing to rebuild the entire tree or destroy the ui state.
For most widgets this works great. Except I'm finding some widgets complain (as is the case with the DropdownButton) if any widget inside of them has a GlobalKey because they expect that their children are "simple" and don't have GlobalKeys inside.
Looking at the tree above, to me it feels like the widgets should only show up in one place in the tree at once since they're only visible in one place at once on the screen.  If the point of the MaterialApp is to provide a layer to host animations and popovers, then why do the menu item widgets also need to show up underneath the DropdownButton object in the tree?
In any case, I suppose I could imagine that some widgets expect their children to be stateless, and cannot accept globally keyed widgets or something, but then that should be documented.  But really it just seems like a bug that the widget is in the tree twice.  After all, my build method only got called once, which means the DropdownMenuItem objects were only called once, and yet they are showing up in two separate places in the tree.
Anyways, thanks again for looking at this.
--braxton

When the button is opened, the item will attach to two different subtrees at the same time, so if the item or its descendants have a GlobalKey, an assertion will be triggered.
@shihaohong @chunhtai,
Do you have any suggestions to solve this problem?
Sample Code
/// Flutter code sample for DropdownButton

// This sample shows a `DropdownButton` with a large arrow icon,
// purple text style, and bold purple underline, whose value is one of "One",
// "Two", "Free", or "Four".
//
// ![](https://flutter.github.io/assets-for-api-docs/assets/material/dropdown_button.png)

import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

/// This is the main application widget.
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: _title,
      home: Scaffold(
        appBar: AppBar(title: const Text(_title)),
        body: const Center(
          child: MyStatefulWidget(),
        ),
      ),
    );
  }
}

/// This is the stateful widget that the main application instantiates.
class MyStatefulWidget extends StatefulWidget {
  const MyStatefulWidget({Key? key}) : super(key: key);

  @override
  _MyStatefulWidgetState createState() => _MyStatefulWidgetState();
}

/// This is the private State class that goes with MyStatefulWidget.
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
  String dropdownValue = 'One';
  GlobalKey _key = GlobalKey();

  @override
  Widget build(BuildContext context) {
    return DropdownButton<String>(
      value: dropdownValue,
      icon: const Icon(Icons.arrow_downward),
      iconSize: 24,
      elevation: 16,
      style: const TextStyle(color: Colors.deepPurple),
      underline: Container(
        height: 2,
        color: Colors.deepPurpleAccent,
      ),
      onChanged: (String? newValue) {
        setState(() {
          dropdownValue = newValue!;
        });
      },
      items: <String>['One', 'Two', 'Free', 'Four']
          .map<DropdownMenuItem<String>>((String value) {
        return DropdownMenuItem<String>(
          key: (value == 'One') ? _key : null,
          value: value,
          child: Text(value),
        );
      }).toList(),
    );
  }
}

@xu-baolin It's unfortunate because we end up using the passed in DropdownMenuItem widgets in two separate parts of the widget tree. One way I see that we can move forward is to document that global keys do not play nice with DropdownMenuItems (and perhaps assert it as well). Then, one workaround that would help with @braxtonmckee's particular situation is to use the selectedItemBuilder parameter. What that ends up doing is it customizes the widget subtree within the DropdownButton, thereby allowing two sets of global keys to be used. From there, the only extra thing that needs to be done is to make the button appearance identical to the default UI appearance.

we end up using the passed in DropdownMenuItem widgets in two separate parts of the widget tree.

That sounds like something we should not do. Do you know why we do that?

I think it's because the widget styling for both the button and the dropdown menu item are identical in the default scenario, so items ends up being reused for both. The IndexedStack displays the item that has been selected, and the items are also displayed in the dropdown route when the button is selected/tapped. I agree that I think that this is something that we shouldn't do. I wonder if there's an easy way to decouple the two. I'll play around with the code for a while today to see.

Here's a WIP proof of concept that fixes the GlobalKey issue: https://github.com/flutter/flutter/pull/81878. It basically just removes the usage of GlobalKeys in the dropdown menu items that are passed into the IndexedStack, but keeps everything else identical.
The only thing that's missing is how we'd provide keys to the menu items in the IndexedStack. We could basically create a new parameter for DropdownButton that takes a List<Key> and then add them when the button items are created. However, this feels wrong and like an anti-pattern. I would prefer that for the default case, we just do not allow the dropdown button items that go into the IndexedStack to be keyed. If the user requires them to be keyed, then we could recommend users to use selectedItemBuilder.

Here's an idea. Can we remove the items from the IndexedStack when the route is pushed? Then the items will exist once in the widget tree.
Series of events will be -
DropDownButton is pressed -> items are removed from IndexedStack -> setState is called -> route is pushed.
The only problem I think this will have is performance issues.

The problem with that approach is that IndexedStack is used to determine the size of the button. If we were to remove all the items from IndexedStack, it would definitely trigger some kind of layout behavior changes, which is undesired.


fixed trailing whitespace on a line

I know this is a tiny edit but when using rails_bestpractices gem on
every project it was bugging me having to fix this.
Hopefully I will contribute more meaningful edits in the future!

We love all commits, small or big! Thanks.


chore: improve Windows support

Bump the policy-fetcher that improves Windows path support on the
policy store.

ofc the policy-fetcher version must changed to use the official repo

Yes, when I include this in "main" repos is just to ease the review process. It's always to be put back as expected before merge.

Merging on green and doing a new rc release.


Add a default keybinding for cursorRedo

cursorRedo is bound by default to Ctrl+U
This short keybinding also shows that this is a commonly used shortcut.
cursorUndo should also have a default keybinding as it is complementary to cursorUndo.
I suggest Ctrl+Shift+J because it is the shortest keybinding I could find that wasn't taken when the editor is focused (except Ctrl+Shift+Q which could also be an option).

Thank you for the suggestion, but I don't think cursorRedo should get a proeminent keyboard shortcut by default.
The reason is simple, cursorUndo is an important keybinding, especially in the use-case of ctrl+D, when it is easy to press one ctrl+D too many when selecting multiple words. It is then possible to undo the last ctrl+D. In this case, cursorRedo can be mimicked by applying the cursor operation again, like pressing ctrl+D again... So IMHO cursorRedo is much more useful than cursorUndo.
I would leave it up to end users to configure their keybindings, especially since it is so easy to do. We can definitely accept PRs for different keymap extensions if we want to align with other editors.


Canonical native python cast value representation

I as see it situation with types should be:

there is 1-to-1 map from JTS type to native python type

So for example number should be always represented as decimal.Decimal for example (returned from Storage.read this way). NumberType.cast should always return decimal.Decimal on any compatible input - int, float, string etc. And so on for other types.
It's already good for may types (but more specific tests should be added) but I'm not sure GeoPointType works that way.
Also not sure it works at all for dict or list input:
# types/geopoint.py

    python_types = (compat.str, list, dict) # from initial codebase

    def cast_default(self, value, fmt=None):
        try:
            if isinstance(value, self.python_types):
                points = value.split(',')

Also GeoJSONType should be reviewed`.

DUPLICATE
https://github.com/frictionlessdata/jsontableschema-py/issues/94


Make Semantic Map Viewer request handlers public

Description:
To allow for a more individualized handling of serving x-rays make the iron handlers public.

meow @SirVer


CHBenchmark Q9 Memory limit exceeded

Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)

tiup bench ch --warehouses 1500 -T 20 -t 0 --time 100h --ignore-error -H <IP_ADDRESS> -P 4000 -D chbenchmark run
tiup bench ch --warehouses 1500 -T 0 -t 1  --count 1 -H <IP_ADDRESS> -P 4000  -D chbenchmark --ignore-error --queries 'q9' run

2. What did you expect to see? (Required)

q9 run successfully.

3. What did you see instead (Required)
[2023-09-20 04:54:54] execute run failed, err execute query q9 failed Error 1105: other error for mpp stream: Code: 0, e.displayText() = DB::TiFlashException: Memory limit (total) exceeded caused by 'out of memory quota for data computing' : would use 55.81 GiB for data computing (attempt to allocate chunk of 2359296 bytes), limit of memory for data computing: 55.81 GiB. Memory Usage of Storage: non-query: peak=2.97 MiB, amount=992.00 KiB; query-storage-task: peak=7.77 MiB, amount=0.00 B; fetch-pages: peak=7.77 MiB, amount=0.00 B., e.what() = DB::TiFlashException,

4. What is your TiFlash version? (Required)

Commit hash: 32974c1bda3991fb43fc114003ebddb35cf98d32
In disaggregated mode.

/component storage


Travis build failed in RealWorldFilesIT.testVariants

https://travis-ci.org/disq-bio/disq/builds/654431819
[ERROR] Tests run: 128, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 348.473 s
<<< FAILURE! - in org.disq_bio.disq.RealWorldFilesIT

[ERROR] org.disq_bio.disq.RealWorldFilesIT.testVariants(/home/travis/build/
disq-bio/disq/gatk/src/test/resources/large/VQSR/emptyB37.vcf, 1048576)
[6]  Time elapsed: 0.089 s  <<< FAILURE!

java.lang.AssertionError: expected:<0> but was:<1>
  at org.disq_bio.disq.RealWorldFilesIT.testVariants(RealWorldFilesIT.java:115)

I haven't gotten to take a look at what's going on here yet.  Do you have any sense of it?

Sorry, I haven't looked too closely either.
We aren't using any snapshot dependencies.  samtools/bcftools are installed from a versioned tarball.  Maybe the gatk-large-files repository changed?  We use the git head of the master branch in https://github.com/disq-bio/disq/blob/master/src/build/bin/checkout-gatk-large-files.sh.

I think the large files in gatk changed but I'm not sure that's why it's failing.  Sorry, I totally forgot that this issue existed.  The tests SHOULD be robust against files changing, they don't have any hardcoded values, so I don't know what's going on yet.

If I run the tests locally against the gatk head version they all pass.  Maybe it is something to do with the bcftools version?

Oh, I wasn't running with bcftools.  I get a failure when I configure it correctly.

It looks like the janky way we use bcftools to count variants falls over on an empty vcf. I'll patch it.


Simple CUDA Graph migration sample

Adding a New Sample(s)
Description
SimpleCudaGraphs migration from CUDA to SYCL and mapping of Taskflow API's to CUDA Graph API's.
Checklist
Administrative

[X] Review sample design with the appropriate Domain Expert: Choudary, Chekuri; Krishnappa, Rakshith
[ ] If you have any new dependencies/binaries, inform the oneAPI Code Samples Project Manager

Code Development

[X] Implement coding guidelines and ensure code quality. see wiki for details
[X] Adhere to readme template
[X] Enforce format via clang-format config file
[X] Adhere to sample.json specification. https://github.com/oneapi-src/oneAPI-samples/wiki/sample-json-specification
[X] Ensure/create CI test configurations for sample (ciTests field) https://github.com/oneapi-src/oneAPI-samples/wiki/sample-json-ci-test-object
[X] Run jsonlint on sample.json to verify json syntax. www.jsonlint.com

Security and Legal

[ ] OSPDT Approval (see Project Manager for assistance)
[X] Compile using the following compiler flags and fix any warnings, the falgs are: "/Wall -Wformat-security -Werror=format-security"
[ ] Bandit Scans (Python only)
[ ] Virus scan

Review

[X] Review DPC++ code with Paul Peterseon. (GitHub User: pmpeter1)
[X] Review readme with Tom Lenth(@tomlenth) and/or Project Manager
[X] Tested using Dev Cloud when applicable

Adding @jkinsky and @ishaghosh27 for README review.

@ShwethaSelma Verified sample builds and runs. Please incorporate @jkinsky feedback to the sample and then I will approve and merge it.

@ShwethaSelma Verified sample builds and runs. Please incorporate @jkinsky feedback to the sample and then I will approve and merge it.

I have incorporated the comment and updated the sample name in sample.json file.

@ShwethaSelma I think the sample name should be something more descriptive than "SimpleCudaGraphs Sample". Adding @tomlenth and @jkinsky for feedback.
Also, it is missing the expertise field in sample.json. Adding @ishaghosh27 for feedback.

@ShwethaSelma I think the sample name should be something more descriptive than "SimpleCudaGraphs Sample". Adding @tomlenth and @jkinsky for feedback.
Also, it is missing the expertise field in sample.json. Adding @ishaghosh27 for feedback.

Agree. At the very least, you should change the name in the readme and sample.json files to "Simple Cuda Graphs" Sample. Adding spaces will make it better even if you don't change the name completely.

@ShwethaSelma @jimmytwei Please add Expertise: Code Optimization to the sample.json file.

@ShwethaSelma I think the sample name should be something more descriptive than "SimpleCudaGraphs Sample". Adding @tomlenth and @jkinsky for feedback.
Also, it is missing the expertise field in sample.json. Adding @ishaghosh27 for feedback.

Agree. At the very least, you should change the name in the readme and sample.json files to "Simple Cuda Graphs" Sample. Adding spaces will make it better even if you don't change the name completely.

I have changed the name as suggested.

Concept and Functionality"

Updated.


Paypal button does not display on MS Edge

Description
Observe missing label on the Paypal button

Steps to reproduce
Go to https://staging.rnib.panlogic.co.uk/donations-and-fundraising
Check the donate promo and look at the button next to Donate with card
The Paypal label is missing
Affected browsers

[ ] Chrome
[ ] Safari
[ ] Firefox
[X ] Edge
Microsoft Edge 41.16299.15.0
Microsoft EdgeHTML 16.16299 Microsoft 2017
Windows 10
HP Pavilion
[ ] IE
[ ] Chrome Mobile/Tablet
[ ] Safari Mobile/Tablet
[ ] Web View / Safari ViewController
[ ] Other

This was resolved by email -- looks like the site's CSP policy is blocking the logo. Need to allow data: in the img-src CSP directive.

We had the same issue and spent quite some time debugging, having fairly strict CSP policies.
Turns out the PayPal icon is an external SVG rendered as a base64 image in a iframe. Until today, there was a bug when using frame-src self in Edge <= 41. They patched it in 42 and released it on April 30. https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8690562/
Hope that helps!


Mingw build fixes part2

This PR builds upon #5187. With these commits, I can successfully build wfreerdp.exe in our Linux based MinGW environment, which is based on mingw-w64-v3.3.0 and gcc-5.1.0.

What's up with Jenkins?

@freerdp-bot test

I don't have much time to spend on this issue, and to be honest, I don't know what the "correct" solution would be to the wmemmove_s / msvcr100 problem. How about this solution?:
add_definitions(${WINPR_DEFINITIONS})
if (WIN32)
	if (NOT MSVC)
            # With MinGW, you need msvcr100 to get wmemmove_s
            list(APPEND WINPR_LIBS "msvcr100")
	endif()
	target_link_libraries(${MODULE_NAME} ${PUBLIC_KEYWORD} ${WINPR_LIBS})
else()
	target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${WINPR_LIBS})
endif(WIN32)

@astrand I´d check WinPR/crt.h and the define blocks there. Then no linking to some runtime is required in that case.

Is there any way of resolving the conflicts ?

Have you progressed on it?

AFAICT we've fixed all the issues with mingw (at least that works perfectly here), @astrand perhaps this PR can be closed ?


Mountains rendered on canvas, collisions

Contunuation of #250, proposal: #219
@MaicomMR @glangford @nielsvdweide @harp71
Try this out here: http://culebron.github.io/atc/

For some reason, the message that a plane has crashed disappearrs immediately. (I guess because I make altitude=0 to make it be removed quickly.) Can someone help with this?

@culebron, there's a crashed flag in the aircraft class. Setting altitude to 0 will instantly remove the plane; setting the crashed flag will automatically stop the plane and slowly lower it to the ground.

@zlsa thanks! Will check the flag. The problem is that when it collides with terrain it's already on the ground. It would look like it's falling into it. Will look into that code more, see what I can do.

I checked what was wrong there. Messages disappeared quickly because I changed CSS style for .hidden. It was used for fadeout, I by mistake forced this class to be invisible.
The property is called hit, not crahsed, and it worked just as I wanted it to: when aircraft collides with terrain, it is already landed, and may disappear. It shouldn't fall down through the ground. So, the fix is pushed.
I think there are no more improvements to push here, unless someone finds a bug.

I'm making an improvement: rather than custom JSON, I want to use GeoJSON, which anyone could create with an editor.

Major update.

terrain file is GeoJSON, you can create it with tools like

SRTM2OSM and JOSM
QGIS

terrain in Rio de Janeiro is much smoother (used buffer-debuffer-buffer method, rather than line simplification algorithms)

Two screenshots: 1) plane flying in a hole in the polygon

collision in the right place

Made fixes readable on the map when terrain is displayed.

To make aircrafts not collide with mountains early on arrival, I arranged STARs for arrivals.

...and added SIDs

Forgot one thing: the scale :) Will add soon.

Is this ready for merge yet? It looks amazing :)

Not yet. I need an elevation scale and sort SIDs at Galeão.

@zlsa now it's finalized, you may merge mountans.

Thank you very much. This is incredible work.

It looks amazing. :star2: :star2: :star2: :star2: :star2:

@glangford @zlsa thanks!

Great work!!!!
Is there any way to tell how high the terrain actually is?

I'm going to add a legend key.

Awsome!!!!

Nice, but: which color represents which altitude? Shouldn´t there be a reference which color is wich minimum altitude?

@harp71 there is a pull request for that, see the legend key shown here: http://culebron.github.io/atc/


[BUG] Get-PnPTenantSite not getting SensitivityLabel property when getting all sites

Reporting an Issue or Missing Feature
Issue in the get all sites mode of Get-PnPTenantSite
Expected behavior
Only when getting all sites : expect to see the SensitivityLabel of each site filled with a GUID of a label, when there is one set on the site
Actual behavior
When getting all sites, the SensitivityLabel property of every site is empty
When getting one specific site using the -Identity argument, the SensitivityLabel is well set
Steps to reproduce behavior
$allSites = Get-PnPTenantSite; # all sites have SensitivityLabel property empty ie : $allSites[0].SensitivityLabel
$oneSite = Get-PnPTenantSite -Identity https://mytenant.sharepoint.com/sites/mylabeledsite; # $oneSite.SensitivityLabel has a GUID
What is the version of the Cmdlet module you are running?
1.9.0
Which operating system/environment are you running PnP PowerShell on?

[X] Windows
[ ] Linux
[ ] MacOS
[ ] Azure Cloud Shell
[ ] Azure Functions
[ ] Other : please specify

Hi @christouuu , unfortunately this is a bug from CSOM SDK which is provided by Microsoft. We wont be able to fix it, only Microsoft can. Once they fix it, we always consume the latest CSOM version and it will be fixed here automatically.
So, will request you to raise a ticket with Microsoft about this behavior.
Will be closing the issue here.


Layer._get_state(), or something like it, should be public

🐛 Bug
The napari_get_writer hookspec docs say:

If path is a recognized format, this function should return a function that accepts the same path, and a list of tuples containing the data for each layer being saved in the form of (Layer.data, Layer._get_state(), Layer._type_string)

Unfortunately, Layer._get_state() is a private method, which should raise alarm bells, and as a consequence it is not even documented in our API docs (see e.g. for Image). So, to write a writer plugin, one needs to go fish around in the image layer source code!
Note: we might need to version the get_state API, but this should not be too hard.

I agree with this proposal, I think there was some discussion in #1584 about API around this method - we should have one function call to return something serializable, we should have another function call that returns our simple objects that plugins could use. The only place where there would be a difference right now is the colormap object.

Resurrecting this. I'm developing a writer plugin that uses Layer._get_state() to work out how to write the data. Making some version of this public would be great, it feels fragile ATM.

@alisterburt and I were just talking about this on the napari-animation repo. The future direction for this will be to get the layers to be our pydantic evented models, and then we'll get layer.dict() and layer.json() methods on them for free. We've done that now for the viewer, but havn't make it for the layers yet. We could push on this soon. Maybe as soon as we get the LayerGroup stuff in from @tlambert03 we can do this? Or maybe we do it ahead of that to make that transition easier. Curious what @tlambert03 recommends the order should be. I don't think we need to wait to get slicing off the layer, that is separate.

I'm not 100% sure what the order should be... That's going to be a very important and useful public API once it "settles", so I'm not sure I want to be in a hurry to "settle it"... or decide right now what order is best.  That may mean that you should just use _get_state()  for now.  It's true it's a bit brittle... but rest assured we agree it's an important thing to make public soonish?

Sounds good. I'm happy using _get_state() for now. At least now I'll get a notification when this changes :)

Not sure if I'm letting a proverbial cat of a bag somewhere, but we do have the public (though undocumented) Layer.as_layer_data_tuple which effectively exposes Layer._get_state. So I wonder if this can be closed?

Also think that this may be closed

Yup, good point. If anyone needs anything different from _get_state, we can reopen!


SDCC not work with stm8

i am use this cmd  (sdcc --Werror --std-sdcc99 -mstm8 -DSTM8S103F3 -c C:\Users\techs\Desktop\STM8s103F\main.c -o C:\Users\techs\Desktop\STM8s103F\Output/STM8s103F.o )
sdcpp.exe: fatal error: when writing output to : Invalid argument
include\STM8S103F3.h:1903: syntax error: token -> 'volatile' ; column 29
please healp me

are you sure you are using the latest STM8 headers? Because I don't get this error message when compiling the attached file main.c.txt (change extension to .c) with
sdcc --Werror --std-sdcc99 -mstm8 -DSTM8S103F3 -c main.c
Also in the current version line 1903 does not contain the keyword "volatile". If you are indeed using the latest STM8 headers from Github and the problem still exists, can you please provide more details like SDCC version, and maybe an example that fails? Thanks a lot in advance!

I got the error actually it was in another file but SDCC was pointing it to this header file. Removing the second header file fixed it.
Thanks for the help. I have another question. Can I distribute these header files with my open source code editor software without any license?

ad 1) thanks for letting me know! If only all problems were solved that easily...   ;-)
ad 2) sure, feel free. I only added a license to exclude liability. May I ask what code editor you're developing?

Thanks, I was trying to add the header files inside my open source code editor MicroStudio IDE for programming stm8 microcontrollers using SDCC but for a long time there was no solution for me. On the SDCC forum 2 days ago, I found out that these header files are now available and they gave me the link here. Currently I am working on version 2.3 of Micro Studio IDE which will be released by March 11 2021 with stm8 microcontrollers.

glad to hear my code is actually being used  :-)
I'm quite interested in an OSS IDE for STM8, so I checked your Website already. Does your IDE also support Linux and graphical debugging?


[BUG] iOS camera preview crashes when switching app

Hello! Thanks a lot for this great plugin!
Describe the bug
Whole app crashes on iOS when in preview and switching back to the app from another one. Not reproduced on Android.
How to reproduce
Plugin example app gives an exception in the same situation. However, it does not really crash the example app as it does on my production app.
Steps to reproduce the behavior:

Open plugin example app on iOS with logs visible.
Open first line (take a photo).
While on the preview screen, switch to another app.
Switch back to example app.

Expected behavior
No Exception raised.
Effective behavior
Exception raised.
Screenshots (If contains)
:
======== Exception caught by widgets library =======================================================
The following CameraException was thrown building ValueListenableBuilder<CameraValue>(dirty, state: _ValueListenableBuilderState<CameraValue>#c046c):
CameraException(Disposed CameraController, buildPreview() was called on a disposed CameraController.)

I don't have the error anymore on flutter run with the following version of didChangeAppLifecycleState in camera_picker_state.dart:
@override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    final CameraController? c = innerController;
    if (c == null && state == AppLifecycleState.resumed) {
      initCameras(currentCamera);
    }
    // App state changed before we got the chance to initialize.
    if (c == null || !c.value.isInitialized) {
      return;
    }
    if (state == AppLifecycleState.inactive) {
      c.dispose();
      innerController = null;
    } else if (state == AppLifecycleState.resumed) {
      initCameras(currentCamera);
    }
  }

I am not proposing a PR for this yet because I need to make sure this solves the issue as well when running from test flight in a near production situation.

Works fine on test-flight => proposed PR #157

Thanks for the merge @AlexV525 !


[MRG] Support "all-categorical" space without one-hot-encoding in gp_minimize

Fixes https://github.com/scikit-optimize/scikit-optimize/issues/56

@betatim @glouppe This is ready for reviews. Categorical input is now supported, basically
    X = np.asarray([
    ["ham", "spam", "ted"],
    ["ham", "ted", "ted"],
    ["ham", "spam", "spam"]])
   y = rng.randn(3)
   hm = HammingKernel(length_scale=[1.0, 1.0, 1.0])

   gpr = GaussianProcessRegressor(hm)
   gpr.fit(X, y)
   gpr.predict(X)

General comment, can you put the kernel code under skopt.learning?

Documentation comment, could you also switch to the docstring format I used everywhere else? (This one does not render properly in Markdown)

Thanks! This is a nice first step towards support of categorical variables. This assumes that all features are categorial though, doesn't it? (i.e., we cannot mix categorical and continuous features)

Actually I ran into a bug while testing the kernel gradient with respect to hyperparameters. I have fixed it in this PR and I have reported it here (https://github.com/scikit-learn/scikit-learn/issues/6701)

This assumes that all features are categorial though, doesn't it?

Yes, but we can address the mixed features type in a different PR
In 4.1.2 of http://arxiv.org/pdf/1211.0906v2.pdf, they just advise to find K for categorical and continuous features separately and do a pointwise multiplication.
Also, could you make another pass?

This should be rebased on top of master. Then I assume this special kernel can be used when all dimensions are Categorical, right? (Not sure what do to for mixed types)

For mixed-types we can have something as described here https://github.com/scikit-learn/scikit-learn/issues/6868
(I'll try to address that today)

@glouppe This does not refactor gp_optimize but just adds the kernel. I'm not sure why I should rebase. Could you clarify?

Well indeed! I was just assuming you would also make the necessary changes to gp_optimize.

Let us do incremental development :P

I started working on the SelectDimensionKernel here (https://github.com/MechCoder/scikit-learn/tree/select_kernel)

Just a FYI, we should push this further due to non-trivial issues in sklearn's implementation.
https://github.com/scikit-learn/scikit-learn/issues/6961
https://github.com/scikit-learn/scikit-learn/issues/6868

Do you wish to finish this for 0.1?

Current coverage is 86.68% (diff: 97.16%)

Merging #62 into master will increase coverage by 1.05%

@@             master        #62   diff @@
==========================================
  Files            26         28     +2
  Lines          1399       1540   +141
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           1198       1335   +137
- Misses          201        205     +4
  Partials          0          0

Powered by Codecov. Last update 1533d1e...dfae490

(That moment when I look back and cannot believe I wrote such pathetic code) :-/

I still have to write the gradient_x method and integrate it with the optimizer functions. Will continue on that tomorrow.

@glouppe @betatim This is ready for reviews!

Also Travis complains.

updated!

After doing this, we can add different kernels operating on different dimensions in a separate PR.

Thanks for the changes. Merging.

Thanks! Will try to implement the SelectDimensionKernel either tonight or after I get back in a few days.

Thanks! Will try to implement the SelectDimensionKernel either tonight or after I get back in a few days.

new issue so it doesn't get lost?


Cannot fetch with relative paths

Problem

fetch::Request cannot be constructed to write relative paths.
Steps To Reproduce
Steps to reproduce the behavior:
Call yew::services::fetch::Request::get("foo/bar")
Actual behaviour
Returns error: http::Error(InvalidUri(InvalidFormat))
Expected behavior
Construct a request that fetches ./foo/bar
Environment:

Yew version: v0.18.0
Rust version: nightly-2021-08-01
Target, if relevant: wasm32-unknown-unknown
Build tool, if relevant: trunk
OS, if relevant: linux ubuntu
Browser and version, if relevant: firefox 90.0

Questionnaire

[x] I'm interested in fixing this myself but don't know where to start
[ ] I would like to fix and I have a solution
[ ] I don't have time to fix this right now, but maybe later

Fetch service has been removed on master and this change will be a part of the next release. Please consider using something else like reqwasm, reqwest, etc

Why is it being removed? It is not exactly trivial to integrate async logic with yew's callback mechanism.

callback now supports send_future function to help with this :)
You can see how this works in the futures example

yew 0.19 has been released which removes services altogether. It is now recommended to use another library like reqwasm for fetch.


报错

{"@timestamp":"2023-03-04T15:00:31.601+08","level":"error","content":"index.go:65 elastic: Error 400 (Bad Request): Validation Failed: 1: this action would add [2] shards, but this cluster currently has [1000]/[1000] maximum normal shards open; [type=validation_exception]\nelastic: Error 400 (Bad Request): Validation Failed: 1: this action would add [2] shards, but this cluster currently has [1000]/[1000] maximum normal shards open; [type=validation_exception]\nelastic: Error 400 (Bad Request): Validation Failed: 1: this action would add [2] shards, but this cluster currently has [1000]/[1000] maximum normal shards open; [type=validation_exception]"}
{"@timestamp":"2023-03-04T15:01:12.190+08","level":"error","content":"writer.go:74 \u0026{validation_exception Validation Failed: 1: this action would add [2] shards, but this cluster currently has [1000]/[1000] maximum normal shards open;     false map[] [] [] [] map[] []   \u003cnil\u003e}"}

Check your ES configuration.


Parametrizable setUp

Component
Forge
Describe the feature you would like
It would be useful to have fuzzing for the setUp() function before tests, in order to run tests for various settings of a testing suite.
Currently this can be done, but requires creating a parametrized setUp<X>() function and calling it at the beginning of each test where fuzzing is needed. Sometimes one can forget to add this at the beginning of the test, which leads to improper coverage.
E.g.:
Instead of:
   function setUp() public {
   }

   function test(uint8 setupParam) public {
       _setupSuite(setupParam);
      ....
   }

It should be like this:
   function setUp(uint8 setupParam) public {
     _setupSuite(setupParam);
   }

   function test() public {
      ....
   }

Doing this would automatically make all tests fuzzed, even if there are no parameters in the test itself.
Additional context
No response

Not super simple to implement and also has some open questions:
If setUp is parameterized, how do fuzz tests works? Would you run 256 runs of setup, each with 256 fuzz tests, i.e. 65536 fuzz runs total? Seems a little bit excessive, but I'm not sure how this should work otherwise.

@onbjerg I think setUp() would indeed be inefficient when requiring >50 executions and at the same time being combined with fuzz tests.
However, in all other scenarios, setUp() fuzz would be terribly useful.
For example, I'm writing tests for a kind of staking contract that can accept any invested ERC20 token at initialization-time, and therefore any decimals() possible value.
I want to make sure that this contract works for all decimals in [0, 18] using vm.assume(decimals <= 18). In this scenario, the setUp` fuzzing would have allowed me to test this with just one extra line of code.
I think this feature should definitely be implemented but with a message in the documentation to inform users that in some scenarios it can be really inefficient and should therefore be used with caution.

That still exhibits the exact same issue. We don't use a solver for fuzz tests, we use shrinking, so your security here is directly proportional to the amount of runs you do.

That still exhibits the exact same issue. We don't use a solver for fuzz tests, we use shrinking, so your security here is directly proportional to the amount of runs you do.

I'm not sure to properly understand shrinking, but an idea could be to allow pre-defining a set of values to runs setUp() with. In my use case this would prevent writing 18 times the same contracts for the 18 decimals scenarios

Thank you for your evaluating this issue and for asking for clarification. I would like to take the liberty to express my desire for the requested functionality, and motivate it with the following scenario:
I have a contract someBase which I initialise with roughly 11 random parameters. In some cases the someBase contract can be validly initialised with those parameters and sometimes it cannot. In the cases it is valid, I would like to run a particular test on that contract.

I have multiple fuzz test files.
Each fuzz test file has a few fuzz tests

Since it is quite verbose to initialise the someBase contract with 11 parameters in each  test in each file, (even if it is just calling the initialisation function with 11 parameters), it would be more convenient to be able to initialise the someBase contract once in the setUp() function, and have a boolean valid/invalid in the setup, to determine if need to run the tests in that file.
Would that be a reasonable motivation for requesting the parameterized setUp() function?
Regarding the how to combine setUp() parameters with test function parameters aspect, perhaps users can choose between:

Throw an error if the fuzz test function also has random arguments (that are not in the setUp() args).
Just create the list of random parameters in that file once per run.
Per random setUp() parameter configuration, have n random parameter configurations per test function.

Though I expect option 0 or 1 are easier to implement, and more in line with how fuzzing works right now. Once again, thank you for all your work on contributing to this marvelous framework!


refactor(Litmusbook): Modified apiversion in csi volumesnapshotclass spec to v1beta1

Signed-off-by: Aman Gupta<EMAIL_ADDRESS>
What this PR does / why we need it:

changed aiversion to v1beta1 in csi volume snapshot class

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Checklist

[ ] Does this PR have a corresponding GitHub issue?
[ ] Have you included relevant README for the chaoslib/experiment with details?
[ ] Have you added debug messages where necessary?
[ ] Have you added task comments where necessary?
[ ] Have you tested the changes for possible failure conditions?
[ ] Have you provided the positive & negative test logs for the litmusbook execution?
[ ] Does the litmusbook ensure idempotency of cluster state?, i.e., is cluster restored to original state?
[ ] Have you used non-shell/command modules for Kubernetes tasks?
[ ] Have you (jinja) templatized custom scripts that is run by the litmusbook, if any?
[ ] Have you (jinja) templatized Kubernetes deployment manifests used by the litmusbook, if any?
[ ] Have you reused/created util functions instead of repeating tasks in the litmusbook?
[ ] Do the artifacts follow the appropriate directory structure?
[ ] Have you isolated storage (eg: OpenEBS) specific implementations, checks?
[ ] Have you isolated platform (eg: baremetal kubeadm/openshift/aws/gcloud) specific implementations, checks?
[ ] Are the ansible facts well defined? Is the scope explicitly set for playbook & included utils?
[ ] Have you ensured minimum/careful usage of shell utilities (awk, grep, sed, cut, xargs etc.,)?
[ ] Can the limtusbook be executed both from within & outside a container (configurable paths, no hardcode)?
[ ] Can you suggest the minimal resource requirements for the litmusbook execution?
[ ] Does the litmusbook job artifact carry comments/default options/range for the ENV tunables?
[ ] Has the litmusbooks been linted?

Special notes for your reviewer:

.


Slider max changing does not clamp value

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

If we change the value bound to the max prop below the actual value the onChange event is not fired.
Expected Behavior 🤔

I would assume that the actual value should be affected, and the onChange event should fire. The value in the event should equal to Max. This is of course debatable if this should be the intended behaviour. Perhaps we could alter the event to report the reason for the value update so a user can decide how he handles it.
Steps to Reproduce 🕹
Code Sandbox

Steps:

Enter code sandbox sample above
Notice the value is set as 8, and max is set as 10
Press reduce button, notice that the slider represents the value as 5 but it is still 8 and handleChange() didn't fire.

Context 🔦

Your Environment 🌎

Tech
Version

Material-UI
v4.?.?

React

Browser

TypeScript

etc.

Did you save your codesandbox? It's the same as the template. :)

Did you save your codesandbox? It's the same as the template.

@IngoVals It's the responsibility of the developer to update the value accordingly when the value goes out of range. The component has does a best effort not to render something broken, however, don't expect more from it.

Yeah, that makes sense. I'm making some assumptions that perhaps aren't right.


Have anyone installed the "BOOTCAMP UPDATE"？

Shall we install this update? Will it add any support for Thunderbolt that uses the "Native" scheme?

It doesn't do anything. It will uninstall your AMD drivers so you will have to re-install it. But it won't add any support.


Get pixel value by lat/lon

Is it possible to get pixel value by lat/lon for a local tile? Leafmap already has the functionality for retrieving pixel value by lat/lon for remote COGs using titiler endpoint or Planetary Computer endpoint. I would love to implement similar functionality for local tiles.
https://leafmap.org/common/#leafmap.common.cog_pixel_value
https://github.com/giswqs/leafmap/blob/40973aed104376d04280d9215ce2d9e464681d3f/leafmap/common.py#L1187

Yes, this is already implemented though not really exposed in the TileClient. The server's endpoint to do this is /pixel/{left}/{right} which you can see on my deployed server here: https://tileserver.banesullivan.com/swagger/
To use this locally with the TileClient, do:
from localtileserver import TileClient
import requests

client = TileClient('/Users/bane/Desktop/TC_NG_SFBay_US_Geo.tif')
url = client.create_url('/pixel/0/0')
data = requests.get(url).json()
print(data)

output:
{'r': 99,
 'g': 75,
 'b': 48,
 'a': 255,
 'bands': {'1': 99.0, '2': 75.0, '3': 48.0},
 'left': 0,
 'top': 0,
 'units': 'pixels'}

I will leave this open to implement a method on the TileClient class to do this (as well as all the other endpoints)

The above is in pixel space. You can use the units parameter to use world coordinates.
I'll document this

That's great to know. I look forward to the implementation. Many thanks!

This functionality is changing a bit in #44


Wrong output for armeb (big endian ARM) binaries

STR
$ cargo new --lib foo && cd $_

$ cat >src/lib.rs <<'EOF'
#![no_std]
#[no_mangle]
pub fn foo(x: u32, y: u32) -> u32 {
    x + y
}
EOF

$ cargo objdump --lib --release --target armebv7r-none-eabi -- -d
/home/japaric/tmp/foo/target/armebv7r-none-eabi/release/libfoo.rlib(foo-5c3d4a3cd43899d6.foo.axz7xdhy-cgu.0.rcgu.o):    file format ELF32-arm-big

Disassembly of section .text.foo:
foo:
       0:       e0 81 00 00     andeq   r8, r0, r0, ror #3
       4:       e1 2f ff 1e     cdpne   p15, #15, c2, c15, c1, #7

Compare the output to the output of GNU objdump
$ arm-none-eabi-objdump -d target/armebv7r-none-eabi/release/libfoo.rlib
foo-5c3d4a3cd43899d6.foo.axz7xdhy-cgu.0.rcgu.o:     file format elf32-bigarm

Disassembly of section .text.foo:

00000000 <foo>:
   0:   e0810000        add     r0, r1, r0
   4:   e12fff1e        bx      lr

This is a bug in llvm-objdump. Reported as https://bugs.llvm.org/show_bug.cgi?id=38721
Meta
I used cargo-binutils v0.1.2 (currently unreleased) and tomorrow's nightly so I can't include sensible version information atm.
cc @paoloteti

Thanks for the feedback. I think llvm-objdump is not stable enough and Arm Compiler still use armdis (at least in the version I use day-by-day) . BTW is this an armeb issue or a generic 'big-endian' issue? thumbeb seems to have the same issue on a simple foo.c.

I have only tested armeb. If you can provide me a binary blob that shows the problem on the thumbeb backend then I can include it in the LLVM bug report (or you comment there yourself).

Simple foo.c
int foo(int a, int b) { return a + b; }

arm-none-eabi-gcc -O2 -mthumb -c -mbig-endian foo.c -o foo_thumbeb.o
arm-none-eabi-gcc -O2 -mthumb -c foo.c -o foo_thumb.o

GNU objdump (GNU Tools for Arm Embedded Processors 7-2018-q2-update) <IP_ADDRESS>80329 report:
arm-none-eabi-objdump -d foo_*

foo_thumbeb.o:     file format elf32-bigarm

Disassembly of section .text:

00000000 <foo>:
   0:	1840      	adds	r0, r0, r1
   2:	4770      	bx	lr

foo_thumb.o:     file format elf32-littlearm

Disassembly of section .text:

00000000 <foo>:
   0:	1840      	adds	r0, r0, r1
   2:	4770      	bx	lr

Using llvm-objdump from rustc 1.30.0-nightly (7061b2775 2018-08-28)
./llvm-objdump -triple=thumb -d /tmp/foo_thumb.o
/tmp/foo_thumb.o:	file format ELF32-arm-little

Disassembly of section .text:
foo:
       0:	40 18 	adds	r0, r0, r1
       2:	70 47 	bx	lr

./llvm-objdump -triple=thumbeb -d /tmp/foo_thumbeb.o
/tmp/foo_thumbeb.o:	file format ELF32-arm-big

subsection length greater than section length
subsection length greater than section length
Disassembly of section .text:
foo:
       0:	18 40 	ands	r0, r3
       2:	47 70 	strb	r7, [r0, #1]

Thanks for the repro instructions. I have reported the thumbeb problem in the original armeb bug report.

No idea whether this has been fixed upstream but it's not really something we can address in cargo-binutils. Closing thus.