.show() method fails

QNET version: 2.0.0-dev
Python version: Python 3.6
Operating System: Windows

Description
Hi, I'm trying to learn the qnet package for my research. I was wondering if I'm doing this in a right way or this method is broken. I assume the error is related to filepath of the temporary file generated..
What I Did
This is the command I ran:
from qnet import *
from sympy import I, sqrt, exp
init_printing()

ϕ = symbols(r"phi", real=True)
Gϕ = SLH(Matrix([[exp(I*ϕ)]]), Matrix([[0]]), 0)
Gϕ.show()

and this is what I got:
<ipython-input-10-e2bcc04e367d> in <module>()
----> 1 Gϕ.show()

~\AppData\Local\conda\conda\envs\qnet2-env\lib\site-packages\qnet\algebra\core\circuit_algebra.py in show(self)
    200         from IPython.display import Image, display
    201
--> 202         fname = self.render()
    203         display(Image(filename=fname))
    204

~\AppData\Local\conda\conda\envs\qnet2-env\lib\site-packages\qnet\algebra\core\circuit_algebra.py in render(self, fname)
    221             fname = tmp_dir + "/tmp_{}.png".format(hash(time))
    222
--> 223         if circuit_visualization.draw_circuit(self, fname):
    224             done = False
    225             for k in range(20):

~\AppData\Local\conda\conda\envs\qnet2-env\lib\site-packages\qnet\visualization\circuit_pyx.py in draw_circuit(circuit, filename, direction, hunit, vunit, rhmargin, rvmargin, rpermutation_length, draw_boxes, permutation_arrows)
    307         c.writetofile(filename)
    308     elif any(filename.endswith(suffix) for suffix in ('.png', '.jpg')):
--> 309         c.writeGSfile(filename)
    310     return True

~\AppData\Local\conda\conda\envs\qnet2-env\lib\site-packages\pyx\canvas.py in writeGSfile(self, filename, device, input, **kwargs)
    472         if input == "eps":
    473             cmd.append("-")
--> 474             p = config.Popen(cmd, stdin=config.PIPE)
    475             self.writeEPSfile(p.stdin, **kwargs)
    476             p.stdin.close()

~\AppData\Local\conda\conda\envs\qnet2-env\lib\site-packages\pyx\config.py in Popen(cmd, *args, **kwargs)
    188         info += " located at {}".format(shutil.which(cmd[0]))
    189     logger_execute.info(info)
--> 190     return subprocess.Popen(cmd, *args, **kwargs)
    191
    192 PIPE = subprocess.PIPE

~\AppData\Local\conda\conda\envs\qnet2-env\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors)
    707                                 c2pread, c2pwrite,
    708                                 errread, errwrite,
--> 709                                 restore_signals, start_new_session)
    710         except:
    711             # Cleanup if the child failed starting.

~\AppData\Local\conda\conda\envs\qnet2-env\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
    995                                          env,
    996                                          os.fspath(cwd) if cwd is not None else None,
--> 997                                          startupinfo)
    998             finally:
    999                 # Child is launched. Close the parent's copy of those pipe

FileNotFoundError: [WinError 2] The system cannot find the file specified

Thrilled to hear back from some users of QNET!
Unfortunately, I'm unable to reproduce your error. Can you give more information about your environment?
I'm running Ubuntu 18.04, using conda to manage python environments. I set up an environment to investigate your issue as follows:
conda create -n test python=3.6 ipykernel
conda activate test
python -m ipykernel install --user --name test --display-name "Python 3 (test)"
git clone https://github.com/mabuchilab/QNET.git
pip install -e ./QNET
pip install pyx
jupyter notebook

Then I ran your code in a new notebook created with the new Python 3 (test) kernel, and here's what it looks like:

If you're using a text console and not a jupyter notebook or qtconsole, you will not see the graphics, but just a text repr that says <IPython.core.display.Image object>.
Note: the warning messages from PyX that are showing in my notebook can be suppressed by running the following code at the top of the notebook:
import logging
logging.getLogger("pyx").setLevel("ERROR")

This is a nuisance that QNET should take care of itself in the not too far future.

Thanks for the reply @danielwe ,
I followed the exact same steps as you mentioned, and I still get the same error:

Perhaps this is a windows-specific bug that needs to be addressed.
One possible culprit is this part
c:\users\ekim7\qnet\src\qnet\algebra\core\circuit_algebra.py in render(self, fname)
    221             fname = tmp_dir + "/tmp_{}.png".format(hash(time))

I think for windows path must be expressed as
fname = tmp_dir + "\\tmp_{}.png".format(hash(time))

But that was insufficient for me to get rid of this error..

Yeah, incompatibility with Windows is definitely the culprit here. Those path concatenations should be done with os.path.join. I don't really have access to any Windows machine, so this will be tricky for me to test at the moment.

I think there are some Continuous-Integration services available for Github that test on Windows, and we should probably look into those if we want to support Windows.

Good news, I was able to reproduce the error in a Windows VM. It occurs already in the import statement. I will look further into it as time allows over the next days, and see if Windows support is a realistic goal.

So here's the problem: on Windows, neither MikTeX nor TeX Live installations expose the ghostscript executable gs, which is called by pyx, the visualization library used by QNET. The FileNotFoundError comes from trying to call gs, not from the slightly malformed temp file path---turns out, Windows can usually handle file paths with forward slashes, and even mixed forward and backward slashes (still, we should eventually change to using os.path or pathlib to construct such paths).
Both distributions do however expose a ghostscript executable/wrapper: MikTeX calls it mgs, and TeX Live rungs. So if you have MikTeX, one way to make QNET visualizations work on Windows is to change the following line in src/qnet/visualization/circuit_pyx.py:
         c.writeGSfile(filename)

to
         c.writeGSfile(filename, gs="mgs")

If you have TeX Live, replace mgs with rungs.
I guess we should implement a check for which of gs, mgs, rungs, or perhaps gswin32c, is available and executable upon import.

Does the latest commit solve the problem on your system, @eunjongkim?

@danielwe I just checked that the latest commit, together with a minor change
fname = tmp_dir + "\\tmp_{}.png".format(hash(time))

to take into account windows path worked. Thanks for the update!

Have you tried without your manual modification? On my Windows setup, it works regardless. I'll soon go through and fix this and any similar instances I can find, but I'm curious whether the current code actually fails on certain setups or not.

It seems to work for me as well without the manual modification.


Human readable alerts for Daemonset/Statefulset events

Rancher versions:
Master 4/20/18
Steps:
Create a new cluster
Create an alert for Daemonset events.
Create an alert for Stateful events.
Results:
Can we please make the event description user friendly?

Master 4/21/18
Verified UI


[COOK-1987] Don't list yourself as currently having RHEL support

https://tickets.opscode.com/browse/COOK-1987
Every single package name is different, but fixing that isn't enough to make it functional

I removed metadata support as part of https://github.com/opscode-cookbooks/openldap/pull/46


AzureAppServiceSettingsV1 slot fails to populate

Type: Bug
Enter Task Name: AzureAppServiceSettings
Environment

Server - Azure Pipelines
Agent - Private

Issue Description
I'm testing the AzureAppServiceSettingsV1-preview task.
There is a problem within the editor. The Slot-entry will not populate the list. It shows 'No Results Found.'
Task logs
Not a task log, but when I open the developer-tools it shows the following message:
statusCode: "forbidden"
errorMessage: "Failed to query service connection API: 'https://management.azure.com/subscriptions/.../resourceGroups/providers/Microsoft.Web/sites/.../slots?api-version=2018-11-01'. Status Code: 'Forbidden', Response from server: '{"error":{"code":"AuthorizationFailed","message":"The client '...' with object id '...' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourceGroups/Microsoft.Web/.../read' over scope '/subscriptions/.../resourceGroups/providers/Microsoft.Web/sites/.../slots' or the scope is invalid. If access was recently granted, please refresh your credentials."}}'"

This is strange, because other tasks in the pipeline can query the slots. In the developertools, I can see that the following data is posted:
{
    "serviceEndpointDetails": null,
    "dataSourceDetails": {
        "dataSourceName": "AzureRMWebAppSlotsId",
        "resourceUrl": "",
        "parameters": {
            "appName": " <removed> ",
            "resourceGroupName": " <removed> ",
            "ConnectedServiceName": " <removed> ",
            "WebAppName": " <removed> ",
            "ResourceGroupName": " <removed> "
        }
    },
    "resultTransformationDetails": {
        "resultTemplate": "{\"Value\":\"{{{ #extractResource slots}}}\",\"DisplayValue\":\"{{{ #extractResource slots}}}\"}"
    }
}

The difference with the calls from the tasks that succeed, is that there are extra properties appName and resourceGroupName, but I do not know if that is the problem.

We recently fixed an issue related to slots which is currently undergoing deployment.
The url _https://management.azure.com/subscriptions/.../resourceGroups/providers/Microsoft.Web/sites/.../slots?api-version=2018-11-01_ does not have resource group name in it. This could be causing the issue for you.

@Debbus72  We had already fixed this issue. Are you still facing this issue ?

For me the problem still exists.
However, it looks like our organisation is still on Azure DevOps sprint 161, but I do not know if that is a problem. How can I check that I use the latest version of the task? (the task still show 1.* (preview))

@Debbus72  Can you confirm the full task version from the pipeline logs?

2020-01-09T06:43:26.4156524Z ##[section]Starting: Azure App Service Settings: Test
2020-01-09T06:43:26.4769139Z ==============================================================================
2020-01-09T06:43:26.4769325Z Task         : Azure App Service Settings
2020-01-09T06:43:26.4769404Z Description  : Update/Add App settings an Azure Web App for Linux or Windows
2020-01-09T06:43:26.4769483Z Version      : 1.158.3
2020-01-09T06:43:26.4769544Z Author       : Microsoft Corporation
2020-01-09T06:43:26.4769598Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks
2020-01-09T06:43:26.4769677Z ==============================================================================
2020-01-09T06:43:29.1526738Z Got service connection details for Azure App Service:'Test'
2020-01-09T06:43:29.1736850Z Updating App Service Application settings. Data: {"key1":"valueabcd","key2":"valueefgh"}
2020-01-09T06:43:29.6450829Z Updated App Service Application settings and Kudu Application settings.
2020-01-09T06:43:30.4649433Z ##[section]Finishing: Azure App Service Settings: Test

@Debbus72  Yes this is the previous version of the task. I am assuming due to the Holiday season the deployment was not done in your account. Please wait for a few more days. Thanks!

We finally got the update yesterday (Azure DevOps sprint 162) and now it works!
Thank you.


Update to new Swift 2.2 selector syntax

Travis integration is apparently still failing, even with Xcode 7.3. The code looks fine, so I’ve merged it, I hope it’s just some CI glitch. Thanks again for the PR :+1: :+1:


Add "Omage Sandra" to names.txt

Please check the top right corner of the screen on this page on GitHub after you make changes
The goal is to make sure that only one line is added
We will merge your commit as soon as possible 😊


Fix prefast warning for JsDiagEvaluateUtf8

JsDiagEvaluateUtf8 calls strlen to get length of passed string and need to
specify that it is null terminated

/// <param name="expression">Expression to evaluate.</param>

Consider adding a comment here indicating that expression is null-terminated.

Refers to: lib/Jsrt/ChakraDebug.h:599 in 0c344df. [](commit_id = 0c344df908f7cf8968a6480e374b9ae51f8c9e99, deletion_comment = False)

:shipit:


feat: store dependencies of extensions in dedicated directory

Puts IC binary dependencies of extensions into binary-dependencies directory, e.g.
❯ tar xfJ sns-aarch64-apple-darwin.tar.gz
❯ tree sns-aarch64-apple-darwin
CHANGELOG.md
extension.json
LICENSE
README.md
sns
binary-dependencies
| - sns-cli

Originally I was planning to bring it together with #48, but somehow, this feature works for me locally but fails in GitHub CI. I will require more investigation, for now I'm leaving it here

I'm no longer part of DFINITY; closing old PRs


Reuse the same sink-file in bdd_sink

This reopens #87 after the master branch was renamed to main

If the main purpose of Adiar is to have big BDDs, then noone should be sitting with so many small BDDs concurrently or keep creating them. The speed increase is probably miniscule compared to the complexity added.


Serialization & comparison fixes

Some more fixes.

Parse image extras property
Optionally serialize texture.source (it is not required in the current spec)
Always check Parameter::number_value to catch user errors, e.g. setting number_value without setting has_number_value, which will cause it to serialize as a bool but read back in as a float anyway
Support writing multiple bin files
Use existing buffer.uri as filename if not empty and not a data uri, else a default file name
Protect against writing the same uri twice (of course naming conflicts when writing multiple gltf+bins to the same directory is up to the user to prevent).

Discussion:
This PR changes the default behavior for writing .bin file(s).

Previously, only the last buffer in the list would be saved (and std::ofstream default is truncate I believe, so the data was really lost). Now all buffers are saved.
More importantly, the bin filename previously defaulted to the glTF filename with a .bin extension. Now, the default name is the buffer.uri property, if valid, with the previous behavior as a fallback.

Awesome! Merged.

This PR changes the default behavior for writing .bin file(s).

Current serialization feature is not complete, thus I'd like to adopt to the behavior in your PR.


Project Form/SOW workflow can be confusing

When a Project Form & SOW exist on a fund, populating them in Hypha can be a bit confusing. From my experience, both are initially populated under Project Form. Once you select Fill in, you first populate the Project Form then the SOW immediately under it. Once you press Save, that's when the SOW field will appear under Project Documents. But, to edit it the user needs to select edit on Project Form and scroll back down
before filling in PAF/SOW

after hitting save while editing Project Form

I'm not sure if there's context I'm missing or if this is a bug but to me it'd make more sense to have the SOW be it's own line from the start, rather than having to go through Project Forms to edit it.

Do OTF still require them to be separate forms?
The reson for the SOW was I believe to have a subsection of the PAF that a separate group of people needed. This people did not need or should see the other parts of the PAF, like names, addresses etc.
We merged them since staff then did not want to add things in two separate forms.
If OTF still needs the separate SOW we should make it easier to edit. If they do not we can removed the features, I'm pretty sure no one else has any use of it.

ah okay that makes sense. OTF does still utilize them as separate forms for the time being - maybe that could be a configurable option in wagtail though to combine the two?

I believe OTF want the option to view the SOW separately, download it as a PDF etc.

@frjo yeah that should be kept but if other implementers wanted to configure the SOW to be a subsection of the PAF it makes sense to me that we wouldn't show it as separate in that use case? but if y'all have heard different from the adopters then that works fine for me.

I do not think anyone else is going to use a SOW form at all. OTF use case is quite specific. Most likely have no need for a project form at all.

ahh alright that makes sense, so maybe just keep it separate if an SOW exists?

Adding an edit link to the SOW makes sense I think. Could be as easy as a link to the current PAF edit form that scrolls down to the SOW part.
If it makes more sense to OTF we can also add a separate SOW edit form. The question is then if it also should show when staff edit the PAF.
Whatever makes sense to staff.


Sap.m.Input type = Number , behavior with UI language

OpenUI5 version: Latest
Steps to reproduce the problem:

Input field with type="Number", set value in Float
Now change the UI language=it(Italian) , their will be no change in the format.(remain same as English)
but if we change the browser language, then Input changes the Number format in Italian number format.

What is the expected result?
Input value format change the number according to the UI language.
What happens instead?
Input value format only changing with browser language change.
Any other information? (attach screenshot if possible)
Please Find the screenshots

Hello @nishan-nainsukha ,
Thank you for sharing this finding. I've created an internal incident<PHONE_NUMBER>. The status of the issue will be updated here in GitHub.
Regards,
Nayden

Hello @nishan-nainsukha
Decimal point of inputs (of type number) in the browser are based on the language of the OS.
We can't really force them to be based on the sap-ui-language.
You can also check other apps such as excel and verify this behaviour.
An option for you would be to use inputType=Text and validate the value property.
Unfortunately, in this case the keyboard on mobile wont be the numeric keyboard.
As this is a general browser limitation I am closing the issue.
Regards,
Martin


Change boost icon from ♻ to 🔁

I think this may need to be replaced in the README too

I think this may need to be replaced in the README too

Thank you; I hadn't made the same change to the Twitter code either. Both are fixed now.


My issue is thanks

@GitCash please send 5000 bits to @mikermcneil to say thanks for the awesome framework.

Thanks!

@GitCash please make it rain 8000 bits on @mikermcneil for all his great work

D'oh! I think settings on the Sails repo stop the GitCash bot from posting or catching the mention. Good to know!


RBD: Remove dead code

during volume creation we are validating
that volume name cannot be empty,removing
this check as we are not going to hit
this case
Fixes: #204
Signed-off-by: Madhu Rajanna<EMAIL_ADDRESS>

@gman0 @rootfs @humblec PTAL

@Madhu-1 please feel free to update some more on why we wont hit this case :)

@Madhu-1 please feel free to update some more on why we wont hit this case :)

@humblec #204

@Madhu-1 to clarify: the intention here is to remove a duplicit req.GetName() validation, since it's already checked here
https://github.com/ceph/ceph-csi/blob/e91a59d2f948a1c81320d61f2e1a2b613a7f8183/pkg/rbd/controllerserver.go#L81-L84
right?

@gman0 yes you are correct

lgtm.

ah, in that case LGTM!


firefox{,-bin}-unwrapped: 120.0.1 -> 121.0

Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Release notes URL into the commit messages. And also bump ESR.

Please also add a reference to the security advisories and mention the relevant CVEs.
https://www.mozilla.org/en-US/security/advisories/mfsa2023-56/
https://www.mozilla.org/en-US/security/advisories/mfsa2023-54/

CVE-2023-6865 sounds like we also need an nss bump?

CVE-2023-6135 sounds like we also need an nss bump?

Most likely resolved in 3.96.0.


Get Output Parameters of Action

To get outputParameters array you can use get_outputParameters() method.
var outputParameters = result.get_outputParameters();
Then refer your parameter by name.

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

ID: 361590b9-cb25-3aee-61e6-658d093231d6
Version Independent ID: 1251e753-bf19-8aef-084d-179ac147ea99
Content: invokeProcessAction (Client API reference) in Dynamics 365 Customer Engagement
Content Source: ce/developer/clientapi/reference/Xrm-Utility/invokeProcessAction.md
Service: crm-online
GitHub Login: @KumarVivek
Microsoft Alias: kvivek

@KumarVivek I think this should be explained in the MS docs, not just here in GitHub.
This documentation page:
https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-utility/invokeprocessaction


POP DIRECTIONAL FORMATTING character at end of value when copying after manual selection

Describe the bug
When copying the displayed value after manually sweeping to select it with the mouse, a POP DIRECTIONAL FORMATTING character is included at the end of the text which interferes with other apps trying to parse the value as a number.
Steps To Reproduce

Type the number 100 into calculator
Select the value using the mouse starting at the '1' (NB, this doesn't happen when sweeping the other way as the zero-width character cannot be selected)
Right click on the selection and choose "Copy" (or use CTRL-C)
Paste the result into Notepad
Hit backspace at the end of the value - a zero-width character (Unicode 202C) is deleted not the last digit.

Expected behavior
No zero-width formatting characters included with the copied value.
Device and Application Information
Calculator v10.1910.0.0 x64 10.1910.0.0 (en-GB)
I'm just reporting this problem.  I don't want to fix it.

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

Thanks for the detailed report! This appears to be a dupe of #504. A fix went in recently and should be available in Calculator v10.2004.* or higher. Let me know if you think this might be something different, and we can revisit this again.


(next) Enums not being properly serialized

Describe the bug
On the stable branch we have enums like UpTo manually defined on the types crate, but that's not the case for next branch, and some autogenerated enums ends up serializing incorrectly.
To Reproduce
Try to create a price with up_to: CreatePriceTiersUpTo::Inf on any tier.
Expected behavior
The price should be created, but instead it fails with an error:
You passed an empty string for 'tiers[0][up_to]'. We assume empty values are an attempt to unset a parameter; however 'tiers[0][up_to]' cannot be unset. You should remove 'tiers[0][up_to]' from your request or supply a non-empty value.

Code snippets
No response
OS
all
Rust version
1.74.0
Library version
next
API version
2024-04-10
Additional context
Taking as an example this enum:
#[derive(Copy, Clone, Debug, serde::Serialize)]
#[serde(untagged)]
pub enum CreatePriceTiersUpTo {
    Inf,
    I64(i64),
}

Inf variant is incorrectly serialized to null, instead of "inf", as explained here.
The correct enum would be:
#[derive(Copy, Clone, Debug, serde::Serialize)]
#[serde(rename_all = "snake_case")]
pub enum CreatePriceTiersUpTo {
    Inf,
    #[serde(untagged)]
    I64(i64),
}

Closing as fixed by #605, not sure why didn't happen automatically


Compatibility with Ember 2.0

I am trying to use it with Ember 2.0 but I am getting error of missing foreach in the line   var forEach = Ember.EnumerableUtils.forEach;

Would be really great to have Ember 2.0 compatibility.

Apologies for taking so long with this. The dependency on Ember.EnumerableUtils is now gone.


Inconsistency in es_index_export.py and config file

Hi guys.
In es_index_export.py in line 30 we load enrichments directory from config:
en_path = ATCconfig.get('enrichments_directory')
But in config file enrichments directory is defined as enrichments_dir, not enrichments_directory.
Therefore loading enrichments directory fails.

Hello @andrazjelenc!
Thank you very much for your help!
Will fix it in a few minutes (:


Unable to flash images over SPI

Between https://github.com/lowRISC/opentitan/commit/956bc343f714df574d671870def96791b1a2663c and https://github.com/lowRISC/opentitan/commit/9e10420314861224009ef04c5f1201743fdfa862 the spiflash tool is unable to flash images to the SPI.
Before commit https://github.com/lowRISC/opentitan/commit/9e10420314861224009ef04c5f1201743fdfa862 running the following command:
./build-out/sw/host/spiflash/spiflash --dev-id="0403:6010" --input=tock/target/riscv32imc-unknown-none-elf/release/earlgrey-nexysvideo-app.bin

would print
Running SPI flash update.
Image divided into 217 frames.
frame: 0x00000000 to offset: 0x00000000
frame: 0x00000001 to offset: 0x000003d8
frame: 0x00000002 to offset: 0x000007b0
frame: 0x00000003 to offset: 0x00000b88
...

and flash an image to the flash on the Nexys Video FPGA and boot the image.
Between https://github.com/lowRISC/opentitan/commit/956bc343f714df574d671870def96791b1a2663c and https://github.com/lowRISC/opentitan/commit/9e10420314861224009ef04c5f1201743fdfa862 the spiflash tool is unable to flash images.
On the host I see:
Running SPI flash update.
Image divided into 217 frames.
frame: 0x00000000 to offset: 0x00000000
Didn't receive correct hash before timeout.
frame: 0x00000000 to offset: 0x00000000
Didn't receive correct hash before timeout.
frame: 0x00000000 to offset: 0x00000000
Didn't receive correct hash before timeout.
frame: 0x00000000 to offset: 0x00000000
...

and on the UART I see:
I00000 boot_rom.c:52] Version:    opentitan-snapshot-20191101-1-3549-g9e104203
Build Date: 2020-12-13, 23:42:26

I00001 boot_rom.c:61] Boot ROM initialisation has completed, jump into flash!

So it seems like the ROM thinks it has something to boot to, but doesn't actually load anything.

The two commits you linked to are part of one push and depend on each other; I wouldn't expect master between those commits to work. However, it should work on master, and CI confirms that.
Unrelated to spiflash, we however see after 9e10420 that a GPIO smoke test broke. I'm therefore backing out this change in #4555.
Can you double-check if spiflash on the current master works for you? It certainly does for non-rust-SW on FPGAs in CI.

Oh no, even more confusing. The PR CI (https://github.com/lowRISC/opentitan/pull/4155) did only fail on the GPIO smoke test on FPGAs, the CI after the PR was merged into master now shows the spiflash problem @alistair23 is reporting here. So two things to sort out, either way, the backout should get us back into a better state for now.
Sorry for the confusion.

We run spiflash on Nexys Video in CI and are reasonably confident that it works in the general case. @alistair23 please re-open with more information if that is still a problem for you.


Creating backend control plane API for per API logging

Fixed with https://github.com/wso2/carbon-apimgt/pull/10978


reduce-memory: add version 1.6

Closes https://github.com/ScoopInstaller/Extras/issues/9660
Relates to https://github.com/ScoopInstaller/Extras/pull/9701

[X] I have read the Contributing Guide.

/verify

You should run checkver.ps1 to ensure the format.

You should run checkver.ps1 to ensure the format.
I thought /verify would take care of it

Sadly not... /verify could only check elements but not format, which is done by other GHAs.


Don't redundantly execute pre-commits as part of Jenkins post-commits

Each post-commit suite is configured to also include pre-commit tests. However, in Jenkins we run pre-commits separately from post-commits, and in all cases when a language post-commit suite runs, the pre-commit is also run separate (in PR, on merge, cron schedule). So, it makes sense to separate the targets. This will free up resources and give a faster signal on post-commit suites as they are doing less work.

Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

It will help us expedite review of your Pull Request if you tag someone (e.g. @username) to look at it.
Post-Commit Tests Status (on master branch)

Lang
SDK
Apex
Dataflow
Flink
Gearpump
Samza
Spark

Go

---
---
---
---
---
---

Java

Python

---

---
---
---

Run Seed Job

Run Java PostCommit

Run Go PostCommit

Run Python PostCommit

Python post-commits failed with:

15:32:31 ERROR: Step ‘Publish JUnit test result report’ failed: None of the test reports contained any result
15:32:32 Setting status of af9903904dae517fbfa626fec7717756a60f1277 to FAILURE with url https://builds.apache.org/job/beam_PostCommit_Python_Verify_PR/247/ and message: 'FAILURE
15:32:32  '

I suspect the pre-commit tests were previously building a JUnit test report which the remaining post-commit tests are not.

Run Java PostCommit

Run Go PostCommit

Run Python PostCommit

Here's how the post-commit timings from the first commit compare to recent runs against master:

Python: 53 mins, down from ~80 mins, 34% reduction
Go: 12 mins, down from ~13 mins, 8% reduction
Java: 105 mins, down from ~115 mins, 9% reduction

LGTM

The python post-commit tests still failed attempting to publish a JUnit test report. Either this configuration is buried in common setup somewhere I missed, or the job definition wasn't up-to-date with this PR when I ran the job. I'll investigate.

Run Seed Job

Run Java PostCommit

Run Python PostCommit

Run Go PostCommit

R: @lostluck (for Go)
R: @udim (for Python)
R: @kennknowles (for Java, already gave LGTM)

Run Python PreCommit

Run Python PostCommit

The Python precommit failure (really a nose or tox bug) should have been retried here: https://github.com/apache/beam/pull/7059
I don't understand the Python postcommit failure. The worker didn't start. Maybe a quota issue?
As for removing junit reporting, timings for postcommit ITs can be useful. They should be generating a nosetests.xml file.

As for removing junit reporting, timings for postcommit ITs can be useful. They should be generating a nosetests.xml file.

The JUnit test reports published from post-commit tests are always empty, which fails the Jenkins job. It seems there are important differences between how the precommits run via tox and how post-commits are executed via the provided scripts. I suspect the integration test scripts are running into a known-limitation of nose tests and subprocesses: https://stackoverflow.com/questions/10120923/python-nose-xunit-report-file-is-empty

Python post-commit job failed again because the Seed Job was re-run on a different PR which overwrote the change to exclude JUnit test report publishing. I've reached out to @ryan-williams to coordinate on running the seed job.

Run Seed Job

Run Python PostCommit

Run Python PostCommit

Still struggling to get a clean Python post-commit run. Last run failed again for seemingly unrelated reasons.
I'm going to rebase up to master to see if perhaps I'm at a bad commit and try again.


A sound condition.

For example, if you want an item texture to only be displayed when a certain sound plays. Like blocks getting darker when there are cave sounds. Or, only when a certain sound in your sounds folder plays. For example a sounds.json file path. E.g

Neat idea, will probably use the sound id instead of the sound path though.
Added to the idea board.

Hmm.. Maybe even allow checking either, not sure yet.

Maybe add a option in the properties file that lets you choose the sound path in the sounds.json file. E.G Soundpaths=1,3


Consider communicating when the Analysis Server has crashed/stopped?

It just remains white.
SDK 1.13, WebStorm 11.0.1
See: http://d.pr/i/1hU7W

I chose Reanalyze Dart Sources from the Dart Analysis tab (http://d.pr/i/QCD) and now all my files have gone to white (no analysis).

Do you get any exceptions in the WebStorm event log (red icon at the bottom-right)

No red icon. Opened Event Log manually. Empty. http://d.pr/i/1k117

Red icon is disabled by default in WebStorm / IntelliJ IDEA release builds. It is enabled in EAPs only. It is possible to enable it by editing bin/idea.properties file in IDE installation (idea.fatal.error.notification=enabled). Or you can look for exceptions in idea.log file (Help | Show Log).

Ok, I'm going to chalk this up to homebrew issues. I returned to my desk this morning and noticed WebStorm reporting that the Dart SDK wasn't configured for the project. In preferences, I noticed the path to the Dart SDK was no longer there. I checked the physical path and lo and behold it no longer existed. I brew install dart again and the rest is pasted:
DaveMac:woven-app dave$ brew install dart
Warning: dart-lang/dart/dart-1.13.0 already installed, it's just not linked
DaveMac:woven-app dave$ brew link dart
Linking /usr/local/Cellar/dart/1.13.0...
Error: Could not symlink bin/content_shell
Target /usr/local/bin/content_shell
is a symlink belonging to dartium. You can unlink it:
  brew unlink dartium

To force the link and overwrite all conflicting files:
  brew link --overwrite dart

To list all files that would be deleted:
  brew link --overwrite --dry-run dart
DaveMac:woven-app dave$ brew link --overwrite dart
Linking /usr/local/Cellar/dart/1.13.0... 8 symlinks created
DaveMac:woven-app dave$ brew install dart
Warning: dart-lang/dart/dart-1.13.0 already installed

So I had to somehow fix my links. Then the path was there, I told WebStorm about it, and the Analyzer started indexing again.
Here are a few messages from the log, if it helps:
2015-11-19 01:57:26,494 [101860694]  ERROR - yzer.DartAnalysisServerService - WebStorm 11.0.1  Build #WS-143.382.36
2015-11-19 01:57:26,494 [101860694]  ERROR - yzer.DartAnalysisServerService - JDK: 1.8.0_40-release
2015-11-19 01:57:26,494 [101860694]  ERROR - yzer.DartAnalysisServerService - VM: OpenJDK 64-Bit Server VM
2015-11-19 01:57:26,494 [101860694]  ERROR - yzer.DartAnalysisServerService - Vendor: JetBrains s.r.o
2015-11-19 01:57:26,494 [101860694]  ERROR - yzer.DartAnalysisServerService - OS: Mac OS X
2015-11-19 01:57:26,494 [101860694]  ERROR - yzer.DartAnalysisServerService - Last Action: EditorBackSpace
2015-11-19 01:57:26,826 [101861026]  ERROR - yzer.DartAnalysisServerService - Dart analysis server, SDK version 1.13.0-dev.7.12, server version 1.12.0, error: Failed to handle completion domain request: {clientRequestTime:<PHONE_NUMBER>816, params: {file: /Users/dave/Sites/woven-app/tool/crawler.dart, offset: 1611}, method: completion.getSuggestions, id: 15389}
#0      AnalysisTask._safelyPerform (package:analyzer/task/model.dart:320)
#1      AnalysisTask.perform (package:analyzer/task/model.dart:210)
#2      AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:271)
#3      AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:246)
#4      AnalysisContextImpl.performAnalysisTask.<anonymous closure> (package:analyzer/src/context/context.dart:1098)
#5      _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:170)
#6      AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1096)
#7      PerformAnalysisOperation.perform (package:analysis_server/src/operation/operation_analysis.dart:367)
#8      AnalysisServer.performOperation (package:analysis_server/src/analysis_server.dart:798)
#9      Future.Future.<anonymous closure> (dart:async/future.dart:118)
#10     _rootRun (dart:async/zone.dart:903)
#11     _CustomZone.run (dart:async/zone.dart:802)
#12     _CustomZone.runGuarded (dart:async/zone.dart:708)
#13     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:733)
#14     _rootRun (dart:async/zone.dart:907)
#15     _CustomZone.run (dart:async/zone.dart:802)
#16     _CustomZone.runGuarded (dart:async/zone.dart:708)
#17     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:733)
#18     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:16)
#19     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:385)
#20     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:150)
#0      Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1      Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2      TypeProviderImpl._initializeFrom (package:analyzer/src/generated/resolver.dart:14071)
#3      TypeProviderImpl.TypeProviderImpl.forNamespaces (package:analyzer/src/generated/resolver.dart:13935)
#4      BuildTypeProviderTask.internalPerform (package:analyzer/src/task/dart.dart:1546)
#5      AnalysisTask._safelyPerform (package:analyzer/task/model.dart:310)
#6      AnalysisTask.perform (package:analyzer/task/model.dart:210)
#7      AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:271)
#8      AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:246)
#9      AnalysisContextImpl.performAnalysisTask.<anonymous closure> (package:analyzer/src/context/context.dart:1098)
#10     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:170)
#11     AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1096)
#12     PerformAnalysisOperation.perform (package:analysis_server/src/operation/operation_analysis.dart:367)
#13     AnalysisServer.performOperation (package:analysis_server/src/analysis_server.dart:798)
#14     Future.Future.<anonymous closure> (dart:async/future.dart:118)
#15     _rootRun (dart:async/zone.dart:903)
#16     _CustomZone.run (dart:async/zone.dart:802)
#17     _CustomZone.runGuarded (dart:async/zone.dart:708)
#18     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:733)
#19     _rootRun (dart:async/zone.dart:907)
#20     _CustomZone.run (dart:async/zone.dart:802)
#21     _CustomZone.runGuarded (dart:async/zone.dart:708)
#22     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:733)
#23     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:16)
#24     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:385)
#25     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:150)
#0      AnalysisFutureHelper.computeAsync.<anonymous closure> (package:analyzer/src/context/context.dart:1988)
#1      PendingFuture.evaluate (package:analyzer/src/context/context.dart:2093)
#2      AnalysisFutureHelper.computeAsync (package:analyzer/src/context/context.dart:1994)
#3      AnalysisContextImpl.computeResolvedCompilationUnitAsync (package:analyzer/src/context/context.dart:650)
#4      DartCompletionManager.waitForAnalysis (package:analysis_server/src/services/completion/dart_completion_manager.dart:278)
#5      DartCompletionManager.computeFull (package:analysis_server/src/services/completion/dart_completion_manager.dart:202)
#6      DartCompletionManager.computeSuggestions.<anonymous closure> (package:analysis_server/src/services/completion/dart_completion_manager.dart:245)
#7      CompletionPerformance.logElapseTime (package:analysis_server/src/services/completion/completion_manager.dart:165)
#8      DartCompletionManager.computeSuggestions (package:analysis_server/src/services/completion/dart_completion_manager.dart:242)
#9      CompletionManager.results.<anonymous closure>.<anonymous closure> (package:analysis_server/src/services/completion/completion_manager.dart:108)
#10     _rootRun (dart:async/zone.dart:903)
#11     _CustomZone.run (dart:async/zone.dart:802)
#12     _CustomZone.runGuarded (dart:async/zone.dart:708)
#13     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:733)
#14     _rootRun (dart:async/zone.dart:907)
#15     _CustomZone.run (dart:async/zone.dart:802)
#16     _CustomZone.runGuarded (dart:async/zone.dart:708)
#17     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:733)
#18     _microtaskLoop (dart:async/schedule_microtask.dart:43)
#19     _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
#20     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#21     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
	at com.jetbrains.lang.dart.analyzer.DartAnalysisServerService$1.serverError(DartAnalysisServerService.java:192)
	at com.google.dart.server.internal.BroadcastAnalysisServerListener.serverError(BroadcastAnalysisServerListener.java:180)
	at com.google.dart.server.internal.remote.processor.NotificationServerErrorProcessor.process(NotificationServerErrorProcessor.java:37)
	at com.google.dart.server.internal.remote.RemoteAnalysisServerImpl.processNotification(RemoteAnalysisServerImpl.java:660)
	at com.google.dart.server.internal.remote.RemoteAnalysisServerImpl.processResponse(RemoteAnalysisServerImpl.java:673)
	at com.google.dart.server.internal.remote.RemoteAnalysisServerImpl.access$100(RemoteAnalysisServerImpl.java:109)
	at com.google.dart.server.internal.remote.RemoteAnalysisServerImpl$ServerResponseReaderThread.run(RemoteAnalysisServerImpl.java:152)

and others like:
...
2015-11-19 02:00:34,062 [102048262]  ERROR - yzer.DartAnalysisServerService - Dart analysis server, SDK version 1.13.0-dev.7.12, server version 1.12.0, error: Exception from assist contributor: DefaultAssistContributor
Cannot compute RESOLVED_UNIT for /Users/dave/Sites/woven-app/tool/crawler.dart in /Users/dave/Sites/woven-app/tool/crawler.dart
#0      AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:666)
...

What's odd is the Dart Analysis tab remained. And choosing to analyze brought me those blank results I mentioned. I'll leave this task open, as it'd be nice if the DAS said something like "Dart Analysis Server has crashed. Are you sure you've configured the path to the Dart SDK?", or maybe just disappear? Maybe this is on the Jetbrains side?

Filed issue here: https://youtrack.jetbrains.com/issue/WEB-19181
And closing this issue.

Do DAS exceptions pasted above worth attention?

Good question, Konstantin/Brian?


Travis CI configuration is needs to be updated

Github issues are for bug reports. If this is a question around usage or understanding please use
Stack Overflow. https://stackoverflow.com/questions/tagged/uber-api
Library version: 0.9.1
Repro steps, stacktrace, screenshots:  https://travis-ci.org/uber/rides-android-sdk/jobs/415625667
sdkmanager tools results in
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.```

Expected Behavior:  passing build.

fixed by #133


Add a function extract_embedding_from_pcm

Add a function extract_embedding_from_pcm such that we can easily extract speaker embedding from part of a long wav file, as well as other formats than wav.

Hi Quan Wang, thanks for your contribution.
It is very useful to add the function extract_embedding_from_pcm in our cli python usage.


[Feature request] optional item in simulate functions

I want to simulate right-click for opening "loot box" by the entity.
In my case its Goose holding Fur Ball (fur ball dropping items on right click).

The problem, is that i cant know what item result i would get after right-clicking.
As i got it right, i should

Detect item Goose holding
Make fake player
Simulate right-click by player with item goose holding
This would open "fur ball" and drop items into fake player inventory
Drop inventory of fake player in world like it was Goose

The problem is that i want any item be used this way. Like, maybe gun? Or giant sword. In this case i need to know not only the result of usage simulation but item transformation (like reducing durability).

If in functions like player.simulateRightClickItem(item, hand); i could assume that item is thing holded in hand, actual item would be used from fake player inventory and transformed, so u could read result after.

I can't make item arg as optional, since null value should be considered as empty hand.
Added result item for your problem.
val result = world.fakePlayer.simulateRightClickEntity(target, <minecraft:shears>);
// for sheep, it will print <minecraft:shears:1>
print(result.item.commandString);

Great! Thank you for the fix!


cleanup: correct misspelling

Correct snapshots spelling in rbd.go
Signed-off-by: Yug<EMAIL_ADDRESS>

Show available bot commands
These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

/retest ci/centos/<job-name>: retest the <job-name> after unrelated
failure (please report the failure too!)
/retest all: run this in case the CentOS CI failed to start/report any test
progress or results

Can we add a skip-e2e label on the PR?


Implement Session Close

Motivation / Context

To implement the session close function with proper handling of channels in different phases of their lifecycle.
Description

Currently, session close is a No-op. Implement a session close mechanism with the following behavior:

When force=true, channels in all phases are locked, channelClient is closed and return a list of channels that are in open phase.
When force=false,

If there are channels in open phase, return an error with the list of channels in open phase.
If there are not channels in open phase, lock all the closed channels, close the channelClient.

Relates to

Testing

Ensure channels in all phases of their lifecycle are handled properly.

Thread Safety

The session.Close should ensure the ongoing operations in any channel belonging to this session is completed.
The session.Close should ensure the ongoing operations in statemachine of go-perun/channel that was not initiated by perun-node is also completed. Currently only one such events exist: Watcher handling a registered event.

The above image shows the state transition diagram for channel state machine in go-perun. From the perun-node point of view, each channel should be in one of the two phases: Acting or Withdrawn, when there is no ongoing operation on that channel. Channels in Acting phase are considered Open and those in Withdrawn phase are considered closed.
When closing a session,

For each channel, wait for any ongoing channel operation to complete by acquiring the channel mutex.
Collect the list of open channels. If the list is not nil, either return an error or close the session depending upon the value of force variable. In case, an error is returned, all the channels should be unlocked, as the session is still open and user must be able to access the channels.
Moreover, to ensure any register operation triggered in the Watch routine, read the Phase of the channel. Since Phase() function needs to lock on the mutex of the statemachine, it will ensure ongoing operation by channel is completed.

@sebastianst @ggwpez @RmbRT  I drew this state diagram based on the current version of go-perun on dev branch. Can you have a look and let me know if I have missed something ?
I think one difference from go-perun and perun-node points of view in the diagram is that

From go-perun POV, Final is also treated as a stable phase.
But, from perun-node POV, Final is a transition phase, because the perun-node software will call settle automatically on a channel in Final phase.

LGTM. I also think your handling of the Final phase as a transition phase makes sense in your particular application, for now. From the SDK's pov, we don't want to force a user to immediately settle a final channel. There may be reasons why a channel should be settled later, e.g., the device is not connected to the internet or gas costs are currently high, or settle transactions are batched, etc.

Yeah, I agree that from the framework point of you, Final is treated as a stable phase and leave it upto the user of the go-perun framework to decide when to settle a finalized channel depending upon the specific application.
Since I did not mark Final as a stable state, I had added the corresponding explanation for it.


Design File

Love it! <3
I wish it came with a editable design file though! How about a .sketch file? Useful? Or trash?

@musavvirahmed Thats a good idea!
if you're down for it, you can build a .sketch file and push it 👍
We're a bit busy releasing the next version atm 🙏

:tada: This issue has been resolved in version 1.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


RedisGraph usage

Is there a seamless way of deserializing a GraphResultSet into json?

Hi @sulaiman1073,
It's not implemented right now but I guess it would be possible.
How would you represent a graph node, a graph edge and a graph path in json ?


Error TS2322: Improve nested interface message handling

Actual behavior:
interface Nestedthing {
  a: {
    b: {
      c: string,
      d: number
    }
  }
}

const _example: Nestedthing = {
  a: {
    b: {
      c: "hi"
      // missing: d
    }
  }
}

Gives an error like:
$ /Users/orta/dev/projects/typescript/ts_examples/nested_interfaces/node_modules/.bin/tsc
example.ts(10,7): error TS2322: Type '{ a: { b: { c: string; }; }; }' is not assignable to type 'Nestedthing'.
  Types of property 'a' are incompatible.
    Type '{ b: { c: string; }; }' is not assignable to type '{ b: { c: string; d: number; }; }'.
      Types of property 'b' are incompatible.
        Type '{ c: string; }' is not assignable to type '{ c: string; d: number; }'.
          Property 'd' is missing in type '{ c: string; }'.

This example is pretty small, but the deeper the nesting, the longer the error message. These massages can get quite hard to dig right to the point:

An example from our codebase

src/lib/Components/Gene/__tests__/About-tests.tsx(45,40): error TS2322: Type '{ gene: { description: string; trending_artists: { __id: string; href: string; name: string; coun...' is not assignable to type 'IntrinsicAttributes & RelayProps & { children?: ReactNode; }'.
  Type '{ gene: { description: string; trending_artists: { __id: string; href: string; name: string; coun...' is not assignable to type 'RelayProps'.
    Types of property 'gene' are incompatible.
      Type '{ description: string; trending_artists: { __id: string; href: string; name: string; counts: { fo...' is not assignable to type '{ trending_artists: (string | number | boolean)[]; }'.
        Types of property 'trending_artists' are incompatible.
          Type '{ __id: string; href: string; name: string; counts: { for_sale_artworks: number; artworks: number...' is not assignable to type '(string | number | boolean)[]'.
            Type '{ __id: string; href: string; name: string; counts: { for_sale_artworks: number; artworks: number...' is not assignable to type 'string | number | boolean'.
              Type '{ __id: string; href: string; name: string; counts: { for_sale_artworks: number; artworks: number...' is not assignable to type 'false'.

We started teaching JS developers learning TypeScript to always "start at the end of a compiler message" - which isn't great ( this is compounded by VS Code only supporting single-line error messages in the problems section )
I wonder if it's possible to improve the error messaging to include a summary before the tree of 'how we got to that error'?
For example:
A pretty simple attack could be to take all the leaf nodes and show them beforehand in a separate section:
/Users/orta/dev/projects/typescript/ts_examples/nested_interfaces/node_modules/.bin/tsc
example.ts(10,7): error TS2322: Type '{ a: { b: { c: string; }; }; }' is not assignable to type 'Nestedthing'.

  example.ts(13,4): Property 'd' is missing in type '{ c: string; }'

  From incompatible property `a` in:
    Type '{ b: { c: string; }; }' is not assignable to type '{ b: { c: string; d: number; }; }'.

    From incompatible property `b` in:
        Type '{ c: string; }' is not assignable to type '{ c: string; d: number; }'.

This:

Highlights the exact place the problem occurs first as you're scanning
Could (one day) work nice with (https://github.com/Microsoft/vscode/issues/1927), which means editors could highlight the exact place where something needs work
Is less visually dense, but still shows the same error

A similar example based error output based on the real life error include above also:
src/lib/Components/Gene/__tests__/About-tests.tsx(45,40): error TS2322: Type '{ gene: { description: string; trending_artists: { __id: string; href: string; name: string; coun...' is not assignable to type 'IntrinsicAttributes & RelayProps & { children?: ReactNode; }'.

  Type '{ __id: string; href: string; name: string; counts: { for_sale_artworks: number; artworks: number...' is not assignable to type 'false'.
  Type '{ __id: string; href: string; name: string; counts: { for_sale_artworks: number; artworks: number...' is not assignable to type 'string | number | boolean'.
  Type '{ __id: string; href: string; name: string; counts: { for_sale_artworks: number; artworks: number...' is not assignable to type '(string | number | boolean)[]'.

  From incompatible property `trending_artists` in:
    Type '{ description: string; trending_artists: { __id: string; href: string; name: string; counts: { fo...' is not assignable to type '{ trending_artists: (string | number | boolean)[]; }'.

    From incompatible property `gene` in:
      Type '{ gene: { description: string; trending_artists: { __id: string; href: string; name: string; coun...' is not assignable to type 'RelayProps'.

We're happy to take a stab at implementing this, but you all have the most context around edge cases and what you want the messages to say.
/cc @damassi @alloy

Sorry for poking over the holidays on this issue, but I was interested in trying to get this done during the holidays when (my) workload is low 💃 🕺

I'm facing similar issues, and I would imagine with the addition of conditional typing, this problem is only going to increase in complexity.
Given the example in the original problem space, would it be possible to indicate the specific problems as individual errors? This would easily allow indicating the errors as close to it's source as possible.
Meaning, for an error on a nested property, you might see:
const _example: Nestedthing = {
  //  Types of property 'a' are incompatible
  a: { // Type '{ b: { c: string; }; }' is not assignable to type '{ b: { c: string; d: number; }; }'.
    // Types of property 'b' are incompatible,
    b: { // Type '{ c: string; }' is not assignable to type '{ c: string; d: number; }'
      // Property 'd' is missing in type '{ c: string; }'.
      c: "hi"
    }
  }
}

As I think on this more, this should be doable in most editors assuming the error messages are structured in a way to allow for this, though output from tsc might be more useful in the format above.  This may also have some overlap with #22170 as they are both trying to bring clarity to error messages in nested objects.

vscode is going to support multi-lined errors - so also thinking about how this could be shown as a hierarchy of errors could be useful too.

Might also be a good idea to see if there’s inspiration that could be drawn from Flow’s new error messages https://medium.com/flow-type/better-flow-error-messages-for-the-javascript-ecosystem-73b6da948ae2.

A concrete suggesion I think works well: Ignore all parts of the type structures that are compatible until the first incompatible type with 2 or more incompatibilities. Show the types along the path that have a name; those that don't should be shown as
example.ts(10,7): error TS2322: Type '{ a: { b: { c: string; }; }; }' is not assignable to type 'Nestedthing'.
  Types of property 'a' are incompatible.
    Type '{ b: { c: string; }; }' is not assignable to type '{ b: { c: string; d: number; }; }'.
      Types of property 'b' are incompatible.
        Type '{ c: string; }' is not assignable to type '{ c: string; d: number; }'.
          Property 'd' is missing in type '{ c: string; }'.

becomes:
example.ts(10,7): error TS2322: Incompatible assignment: the property path 'a.b.d' of type 'number' exists in 'Nestedthing' but not in '{ a: { b: { c: string; }; }; }'
  Expected types along the property path of Nestedthing:
    {...}, {...}, number
  Found types along the property types of '{ a: { b: { c: string; }; }; }'
    {...}, {...}, void

So instead of describing the types at each level, describe the toplevel types that are supposed to be compatible but aren't, then the path to the first incompatible structure, and the bottom missing property

The TS 3.0 error messages fix this well! I'm going to close this issue 👍
Thanks all.


[Unit Testing]  Why not use vitest instead of jest

Which @angular/* package(s) are relevant/related to the feature request?
upgrade
Description
i read in blog post about two tings:

Better unit testing with Jest and Web Test Runner
Developer preview of the esbuild-based build system, with vite

so my question is: why not use a tool which has better integration with vite as well as better performance ?
Proposed solution
Replace jest by using vitest, which is:

compatible with jest API
better performance
the best fit when using vite

Alternatives considered
allow the devs choose which want to by make available Jest and vitest.
Where those which:

dont use vite build base, it is recommend use Jest

Otherwise vite + vitest, would be the best bet.

would be good to have both options

Really appreciate the thorough response.  I had the same question myself about vitest since the bit that I've used has been a rewarding experience, and the synergy with vite seemed like a slam dunk.  But knowing, now, that Vite is used in a more limited capacity helps clarify that.  And, to your point, we've been using Jest in a significant portion of our Angular applications for years, and it's been a solid option for us (in no small part to the great work that @ahnpnl's done with jest-preset-angular).   So it's definitely proven to be a good at scale.


Check for overflow attack on content_length.

Naughty stuff happens in the parser if an attacker specifies a content-length greater than the max value allowed by int64_t.

If content-length in a header is set to LLONG_MAX+1, parser drops into s_body_identity_eof, which is not technically correct.

If content-length in the header is set to ULLONG_MAX, the parser decides there is a new message (line 1600), and will break on subsequent body data.

Neither of these are necessarily insecure in and of themselves and obviously unusual, but I would expect a savvy attacker might make use of this, particularly depending on how the parser was being used (say, as in an http proxy).
If overflow values are used in chunk headers, the situation is worse.

If LLONG_MAX+1 is used in a chunk header and NDEBUG is not defined, an assertion will fail and the app will abort (by default).

If LLONG_MAX+1 is used in a chunk header and NDEBUG is defined, the math gets funky, and the pointer 'p' gets incremented to point to a bad memory address, possibly causing a 'EXC_BAD_ACCESS' segfault.

I've added a couple simple checks on calculating content_length to error out on the overflow case.  There's probably a more clever and/or efficient way to do this, but this test has the quality of being straight forward and understandable.

bnoordhuis/http-parser@6185bcb does exactly that.

Seems better.  The value can still overflow though; I'd have to dig
through the code and see if that opens any attack surfaces. From a
quick glance, doesn't appear to be any different than the client lying
about the content-length, but I haven't studied it deeply.  Parser
definitely won't handle it correctly, but requests this large are so
huge as to be ridiculous (of course we said the same thing in the 90's
about those impossibly huge chunks called Gigabytes).
If it were me, I'd check explicitly and fail when a message comes
through that is logically too large to be handled correctly by the
parser, whether the parser moves content_length to uint64_t or not.
Thanks,
Sean
On Sat, Jan 21, 2012 at 5:06 PM, Ben Noordhuis
<EMAIL_ADDRESS>wrote:

bnoordhuis/http-parser@6185bcb does exactly that.

Reply to this email directly or view it on GitHub:
https://github.com/joyent/http-parser/pull/76#issuecomment-3599344

If it were me, I'd check explicitly and fail when a message comes through that is logically too large to be handled correctly by the parser

You're right. I added overflow checks in bnoordhuis/http-parser@1f0250a.

Fixed in 89a9da0.


Error while capturing exception that contains a extension module stack frame

The following line
https://github.com/elastic/apm-agent-python/blob/6328e3ddf789fe897257edf8f1197215f078df6b/elasticapm/utils/stacks.py#L80
raises
TypeError: 'NoneType' object is not subscriptable

When loader.get_source(...) returns None, which in my case it does because the loader is a ExtensionFileLoader that always returns None.
I am running elastic-apm 2.1.1 under Python 3.6

Thanks for the report @martenbr! Is the extension module you use publicly available so we can reproduce this?

@martenbr awesome, thanks, I'll get this fixed ASAP, but it'll probably be a couple of days until I can get around to it

@martenbr I just committed a fix. Thanks again for raising the issue! We'll cut a new release in the coming days.
BTW, we're working on instrumenting Cassandra, but don't really have that much code to test it with. If you have the time, it would be super helpful if you could try out #205 in your dev environment and let us know how it goes. I rebased it on top of master just now, so it should contain the fix from #219.


Add "native-certs" feature flag

This feature flag enables the "native-certs" feature from tame-index which enables the use of the host OS certificate store with reqwest. I'm separately working on a PR to support third party registries. This feature flag is needed to support third party registries on some corporate networks.

Thanks for the PR! A couple of questions for you:

enables the use of the host OS certificate store with reqwest

Does this mean it only works with the gix-reqwest feature, and would not work with the gix-curl feature?
Also, is there a good way to add some tests to ensure this feature continues to work correctly in the future? I'm afraid I'm not familiar with the details of OS certificate stores, so I'd like to proactively minimize the risk of something breaking down the line in a way that I as the maintainer would be on the hook to fix.

Hmm so looking at it a bit more, it's pretty complicated. Let me see if I can explain whats going on. I can't guarantee that all of this information is 100% accurate, but it is my understanding of the situation.
I'm not sure what your familiarity level is with TLS certificates, but basically when making an https request, you'll likely have some number of root certificates locally that are used to validate the remote server's TLS certificate. The default behavior with browsers and things like wget/curl (which typically use openssl on linux for example) is to use the root certificates installed on the host OS. A lot of the rust ecosystem however uses rustls which is rust implementation of TLS. With rustls it is common to use the webpki roots which is a set of root certificates provided by Mozilla. Usually there is a ton of overlap between the webpki roots as your host OS root certificates which is why queries tend to just work no matter what you use. However, its common in corporate networks to have custom tls certificates that are created based on an internal root certificate. (VPNs also do this too to MITM corporate network connections). This internal root certificate can be installed in the host OS to make it easy for the user to communicate with internal servers. When this happens, the webpki root certs will not work unless those custom tls certificates are also signed by something that rolls up the webpki root certificates which is not always the case. So with rustls in this scenario, you need to enable the native-certs feature so that rustls will query the host OS certs as well when validating https queries.
And now on the specifics here.
cargo-semver-checks depends on both gix and tame-index, and tame-index also depends on gix.
The existing feature flag for gix-curl only enforces the usage of curl for gix and not tame-index. The default behavior for curl as currently configured is to use openssl for tls, which would by default use the host OS certificates. The default behavior gix-reqwest would be to use rustls for tls, which as configured uses the webpki root certificates (not the host OS ones).
So the change I did, really only affects the reqwest based http requests and would not affect the curl based ones (and the curl based ones already have different behavior with respect to certificates compared to the reqwest ones).
An additional complication though is that even if you do --no-default-features --features gix-curl, the reqwest backend is still used by tame-index for sparse registries. So if you want to use cargo-semver-checks with curl, you still need to enable this feature flag if you're using sparse registries because those requests don't route through curl.
I'm happy to update the comment on the feature to try to describe this since it is complicated. I could also rename the feature to reqwest-native-certs to make it more clear that its not touching the curl side of things.
Regarding tests, I'm sure there is some way to do that, but I suspect it would be complicated. I haven't looked deeply at how this project handles tests, but you would likely need a registry behind an http server with a self signed certificate and then have a container which with the self signed certificate installed to prove that it can talk to it. I'm not even sure if this is possible given that there's no third party registry support (though you could do it at the tame_index level and not the overall program level). I am working on a PR for third party registries that I hope to have up soon, so that might make it a bit easier to write a test. In the meantime, I personally would also be fine putting this behind an experimental feature flag to make it clear that its not well tested, though I at least confirmed it works locally in my one use case.
Sorry for the long comment, but let me know what you would like me to do with this or if you have any other questions

Thanks for the detailed comment, I appreciate it!
Any chance you might be up for chatting about the two PRs over a video call one of these days?
I'd love to learn more about your use cases and figure out how cargo-semver-checks can best support them while continuing to minimize maintainability risk — which is the main existential threat to open-source software like this.

Yep. Happy to. Shoot me an email and we can coordinate on timing.


Error deploying to sandbox org

Greetings!
I very much appreciate the work you do. I am running into an issue deploying this tool using the deploy button on the GitHub page.
Thanks in advance for any insight you can provide!
Deployment Complete
Failures:
classes/MetadataDataController.cls(42,5):Dependent class is invalid and needs recompilation:
MetadataService: line 10026, column 13: Method does not exist or incorrect signature: WebServiceCallout.invoke(MetadataService.MetadataPort, MetadataService.deleteMetadata_element, Map, List)
classes/MetadataRetrieveController.cls(42,9):Dependent class is invalid and needs recompilation:
MetadataService: line 10026, column 13: Method does not exist or incorrect signature: WebServiceCallout.invoke(MetadataService.MetadataPort, MetadataService.deleteMetadata_element, Map, List)
classes/MetadataService.cls(10026,13):Method does not exist or incorrect signature: WebServiceCallout.invoke(MetadataService.MetadataPort, MetadataService.deleteMetadata_element, Map, List)
classes/MetadataServiceExamples.cls(37,9):Dependent class is invalid and needs recompilation:
MetadataService: line 10026, column 13: Method does not exist or incorrect signature: WebServiceCallout.invoke(MetadataService.MetadataPort, MetadataService.deleteMetadata_element, Map, List)
classes/MetadataServiceTest.cls(44,36):Dependent class is invalid and needs recompilation:
MetadataService: line 10026, column 13: Method does not exist or incorrect signature: WebServiceCallout.invoke(MetadataService.MetadataPort, MetadataService.deleteMetadata_element, Map, List)
classes/RemoteSiteHelperController.cls(48,47):Dependent class is invalid and needs recompilation:
MetadataService: line 10026, column 13: Method does not exist or incorrect signature: WebServiceCallout.invoke(MetadataService.MetadataPort, MetadataService.deleteMetadata_element, Map, List)
classes/RemoteSiteHelperTest.cls(10,47):Dependent class is invalid and needs recompilation:
Class.RemoteSiteHelperController.checkMetadataAPIConnection: line 48, column 47
MetadataService: line 10026, column 13: Method does not exist or incorrect signature: WebServiceCallout.invoke(MetadataService.MetadataPort, MetadataService.deleteMetadata_element, Map, List)
components/remotesitehelper.component(remotesitehelper):Apex class 'RemoteSiteHelperController' does not exist
pages/metadatadata.page(metadatadata):Apex class 'MetadataDataController' does not exist
pages/metadatadeploy.page(metadatadeploy):Apex class 'MetadataDeployController' does not exist
pages/metadataretrieve.page(metadataretrieve):Apex class 'MetadataRetrieveController' does not exist
pages/remotesitepage.page(remotesitepage):Apex class 'RemoteSiteHelperController' does not exist
classes/MetadataDeployController.cls(31,9):Dependent class is invalid and needs recompilation:
MetadataService: line 10026, column 13: Method does not exist or incorrect signature: WebServiceCallout.invoke(MetadataService.MetadataPort, MetadataService.deleteMetadata_element, Map, List)

Hello Andy,
As we spoke about on your personal website, also having some trouble with the deploy button to push apex wrapper code to my dev org.
Steps to reproduce:
I do get the prompt to select production - developer / sandbox as well as the Owner and Repository upon pressing the deploy button.
I leave it as Production - Developer and keep the Owner at financialforcedev and Repo at apex-mdapi.
I then login to my org, it processes, and then gives Oath error.
I do have mydomain turned on, if that matters.
Thanks!
-Joseph

Thanks @jdrishe, i am wondering if this is the same as this issue https://github.com/afawcett/githubsfdeploy/issues/21?

@afawcett sorry, missed that issue on the specific deploy page!  I have moved the comment over to the issue.

Thanks!

@cdanhowell I didn't have a sandbox handy, but i did try with my DE test org and it deploys fine. I do wonder if your having an issue called "Shadowing". These means that if you had a class in your sandbox called WebServiceCallout this will override the System provided one. Can you check for this? Happy to re-open the issue to discuss further btw. 👍

100% correct, I missed the WebServiceCallout bit. Good catch, and thanks again!


Plugin unable to launch Aspire AppHost because of bad handshake

When attempting to launch the run configuration of an Aspire application, I get the following error output.

run session could not be started: failed to connect to IDE run session notification endpoint: websocket: bad handshake

/Users/khalidabuhakmeh/RiderProjects/AspireApp1/AspireApp1.AppHost/bin/Debug/net9.0/AspireApp1.AppHost
info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 9.0.0-preview.3.24210.17+c2d83148f169bdf4980393a66eff2a28e94eb6c9
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application starting.
info: Aspire.Hosting.DistributedApplication[0]
      Application host directory is: /Users/khalidabuhakmeh/RiderProjects/AspireApp1/AspireApp1.AppHost
info: Aspire.Hosting.DistributedApplication[0]
      Now listening on: http://localhost:15174
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application started. Press Ctrl+C to shut down.
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"apiservice-s6t0mf0"}, "Reconciliation": 6, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: websocket: bad handshake"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"webfrontend-upeha00"}, "Reconciliation": 7, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: websocket: bad handshake"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"apiservice-s6t0mf0"}, "Reconciliation": 8, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: websocket: bad handshake"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Executable": {"name":"webfrontend-upeha00"}, "Reconciliation": 9, "error": "run session could not be started: failed to connect to IDE run session notification endpoint: websocket: bad handshake"}
^C
Process finished with exit code 0.

Running the same project from Rider's terminal results in a successful launch.
dotnet run --project AspireApp1.AppHost

With the resulting output of:
info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 9.0.0-preview.3.24210.17+c2d83148f169bdf4980393a66eff2a28e94eb6c9
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application starting.
info: Aspire.Hosting.DistributedApplication[0]
      Application host directory is: /Users/khalidabuhakmeh/RiderProjects/AspireApp1/AspireApp1.AppHost
info: Aspire.Hosting.DistributedApplication[0]
      Now listening on: http://localhost:15174
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application started. Press Ctrl+C to shut down.

Probably something changed on the Aspire side because we don't have any changes.

Running the same project from Rider's terminal results in a successful launch.
Because it can't connect to the IDE, and in the CLI scenario it runs all the projects by itself.

Workload
Installed Workload Id      Manifest Version                                Installation Source
------------------------------------------------------------------------------------------------
aspire                     9.0.0-preview.3.24210.17/9.0.100-preview.1      SDK 9.0.100-preview.6

.NET SDK
9.0.100-preview.6.24328.19

Rider Information
More information:
- JetBrains Rider 2024.2 RC 1
Build #RD-242.20224.285, built on August 6, 2024
Licensed to JetBrains Rider EAP user: Khalid Abuhakmeh
Expiration date: September 5, 2024
Runtime version: 21.0.3+13-b509.4 x86_64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 14.5
.NET Core v8.0.4 x64 (Server GC)
This IDE is managed by JetBrains via JetBrains IDE Services.
JetBrains IDE Services version: 2<IP_ADDRESS>-ij242, https://tbe.labs.jb.gg
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4096M
Cores: 12
Metal Rendering is ON
Registry:
  ide.experimental.ui=true
  terminal.new.ui=true
  llm.chat.in.popup=true
  rider.razor.use.frontend.formatter=true
Non-Bundled Plugins:
  com.intellij.ja (242.21794)
  com.intellij.javafx (1.0.4)
  com.intellij.zh (242.21794)
  com.intellij.resharper.HeapAllocationsViewer (2024.2.0-eap02)
  com.intellij.ko (242.21794)
  avalonia-rider (1.4.0)
  com.jetbrains.rider.android (242.20224.285)
  ice.explosive.gdscript (2.5.6)
  com.intellij.mermaid (0.0.22+IJ.232)
  com.intellij.ml.llm (242.20224.387)
  org.jetbrains.plugins.gitlab (242.20224.385)
  org.jetbrains.plugins.github (242.20224.385)
  org.jetbrains.toolbox-enterprise-client (2<IP_ADDRESS>-ij242)
  com.jetbrains.outsight (1.1.24)

@khalidabuhakmeh I've tested with the latest Aspire RC, and it seems to work fine. Could you please recheck it?

It works again in RC2. We can close this issue.


Custom http retryable client

I'm using a go retryable HTTP client from this package: https://github.com/hashicorp/go-retryablehttp. Is it possible to set this as a custom HTTP client? I saw the setClient method but it only seems to support the *http.Client type...
It supports basically all the same methods as the standard HTTP client, so it would be really cool if there was a way to use this

The project readme mentions the following:

It's possible to convert a *retryablehttp.Client directly to a *http.Client. This makes use of retryablehttp broadly applicable with minimal effort. Simply configure a *retryablehttp.Client as you wish, and then call StandardClient()

As far as I understand, this solves your problem.

Nice catch @asciimoo, thanks!


Check if client TCP connection is not closed

This is more of a question than an issue. Is there a way to check if the TCP connection is not closed? As far as I can tell the TcpStream is not exposed in any way from the client and thus its methods are not usable

Yep. We accept everything that is AsyncRead + AsyncWrite, including things such as the [NamedPipeClient][https://docs.rs/tokio/1.17.0/tokio/net/windows/named_pipe/struct.NamedPipeClient.html]. This means having a specific API for asking the questions from whatever implements these traits is not the easiest thing to do.
Do you need to get that info from the connection, or would a dumbest and fastest possible query do the trick?

Thanks for the response. I wanted a cheap way to check for the connection status without having to send anything over the wire (which is not 100% reliable but good enough). Would it be possible to expose the concrete underlying transport from a new client method?

In particular I wanted to use something like this http://stefan.buettcher.org/cs/conn_closed.html to detect closed connections. I am exploring options, without being certain that this is doable with tokio.

If you'd like to try up with a PR to see what kind of API would work for you, I'd give it a review and merge to main if it works.


fix a bug in executor.py

The following error occurs when batch_size = 1 or drop_last = False: ValueError: Expected input batch_size (1) to match target batch_size (0).

Hi, I did not reproduce this bug.

Could you provide more  information?

Could you provide more information?

This bug can be triggered in two cases. When batch_size = 1, the output dimension is one dimension more than that of the label, and the dimensions do not match when calculating the loss; when drop_last = False, if the length of the dataset is not an integral multiple of batch_size, it will sometimes cause only one piece of data in a batch, which will become the case of batch_size = 1 above.
Of course, we don't usually set batch_size to 1 in training, but we do when we want to debug the code.
Finally, you can set batch_size to 1 to reproduce the bug.
This is a fragment of my error message.
Traceback (most recent call last):   File "/data/lisirui/wespeaker/examples/cnceleb/v5_0327/wespeaker/bin/train.py", line 235, in <module>     fire.Fire(train)   File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/fire/core.py", line 141, in Fire     component_trace = _Fire(component, args, parsed_flag_args, context, name)   File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/fire/core.py", line 466, in _Fire     component, remaining_args = _CallAndUpdateTrace(   File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace     component = fn(*varargs, **kwargs)   File "/data/lisirui/wespeaker/examples/cnceleb/v5_0327/wespeaker/bin/train.py", line 207, in train     run_epoch(train_dataloader,   File "/data/lisirui/wespeaker/examples/cnceleb/v5_0327/wespeaker/utils/executor.py", line 65, in run_epoch     loss = criterion(outputs, targets)   File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl     return forward_call(*input, **kwargs)   File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/torch/nn/modules/loss.py", line 1164, in forward     return F.cross_entropy(input, target, weight=self.weight,   File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/torch/nn/functional.py", line 3014, in cross_entropy     return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing) ValueError: Expected input batch_size (1) to match target batch_size (0). WARNING:torch.distributed.elastic.multiprocessing.api:Sending process 112747 closing signal SIGTERM WARNING:torch.distributed.elastic.multiprocessing.api:Sending process 112749 closing signal SIGTERM

Could you provide more information?

This bug can be triggered in two cases. When batch_size = 1, the output dimension is one dimension more than that of the label, and the dimensions do not match when calculating the loss; when drop_last = False, if the length of the dataset is not an integral multiple of batch_size, it will sometimes cause only one piece of data in a batch, which will become the case of batch_size = 1 above. Of course, we don't usually set batch_size to 1 in training, but we do when we want to debug the code. Finally, you can set batch_size to 1 to reproduce the bug. This is a fragment of my error message. Traceback (most recent call last): File "/data/lisirui/wespeaker/examples/cnceleb/v5_0327/wespeaker/bin/train.py", line 235, in <module> fire.Fire(train) File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/fire/core.py", line 466, in _Fire component, remaining_args = _CallAndUpdateTrace( File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "/data/lisirui/wespeaker/examples/cnceleb/v5_0327/wespeaker/bin/train.py", line 207, in train run_epoch(train_dataloader, File "/data/lisirui/wespeaker/examples/cnceleb/v5_0327/wespeaker/utils/executor.py", line 65, in run_epoch loss = criterion(outputs, targets) File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/torch/nn/modules/loss.py", line 1164, in forward return F.cross_entropy(input, target, weight=self.weight, File "/data/lisirui/anaconda3/envs/wespeaker/lib/python3.9/site-packages/torch/nn/functional.py", line 3014, in cross_entropy return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing) ValueError: Expected input batch_size (1) to match target batch_size (0). WARNING:torch.distributed.elastic.multiprocessing.api:Sending process 112747 closing signal SIGTERM WARNING:torch.distributed.elastic.multiprocessing.api:Sending process 112749 closing signal SIGTERM

Sorry, I can't reproduce this bug either by simply setting batch_size=1 in our voxceleb2 recipe using resnet34 model.
Are there any other experimental setups you modify that are different from the default config? Could you provide more details to help us reproduce this bug? Thanks.

This problem was caused by my modification of dataloader, which was resolved after pulling the latest version.


fix using --ids in documentation

This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines

[x] The PR has modified HISTORY.rst with an appropriate description of the change (see Modifying change log).

Command Guidelines

[x] Each command and parameter has a meaningful description.
[x] Each new command has a test.

(see Authoring Command Modules)

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

Codecov Report

Merging #4329 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4329   +/-   ##
=======================================
  Coverage   69.06%   69.06%
=======================================
  Files         484      484
  Lines       31055    31055
  Branches     4853     4853
=======================================
  Hits        21447    21447
- Misses       8029     8033    +4
+ Partials     1579     1575    -4

Impacted Files
Coverage Δ

...storage/azure/cli/command_modules/storage/_help.py
100% <ø> (ø)
:arrow_up:

...dback/azure/cli/command_modules/feedback/custom.py
31.25% <0%> (ø)
:arrow_up:

...li-cloud/azure/cli/command_modules/cloud/custom.py
13.79% <0%> (ø)
:arrow_up:

...nent/azure/cli/command_modules/component/custom.py
16.26% <0%> (ø)
:arrow_up:

src/azure-cli-core/azure/cli/core/util.py
69.73% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

I removed changes in rst files


Bottlenecks

Bottleneck Identification Algorithm
The PeMS system runs a bottleneck identification algorithm every day. The original algorithm was presented in, "Systematic Identification of Freeway Bottlenecks," by Chen, C., Skabardonis, A., Varaiya, P. (2003). Transportation Research Board, 2004.
This algorithm attempts to identify bottlenecks on the freeway system at every detector. At a high level, a bottleneck exists at a particular detector when there is a persistent drop in speed from the current detector to the detector immediately upstream. Specifically we have the following defining conditions:
There is a drop in speed of at least 20 mph.
The speed at the current detector is less than 40 mph.
The detectors are less than 3 miles apart.
The speed drop persists for at least 5 out of any 7 contiguous 5-minute data points.
When localizing PeMS to metric units these thresholds are translated directly.
If all of these conditions are met then we declare that there is a bottleneck at this location that has been activated for all of the 7 5-minute time points (technically the bottleneck is between these two detectors - we don't know where exactly. We declare that the bottleneck is at the detector where the speed has dropped.) We perform this analysis for each of three time periods: AM shift (5am-10am), noon shift (10am-3pm), and PM shift (3pm-8pm). For each location where a bottleneck is activated we compute the following:
Bottleneck Duration: This is how long the bottleneck was active during that particular shift on that day.
Bottleneck (Spatial) Extent: For each 5-minute period when the bottleneck was active we see how far upstream the bottleneck extends. For this, at each time point, we find the farthest upstream detector with speed less than 40 mph and use that location as the extent during that 5-minute period. To get a single extent for the entire bottleneck, we take the median of the extents for each 5-minute period.
Bottleneck Delay: The delay is simply the sum of the individual PeMS segment delays for the entire duration and spatial extent of the bottleneck. The delay is calculated with respect to a threshold speed of 60 mph.
We then allow users to see summary tables of the top bottlenecks in a region sorted by the number of days activated, or any other available measure. In addition we allow users to see the bottlenecks on the maps.

AM off peak (or day off peak??), AM peak (or Day peak??), PM peak, PM off peak, holiday - these are additional time frames we might need to consider? Can you clarify and expand on what you mentioned this morning @kengodleskidot
We discussed potentially creating a table to capture this.

Right now, the three time periods listed above are not something we need to worry about as identified in this morning's discussion. We'll re-visit this at a later time.

Based on the technical discussion yesterday do we want to continue using delay_60_mph or switch to delay_65_mph? @kengodleskidot

Here's the outline I've been using to keep me grounded in this work: https://docs.google.com/spreadsheets/d/1gv4S8BsSt4gScx8kHNzhGjSH-z4srUGEiehqmLdvfdg/edit#gid=0

Based on the technical discussion yesterday do we want to continue using delay_60_mph or switch to delay_65_mph? @kengodleskidot

Continue using delay_60_mph.

Attached is the paper identified in the initial comment above:
Systematic_Identification_of_Freeway_Bottlenecks (1).pdf

GIS representation of bottleneck: https://gisdata-caltrans.opendata.arcgis.com/maps/9509bf8a475f49b4a9c79bac15f8b479

AM off peak (or day off peak??), AM peak (or Day peak??), PM peak, PM off peak, holiday - these are additional time frames we might need to consider? Can you clarify and expand on what you mentioned this morning @kengodleskidot
We discussed potentially creating a table to capture this. This may also be captured in a new issue.

I just wanted to close the loop on this and mention that we added variables for the on-peak/off-peak timeframes in #227. There is some additional work to be done on holiday's, but we will continue that discussion in #223.

FYI additional information about bottlenecks from FHWA for reference. These will not impact our current analysis but could be useful in future discussions https://ops.fhwa.dot.gov/bn/lbr.htm and https://ops.fhwa.dot.gov/bn/bnchart.htm


Inject lazy dependencies

Still TODO Find a nice way to expose WebampLazy as:
import WebampLazy from 'webamp/lazy';

Review request: @Borewit

Note that I created a PR targeting this branch: captbaritone/webamp#650