No devices found

Hi, thank you for your compontent!!!
I have a Fresh Element Mini Pro and a Pura X.... I created a new account, as indicated in the instructions, via the Petkit app and shared the two devices.
The new user, through the app, is able to use the devices normally.
If I create the integration in Home Assistant with the new user data, the "no devices found" error appears, while if I create the integration with the original user data I have all my devices available.
How is this possible?
Thank you :)

This is due to the family share feature that PETKIT introduced. If you use the app with the new account you'll see that the devices are located under a different header and not returned as part of the account's device roster.

Thanks for such a quick reply 🙂
It works perfectly!!!
Thanks again 🙂

No problem! I'll have to edit the documentation to make mention of this since they started utilizing the "Family share" feature.


sync-all fix. issues #66

What this PR does / why we need it:
Make changes for API path:
previous: http://localhost:8190/v1/storages/sync_all
after fix: http://localhost:8190/v1/storages/sync-all
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
Test REport:

Release note:

Fixes #66

Codecov Report

Merging #211 into master will decrease coverage by 0.54%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #211      +/-   ##
==========================================
- Coverage   53.11%   52.57%   -0.55%
==========================================
  Files          66       66
  Lines        4424     4365      -59
  Branches      491      491
==========================================
- Hits         2350     2295      -55
+ Misses       1969     1965       -4
  Partials      105      105

Impacted Files
Coverage Δ

dolphin/api/v1/router.py
100.00% <100.00%> (ø)

dolphin/drivers/driver.py
56.52% <0.00%> (-11.23%)
:arrow_down:

dolphin/cryptor.py
72.72% <0.00%> (-4.20%)
:arrow_down:

dolphin/wsgi/common.py
64.28% <0.00%> (-3.46%)
:arrow_down:

dolphin/task_manager/tasks/task.py
26.92% <0.00%> (-2.71%)
:arrow_down:

dolphin/drivers/fake_storage/__init__.py
37.07% <0.00%> (-2.71%)
:arrow_down:

dolphin/api/v1/alert.py
25.51% <0.00%> (-2.22%)
:arrow_down:

dolphin/api/validation/validators.py
44.35% <0.00%> (-1.74%)
:arrow_down:

dolphin/api/v1/access_info.py
65.21% <0.00%> (-1.45%)
:arrow_down:

dolphin/api/v1/storages.py
74.28% <0.00%> (-1.17%)
:arrow_down:

... and 12 more


Expose Code Section Offset

Motivation
Currently you cannot learn about the in-WASM file offset of the code section. This is however necessary to make DWARF work as offsets in DWARF files are relative within the code section whereas back traces by browsers provide the absolute offset within the WASM file. To calculate the difference the offset of the code section is required.
Currently the only way to get this information appears to parse the file a second time with wasmparser:
let mut code_offset = 0;
for payload in wasmparser::Parser::new(0).parse_all(wasm) {
    if let Ok(wasmparser::Payload::CodeSectionStart { range, .. }) = payload {
        code_offset = range.start as u64;
        break;
    }
}

Proposed Solution
Keep track of the CodeSectionStart's range start in the module.
Alternatives
Parse again as we're doing currently.
Additional Context
Some notes on why we need this can be found here: https://github.com/getsentry/symbolic/issues/290

This crate in general is intended for wasm transformations, but would y'all's use case fall moreso into simply parsing? For something like that building on wasmparser is probably a better route than building on walrus

I first started using wasmparser directly but I ended up reimplementing a ton of walrus in the process. I do agree though that the nature of how walrus is working makes it unclear if the code offsets carries a meaning. For instance to solve #67 the code offset does not play a role.
I think it's fine to close this issue, that said, walrus is currently one of the most convenient crates to work with WASM because it provides an object representing the module and the only other crate in the ecosystem that is similar I'm aware of is parity-wasm which is throwing away even more info which makes it hard to use for working with debug data.

Ah yeah unfortunately there aren't a ton of crates for representing "here's an API to the wasm module you just parsed". That sort of use though tends to be pretty context-specific and it's difficult to make "one API to rule them all" really. The wasmparser crate is intended to at least be the shared support for parsing the wasm file, but as you've found it's very low level. Walrus is more geared towards wasm-to-wasm transformations (e.g. wasm-bindgen) and isn't intended so much for inspection of a wasm file. For example we don't have the original code offset for all functions because functions can also be created on the fly.
That's not to say though that we couldn't add all this information to walrus. If it's the case that walrus is the best fit in the ecosystem for now (even if it's not the best fit for your use case theoretically), it seems fine to at least provide the information!
I'd personally be totally fine with a PR to add "source information" to things like functions which would be optional (for created functions), but present on all decoded functions.


Use connection pool for S3 HTTP requests

What problem does this PR solve?
Issue Number: close https://github.com/pingcap/tiflash/issues/7302
Problem Summary:
What is changed and how it works?

Using session pool for poco client to reduce re-connect to S3-like system (AWS S3, minio, etc.) every request
Add two config for testing

storgae.s3.enable_poco_client for using poco client or curl client, default is true, use poco client
storage.s3.enable_http_pool for enable session pool when using poco client or not, default is true

Check List
Tests

[ ] Unit test
[ ] Integration test
[x] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/run-build-release comment=true

/run-build-release comment=true

/run-build-release comment=true

/run-build-release comment=true

/run-all-tests

/run-unit-test

/run-all-tests

/run-all-tests

/merge


creating distinction between scalar and non-scalar datums

Per issue https://github.com/obi-ontology/obi/issues/1276
Renaming existing scalar measurement datum subclasses with "scalar" prefix.
Creating new measurement datums specific to mass, length, rate, time.

@ddooley Could you please create an issue tracker associated with the pull request? So, IAO developers can know the change you made and the reason why you made it. You can say if no objection in 1 or 2 weeks, you will merge the request. But it would be better to assign an IAO developer to review it before merge the request. Thanks!


Rebuild the images

docker-compose can't always detect that an image needs to be rebuilt and sometime the tests fails as you're testing an image built with old files.  My current workarround is to call docker-compose -f tests/docker-compose.yml build before running the tests.  A better solution could be to add the --build option to docker-compose up in the fixture.

Hi Grégoire!
Thanks for reporting this!  Are there any other side-effects to adding this option?
André

Hi André, thanks for a useful tool!
No other side effect that I know of.

Just released version 0.3.0 on PyPI.  Let me know how it goes!

Wow, that was fast! I upgraded our tests to the new version and they seem to be working well without the extra docker-compose build now. Thanks!


Group suites over multiple files

When splitting my tests accross multiple files I got them grouped for each file.
// file1.js
describe('test 1 - file 1', function () {
    // more testcode here
});

// file2.js
describe('test 1 - file 2', function () {
    // more testcode here
});

The output is as expected
test 1 - file 1
    (tests listed here)
test 1 - file 2
    (tests listed here)

But I wonder if it is possible to group these tests by defining an additional "shared" describe
// file1.js
describe('grouped', function () {
    describe('test 1 - file 1', function () {
        // more testcode here
    });
});

// file2.js
describe('grouped', function () {
    describe('test 1 - file 2', function () {
        // more testcode here
    });
});

The expected output would be
grouped
    test 1 - file 1
        (tests listed here)
    test 1 - file 2
        (tests listed here)

This is how I currently achieve the desired output, but I am not sure if it just a workaround or how it should be done.
export default function () {
    describe('test 1 - file 1', function () {
        // more testcode here
    });
}

import Test1 from './test1.js';

describe('grouped', function () {
    Test1();
});

dupe of #1413

Here's the same solution, but with different syntax:
one.js
function test1 () {
  describe('test 1 - file 1', function () {
    it('should be true', function () {
      expect(true).to.be.true
    })
  })
}
module.exports = {
  test1:test1
}

(do that ^ for each file of tests)
and this to use them in a group:
const one = require('./one.js')
const two = require('./two.js')
describe('grouped', function () {
  one.test1()
  two.test1()
})

Hope that helps

This is how I currently achieve the desired output, but I am not sure if it just a workaround or how it should be done.
export default function () {
    describe('test 1 - file 1', function () {
        // more testcode here
    });
}

import Test1 from './test1.js';

describe('grouped', function () {
    Test1();
});

That's not ideal, since adding new test suits, requires editing the "joiner module", and can cause for example conflicts when merging multiple codes.


Conditional Environment Variables

It would be great if you could set fastcgi environment variables based on the request.
Something would imagine something like nginx map directive

You can set env variables using the env keyword in the fastcgi directive. Does that not do what you want?

You could use env but you have to copy a lot of configration. Many PHP toolkits are using environment variables to select between development, production and staging. If you want to deploy all of those on the same host using dev.host.com staging.host.com and www.host.com you would have to copy the configuration and change hostname and selected application environment. Imports don't work because the must be outside of server blocks. They might work if they had parameters like
import vhosts/vhosttemplate host=some.host stage=prod foo=bar ...

Alternatively I suggest to allow a mapping between placeholders and constants.

Hmm, what about using real env variables to set your environment? Would this work?
$ export STAGE=prod

In the Caddyfile (in the fastcgi directive):
env stage {$STAGE}

This does not work if you want to run all environments at the same time.
Another example might be a single CMS installation with multiple websites  that are choosen by environment variables.

@wienczny Sure it does:
$ STAGE=prod caddy -conf=...
$ STAGE=dev caddy -conf=...

Or am I misunderstanding something?

Aren't you running two instances this way? Do both share port 80 and 443?

Yes, it does run two instances. So you want to run both a production and dev environment on the same port?

It's just an example. There are usecases where this can be a valid option. I really want to run Magento stores that use environment variables to distinguish different store views. These could have different languages or products. This is useful if you have .com for english and .de for german for example.There could be different domains for retail and b2b, too. I just thought Magento's usecase was too difficult to explain.

If your needs are that complex then perhaps Caddy is not a good fit, we want to keep things simple/easy for the user as much as possible. The Caddy philosophy is that the complexity of a web app should be deferred to the app itself, not in the web server... we'll only bend so far, and programming conditionals into the Caddyfile is too far IMO.
Thanks for the question!


response-content-disposition not possible for presigned urls

Hi. I have an issue where query parameters such as response-content-disposition on a s3 url that i want to presign leads to an invalid request.
let url = "https://s3.amazonaws.com/somebucket/resources/8fc67703-27e7-4717-aa2e-1b68cf1396b2_sketch.zip?response-content-disposition=attachment%3b+filename%3diPhone%20XS%203DSketch.zip"
return try signer.presignedURLV4(httpMethod: .get, urlString: url,
                                         expiration: .thirtyMinutes, headers: [:])

generates this url:
https://s3.amazonaws.com/somebucket/resources/8fc67703-27e7-4717-aa2e-1b68cf1396b2_sketch.zip?response-content-disposition=attachment%3b+filename%3diPhone%20XS%203DSketch.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISXSCUIUV72UKPUQ%2F20181129%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181129T132601Z&X-Amz-Expires=1800&X-Amz-SignedHeaders=host&X-Amz-Signature=946680fadbd3637df79ce26c25fd3f5feaa4b1c530949b01e74552739143f479

which is clearly wrong since S3SignerAWS adds another ? to the query. I think the issue in question is caused by this line:
https://github.com/JustinM1/S3SignerAWS/blob/master/Sources/S3SignerAWS.swift#L302
Which should probably be appending the queryComponents instead.

@JustinM1 Do you have any pointers for me what might be going on here? Any help much appreciated 👌

Sorry for the delay @ksmandersen! I just released an update that hopefully fixes the issue you encountered:
https://github.com/JustinM1/S3SignerAWS/blob/master/Sources/S3SignerAWS.swift#L299
Unfortunately, I wasn't able to find an aws test suite case that adds additional query params to write a unit test for. If you still have any problems, please re-open this issue.


Add component testing example to Svelte

This adds a component testing example to the Svelte app using @testing-library/svelte and some suggested paradigms in Svelte documentation. This involved:

Previous npm run test script was using Playwright to run e2e tests, so that was moved to an e2e/ directory and invoked from a test:e2e script so that unit tests could be run via npm run test.
The transport for the Connect client is now set/accessed from Svelte's Context API. Since the Context API can only be invoked within a component lifecycle, the calls to setContext were moved to a Svelte layout as illustrated here.
The actual test, in turn, then modifies this value in context through the use of a parent helper component which allows for passing in a component under test and a mock context to be used during the test run. This example was pulled from the Svelte Society recipes here. The Svelte Society page is not officially affiliated with the Svelte maintainers, but is linked from their site as a third-party resource.
Svelte's component lifecycle within a test seems to be tripping over either completely flushing promises or calling a generator function (i.e. Introduce). The library flush-promises, which is recommended for async Vue testing, was introduced to force these promises to resolve.

In addition, the npm run lint command was broken due to some outdated Svelte plugins, so the latest config was migrated for ESLint and all commands were verified to be working.

Looks great, just one optional comment from me. Thanks for the comprehensive PR description.
npm run lint is still broken though after a npm run build. Every project needs it's own .prettierignore file if uses prettier and needs exclusions.

Yep, good call. Fixed.


Quantity in text is wrong

Mentions "for several reasons" but then bullets three.

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

ID: a4d56b6e-a220-710c-f051-6e78bf0883fe
Version Independent ID: d1aa0964-725e-0b99-00c0-7ddcfad46920
Content: Sign out of Microsoft Teams - Microsoft Teams
Content Source: Teams/sign-out-of-teams.md
Service: msteams
GitHub Login: @HowlinWolf-92
Microsoft Alias: v-mahoffman

Thank you for submitting feedback and contributing to the docs. We are currently investigating this.

@coletham thank you for reaching out and helping to improve Microsoft Docs. The term 'several' can mean any number from 3 - 5 usually, so the terminology will remain as is.


Line Protocol should include unit of timestamp, precision should always truncate

As of now, writing to InfluxDB with the precision flag in the query string is inconsistent. When writing without a timestamp, the precision flag tells Influx to truncate the write time to the given unit of precision. When writing with a timestamp, the precision flag is telling Influx the units of the write.
Ergo, there is no way to give InfluxDB a timestamp in nanoseconds and tell it to write at second precision. The user must truncate their timestamp to seconds and then use the precision flag to tell Influx it's units.
Changing this will make the Influx write interface more consistent, and has the added benefit of allowing users to write using timestamps in any unit of measurement via other avenues, such as UDP.
If units are not given, it would default to nanoseconds, in the interest of backwards-compatability.
There is one use-case for which this will be a breaking change. Users who are writing via the HTTP interface with a timestamp will need to change the following line-protocol / query string combination:
query: POST /write?precision=s
line-protocol: net_bytes_recv,host=tyrion,interface=en0 value=17412331189i<PHONE_NUMBER>
to
query: POST /write?
line-protocol: net_bytes_recv,host=tyrion,interface=en0 value=17412331189i<PHONE_NUMBER>s
tldr
Allow the InfluxDB Line Protocol to include a timestamp (default to ns),
writes a value of 10 at time:<PHONE_NUMBER>s
cpu,host=foo value=10<PHONE_NUMBER>s
writes a value of 10 at time:<PHONE_NUMBER>000000ns
cpu,host=foo value=10<PHONE_NUMBER>000000

So to be clear, the s parameter on the query will now be ONLY for truncating time, and unless specified in the line protocol, it's always ns time right?

I think we should keep the query parameter as well. That way it's not a breaking change in any way. What's the advantage for making the query parameter not specify units as well as truncation?

@corylanou correct, the precision= parameter in the query string would ONLY be for truncating time. Line protocol would default to ns unless specified otherwise
@pauldix Definitely keeping the query parameter, but the problem now is that it truncates in one situation (no timestamp), and it specifies units in another situation (with a timestamp). Doing both wouldn't really have any effect, because if you are specifying a timestamp in s, there is no truncation to do to get it to s anyways

My suggestion is that if the units are specified on the line protocol, you ignore the query parameter. Otherwise, keep the same behavior we have now. That way we avoid the breaking change entirely.

@pauldix then we won't be supporting truncating user-provided timestamps

I don't think we need to support truncating user provided timestamps. That's trivial for them to do so there's no win from an API perspective.

In fact, there's no reason for them to want truncation on a timestamp they provide. It's more efficient in terms of the amount of data you're sending over the wire to specify the precision and leave out all the excess digits

So, the scenarios are:
No timestamp provided

precision parameter not provided: insert now with ns precision
precision parameter provided: insert now with truncation to parameter specified precision

Timestamp provided

no precision parameter, no line protocol suffix: no truncation, time is considered ns
precision parameter provided, no line protocol suffix: consider timestamp the parameter specified precision
precision parameter provided, line protocol suffix provided: ignore param, use line protocol for timestamp precision, no truncation

Did I get that right?

@corylanou yes that's correct, my original thought was for "timestamp provided, precision parameter provided, no line protocol suffix" to behave differently (truncating), but this way is certainly more backwards-compatible

What @corylanou said is right. Assigned to you for 0.9.5 unless @sparrc wants to take it :)

Closing this in favor of #6037. I like the proposal here, but this is an old issue and it's going to get lost. This would also be a breaking change to the line protocol at this point and would have to go into a v2 anyway.

@jsternberg just to confirm, you can still pass the unit in per point, but you're not required to?

In the current line protocol, I don't think you can. The current behavior is what's described at the beginning of this issue. I think we should move this discussion to #6037 because this would be a breaking change for the line protocol V1 and we don't want to forget about this proposal while considering what we should do for V2.


Spark Streaming

[x]  Validate current implementation of spark streaming support
[x] Test performance with streaming load
[x] Add streaming sample

sample added #20
noticed poor performance on high load - 120K messages in 60 seconds (2K msg per sec) sent via event hub took more than an hour to ingest

Current implementation is not efficient when stream writing from an Event Hub with more than one partition.

Update sample with relevant comment
#22


Replicate PR

Closes #2

The test below is automatically generated and verifies that this PR resolves the GH Issue #22:
the code before the PR fails the test and the code after the PR passes the test. 🚀
def test_separability_matrix_for_nested_compound_models():
    from astropy.modeling import models as m
    from astropy.modeling.separable import separability_matrix
    cm = m.Linear1D(10) & m.Linear1D(5)
    nested_cm = m.Pix2Sky_TAN() & cm
    expected_matrix = [[True, True, False, False],
                       [True, True, False, False],
                       [False, False, True, False],
                       [False, False, False, True]]
    result_matrix = separability_matrix(nested_cm)
    assert (result_matrix == expected_matrix).all()

The test below is automatically generated and verifies that this PR resolves the GH Issue #2:
the code before the PR fails the test and the code after the PR passes the test. 🚀
def test_separability_matrix_for_nested_compound_models():
    from astropy.modeling import models as m
    from astropy.modeling.separable import separability_matrix
    cm = m.Linear1D(10) & m.Linear1D(5)
    nested_cm = m.Pix2Sky_TAN() & cm
    expected_matrix = [[True, True, False, False],
                       [True, True, False, False],
                       [False, False, True, False],
                       [False, False, False, True]]
    result_matrix = separability_matrix(nested_cm)
    assert (result_matrix == expected_matrix).all()


Support/warning for usage Normal()

When using x ~ Normal(...) in the model macro, the error no method matching ~(::RandomVariable, ::Normal{Float64})  is thrown. Ofcourse, this makes sense to us, but for outsiders this can be very confusing.
My proposal: when its std parameter is fixed, implicitly convert to MvNormalMeanPrecision. Else throw a warning. Priors on the mean should be allowed.

This should not happen, we have an explicit check and this error has been implemented already: https://github.com/biaslab/RxInfer.jl/blob/main/src/graphppl.jl#L478. Under what circumstances did you het this method error>?


extended time series support

i could be doing something wrong, but i'm getting JSONDecoderError when trying to use extended ts api:
envs\DataStore\lib\json\decoder.py in raw_decode(self, s, idx)
353             obj, end = self.scan_once(s, idx)
354         except StopIteration as err:
--> 355             raise JSONDecodeError("Expecting value", s, err.value) from None
356         return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
sample code:
import alpha_vantage as av
from alpha_vantage.timeseries import TimeSeries
import os
source_key = os.getenv('ALPHAVANTAGE_API_KEY')
ts = TimeSeries(source_key)
ts.get_intraday_extended('SPY', interval='15min', slice='year1month1')

I am surprised noone responded in 2 months, but I face the same problem.
After debugging sources and reading documentation, it is clear that either this endpoint never worked or alpha_vantage did a breaking change, because per doc:
...this endpoint uses the CSV format which is more memory-efficient than JSON...

This wrapper naively appends &datatype=json to the end of the uri which does work for the regular API but not one.

Correct => output_format="csv" and then you can convert to dataframe
#download the csv
ts = TimeSeries(key=MYKEY, output_format='csv')  # Note this
totalData, _ = ts.get_intraday_extended(symbol = 'GE', interval = '30min', slice = 'year2month12')

#csv.reader --> dataframe
df = pd.DataFrame(totalData)
#setup of column and index
header_row=0
df.columns = df.iloc[header_row]
df = df.drop(header_row)
df.set_index('time', inplace=True)

#show output
print(df)

Hope this helps. I struggled for the same answer some time ago.

if you don't have premium api key, you got only 5 API requests per minute

Not an API issue. I can get a response if I specify CSV format. the issue becomes converting it. as mentioned in https://github.com/RomelTorres/alpha_vantage/issues/287#issuecomment-803411808 the output is a _csv.reader object so pipe it through list and then use pandas.dataframe.from_records to convert it back to pandas.
csv_list = list(_csv.reader) df = pandas.DataFrame.from_records(csv_list[1:], columns=csv_list[0])
As far as your API limit if you wanted to iterate through the 24 slices you can simply add a throttling delay to avoid hitting the limit.

[2023-07] Temporarily closing this issue due to inactivity.


Manual

First of all, thanks a lot for your implementation.
I do not have an easee Wallbox yet but I want to see which features would be available.
But neither a manual/explanation exists nor after installing the instance in ioBroker any objects beside "Online".

The objects are only created when the API can connect, and that per box. If you have more than one, they will all be included. You can control the box and query all values. Functions almost like the app but only in iobroker


Add vectorized fillNextPrimes() algorithm for other CPU archtectures (e.g. arm64)

primesieve::iterator's performance depends heavily on the fillNextPrimes() method from PrimeGenerator.cpp. For x64 we have a vectorized AVX512 algorithm that is pretty optimal for this task. Once other CPU architectures (e.g. arm64) support 512-bit vector instructions like AVX512 we should port our AVX512 algorithm to these CPU architectures.
ARM has recently added (2021) the Scalable Vector Extension (SVE) to its CPUs. SVE is supposed to be a portable vector instruction set that works with different vector instructions widths. However for vectorizing our fillNextPrimes() method we need at least 512-bit vector instructions.

Primesieve's AVX512 fillNextPrimes() algorithm is close to optimal for converting 1-bits from the sieve array into the corresponding bit indexes/positions (and next into prime numbers). The algorithm mainly relies on the VPCOMPRESSB  and VPERMB instructions from AVX512.
According to ChatGPT the new ARM SVE instruction set has those instructions as well.

Yes, ARM Scalable Vector Extension (SVE) does offer a similar functionality to Intel AVX-512's VPCOMPRESSB instruction. In ARM SVE, the svcompress_b instruction serves a similar purpose.
Yes, ARM Scalable Vector Extension (SVE) provides a similar functionality to Intel's AVX-512 VPERMB instruction. In SVE, you can achieve similar byte-wise permute operations using the sveperm instruction family.

This means that it should be relatively easy to port Primesieve's AVX512 fillNextPrimes() algorithm to ARM SVE. But there is one big drawback, in ARM SVE the vector length is dynamic which adds another layer of complexity for implementing this algorithm.

According to ARM’s Scalable Vector Extensions: A Critical Look at SVE2 For Integer Workloads, as of 2024 there are no ARM CPUs out yet that support SVE or SV2.  Maybe these issues explain why there is no wide adoption of ARM SVE yet...
It is best to wait a few years until ARM CPUs ship a vector extension of at least 256-bits (ideally we want 512-bits like in AVX512.). Ideally we want a fixed vector length instruction set, similar to ARM NEON or AVX512.


helloworld file has been added

Works, make sure you star the repository for the confirmation and check out this discussion, thanks.


open_all with ajax on a large tree

Is there a way to queue up the ajax requests when calling the open_all function on a very large tree?   We're seeing hundreds of requests getting sent all at once and need to queue that up somehow.

Take a look at massload - it will be a single request. You can also use core.data as a function and implement your own queue logic. Massload should be easier however.


Add type guard for in keyword

Fixes #10485
Added support for typeguarding for following cases:
if ("a" in (x))
if ("a" in x)
if ("a" in x.prop)
if ("a" in x.outer.prop)
if ('a' in this)
if ('a' in this.prop)

@IdeaHunter,
Thanks for having already signed the Contribution License Agreement. Your agreement has not been validated yet. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@RyanCavanaugh  I have updated code to match requested behavior, can you, please, review it?
I would love to hear a feedback from you since i didn't even know do I moving in the right direction or not...

Looks good overall to me. @ahejlsberg care to review?

ping @RyanCavanaugh @ahejlsberg

I'm really looking forward to this landing!

Is it possible this will land for the Typescript 2.4 release?

Can I ask what block this PR being merged?

Can anyone comment as to why this PR is still languishing 6 months later?

There is two reasons of it:

They don't care about it/don't like/don't have time for it/didn't yet got bitten in most precious place by a relevant bug 😆/have more important stuffs to do (reason doesn't really matter in this but the lack of motivation to spend some time on it is the only important thing, otherwise this PR would already be merged)
Me not pushing it forward, because of using to babel+flow and didn't use typescript anywhere else(lack of motivation from my side to use typescript)

Good to merge after one edit. Sorry for the delay on this 🙁

Going to to do requested fixes later, after my work day ends :-)


Add compilation error when ignoring the error cause using _ in error binding pattern

Purpose
$title
Fixes #39042
Check List

[ ] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

@suleka96, please note that we need to add this to the release note also.


export memory_attention module to onnx failed with RuntimeError: ScalarType ComplexFloat is an unexpected tensor scalar type.

I am trying to export various model modules of sam2 to onnx for use on c++, but I encountered an error exporting the memory_attention module and I couldn't find any solution.
I tried torch.onnx.export and torch.onnx.dynamo_export, but they failed.
This is the project address: https://github.com/Aimol-l/SAM2Export.git
View export_onnx.py
Thank you！！！

Have you tried with https://pytorch.org/docs/stable/onnx_dynamo.html and a fresh pytorch version?

yep,I haven tried it. I have read this issue pytorch/pytorch # 59246, but it has not been resolved. Very confused :-)

But I suppose that in this case it is more:
https://github.com/pytorch/pytorch/issues/49793

/cc @ibaiGorordo have you got a similar issue?

We are also trying to export memory_attention to ONNX, but we are encountering the same error. Export results in a ComplexFloat error and onnx.dynamo_export results in an unknown error. We were able to export image_encoder, mask_decoder, prompt_encoder, and memory_encoder without any issues.
Code
            torch.onnx.export( # also dynamo_export
                self.memory_attention, (current_vision_feats[0], memory, current_vision_pos_embeds[0], memory_pos_embed, num_obj_ptr_tokens), 'memory_attention_'+model_id+'.onnx',
                input_names=["curr", "memory", "curr_pos", "memory_pos", "num_obj_ptr_tokens"],
                output_names=["pix_feat"],
                verbose=False, opset_version=17
            )

https://github.com/axinc-ai/segment-anything-2/blob/onnx/sam2/modeling/sam2_base.py#L709
Output
ScalarType ComplexFloat is an unexpected tensor scalar type

I suppose it is caused by
https://github.com/facebookresearch/segment-anything-2/blob/main/sam2/modeling/position_encoding.py#L200
But it seems https://github.com/pytorch/pytorch/issues/49793 is closed or not?

What is the error with onnx.dynamo_export? What pytorch version?

As far as I can tell, complex numbers are only being used to handle 2D rotations. So if compatibility is an issue, it's possible to convert the code over to use matrix multiplications instead.
It should be a matter of just changing how the complex numbers are computed (the compute_axial_cis function) to something that creates 2x2 matrices:
def get_rotation_matrices(dim, end_x, end_y, theta=10000.0, device=None, dtype=None):

    powers = torch.linspace(0, 1, 1 + (dim // 4), device=device, dtype=dtype)[:-1]
    base_angles = torch.pow(theta, -powers)

    end_x, end_y = int(end_x), int(end_y)
    x_mults = torch.arange(end_x, device=device, dtype=dtype).repeat(end_y)
    y_mults = torch.arange(end_y, device=device, dtype=dtype).repeat_interleave(end_x)
    angles_xy = (torch.outer(mults, base_angles) for mults in (x_mults, y_mults))

    rotmats_list = []
    for angles in angles_xy:
        sterm, cterm = torch.sin(-angles), torch.cos(-angles)
        rotmat = torch.stack(
            [
                torch.stack([cterm, -sterm], dim=-1),
                torch.stack([sterm, cterm], dim=-1),
            ],
            dim=-1,
        )
        rotmats_list.append(rotmat)

    return torch.cat(rotmats_list, dim=1).unsqueeze(0).unsqueeze(0)

And then similarly changing over how the complex numbers are used to rotate tokens (the apply_rotary_enc function) to instead use the rotation matrices:
def apply_rotary_enc(xq, xk, rotmats, repeat_freqs_k=False):

    bq, hq, nq, cq = xq.shape
    bk, hk, nk, ck = xk.shape

    q_out = torch.matmul(rotmats, xq.reshape(bq, hq, nq, cq // 2, 2, 1)).flatten(3)
    k_rotmat = rotmats.repeat(1, 1, nk // nq, 1, 1, 1) if repeat_freqs_k else rotmats
    k_out = torch.matmul(k_rotmat, xk.reshape(bk, hk, nk, ck // 2, 2, 1)).flatten(3)

    return q_out, k_out

This is pulled from a modified implementation, so there might be some other small tweaks needed for everything to run properly. However, from what I've seen, the complex number version runs extremely fast compared to using matrix multiplications. It seems there might be some special optimizations for complex numbers (maybe it doesn't matter in onnx though?).

Is the Rotary in torchtune compatible?
https://github.com/pytorch/torchtune/blob/main/torchtune/modules/position_embeddings.py#L14

Is the Rotary in torchtune compatible?

I'm not familiar with torchtune, but as far as I can tell, it looks like a 1D version of RoPE. It's also using a matrix multiplication (manually), so if it's converted to 2D, it should work.

@heyoeyo In any case onnx.dynamo_export it is working with complex but you need to use the API correctly. See the signature at https://pytorch.org/docs/stable/onnx_dynamo.html#id6
It seems that the real problem with onnx dynamo is:
AssertionError: Mutating module attribute freqs_cis during export.

See more at https://github.com/pytorch/pytorch/issues/106217

After we use an easy workaround for  https://github.com/pytorch/pytorch/issues/106217
then the main problem is unsqueeze with complex
torch.onnx._internal.diagnostics.infra.context.RuntimeErrorWithDiagnostic: Cannot find any COMPLEX symbolic function for aten::unsqueeze.default, which should be registered under aten.unsqueeze.default.

That it is https://github.com/pytorch/pytorch/issues/126972

then the main problem is unsqueeze with complex

If .reshape() still works with complex numbers, then it should be possible to replace the .unsqueeze() with a reshape operation that just puts a 1 in whatever dimension the unsqueeze was adding. Or otherwise maybe the simpler [None] trick would work if even reshape isn't supported (i.e. these are equivalent: data.unsqueeze(1) <-> data[:, None])

It seems to be more about the else case:
https://github.com/facebookresearch/segment-anything-2/blob/7e1596c0b6462eb1d1ba7e1492430fed95023598/sam2/modeling/position_encoding.py#L214-L219
I don't know on what device it is not working repeat on complex. Have you tried on CPU the repeat branch?

@ronghanghu Has done this commit. Can you expand a bit about the repeat on complex incompatibilites on non cuda devices?
As at the same time unsqueeze is not compatible with complex on onnx/export https://github.com/pytorch/pytorch/issues/106217

Asyou are working on different repositories/branches can you focus to open a DRAFT PR on this repo using onnx.dynamo_export?
I think It will be easier to track the progress/workarounds and get support form the original Meta team.

@heyoeyo Thank you for the information about replacing RotteryEncoder's Complex Tensor with Matmul. Using the provided code, I was able to convert it to ONNX with torch.export.
https://github.com/axinc-ai/segment-anything-2/blob/onnx/sam2/modeling/sam/transformer.py#L340
https://github.com/axinc-ai/segment-anything-2/blob/onnx/sam2/modeling/position_encoding.py#L224
Memory Attention Tiny : https://storage.googleapis.com/ailia-models/segment-anything-2/memory_attention_hiera_t.onnx
Netron : https://netron.app/?url=https://storage.googleapis.com/ailia-models/segment-anything-2/memory_attention_hiera_t.onnx

@janghyuncho @kyakuno  Can u share your inference code?
thanks very much!

@janghyuncho @kyakuno Can u share your inference code?
thanks very much!

https://github.com/Aimol-l/OrtInference

@MonolithFoundation Our inference code is below. It also supports MemoryAttention.
https://github.com/axinc-ai/ailia-models/tree/master/image_segmentation/segment-anything-2
Use ONNX Runtime (121,714 ms for hiera_l on M2 Mac)
python3 segment-anything-2.py -v demo --onnx

Use our ailia SDK (24,106 ms for hiera_l on M2 Mac)
pip3 install ailia
python3 segment-anything-2.py -v demo

ONNX files are automatically downloaded.


ci is broken

Failed to access tvm ci - https://ci.tvm.ai/, got error "Service Unavailable"
@tqchen @zhiics

Should be fixed by now


Fix grammar for general stats

Codecov Report

Merging #74 into master will decrease coverage by 0.15%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
- Coverage   15.04%   14.89%   -0.16%
==========================================
  Files          33       33
  Lines        1070     1081      +11
  Branches      125      127       +2
==========================================
  Hits          161      161
- Misses        907      918      +11
  Partials        2        2


Add special OAuth parameters that probably only Slack needs

The new Slack OAuth API has a couple changes that our current SDK can't handle. We could hack these features into the Coda code base, but that would not allow other developers to make their own Slack Pack.
First, Slack Apps cannot request scopes that are beyond what the Slack App's profile is updated to. This is a problem because in SlackOauth world, scope means bot scopes, and user_scope is what we want to use. We had already supported user_scope as an additionalParam, but now Slack will refuse to work unless we additionally remove the scope param.
Second, the access_token in the OAuth response from Slack is now the bot scope, and the user token that we want is now nested in a sub-field (authed_user).
I cannot test these changes with the CLI for real because Slack no longer allows non-https redirect URLs, but I did test them end-to-end in dev by creating a new Slack Dev pack and verifying it works.
If we like this approach, I can add unit tests (it's not trivial because oauth_server.ts is only tested by auth_test.ts currently, which treats it like a black box).

Surfacing for @ekoleda-codaio for visibility as well, though he's out sick.


Question on tf.stop_gradient in dqn build_graph

Hey,
This question is regarding build_train function in DQN/build_graph.py. I notice that when you were computing td_error, you use tf.stop_gradient on target_Q values. Do you mind providing an explanation on this, What does stop_gradient do here, and how will it affect the overall loss function?
Regards
Henry

The reason this is happening is so that gradients don't flow into the target Q function. Since 2 networks are being used here if you allow gradients to update the targetQ this becomes improper. This stop_gradient allows you to essentially treat targetQ as a constant that is the target update.

Correct!


sorted: make a very strict mem implementation for testing

so we don't get bitten by sqlite weird locks and gotchas

What's the matter with pkg/sorted/mem.go ?

I've issued https://camlistore-review.googlesource.com/5597 for removing the last remnants of code.google.com/p/leveldb-go - from pkg/sorted/mem.go.

I don't remember for sure what that issue was about exactly. I'll need to think about it.

a2c19c1f425c9266dc0ba23dd2c5c672d577e8da makes pkg/sorted/mem.go use syndtr/goleveldb.
I don't remember what the specific emphasis on strict and testing should have been about, so closing it for now.


No scalar data was found

GitHub issues are for bugs / installation problems / feature requests.
For general support from the community, see StackOverflow.
To make bugs and feature requests more easy to find and organize, we close issues that are deemed
out of scope for GitHub Issues and point people to StackOverflow.
For bugs or installation issues, please provide the following information.
The more information you provide, the more easily we will be able to offer
help and advice.
Environment info
Operating System: CentOS 7
Installed version of CUDA and cuDNN:  Using CPU version
(please attach the output of ls -l /path/to/cuda/lib/libcud*):
If installed from binary pip package, provide:

Which pip package you installed.
https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
The output from python -c "import tensorflow; print(tensorflow.version)".

print(tensorflow.version)
0.8.0

If installed from sources, provide the commit hash:
Steps to reproduce
1.In you TensorFlow program:
Set logs writer into folder /tmp/tensorflow_logs
summary_writer = tf.train.SummaryWriter('/tmp/tensorflow_logs', graph_def=sess.graph_def)
2.
python ./lib/python2.7/site-packages/tensorflow/tensorboard/tensorboard.py --logdir=/tmp/tensorflow_logs
3.Open http://[address]:6006/ into your web browser
What have you tried?

Tried to enable debug and see if anything is wrong.
python ./lib/python2.7/site-packages/tensorflow/tensorboard/tensorboard.py --logdir=/tmp/tensorflow_logs --debug
Looked if there files in exist in /tmp/tensorflow_logs
Checked their sizes
Everything looked correct

Logs or other output that would be helpful
(If logs are large, please upload as attachment).
When I open web page:
Web application itself works, but this error is shown:
"No scalar data was found."

Can you please tell us a bit more about the TensorFlow program that you were running. In particular, what tf.scalar_summary() ops did you expect to see in the TensorBoard output, and how did you write them to summary_writer? Also, when you say "Checked their sizes / Everything looked correct", does this mean that there were events in the file, or just a graph?

Here is the code I was using: https://github.com/aymericdamien/TensorFlow-Examples/blob/master/notebooks/5 - User Interface/graph_visualization.ipynb
In the folder "/tmp/tensorflow_logs" there was a file "events.out.tfevents.1462126139.localhost.localdomain" and it was around 8kb

Looking at the code of that notebook, I think the "No scalar data was found" error message is expected behavior: the notebook doesn't explicitly log anything to the summary_writer, apart from sess.graph_def (which probably accounts for the 8kb of data in the event log file). If you click on the "Graph" link at the top of the TensorBoard page, you should be able to see the graph.

I'm closing this due to inactivity. Let us know if you still have problems!


Changes:

Convert 7-Zip, CMake, MongoDB, Java, Kind to Pester
Implement a bunch of helper functions and asserts for Pester
Run all tests twice, right after installation and at the end of the build
Install Pester 5 to Windows images

Test builds:
Win 2016: https://dev.azure.com/github/virtual-environments/_build/results?buildId=75114&view=results
Win 2019: https://dev.azure.com/github/virtual-environments/_build/results?buildId=75090&view=results
Check list

[x] Related issue / work item is attached
[x] Tests are written (if applicable)
[ ] Documentation is updated (if applicable)
[x] Changes are tested and related VM images are successfully generated

General rules for future PRs
(will be pushed to documentation later)

Put tests files to Tests folder
If the test is simple (< 20 lines), you should put it to common files. If it is huge test (like Java), put it to the separate file.
Name common files based on tool category like Tools, Databases, Browsers, ProjectManagement and etc (see documentation file for details)
Add Invoke-PesterTests -TestFile "<Test file name>" -TestName "<Describe name><optional parameter>" line to Install script.
Delete Validate file, remove it from template
Use pattern "cmake --version" | Should -ReturnZeroExitCode if you need to run the command and check that exit code is 0

/azp run windows2016, windows2019

@maxim-lobanov - installing the latest Pester version seems a breaking update for people with builds that relied on the stock Windows 10 Pester installation to be there (it just broke our build)... Should at least be mentioned in the README that comes with this image version?

Import-Module -Verbose -MaximumVersion 3.99.99 -Name Pester

before we invoke Pester fixed it for us.

Hello @mahilleb-msft , thank you for raising this point. We were not aware about usage of pre-installed Pester since Pester 3 is pretty old (Pester 4 was released in 2017) so we didn't expect any impact.
It definitely makes sense to list pre-installed PowerShell modules in image documentation. We will take care about it.
Also I will create announcement issue for this update.
Thanks!


Click warnings

Click python lib gives warnings at each subliminal 1.0.1 launch.
See bellow output of subliminal download --help  command.
/usr/local/lib/python2.7/dist-packages/subliminal/cli.py:115: Warning: Click detected the use of the unicode_literals __future__ import.  This is heavily discouraged because it can introduce subtle bugs in your code.  You should instead use explicit u"" literals for your unicode strings.  For more information see http://click.pocoo.org/python3/
  @click.pass_context
/usr/local/lib/python2.7/dist-packages/subliminal/cli.py:145: Warning: Click detected the use of the unicode_literals __future__ import.  This is heavily discouraged because it can introduce subtle bugs in your code.  You should instead use explicit u"" literals for your unicode strings.  For more information see http://click.pocoo.org/python3/
  @click.pass_context
/usr/local/lib/python2.7/dist-packages/subliminal/cli.py:172: Warning: Click detected the use of the unicode_literals __future__ import.  This is heavily discouraged because it can introduce subtle bugs in your code.  You should instead use explicit u"" literals for your unicode strings.  For more information see http://click.pocoo.org/python3/
  @click.pass_obj```

Please search closed issues #495

oups sorry


run PaddleSpeech  VectorExecutor on xpu device fail

-Description：
Environment：
ARM, Kunlun R200
OS: Linux localhost.localdomain 4.19.152-801.s2500.el8_1.aarch64 #1 SMP Fri Jun 24 11:57:19 CST 2022 aarch64 aarch64 aarch64 GNU/Linux
python:3.7.4
paddle:  compile and build on source  with xpu
-Test code
import paddle
from paddlespeech.cli.vector import VectorExecutor
from scipy.spatial.distance import cosine
vector_executor = VectorExecutor()
audio_emb = vector_executor(
model='ecapatdnn_voxceleb12',
sample_rate=16000,
config=None,  # Set config and ckpt_path to None to use pretrained model.
ckpt_path=None,
audio_file='./85236145389.wav',
device=paddle.get_device())
print('Audio embedding Result: \n{}'.format(audio_emb))
test_emb = vector_executor(
model='ecapatdnn_voxceleb12',
sample_rate=16000,
config=None,  # Set config and ckpt_path to None to use pretrained model.
ckpt_path=None,
audio_file='./123456789.wav',
device=paddle.get_device())
print('Test embedding Result: \n{}'.format(test_emb))
score = vector_executor.get_embeddings_score(audio_emb, test_emb)
print(f"Eembeddings Score: {score}")
score = 1 - cosine(audio_emb, test_emb)
print(f"Eembeddings Score2: {score}")
-Error:
[INFO][BKCL][/home/users/yangyu22/baidu/xpu/bkcl/src/globals.cpp:52] set BKCL timeout to 600 seconds
[INFO][BKCL][/home/users/yangyu22/baidu/xpu/bkcl/src/globals.cpp:53] set BKCL RING BUFFER SIZE to 1048576
XPURT /usr/local/lib64/python3.7/site-packages/paddle/fluid/../libs/libxpurt.so loaded
W0823 14:50:02.136422 61499 pybind.cc:2107] Cannot use get_all_custom_device_type because you have installedCPU/GPU version PaddlePaddle.
If you want to use get_all_custom_device_type, please try to install CustomDevice version PaddlePaddle by: pip install paddlepaddle-core
W0823 14:50:03.240737 61499 xpu_context.cc:89] Please NOTE: xpu device: 0
W0823 14:50:03.241063 61499 device_context.cc:310] Please NOTE: xpu device: 0
/usr/local/lib64/python3.7/site-packages/scipy/fftpack/init.py:103: DeprecationWarning: The module numpy.dual is deprecated.  Instead of using dual, use the functions directly from numpy or scipy.
from numpy.dual import register_func
/usr/local/lib64/python3.7/site-packages/scipy/sparse/sputils.py:16: DeprecationWarning: np.typeDict is a deprecated alias for np.sctypeDict.
supported_dtypes = [np.typeDict[x] for x in supported_dtypes]
/usr/local/lib64/python3.7/site-packages/scipy/special/orthogonal.py:81: DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import (exp, inf, pi, sqrt, floor, sin, cos, around, int,
/usr/local/lib64/python3.7/site-packages/scipy/io/matlab/mio5.py:98: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from .mio5_utils import VarReader5
Traceback (most recent call last):
File "test_sv_xpu.py", line 12, in
device=paddle.get_device())
File "/usr/local/lib/python3.7/site-packages/paddlespeech/cli/utils.py", line 328, in _warpper
return executor_func(self, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/paddlespeech/cli/vector/infer.py", line 257, in call
self.infer(model)
File "", line 2, in infer
File "/usr/local/lib64/python3.7/site-packages/paddle/fluid/dygraph/base.py", line 354, in _decorate_function
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/paddlespeech/cli/vector/infer.py", line 358, in infer
embedding = self.model.backbone(feats, lengths).squeeze().numpy()
File "/usr/local/lib64/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 930, in call
return self._dygraph_call_func(*inputs, **kwargs)
File "/usr/local/lib64/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "/usr/local/lib/python3.7/site-packages/paddlespeech/vector/models/ecapa_tdnn.py", line 511, in forward
x = self.mfa(x)
File "/usr/local/lib64/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 930, in call
return self._dygraph_call_func(*inputs, **kwargs)
File "/usr/local/lib64/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "/usr/local/lib/python3.7/site-packages/paddlespeech/vector/models/ecapa_tdnn.py", line 208, in forward
return self.norm(self.activation(self.conv(x)))
File "/usr/local/lib64/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 930, in call
return self._dygraph_call_func(*inputs, **kwargs)
File "/usr/local/lib64/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "/usr/local/lib/python3.7/site-packages/paddlespeech/vector/models/ecapa_tdnn.py", line 177, in forward
x_n = self.norm(x)
File "/usr/local/lib64/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 930, in call
return self._dygraph_call_func(*inputs, **kwargs)
File "/usr/local/lib64/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "/usr/local/lib64/python3.7/site-packages/paddle/nn/layer/norm.py", line 666, in forward
use_global_stats=self._use_global_stats)
File "/usr/local/lib64/python3.7/site-packages/paddle/nn/functional/norm.py", line 207, in batch_norm
variance_out, *attrs)
OSError:

C++ Traceback (most recent call last):
0   paddle::imperative::Tracer::TraceOp(std::string const&, paddle::imperative::NameVarBaseMap const&, paddle::imperative::NameVarBaseMap const&, paddle::framework::AttributeMap, std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > > const&)
1   void paddle::imperative::Tracer::TraceOpImplpaddle::imperative::VarBase(std::string const&, paddle::imperative::details::NameVarMapTraitpaddle::imperative::VarBase::Type const&, paddle::imperative::details::NameVarMapTraitpaddle::imperative::VarBase::Type const&, paddle::framework::AttributeMap&, phi::Place const&, bool, std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > > const&, paddle::framework::AttributeMap*, bool)
2   paddle::imperative::PreparedOp::Run(paddle::imperative::NameVarBaseMap const&, paddle::imperative::NameVarBaseMap const&, paddle::framework::AttributeMap const&, paddle::framework::AttributeMap const&)
3   std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<phi::XPUPlace, false, 0ul, paddle::operators::BatchNormXPUKernel<paddle::platform::XPUDeviceContext, float> >::operator()(char const*, char const*, int) const::{lambda(paddle::framework::ExecutionContext const&)#1}>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&)
4   paddle::operators::BatchNormXPUKernel<paddle::platform::XPUDeviceContext, float>::Compute(paddle::framework::ExecutionContext const&) const
5   phi::enforce::EnforceNotMet::EnforceNotMet(phi::ErrorSummary const&, char const*, int)
6   phi::enforce::GetCurrentTraceBackStringabi:cxx11

Error Message Summary:
ExternalError: The batch_norm_infer XPU API return wrong value[1 xpu api invalid param]
[Hint: Expected r == xpu::Error_t::SUCCESS, but received r:1 != xpu::Error_t::SUCCESS:0.] (at /workspace/qiyuan/Paddle/paddle/fluid/operators/batch_norm_op_xpu.cc:121)
[operator < batch_norm > error]
-misc
run normally with param device="cpu".

xpu支持问题在paddle里反馈吧。这边看不了这种问题。


cmd/go: improve error message for missing dependencies when building files from another module

Let's say I have a module, foo, with a main.go file with a dependency on filippo.io/edwards25519. If I run or build main.go from inside foo, everything goes well.
If I run it or build it from outside the module, I get
$ go run foo/main.go
foo/main.go:3:8: no required module provides package filippo.io/edwards25519: working directory is not part of a module

If I run it or build it from inside a different module, I get
$ go run ../foo/main.go
../foo/main.go:3:8: no required module provides package filippo.io/edwards25519; to add it:
	go get filippo.io/edwards25519

In both cases, the error message could have noticed that main.go is inside a (different) module, and added something like
note: the file is in a module that is not active, to activate it:
	cd .../foo

(go run and go build with .go files are a constant source of confusion, got way less useful with modules because one can't just run arbitrary files as scripts from anywhere, and should IMHO be deprecated, but while we support them we should try to make them less painful.)

cc @bcmills @jayconrod @matloob

The not active terminology seems a bit confusing too. Perhaps:
note: foo/main.go is in a module rooted at ./foo; to use its dependencies, first change to a directory within that module:
	cd ../foo

Hmm, but if we're already in some other module, it's not obvious whether the right solution is to cd into that directory (using its dependencies instead of those of the current module), or to add replace and require directives to add it as a dependency of the current module.

(If we're currently not in any module at all, I think it would be reasonable to suggest the cd command.)


using -d won't downlaod to specified location-- Gets deleted from /var/lib/docker

sudo docker run --rm -v ${PWD}/pkgs:/rusty-psn/pkgs rusty-psn -d /home -t BLUS31527
It downloads, then gets deleted from disk.
I needed to sudo chmod -R 777 /var/lib/docker/overlay2
then keep running rsync and hope you don't miss anything while rusty-psn is updating
rsync -a /var/lib/docker/overlay2 /home/games --info=progress2
then i was able to search which folders are the largest and follow them unitll you find the .pkg files and then install in emulator.

If you are not using the default path for pkgs, then you should be running docker run --rm -v /home/:/rusty-psn/pkgs rusty-psn -t BLUS31527.
The way you are trying to run it, Docker will search for /home inside the container, it won't use your home directory. Since it won't find it, it'll get placed on a temporary directory that'll get removed after it's done running.
Using -v /home/:/rusty-psn/pkgs instead of ${PWD}/pkgs:/rusty-psn/pkgs mounts your home directory (the path you were trying to use) to rusty-psn's default download folder for pkgs, which removes the need to specify a path with -d.


Rework folder structure for visualizer

Good boy.

@saurabh1002 can you please add a minimal description? I have no clue what is going on here


Question about Entity and Time Effects

First off, I really like package and it's been great to fixed effects regression natively in Python.
I have a question/suggestion: why do you require the the use of multiindex dataframes for use with fixed effects regression, rather than just supplying a column name for which column to demean over or create dummies for? Based on the demean function, you're doing a groupby-transform when you're demeaning which doesn't require indices to be set.
This isn't meant as a criticism, I really like the package! I just wanted to get your rationale if you have time.

Because allowing columns would require two additional inputs into the
signature, one for the entity column and one for time.  The signature is
already fairly large without these two additional inputs.
On Sat, Oct 10, 2020, 00:33 Aleksandr Michuda<EMAIL_ADDRESS>wrote:

First off, I really like package and it's been great to fixed effects
regression natively in Python.
I have a question/suggestion: why do you require the the use of multiindex
dataframes for use with fixed effects regression, rather than just
supplying a column name for which column to demean over or create dummies
for? Based on the demean function, you're doing a groupby-transform when
you're demeaning which doesn't require indices to be set.
This isn't meant as a criticism, I really like the package! I just wanted
to get your rationale if you have time.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/bashtage/linearmodels/issues/283, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABKTSRPYCN3E4I5BELPVZNLSJ6MVTANCNFSM4SKUOGPQ
.

The two are also only separated by a single call to set_index or reset_index.


[feature request] Adding supports for more archiving services like rahiel/archiveror

In terms of archiving, I think it might be useful to add support for Archive Today and IPFS to improve the reliability of network archiving? Just like rahiel/archiveror and wabarc/wayback does.

Can you elaborate why that would be useful? Why is the Internet Archive integration not sufficient? Should this be a configurable alternative to the Internet Archive integration, or should a bookmark be archived with multiple services?

Some websites cannot be successfully archived with Internet Archive Wayback Machine but can be archived with Archive Today. So I thought adding it as an option would make the bookmark service perfect (in case you run into a site that can't be archived).
I don't use IPFS very often, and IPFS is not as popular as Archive Today in my observations. I just thought if IPFS could be added as a supplement, the project will also attract people who prefer a more decentralized service.

I'll add another (IMHO important and) current reason: cyberattacks + IAS outages
Thanks in advance + BR!


uv pip compile incorrectly compiles extras in requirements.txt

Version Information

UV version: uv 0.5.10 (37b11ddb2 2024-12-17)
OS: macOS 14.7.1
Python: 3.12.7

Steps to Reproduce

Create a new project:

mkdir uv_test
cd uv_test

Initiate UV project:

uv init .

Add sentry-sdk with fastapi extras:

uv add 'sentry-sdk[fastapi]'

This creates a pyproject.toml with:

[project]
name = "uv-test"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
    "sentry-sdk[fastapi]>=2.19.2",
]

Generate requirements.txt. Using --versbose for debug perpose:

uv pip compile pyproject.toml -o requirements.txt --verbose

the output:
DEBUG uv 0.5.10 (37b11ddb2 2024-12-17)
DEBUG Starting Python discovery for a default Python
DEBUG Looking for exact match for request a default Python
DEBUG Searching for default Python interpreter in virtual environments, managed installations, or search path
DEBUG Found `cpython-3.12.7-macos-aarch64-none` at `/Users/muminur.rahman/Desktop/uv_test/.venv/bin/python3` (virtual environment)
DEBUG Using Python 3.12.7 interpreter at .venv/bin/python3 for builds
DEBUG Using request timeout of 30s
DEBUG Found static `requires-dist` for: /Users/muminur.rahman/Desktop/uv_test
DEBUG No workspace root found, using project root
DEBUG Solving with installed Python version: 3.12.7
DEBUG Solving with target Python version: >=3.12.7
DEBUG Adding direct dependency: sentry-sdk[fastapi]>=2.19.2
DEBUG Found fresh response for: https://pypi.org/simple/sentry-sdk/
DEBUG Searching for a compatible version of sentry-sdk[fastapi] (>=2.19.2)
DEBUG Selecting: sentry-sdk==2.19.2 [preference] (sentry_sdk-2.19.2-py2.py3-none-any.whl)
DEBUG Adding transitive dependency for sentry-sdk==2.19.2: sentry-sdk==2.19.2
DEBUG Adding transitive dependency for sentry-sdk==2.19.2: sentry-sdk[fastapi]==2.19.2
DEBUG Searching for a compatible version of sentry-sdk[fastapi] (==2.19.2)
DEBUG Selecting: sentry-sdk==2.19.2 [preference] (sentry_sdk-2.19.2-py2.py3-none-any.whl)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/31/4d/74597bb6bcc23abc774b8901277652c61331a9d4d0a8d1bdb20679b9bbcb/sentry_sdk-2.19.2-py2.py3-none-any.whl.metadata
DEBUG Adding transitive dependency for sentry-sdk==2.19.2: fastapi>=0.79.0
DEBUG Searching for a compatible version of sentry-sdk (==2.19.2)
DEBUG Selecting: sentry-sdk==2.19.2 [preference] (sentry_sdk-2.19.2-py2.py3-none-any.whl)
DEBUG Adding transitive dependency for sentry-sdk==2.19.2: urllib3>=1.26.11
DEBUG Adding transitive dependency for sentry-sdk==2.19.2: certifi*
DEBUG Found fresh response for: https://pypi.org/simple/certifi/
DEBUG Found fresh response for: https://pypi.org/simple/urllib3/
DEBUG Found fresh response for: https://pypi.org/simple/fastapi/
DEBUG Searching for a compatible version of fastapi (>=0.79.0)
DEBUG Selecting: fastapi==0.115.6 [preference] (fastapi-0.115.6-py3-none-any.whl)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/a5/32/8f6669fc4798494966bf446c8c4a162e0b5d893dff088afddf76414f70e1/certifi-2024.12.14-py3-none-any.whl.metadata
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/ce/d9/5f4c13cecde62396b0d3fe530a50ccea91e7dfc1ccf0e09c228841bb5ba8/urllib3-2.2.3-py3-none-any.whl.metadata
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/52/b3/7e4df40e585df024fac2f80d1a2d579c854ac37109675db2b0cc22c0bb9e/fastapi-0.115.6-py3-none-any.whl.metadata
DEBUG Adding transitive dependency for fastapi==0.115.6: starlette>=0.40.0, <0.42.0
DEBUG Adding transitive dependency for fastapi==0.115.6: pydantic>=1.7.4, <1.8 | >=1.8+, <1.8.1 | >=1.8.1+, <2.0.0 | >=2.0.0+, <2.0.1 | >=2.0.1+, <2.1.0 | >=2.1.0+, <3.0.0
DEBUG Adding transitive dependency for fastapi==0.115.6: typing-extensions>=4.8.0
DEBUG Searching for a compatible version of urllib3 (>=1.26.11)
DEBUG Selecting: urllib3==2.2.3 [preference] (urllib3-2.2.3-py3-none-any.whl)
DEBUG Searching for a compatible version of certifi (*)
DEBUG Selecting: certifi==2024.12.14 [preference] (certifi-2024.12.14-py3-none-any.whl)
DEBUG Found fresh response for: https://pypi.org/simple/typing-extensions/
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl.metadata
DEBUG Found fresh response for: https://pypi.org/simple/starlette/
DEBUG Searching for a compatible version of starlette (>=0.40.0, <0.42.0)
DEBUG Selecting: starlette==0.41.3 [preference] (starlette-0.41.3-py3-none-any.whl)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/96/00/2b325970b3060c7cecebab6d295afe763365822b1306a12eeab198f74323/starlette-0.41.3-py3-none-any.whl.metadata
DEBUG Adding transitive dependency for starlette==0.41.3: anyio>=3.4.0, <5
DEBUG Found fresh response for: https://pypi.org/simple/pydantic/
DEBUG Found fresh response for: https://pypi.org/simple/anyio/
DEBUG Searching for a compatible version of pydantic (>=1.7.4, <1.8 | >=1.8+, <1.8.1 | >=1.8.1+, <2.0.0 | >=2.0.0+, <2.0.1 | >=2.0.1+, <2.1.0 | >=2.1.0+, <3.0.0)
DEBUG Selecting: pydantic==2.10.4 [preference] (pydantic-2.10.4-py3-none-any.whl)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/a0/7a/4daaf3b6c08ad7ceffea4634ec206faeff697526421c20f07628c7372156/anyio-4.7.0-py3-none-any.whl.metadata
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/f3/26/3e1bbe954fde7ee22a6e7d31582c642aad9e84ffe4b5fb61e63b87cd326f/pydantic-2.10.4-py3-none-any.whl.metadata
DEBUG Adding transitive dependency for pydantic==2.10.4: annotated-types>=0.6.0
DEBUG Adding transitive dependency for pydantic==2.10.4: pydantic-core>=2.27.2, <2.27.2+
DEBUG Adding transitive dependency for pydantic==2.10.4: typing-extensions>=4.12.2
DEBUG Searching for a compatible version of typing-extensions (>=4.12.2)
DEBUG Selecting: typing-extensions==4.12.2 [preference] (typing_extensions-4.12.2-py3-none-any.whl)
DEBUG Searching for a compatible version of anyio (>=3.4.0, <5)
DEBUG Selecting: anyio==4.7.0 [preference] (anyio-4.7.0-py3-none-any.whl)
DEBUG Adding transitive dependency for anyio==4.7.0: idna>=2.8
DEBUG Adding transitive dependency for anyio==4.7.0: sniffio>=1.1
DEBUG Adding transitive dependency for anyio==4.7.0: typing-extensions{python_full_version < '3.13'}>=4.5
DEBUG Searching for a compatible version of typing-extensions{python_full_version < '3.13'} (>=4.5)
DEBUG Selecting: typing-extensions==4.12.2 [preference] (typing_extensions-4.12.2-py3-none-any.whl)
DEBUG Adding transitive dependency for typing-extensions==4.12.2: typing-extensions==4.12.2
DEBUG Adding transitive dependency for typing-extensions==4.12.2: typing-extensions{python_full_version < '3.13'}==4.12.2
DEBUG Found fresh response for: https://pypi.org/simple/annotated-types/
DEBUG Searching for a compatible version of typing-extensions{python_full_version < '3.13'} (==4.12.2)
DEBUG Selecting: typing-extensions==4.12.2 [preference] (typing_extensions-4.12.2-py3-none-any.whl)
DEBUG Searching for a compatible version of annotated-types (>=0.6.0)
DEBUG Selecting: annotated-types==0.7.0 [preference] (annotated_types-0.7.0-py3-none-any.whl)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl.metadata
DEBUG Found fresh response for: https://pypi.org/simple/sniffio/
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl.metadata
DEBUG Found fresh response for: https://pypi.org/simple/idna/
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl.metadata
DEBUG Found fresh response for: https://pypi.org/simple/pydantic-core/
DEBUG Searching for a compatible version of pydantic-core (>=2.27.2, <2.27.2+)
DEBUG Selecting: pydantic-core==2.27.2 [preference] (pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/d3/f3/c97e80721735868313c58b89d2de85fa80fe8dfeeed84dc51598b92a135e/pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl.metadata
DEBUG Adding transitive dependency for pydantic-core==2.27.2: typing-extensions>=4.6.0, <4.7.0 | >=4.7.0+
DEBUG Searching for a compatible version of idna (>=2.8)
DEBUG Selecting: idna==3.10 [preference] (idna-3.10-py3-none-any.whl)
DEBUG Searching for a compatible version of sniffio (>=1.1)
DEBUG Selecting: sniffio==1.3.1 [preference] (sniffio-1.3.1-py3-none-any.whl)
DEBUG Tried 12 versions: annotated-types 1, anyio 1, certifi 1, fastapi 1, idna 1, pydantic 1, pydantic-core 1, sentry-sdk 1, sniffio 1, starlette 1, typing-extensions 1, urllib3 1
DEBUG marker environment resolution took 0.014s
Resolved 12 packages in 18ms
# This file was autogenerated by uv via the following command:
#    uv pip compile pyproject.toml -o requirements.txt
annotated-types==0.7.0
    # via pydantic
anyio==4.7.0
    # via starlette
certifi==2024.12.14
    # via sentry-sdk
fastapi==0.115.6
    # via sentry-sdk
idna==3.10
    # via anyio
pydantic==2.10.4
    # via fastapi
pydantic-core==2.27.2
    # via pydantic
sentry-sdk==2.19.2
    # via uv-test (pyproject.toml)
sniffio==1.3.1
    # via anyio
starlette==0.41.3
    # via fastapi
typing-extensions==4.12.2
    # via
    #   anyio
    #   fastapi
    #   pydantic
    #   pydantic-core
urllib3==2.2.3
    # via sentry-sdk

Expected Behavior
The generated requirements.txt should include sentry-sdk[fastapi]==2.19.2 to maintain the extras specification.
Actual Behavior
The generated requirements.txt includes just sentry-sdk==2.19.2 without the [fastapi] extra specification.
Additional Context

Using pip-tools to generate requirements.txt correctly maintains the extras syntax
While all dependencies are correctly resolved and installed, the lack of extras syntax in the requirements.txt causing issues where the extra is required.

You're looking for the --no-strip-extras flag. For reference, this has no practical impact on behavior. The file functions exactly the same way with our without the extras, which is why they're omitted. It's only a superficial difference (i.e., a difference in appearance).


Yodaplus XDC pay implementation

now allowing XDCpay to be used with this modal

With stable version 2.0.0 of Web3Modal now released, we are officially dropping support for version 1.x
Due to this this issue/pr was marked for closing. It is highly recommended to upgrade as 2.x will be receiving further updates that will enable functionality for some of our newer sdks like auth and push as well as support for WalletConnect v2 (See this post about WalletConnect v1 being deprecated https://medium.com/walletconnect/walletconnect-v1-0-sunset-notice-and-migration-schedule-8af9d3720d2e)
If you need to continue using Web3Modal 1.x and require this feature/fix implemented, we suggest adding it via forking V1 branch.


Morpheme detail view tidy-up

Several small things to tidy up this view:

Replace "Delete sign" by "Delete morpheme"
Warning should speak of "morpheme" not of "sign"
Search results come up now with a list of "undefined" buttons -- repair as with Gloss Detail View
Remove the text "Search results" as in the GlossDetailView

:-)

Actions

Changed label in "morpheme_detail.html"
Changed label in "morpheme_detail.html"
Search results: repaired this to show the results of the previous search
Removed text "Search results" as in GlossDetailView

@ocrasborn : Everything okay now?

@ErwinKomen : this is actually on the sign detail view: when I click on the morpheme link to the right of the Annotation ID Gloss (Dutch), I'm sent to the sign detail view rather than the morpheme detail view.

@ocrasborn : okay, I'll see to that on wednesday

Situation: in Sign Detail View, the URL for morphemes defined for this sign are wrong
Actions:

Changes in gloss_detail.html, reference to dictionary:admin_gloss_view changed to dictionary:admin_morpheme_view where needed (see dictionary/urls.py)

@ocrasborn : this should work correctly now.

Related to the morpheme detail view tidy up are a few things in the GlossDetailView:
1 - Clicking on a morpheme while not in edit mode: should not open edit window
(note: Clicking on a morpheme while in edit mode should)
2 - Make it possible to DELETE a morpheme
3 - Adding and Deleting morphemes is now not working. Related to issue #121, where I removed the gloss's PK. Apparently other parts of the software expect it to be there (sigh...)
4 - Wording: change under Morphology "Type" to "Compound Part"
5 - Compound appearance in "Annotation ID gloss": separator "+" should not be clickable. Also in ListView. Also for MorphemeDetailView and MorphemeListView

Actions:
1 - Added "edit" class to "morpheme-definition_{{morpheme.id}}" in "gloss_detail.html"
2 - Added delete section (around line 428) in gloss_detail.html; added "update_morpheme_definition()" function in "update.py" -- removes the relation between a gloss and a morpheme.
3 - Adapted the functions "gloss_from_identifier" and "morph_from_identifier" in update.py to take care of idgloss's that come without a PK (taking into account that idgloss must be unique) -- @Woseseltops : please correct me if I'm wrong here!
4 - Changed the wording in gloss_detail.html
5 - Adapted occurrances of gloss lists in Sign Detail View (gloss_detail.html) and Sign List View (admin_gloss_list.html)
@ocrasborn : please check if all of the above changes are well now.

All works fine. One refinement necessary: Make the trashcan icon for deleting a morpheme only visible in edit mode, as with the compound components above it.

@ocrasborn : I had taken care of this, but forgot to update "gloss_edit.js". Now that's updated, all should work well (after renewing the browser's cache probably).