Operator Performance Regression on CPU

Follow up on dev list discussion:
<EMAIL_ADDRESS>We have found some operators to have performance regression using the operator benchmark module here:
https://github.com/apache/incubator-mxnet/tree/master/benchmark/opperf
@sandeep-krishnamurthy has helped to run the benchmark and this is the training mode result:
https://gist.github.com/sandeep-krishnamurthy/e0a2be893c8c4d484390c9c8813bdf50
The above result is using training mode (autograd.record()) and calculating both forward and backward time.
As most users use CPU for inference only, to further investigate the impact on inference I have run the scripts using inference mode
Please find the inference and training mode results here:
https://docs.google.com/spreadsheets/d/1_eezNWbrBAm3s3i6G1m0Rd3YYdTEnmKlYtn4klqdyN0/edit?usp=sharing
I have calculated the regression percentage and sorted them, thanks to @aaronmarkham for providing the first version.
Although there are variances on perf numbers between runs, we observe the following commonly used operators be slower consistently.
We need to look into them and fix if root caused.

[x] Dropout
[x] relu
[x] LeakyReLU
[x] dot
[ ] element wise ops (mul, div, sub)
[ ] broadcast ops (mul, sub)

Some ops regression seems only to happen on mxnet-mkl version (refer to 4th sheet of the google sheet)
Environment:
AWS C5.18xLarge
Deep Learning Base AMI (Ubuntu) Version 18.1
Python 3.6
MXNet versions:
with MKLDNN
pip install mxnet-mkl==1.5.0b20190627
pip install mxnet-mkl==1.4.1

without MKLDNN
pip install mxnet==1.5.0b20190627
pip install mxnet==1.4.1

Note: nightly 20190627 contains the latest commit in v.1.5.x
Scripts:
https://github.com/apache/incubator-mxnet/tree/master/benchmark/opperf
Notes: you need to modify the scripts a bit to run

requires python 3.6, requires to add your scripts path to PYTHONPATH, follow instructions to run benchmark on all operators.
To run operators in inference mode, you need to set False at this line
and change run_backward to False in all files under:
https://github.com/apache/incubator-mxnet/tree/master/benchmark/opperf/nd_operations
for example here.

cc @PatricZhao @szha @ddavydenko

script command:
python incubator-mxnet/benchmark/opperf/opperf.py --output-format md --output-file mxnet-{version}-infer.md
raw script output:
https://drive.google.com/drive/folders/1OE-bedTFd-HN0Og6vW8XGWkswrRrdyW0?usp=sharing

Maybe this is the same thing with #15430.  @ciyongch is WIP

Yes,  #15430 is also caused by op perf regression. I will try to reproduce the case and focus the inference firstly.

@roywei I've collected some performance data of  Dropout, relu, and dot on C5.18xlarge, and saw  some big run to run variance on dot and Dropout as below table without binding cores as table 1.
After binding cores to a socket via below command before running benchmarking, I got a stable and better results as table 2.
export KMP_AFFINITY=granularity=fine,noduplicates,compact,1,0
export OMP_NUM_THREADS=18

I ran 5 times with 10 warmup + 100 runs for each time. Not sure if you're setting the env variables when running the benchmark. And I suggest to re-run the ops for several times to see if it's a real degradation.
As for relu operator got worse perf on v1.5,  I found v1.5 included the commit of c64559178 (#14262), which added "IsNan(a)" check for data which introduced some overhead. Will add more data and more operator results later.

I have updated the document(1st sheet): https://docs.google.com/spreadsheets/d/1_eezNWbrBAm3s3i6G1m0Rd3YYdTEnmKlYtn4klqdyN0/edit#gid=196553607
With the current data Dot and Dropout is not a big concern now. Relu's regression is something we have to accept as otherwise it could lead to nans and bugs.

@roywei I looked at the table, except a few ops with big variances, most of the degraded ops listed in the table dropped into mshadow. I did some further analysis, and found that the performance regression is caused by the commit of 6e94643 (https://github.com/dmlc/mshadow/pull/371), which changed the data type for index_t. Seems the quick fix in that PR didn't work for these ops, and a better solution is required for the type changing.
Here's some perf data collected on my local machine (SKX-8180), you can have a try on your platform :)

Operator
Avg Forward Time (ms) 1.4.1
Avg Forward Time (ms) 1.5.0
Regression
Avg Forward Time (ms) 1.5.0 (revert 6e94643)
Updated Regression
data shape

relu
0.0047
0.0107
127.7%
0.0057
21.3%
{'data': (10000, 1)}

relu
0.0065
0.0143
120.0%
0.005
-23.1%
{'data': (10000, 1)}

relu
0.005
0.0144
188.0%
0.0051
2.0%
{'data': (10000, 1)}

relu
0.0052
0.0115
121.2%
0.0066
26.9%
{'data': (10000, 1)}

relu
0.005
0.0138
176.0%
0.0061
22.0%
{'data': (10000, 1)}

logical_not
0.005
0.0221
342.0%
0.0057
14.0%
{'data': (10000, 1)}

logical_not
0.0051
0.0214
319.6%
0.0056
9.8%
{'data': (10000, 1)}

logical_not
0.0054
0.0215
298.1%
0.0056
3.7%
{'data': (10000, 1)}

logical_not
0.0051
0.0214
319.6%
0.0057
11.8%
{'data': (10000, 1)}

logical_not
0.0051
0.0216
323.5%
0.0056
9.8%
{'data': (10000, 1)}

softsign
0.0054
0.0166
207.4%
0.0059
9.3%
{'data': (10000, 1)}

softsign
0.0053
0.0166
213.2%
0.006
13.2%
{'data': (10000, 1)}

softsign
0.0058
0.0163
181.0%
0.006
3.4%
{'data': (10000, 1)}

softsign
0.0053
0.0162
205.7%
0.006
13.2%
{'data': (10000, 1)}

softsign
0.0054
0.0164
203.7%
0.0062
14.8%
{'data': (10000, 1)}

@apeforest

Thanks @ciyongch for diving deep and help in identifying root cause of the issues.
Can you please help me understand why we see variance only for few operators without setting environment variables for KMP and OMP? Our users don't do these environment variable setup so is it something we need to worry about that these operators will perform badly and indeterministic without that setting?

@TaoLv @ciyongch The MSHADOW_INT64_TENSOR_SIZE (in MXNet it is controlled by USE_INT64_TENSOR_SIZE) is off by default. I.e. all the tensor data type should still be int32. Did you run using building from source or using the pip wheel?

@TaoLv @ciyongch Thanks for the investigation. I will try to verify it on my machine.

@sandeep-krishnamurthy As most of the MXNet's ops will do the parallelism via openmp on CPU, from performance perspective, binding CPU cores will reduce the performance degradation due to cache misses and get better thread scheduling.
Without binding the cores,  the performance variance could be bigger due to thread/context switch among those available cores, and plus the time of benchmarking on an individual op is usually small, like several to a hundred microsecond as showed in the above table (in the case of 10 warmup + 100 runs for each op).
BTW, as op level performance tuning is not always reflect its real performance in a real model (for example, data is more easily/likely cached in op benchmarking, which results the better performance compared to a real model scenario). It's better if the future CI will combine some basic/general models benchmarking to determine the regression. What do you think?

I agree that what impact actuall user experience is the final speed of the model inference/training as operators get fused and there are other performance improvement technics applied on overall model. Currently we don't have enough data to say these ops regression we have will impact actuall model speed.
Regarding the int32 vs int64 flag, we found out no matter what's the flag, there are around 15% regression on broadcast ops, on both mxnet-mkl and mxnet pip packages between 1.4.1 and 1.5.0. I'm still root causing it.
| mxnet-mkl | mxnet-mkl | mxnet-mkl | mxnet-mkl | mxnet-mkl |   | mxnet | mxnet |
-- | -- | -- | -- | -- | -- | -- | -- | -- | --
  | 1.4.1 (int64) | 1.5.0 int32 | 1.5.0 int64 | 1.5 int 32 vs 1.4.1 | 1.5 int 64 vs 1.4.1 |   | 1.5.0 mxnet | 1.4.1 mxnet | regression
broadcast_add | 0.00242 | 0.00286 | 0.0029 | 18% | 20% |   | 0.0021 | 0.0016 | 31%
broadcast_div | 0.00244 | 0.00286 | 0.00296 | 17% | 21% |   | 0.0021 | 0.0017 | 24%
broadcast_equal | 0.0024 | 0.00294 | 0.00294 | 23% | 23% |   | 0.0021 | 0.0016 | 31%
broadcast_greater | 0.00244 | 0.00282 | 0.00294 | 16% | 20% |   | 0.0021 | 0.0016 | 31%
broadcast_greater_equal | 0.00244 | 0.00284 | 0.00286 | 16% | 17% |   | 0.002 | 0.0017 | 18%
broadcast_hypot | 0.0025 | 0.00292 | 0.00302 | 17% | 21% |   | 0.0021 | 0.0016 | 31%
broadcast_lesser | 0.00242 | 0.00288 | 0.00298 | 19% | 23% |   | 0.002 | 0.0015 | 33%
broadcast_lesser_equal | 0.00246 | 0.00288 | 0.00288 | 17% | 17% |   | 0.0021 | 0.0017 | 24%
broadcast_logical_and | 0.0024 | 0.0029 | 0.00292 | 21% | 22% |   | 0.0021 | 0.0016 | 31%
broadcast_logical_or | 0.0025 | 0.00288 | 0.00288 | 15% | 15% |   | 0.0021 | 0.0016 | 31%
broadcast_logical_xor | 0.00242 | 0.0029 | 0.00296 | 20% | 22% |   | 0.0021 | 0.0016 | 31%
broadcast_maximum | 0.00248 | 0.00288 | 0.00284 | 16% | 15% |   | 0.0021 | 0.0016 | 31%
broadcast_minimum | 0.0025 | 0.00286 | 0.00284 | 14% | 14% |   | 0.002 | 0.0015 | 33%
broadcast_mod | 0.00262 | 0.00294 | 0.00302 | 12% | 15% |   | 0.0021 | 0.0016 | 31%
broadcast_mul | 0.00244 | 0.00288 | 0.00298 | 18% | 22% |   | 0.0021 | 0.0017 | 24%
broadcast_not_equal | 0.00258 | 0.00296 | 0.00294 | 15% | 14% |   | 0.002 | 0.0016 | 25%
broadcast_power | 0.00296 | 0.00336 | 0.00348 | 14% | 18% |   | 0.0023 | 0.0019 | 21%
broadcast_sub | 0.0025 | 0.00296 | 0.003 | 18% | 20% |   | 0.002 | 0.0016 | 25%

I have ran a search for perf regression on broadcast_add and there are 2 regressions between 0412-0425, 0619-0621

mxnet-mkl version
broadcast_add speed
commit

1.5.0b20190411
0.003

1.5.0b20190412
0.003
30d479feae11b04d423f2ec055d124fb6d2d5730

1.5.0b20190425
0.0034
587d480372f41b25fcbffd45ce77373ad93d41b5

1.5.0b20190426
0.0034

1.5.0b20190619
0.0033
ccbbf6b4b76ea536a6583c99497c83b65a20817b

1.5.0b20190620
0.0035
2de0db0911f2e71728fa85ab342bd99a10974fc9

1.5.0b20190621
0.0037
8b5f376d17b644385706016caf8b1e58e95d96df

@sandeep-krishnamurthy @Zha0q1
https://github.com/apache/incubator-mxnet/pull/15240 This PR introduced regression from 0619-0621.
broadcast_add speed before this PR: 0.004, after this PR: 0.0047
Note speed is different than pip installed version due to build flags but the regression is there.
build: sudo  make -j$(nproc) USE_MKLDNN=1
script:
import mxnet as mx
from mxnet import nd
mx.random.seed(10)
from benchmark.opperf.utils.benchmark_utils import run_performance_test

add_res = run_performance_test(nd.broadcast_add, run_backward=False, dtype='float32', ctx=mx.cpu(),
                               inputs=[{'lhs': [(1024, 1024), (10000, 10), (10000, 1)], 'rhs': [(1024, 1024), (10000, 10), (10000, 1)]} ],
                               warmup=10, runs=500)

print("speed:", add_res[0]['broadcast_add'][0]['avg_time_forward_broadcast_add'])

another regression from PR https://github.com/apache/incubator-mxnet/pull/14661
broadcast_add speed:
before 0.0033
after:  0.0039

| 1.4.1 | 1.4.1 | 1.4.1 | average | 1.5.0 | 1.5.0 | 1.5.0 | 1.5.0 | 1.5.0 average
-- | -- | -- | -- | -- | -- | -- | -- | -- | --
broadcast_add | 0.055 | 0.059 | 0.056624 | 0.0567635 | 0.058 | 0.06 | 0.057 | 0.057 | 0.058183
elemwise_add | 0.104 | 0.104460 | 0.104491 | 0.10444 | 0.121223 | 0.127 | 0.124 | 0.124 | 0.125145

https://github.com/apache/incubator-mxnet/pull/15240 may introduced extra runtime in profiler in mxnet 1.5. Using timeit module, broadcast_add between mxnet1.4 and mxnet1.5-int64 does not show significant difference:
import timeit
SETUP_CODE = '''
import mxnet as mx
from mxnet import nd
mx.random.seed(10)
def binary_op(lhs, rhs):
    return nd.broadcast_add(lhs=lhs, rhs=rhs,  dtype='float32', ctx=mx.cpu())

lhs = nd.random.uniform(shape=(1024, 1024), dtype='float32', ctx=mx.cpu())
rhs = nd.random.uniform(shape=(1, 1024), dtype='float32', ctx=mx.cpu())
res = binary_op(lhs, rhs)
'''

TEST_CODE = '''
res.wait_to_read()
'''
# timeit.repeat statement
times = timeit.repeat(setup = SETUP_CODE,
                      stmt = TEST_CODE,
                      repeat = 3,
                      number = 10000)

# priniting minimum exec. time
print('time: {}'.format(min(times)))

mxnet 1.4:  time: 0.007329841988394037
mxnet 1.5 (with int64 flag): time: 0.007355470006586984
mxnet 1.5 (default):  time: 0.007073252985719591

Conclusion

No significant regression for broadcast ops. This issue should no block 1.5.0 release.
We should use timeit or time module for benchmark. Or use the same profiler module to make sure it's apple to apple comparison
Need better benchmark methods to reduce the variance between runs to clearly identify if there is a regession, otherwise it's hard to root cause and fix

There is also no significant regression on BatchNorm op between 1.4.1 and 1.5.0
| 1.4.1 (int64) | 1.4.1 (int64) | 1.4.1 (int64) | average | 1.5.0 (int 32) | 1.5.0 (int 32) | 1.5.0 (int 32) | average
-- | -- | -- | -- | -- | -- | -- | -- | --
BatchNorm | 2.609942 | 2.621809 | 2.608 | 2.607639 | 2.63 | 2.594 | 2.611 | 2.61147967
script:
import mxnet as  mx
import time

mx.random.seed(0)

data = mx.nd.random.uniform(0, 256, (32, 3, 256, 256))
beta = mx.nd.random.uniform(shape=(3,))
gamma = mx.nd.random.uniform(shape=(3,))
mean = mx.nd.random.uniform(shape=(3,))
var = mx.nd.random.uniform(shape=(3,))
repeat = 1000

mx.nd.waitall()
start = time.time()
for _ in range(repeat):
    #c = mx.nd.broadcast_add(a, b)
    c = mx.nd.BatchNorm(data=data, gamma=gamma, beta=beta, moving_mean=mean, moving_var=var)
    # c = mx.nd.elemwise_add(a, b)
    c.wait_to_read()
elapse = time.time() - start

print("elapse time: %fms" % (elapse * 1000 / repeat))

Conclusion

No significant regression for broadcast ops and batchnorm. This issue should no block 1.5.0 release.
Regression on ReLU is expected as it's necessary as stated in https://github.com/apache/incubator-mxnet/pull/14262
We should use timeit or time module for benchmark. Or use the same profiler module to make sure it's apple to apple comparison
Need better benchmark methods to reduce the variance between runs to clearly identify if there is a regession, otherwise it's hard to root cause and fix. Right now we use fixed seed and set  OMP_NUM_THREADS

@roywei does it mean the operator profiling results with current profiler module is not accurate?

@ciyongch The profiler was implemented in 1.5 and there are changes in the profiler code which were not in 1.4.1 release: https://github.com/apache/incubator-mxnet/pull/15240. This could have made difference in runtime as the runtime in each operator is very sensitive.
Going forward, we should enhance the profiler module and make it available in CI so we can capture the performance degradation in time.

@apeforest Thanks for the info, as we saw the current perf degradation only happened for some ops or some certain shapes with v1.5, any suggestion to do profiling for a real model? Could we still rely on the profiling result with latest MXNet code base (with #15240)  so far?

According to the above mentioned benchmark results, it looks like v1.5 is gonna be more faster than v1.4. Am I right?


Console Display Issue - Custom Local Authenticator Not Visible in Application Signing Method Section

Describe the issue:
The custom local authenticator created is not displaying in the application signing method section of the console application. However, the authenticator is visible in the management console, and the authentication flow can be successfully completed through the management console.
Additionally, after adding the authenticator via the management console, it does not appear in the console, application signing method section, showing as empty.
Console view

Management Console

customAuth.webm
How to reproduce:
refer doc : https://is.docs.wso2.com/en/latest/references/extend/federation/write-a-custom-local-authenticator/

Create a custom local authenticator using the appropriate steps.
Confirm its visibility and functionality in the management console.
Check the application signing method section in the console application.

Expected behavior:
The custom local authenticator should be displayed in the application signing method section of the console application after creation. The list should remain consistent with what is visible in the management console.
Environment information (Please complete the following information; remove  any unnecessary fields) :

Product Version: wso2is-7.0.0-beta6-SNAPSHOT
OS: Mac
Database: H2
Userstore: JDBC

Analysis
The authenticators are shown in the console UI only if the isEnable property is assigned as true. Adding such custom connectors through /dropins does not assign this property as true. Hence, the authenticator is not visible in the console UI.

When a local authenticator jar is added to the /dropins folder, it can be accessed and utilized through the management console. But, properties such as isEnabled should be explicitly mentioned through the configuration files. If not, such properties will be set to default which is false in this case. To view those authenticators in the connections page, the isEnabled attribute should be true. By adding a configuration as given below in the deployment.toml this can be achieved.
[[authentication.custom_authenticator]]
name = <authenticator name>
enabled = true

This has to be added as a step to our documentation since this is not explicitly mentioned.

After adding the configuration as mentioned above, the authenticator is still not displayed in the Connections page. But the authenticator is seen in the sign-in method Tab under an application page. This is because, the authenticators shown in the Connections page are not decided according to the API response sent. This has to be validated and fixed from the frontend.
cc: @NipuniBhagya

Since the custom local authenticator doesn't have any configuration fields, it is not displaying in connections section. Instead, any added custom local authenticator can be utilized directly in an application without the need for additional configuration. Following an offline discussion with Maduranga and Ziyam, it's clarified that there's no requirement to configure custom local authenticators. Hence, it's expected that custom local authenticators won't be displayed in the connections section. Hence, Closing the issue.

Since the custom local authenticator doesn't have any configuration fields, it is not displaying in connections section. Instead, any added custom local authenticator can be utilized directly in an application without the need for additional configuration. Following an offline discussion with Maduranga and Ziyam, it's clarified that there's no requirement to configure custom local authenticators. Hence, it's expected that custom local authenticators won't be displayed in the connections section. Hence, Closing the issue.

@DilshanSenarath Does this mean? We do not support custom local connectors through the new console.

@DilshanSenarath Does this mean? We do not support custom local connectors through the new console.

No, we can add custom local authenticators, but they are only visible in the application sign-in method tab, not under the connections.


!archive via Twitter

<SketchCow> Feature Request: If I or a list of people with twitter accounts tweet "@ archivebot would you kindly __________, take out any urls and add them.
<SketchCow> I'd have done that while travelling.
<SketchCow> @ archivebot would you kindly archive www.fooper.com

Huh, not too much here for quite a while...
Now that I have a Twitter account and have been using it for a while, I've reconsidered how this should work.  There's a few cases:

Direct message or tweet to ArchiveBot ("@ArchiveBot would you kindly ...")
Involving ArchiveBot in a reply
Mentioning ArchiveBot in a retweet / linked Twitter URL

Here's what I think should happen in the above cases:

!ao on the given URL with --phantomjs --youtube-dl
!ao on all URLs in the conversation, also with --phantomjs --youtube-dl
!ao on the retweeted / linked tweet and any URLs in that tweet; same parameters


fix: fixed broken 'packages' table

This fixes the broken packages table in the README, which I broke while updating it while working on the BLE transport

Codecov Report

Merging #210 (0c56ef6) into main (846a541) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #210   +/-   ##
=======================================
  Coverage   86.78%   86.78%
=======================================
  Files          24       24
  Lines        1241     1241
  Branches      277      287   +10
=======================================
  Hits         1077     1077
  Misses        150      150
  Partials       14       14

@TimoGlastra @blu3beri


Add class-like state behavior option to withState

Adds an additional optional param set for withState, where if you only provide initialState, then stateName and stateUpdaterName are defaulted to 'state' and 'setState'. In this form setState works exactly like setState from a typical class component (because its really just proxying straight to this.setState).
Example Usage:
import { withState } from 'recompose';

// setting initial state only
const enhance = withState({ red: 0, green: 0, blue: 0 });

// automatically get state and setState props
const RGBChooser = enhance(({ state, setState }) =>
  <div>
    <input type="text" value={ state.red } onChange={ (e) => setState({ red: e.target.value }) } />
    <input type="text" value={ state.green } onChange={ (e) => setState({ green: e.target.value }) } />
    <input type="text" value={ state.blue } onChange={ (e) => setState({ blue: e.target.value }) } />
    <div
      style={{
        display: block,
        width: 30,
        height: 30,
        backgroundColor: `rgb(${state.red},${state.green},${state.blue})`
      }}
    />
  </div>
);

I have code, tests, and docs in this PR.
closes #321

I'll write here why I would prefer something like #308 and not a current solution.
Because current solution causes new function creation for every handler. Yes we can always use withHandlers but having that in withHandlers method call like
withState('something', 'setSomething', {a:1, b: 2}),
withHandlers({
  onAChange: ({ setSomething }) => ({ a }) => ({
      setSomething(prev => ({...prev, a}))
  })
})

As you see this is not so a big addition even you will write it inside render.
So I don't think solution above will somehow make better current situation.
I created an issue here https://github.com/reasonml/reason-react/issues/37 about what I wrote in #308 BTW we can try implementation provided there https://github.com/reasonml/reason-react/blob/master/src/reactRe.re#L422-L454 and even it has some drawbacks now
I think it will be solved by React soon.

I totally agree with you and are we sure it will be solved by React soon? Will they even settle on a final API soon as well? If not, why wait? Let's improve upon what we know now.
True, this is not a clever feature, but this is probably how withState should have behaved originally.
Typically I agree that most PRs should be rejected because they can be implemented in dev's own code, but this is simply allowing functional stateless components to have state features that mirrors existing class state features. For beginners of recompose it will be very comfortable, and it's way more flexible for when devs need to manage more than a single state variable.

Codecov Report

Merging #357 into master will increase coverage by 0.18%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
+ Coverage   93.07%   93.25%   +0.18%
==========================================
  Files          51       51
  Lines         332      341       +9
==========================================
+ Hits          309      318       +9
  Misses         23       23

Impacted Files
Coverage Δ

src/packages/recompose/withState.js
100% <100%> (ø)
: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 25032fe...24657af. Read the comment docs.

but this is probably how withState should have behaved originally

agree, btw original React setState with state merging is also confusing, year or more ago I did
a PR to react-redux https://github.com/reactjs/react-redux/pull/50 so even superexperienced developer did a mistake with original setState

I wanna say current behavior is more predictable, and in a lot of cases allows to use it without withHandlers  etc

lot of cases allows to use it without withHandlers etc

When can you ever use it without withHandlers? Or do you mean use an anonymous function with the jsx?

So until we get additional setState version in React, all will be as is.

Can't we fix it ourselves instead of waiting on react? Can we throw and error to escape setState and have a wrapper/proxy setState that catches the error? In this way we could implement what you want with the updater approach.


benchmarks for RVV

I would like to evalute the V vector extension to compare it with other vector ISA, such as ARM SVE, or other SIMD architectures.
Is there any representative benchmark for this task?

@wanghuibin0 I don't think you'll be able to find something like that until rvv 1.0 CPUs are widely available.
This isn't quite what you are looking for, but I've created a few benchmarks to evaluate how to write performant rvv code: https://camel-cdr.github.io/rvv-bench-results/index.html
I've got results from the only two currently generally available CPUs with rvv support (C906 and C920), but note that they implement the pre ratification version 0.7.1 of the extension.

Here is one but not quite there yet
https://github.com/RALC88/riscv-vectorized-benchmark-suite
and here is what they say "Current implementation is targeting RISC-V Architectures; however, it can be easily ported to any Vector/SIMD ISA thanks to a wrapper library which we developed to map vector intrinsics and math functions to the target architecture."
Hope it helps


Number prop editors shouldn't set a default value if it's null

as in:

@andreadelrio feel free to take this


FileId should never be 0

Aim
When compiling a file for the LSP, the root file is added via driver.create_local_crate(file_path, CrateType::Binary); but that makes any diagnostics produced by the root file to be marked as the 0 File ID. If you resolve this to a Path in the FileManager, it resolves to the directory the file resides within. The ID of a file should never be resolved to the directory and should always resolve to the actual file.
Expected Behavior
Comparing file_path and file_manager.path(file_id) should always be the same.
Bug
The path doesn't resolve to the file.
To Reproduce
No response
Installation Method
None
Nargo Version
No response
Additional Context
Currently being hardcoded as file_id.as_usize() != 0 which is far from ideal as the LSP only operates on file path URIs
Would you like to submit a PR for this Issue?
No
Support Needs
No response

@phated whats the status of this issue?


Cleaner way to connect to containers from inside and outside of docker

Is your feature request related to a problem? Please describe.
What I'm trying to accomplish is to have one set of integration/e2e tests working both from test runner and from a docker container in CI/CD. Some tests require calling RabbitMQ management HTTP API. I'm using this to get the link to this API:
    public Uri GetManagementUri() => InDocker
        ? new Uri($"http://host.docker.internal:{_rabbitMqContainer.GetMappedPublicPort(15672)}")
        : new Uri($"http://localhost:{_rabbitMqContainer.GetMappedPublicPort(15672)}");

    private bool InDocker => Environment.GetEnvironmentVariable("DOTNET_RUNNING_IN_CONTAINER") == "true";

I thought it might be possible to move this logic to the library instead.
Describe the solution you'd like
Not sure, I know the library already figures out if it's running inside of docker, so maybe expose a bool value representing that? Maybe the container could point to the HTTP address with the port similiar to how it does with connection strings, but not sure how popular of a requirement that is.
Describe alternatives you've considered
Well, the above solution works, I'm just after something cleaner.

My bad, didn't figure out Hostname is a thing in time.


Updated

Sorry for wrong short.
It work this command for me:  LC_ALL=en_US sort -uf -o spammers.txt spammers.txt

Merged, thanks.


Err : Index is not in the allowed range.

When trying to change font size of selected text. I am getting this error specifically for safari browser. Hereby sharing screenshot of the same.Please provide some inputs for fixing this.

hi, can you please post a screen recording of the error being reproduced? will help debugging. thanks.

There are two issues actually:
note : This issue is for safari browser specifically

Inability to apply font size to specific text: When I select the entire cell, I am able to change the font size. However, when I try to select specific text within the cell and adjust the font size, the selection disappears and the font size change is not applied.
Error: Occasionally, when attempting the aforementioned action, an error occurs. I have attached a screenshot of the error in the issue. Although the error does not consistently replicate in Storybook, it consistently occurs in our application.

https://github.com/ruilisi/fortune-sheet/assets/60534916/f701bb0b-89b4-4bdc-984f-e4a6d32108f9

thanks, @himanshupatil363 . im not entirely sure at this point whats causing this but let me have a look.

i looked into this, and i am unable to replicate the error in the storybook after multiple tries. however, the inability to apply font size is something i have confirmed and working on.

Thanks also do we have any option to use custom font family in fortunesheet?

havent seen it being done yet, i might be wrong since i recently started contributing.
also, i can now confirm that the error you are storybook is reproducible now for me and i will fix that. but not being able to change the font is something which is looking tricky as safari and chrome are fundamentally different when it comes to selecting text.

@himanshupatil363 i have raised #528 which will ensure that the sheet does not break, but safari handles selection differently than chrome, which is why the selection gets lost on clicking the menus. this will require a deeper dive.


[$4000] Web app does not connect on Chomebook device

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Connect Chromebook to internet via Instant Tether to a Pixel device
On a web browser, navigate to new.expensify.com
Notice that you are able to open the new.expensify.com page, however it does not recognize you as being online.

Expected Result:
User should be able to navigate the app in any device
Actual Result:
User is unable to use the webApp in Chromebook. Here's some extra info from @quinthar

Aha, I figured it out.  Chromebook has two ways to connect, wifi, or some kind of "direct connect" to your Pixel phone.  When you connect to wifi like normal, we recognize it.  When you connect to wifi via the direct Pixel connect (not sure what it is -- bluetooth?  quantum tunneling?), we do not recognize you as being online.

Workaround:
None
Platform:

Where is this issue occurring?

Web

Version Number: 1.0.88-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
View all open jobs on GitHub

From @quinthar https://expensify.slack.com/archives/C01GTK53T8Q/p1629946809006100

Cannot go online with Chromebook.  No errors.  Just.... doesn't connect.

Triggered auto assignment to @kadiealexander (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@kadiealexander this was my bad, I created the issue and it still had the AutoAssignerTriage label. Adding the engineering label now.

Triggered auto assignment to @jasperhuangg (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

Outta curiosity I tested tethering from an iphone and didn't have any issues

I don't have a Chromebook to reproduce this error, so I'm going to unassign myself and reach out in #engineering-chat for an assist. My take is that we need to update how we detect a user's offline status to account for "Pixel Connect"?

This feels more like a weekly to me.

Eep! 4 days overdue now. Issues have feelings too...

Demoting to a weekly since this seems like an uncommon edge case.

Triggered auto assignment to @stephanieelliott (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

Posted job to Upwork: https://www.upwork.com/jobs/~01855e280c1fa3ca00

Triggered auto assignment to @marcaaron (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

I also do not have a Chromebook so unsure how to verify if any proposals work or not.

I’m thinking we can maybe just set up a tunnel to a local build and have someone who does have a Chromebook test any proposals that come in? Really could be anyone with a Chromebook just signing into an ngrok web build or something.

Doubled price to $500 a day early cuz I'm in here for the Weekly resync

I'm happy to test and confirm.  Also, the title seems a bit off -- it does open, it just doesn't connect.

This is on hold while we prioritize N6 issues.

Still on hold

N6 hold has been lifted, this PR is undergoing QA now

Price doubled again, now $1,000.

This has been open for a few months now with no proposals, took a swing at updating the issue description to make the problem a bit more clear.  I think the "pixel direct connect" is the Instant Tether feature described here, which would mean issue occurs only when using a Chromebook which is tethered to a Pixel.
Updated the action steps, @quinthar does this accurately describe what you are running into:

Connect Chromebook to internet via tethering to another device
On a web browser, navigate to new.expensify.com
Notice that you are able to open the new.expensify.com page, however it does not recognize you as being online.

We are placing all non-critical issues on hold while we're on a company offsite.  The hold is expected to be lifted on 11/19 (but could go longer).  For any PRs that are submitted before or during the hold, we will add a $250 bonus payment.

Doubled the job price again on behalf of the team here.

Doubled to again, to $4,000!

I was able to reproduce this issue using HP Chromebook 11 G6 and OnePlus 6
We use @react-native-community/netinfo to retrieve information abount current network state. For browser this library uses  Network Information API .
We are iterested in this file.
As you can see, it correctly uses navigator interface to see if we are connected to the internet:
const isConnected = navigator.onLine;
When we are connected via Instant Tethering, connection type is 'unknown'.
The problem occured because react-native-netinfo treats connection of type 'unknown' as not connected, no matter what the real connection state is.
You can see this problem exactly here
 else if (type === NetInfoStateType.unknown) {
    const state: NetInfoUnknownState = {
      ...baseState,
      isConnected: false,
      isInternetReachable: false,
      type,
      details: null,
    };
    return state;
  }

If connection has an 'unknown' type, isConnected will always be false.
So my proposal is:

Fork react-native-netinfo
Replace the code i was talking about earlier with

 else if (type === NetInfoStateType.unknown) {
    const state: NetInfoUnknownState = {
      ...baseState,
      isConnected: isConnected,
      isInternetReachable: false,
      type,
      details: null,
    };
    return state;
  }

That way if connection type is 'unknown', we will still get the real network state in 'isConnected' property
I've already forked this library and applied the described fix and it works as expected.
Attaching videos for demonstration:
https://user-images.githubusercontent.com/9059945/142476970-77e40c6e-d884-4411-afb0-b20324d1d7d5.mp4
https://user-images.githubusercontent.com/9059945/142477076-22aae72c-eb69-459b-bd64-05c1087045c4.mp4

Thanks @eVoloshchak .  @marcaaron is out of the office til 11/22, I'm going to see if I can get another CME (Contributor Manager Engineer) to review

Nice work @eVoloshchak.
My only concern is that there might be a valid reason for isConnected to default to false in this case. However, the only info I could find on this was an unanswered question from our own @marcaaron.

I think it is safe to assume that returning the isConnected state is okay here, but I'm going to bump the question in the hope that we can get this confirmed by the library author.
It would also be preferable to fix this issue in the library, but obviously this depends on whether the author agrees with us. Because of this, would you mind holding for a couple of days, in the off chance that we can get this merged as a PR on the original library?

Actually, I think it's unlikely that they will notice our question. As PRs seem to be more active, let's go ahead and try to submit the change as a PR on the original library. If they ignore or reject the change then we can use your fork instead.
Does that sound okay to you @eVoloshchak? If so, I'm happy to approve the proposal.

Okay, it sounds like we've got the go-ahead to submit a PR! The authors have specifically asked that we include some release notes that explain the change so that other users are aware that the behavior of NetInfoStateType.unknown has changed.
Are you happy to submit a few sentences along with the PR @eVoloshchak? We can help with this too if necessary.

Okay, it sounds like we've got the go-ahead to submit a PR! The authors have specifically asked that we include some release notes that explain the change so that other users are aware that the behavior of NetInfoStateType.unknown has changed.
Are you happy to submit a few sentences along with the PR @eVoloshchak? We can help with this too if necessary.

We are using version 5.9.10, while the latest is 7.1.2. Do i submit a PR and we migrate to the latest version?
I'm leaving my country in a couple of hours and won't have access to computer till november 27. I'll have a phone, but that is not sufficient to test the changes. Could this wait or Is this critical? If that is an issue, I could try and find one to rent/buy

Thanks @eVoloshchak! Hired you on the job in Upwork.

I'm leaving my country in a couple of hours and won't have access to computer till november 27.

This issue is non-critical, I think this is fine to wait and test changes once you return. Thanks!

We are using version 5.9.10, while the latest is 7.1.2. Do I submit a PR and we migrate to the latest version?

Yeah, we should make a note on the PR so that we can pay attention to these additional version changes when testing. But if any issues arise here then don't worry, we can treat those as a separate issue.

I'm leaving my country in a couple of hours and won't have access to computer till november 27. I'll have a phone, but that is not sufficient to test the changes. Could this wait or Is this critical? If that is an issue, I could try and find one to rent/buy

As Stephanie said, the delay is no problem.

📣 @eVoloshchak You have been assigned to this job by @jliexpensify!
Please apply to this job in Upwork and let us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖

Submitted a pull-reqest to react-native-netinfo

Nice, I'll follow along with the PR review. It seems like you've explained the changes well.

The PR was merged and is now included in version 7.1.3.
Do I create a PR for the app with @react-native-community/netinfo version changed from ^5.9.10 to ^7.1.3 in package.json?

@eVoloshchak yes please

Here's a list of issues that might be affected positively by the update of netinfo that was merged:

https://github.com/Expensify/App/issues/6059
https://github.com/Expensify/App/issues/5337

Might be that the updated netinfo library has a workaround for navigator.onLine being incorrectly reported as false ?

Here's a list of issues that might be affected positively by the update of netinfo that was merged:

Connection drop is not detected - Reported by: @Santhosh-Sellavel  #6059
Desktop - App showed offline status with an active internet connection #5337

Might be that the updated netinfo library has a workaround for navigator.onLine being incorrectly reported as false ?

I'm guessing the root cause of both of these issues is that the library does not detect if internet is actually reachable, it just relies on device being connected to some kind of a network. I was able to reproduce the first issue with the updated netinfo and it seems that the second issue is the same as the first (but instead of not detecting that internet is gone it is not detecting, that internet is available again).
There is an issue describing this problem, but it wasn't resolved.
I've tried to play around with reachability timeout of NetInfo's configure settings, but that didn't help.
I would propose setting up some sort of a task that would ping some endpoint periodickally, similar to what is described in this comment. We could even use the same endpoint that library is using: https://clients3.google.com/generate_204

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.1.18-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

https://github.com/Expensify/App/pull/6500

If no regressions arise, payment will be issued on 2021-12-15. :confetti_ball:

Apologies for the delay @eVoloshchak , I just paid you $4000 in Upwork!  Thanks for the help!


Make sure ParametersTable with changes has equal width columns

Bug/issue #, if applicable: 103421001
Summary
Ensures columns inside the ParametersTable have the same width, even if wrapped in a changes class.
Dependencies
NA
Testing
Steps:

Ensure that adding a changes class to the row does not affect the width of the columns.

Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.

[ ] ~Added tests~ - no css only
[ ] Ran npm test, and it succeeded
[ ] Updated documentation if necessary

@swift-ci test


How Convert Weights

Dear @clcarwin,
Thank you for your nice work. Would you please tell me how you can convert Caffe weights and model of S3FD into PyTorch?
Can you convert the model & pre-trained weights of RefineDet into PyTorch?

Convert caffemodel to numpy array caffemodel2json_to_npy.
Copy numpy array to Pytorch weight.

Thank you.


image for each post should be different

royalty-free images are available here https://unsplash.com

I would agree with this.


Add option to train from partially deduped data

Let's say I have a dataset that has already been imperfectly deduped using a different process, so that there is a field that identifies which records refer to the same person.
It would be nice to be able to be able to pass this information in as examples of positive matches, thus cutting down the amount of active learning that needs to be performed.
Or does it make sense to just pass the id field in as a feature...

Whoops. Already implemented as a convenience function: trainingDataDedupe


fix: change luis name to luis application name

Description
change luis name to luis application name
Task Item
Closes #5179

Coverage increased (+0.02%) to 55.444% when pulling dde3a8e1e238b6d25cb811ccb4c29c21b0f09c21 on liweitian:nameChange1 into e2b13bf832bc5b9ed7598bf851d9a3b8c39ac0a8 on microsoft:main.


Fix styling bug in public channel creation setting in dark theme.

First commit is to fix the styling bug.

Third commit is to refactor the dropdown widget code as discussed in https://github.com/zulip/zulip/pull/30386#discussion_r1635357757

Screenshots and screen captures:

Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[ ] Each commit is a coherent idea.
[ ] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

lgtm aside from the test failures.

Fixed the tests and also added some comments for the thinking around test changes.

Merged, thanks @sahil839!
@afeefuddin @Lalit3716 the last commit in this PR, as noted in https://github.com/zulip/zulip/pull/30400#discussion_r1640550415, is the type of change that we'll be wanting to undo as we move to doing more TypeScript work on the node tests; we should in theory be just having the test setup process include initializing modules like current_user with basic data, such that we can use the normal settings_data code rather than mocking it.


Added TypeScript version for Lambda-SQS Batch failure

Issue #, if available:
Description of changes:
I have created a new file which represents the TypeScript version of the snippet
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@boyney123 ready for you 😄

thanks, LGTM!


Crashes on Windows 10 64bit

Describe the issue
bitcoingreen-qt.exe process crashes immediately upon starting on my machine
Can you reliably reproduce the issue?
If so, please list the steps to reproduce below:

Install or unpack fresh zip file or BITG installation into a folder.
Run bitcoingreen-qt.exe
An empty window appears and then quickly disappears.

Expected behavior
BITG process should start properly and Wallet window should appear as normal
Actual behavior
An empty window appears and then quickly disappears. Process is instantly killed. I can find two entries about app crash in Windows Event Viewer.
Screenshots.
If the issue is related to the GUI, screenshots can be added to this issue via drag & drop.
What version of Bitcoin Green Core are you using?
Latest release version, bitcoingreen-1.3.0-win64.zip (I've tried installer too).
I tried to empty datadir, I redirected datadir to different folder - same result, I filled datadir with pre-entered masternode.conf, bitcoingreen.conf and wallet.dat - same result.
Machine specs:

OS: Windows 10 Pro 64bit
CPU: Intel Pentium G4600
RAM: 12GB DDR4
Disk size: 111GB
Disk Type (HD/SDD): SSD

Any extra information that might be useful in the debugging process.
BITG is leaving no traces or debug.log files. No data is being changed at all in datadir folder. It's just window which appear and then quickly disappear.
I tried same .exe files on different Windows 10 64 Bit computer and it works. I tried same datadir files on different computer and it also works. Somehow, BITG is not compatible with my Windows installation. But how come? Everything else works there (about 5 crypto wallets, GPU mining, CPU mining, and many other 24/7 running programs).

error1.txt
error2.txt

@pioruns is this still happening with the latest version?

Unfortunately for this BITG issue (and furtunately for me), I switched to Linux and BITG works fine there, on the same hardware. So I will stick to it.

thanks @pioruns, I'll close this for now, will reopen if something similar occurs again.


Fix cut-paste into the same dir not to copy an item

Closes: https://github.com/files-community/Files/issues/1546

@gave92 - I was really hesitating if to put the check only there or rather in FilesystemOperations.MoveAsync so all the cases are covered.
WDYT?  If I move it to FilesystemOperations I guess I will need to return a null storage history.

I agree it's better to move it to FilesystemOperations.
This is an example taken from FilesystemOperations.RenameAsync() which looks similar to what you're doing here
if (Path.GetFileName(source.Path) == newName)
{
    errorCode?.Report(FilesystemErrorCode.ERROR_ALREADYEXIST);
    return null;
}```

example taken from FilesystemOperations.RenameAsync(

Thanks! Doing it right now :smile:

@Don-Vito Great work! LGTM


Expose underlaying glutin::GlWindow

Closes #94

It's behind feature flag, should be safe?

bors r+


Include (and require value for) a predicate field in all statement types

At present we don not include a predicate attribute for VA statements where there is only a single predicate possible, which can be intuited from the type of statement (e.g. for MC Annotations, where the predicate is simple 'has_consequence').  However, it has been suggested that including the predicate attribute and making it required (1..1) would result in more consistent and parsable/computable data - even though it adds no discriminatory value.
This ticket is to capture feedback on this proposal.
Other VA Statement types where there is currently no predicate attribute in the statement model include Population Frequency and Computational Functional Impact.

This is no longer relevant.  We moved predicate to Proposition and require it


Check that BIRD is responsive as part of liveness

Description

Fixes https://github.com/projectcalico/calico/issues/7472
Related issues/PRs

Todos

[ ] Tests
[ ] Documentation
[ ] Release note

Release Note

Improve BIRD liveness probe so that it confirms BIRD is responsive over its socket

Reminder for the reviewer
Make sure that this PR has the correct labels and milestone set.
Every PR needs one docs-* label.

docs-pr-required: This change requires a change to the documentation that has not been completed yet.
docs-completed: This change has all necessary documentation completed.
docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

release-note-required: This PR has user-facing changes. Most PRs should have this label.
release-note-not-required: This PR has no user-facing changes.

Other optional labels:

cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

@matthewdupre the linked issue in the description provides an example reported by a user where BIRD had hung and was non-responsive, resulting in BGP sessions dropping. The user reported that manually restarting BIRD fixed the issue.
I agree that more triggers to restart BIRD can be concerning. That's generally why liveness probes are considered with a minimum-number of required failures before they come into effect.
On the other hand, why bother having liveness probes if they're just always going to default to "true" regardless of underlying system health?

actually makes things worse by restarting a lengthy process that would have eventually succeeded.

In this particular case, the pre-requisite is simply BIRD responding over its socket. I believe this should be a fairly safe check even in a loaded system, as BIRD should respond on its socket prior to any sort of data plane / synchronization logic that might be happening.

I believe I am facing this issue.
Kubernetes version:
Client Version: v1.29.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.0

Cloud provider:
bare-metal

Installation method: https://github.com/phantomsixthplayer/k8s-baseline-installation
Host OS:
$ cat /etc/os-release
NAME="CentOS Stream"
VERSION="9"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="9"
PLATFORM_ID="platform:el9"
PRETTY_NAME="CentOS Stream 9"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:centos:centos:9"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

$ uname -a
Linux k8s-control-plane-1 5.14.0-404.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 4 21:14:38 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Container runtime (CRI) and version:
$ containerd --version
containerd github.com/containerd/containerd v1.7.11 64b8a811b07ba6288238eefc14d898ee0b5b99ba

Related plugins (CNI) and versions: https://github.com/containernetworking/plugins/releases/download/v1.4.0/cni-plugins-linux-amd64-v1.4.0.tgz
Description:
Following a clean installation using “kubeadm init,” the Calico nodes with pod names “calico-node-fjzj7” and “calico-node-v9d2h” in the “calico-system” namespace are encountering readiness probe failures. Despite my troubleshooting efforts, I haven’t been successful in resolving the issue. Any suggestions and ideas for troubleshooting welcome. See logs, and the installation steps above outline the process undertaken.
pod: calico-node-fjzj7 in namespace: calico-system
Events:
  Type     Reason     Age    From               Message
  ----     ------     ----   ----               -------
  Warning  Unhealthy  7m32s  kubelet            Readiness probe failed: calico/node is not ready: felix is not ready: Get "http://localhost:9099/readiness": dial tcp [::1]:9099: connect: connection refused
  Warning  Unhealthy  7m31s  kubelet            Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/bird/bird.ctl: connect: no such file or directory
  Warning  Unhealthy  7m30s  kubelet            Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/calico/bird.ctl: connect: connection refused

pod: calico-node-v9d2h in namespace: calico-system
Events:
  Type     Reason     Age   From               Message
  ----     ------     ----  ----               -------
  Warning  Unhealthy  10m   kubelet            Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/bird/bird.ctl: connect: no such file or directory
  Warning  Unhealthy  10m   kubelet            Readiness probe failed: calico/node is not ready: felix is not ready: Get "http://localhost:9099/readiness": dial tcp [::1]:9099: connect: connection refused

pod: calico-apiserver-54b4cd957d-cdbvv in namespace: calico-apiserver
Events:
  Type     Reason       Age    From               Message
  ----     ------       ----   ----               -------
  Warning  FailedMount  9m34s  kubelet            MountVolume.SetUp failed for volume "calico-apiserver-certs" : failed to sync secret cache: timed out waiting for the condition

pod: calico-apiserver-54b4cd957d-dc8bt in namespace: calico-apiserver
Events:
  Type     Reason       Age    From               Message
  ----     ------       ----   ----               -------
  Warning  FailedMount  9m35s  kubelet            MountVolume.SetUp failed for volume "calico-apiserver-certs" : failed to sync secret cache: timed out waiting for the condition

pod: calico-kube-controllers-6ddb6ddd65-qrrlg in namespace: calico-system
Events:
  Type     Reason                  Age                  From               Message
  ----     ------                  ----                 ----               -------
  Warning  FailedScheduling        10m                  default-scheduler  0/1 nodes are available: 1 node(s) had untolerated taint {node.kubernetes.io/not-ready: }. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
  Warning  FailedCreatePodSandBox  10m                  kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "9c4119ee8f5f88b2020633e5f5177f5e18654b1011d979ba24bd8c7c56d7b723": plugin type="calico" failed (add): stat /var/lib/calico/nodename: no such file or directory: check that the calico/node container is running and has mounted /var/lib/calico/

pod: calico-typha-8684598794-g6sj2 in namespace: calico-system
Events:
  Type     Reason            Age   From               Message
  ----     ------            ----  ----               -------
  Warning  FailedScheduling  11m   default-scheduler  0/1 nodes are available: 1 node(s) didn't have free ports for the requested pod ports. preemption: 0/1 nodes are available: 1 node(s) didn't have free ports for the requested pod ports.

pod: csi-node-driver-8jkgq in namespace: calico-system
Events:
  Type     Reason                  Age                     From               Message
  ----     ------                  ----                    ----               -------
  Warning  NetworkNotReady         7m51s (x20 over 8m29s)  kubelet            network is not ready: container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized
  Warning  FailedCreatePodSandBox  7m49s                   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "2e2456fe7c48e00174f02ad2b17d1a25c556712a9f85c5f4642fdc70da8fcb45": plugin type="calico" failed (add): stat /var/lib/calico/nodename: no such file or directory: check that the calico/node container is running and has mounted /var/lib/calico/

pod: csi-node-driver-mmgz6 in namespace: calico-system
Events:
  Type     Reason                  Age                  From               Message
  ----     ------                  ----                 ----               -------
  Warning  NetworkNotReady         10m (x20 over 11m)   kubelet            network is not ready: container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized
  Warning  FailedCreatePodSandBox  10m                  kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "bbd297dedf3011c2dc00f572974dd8d5b435a676024c4e1e341739d535bfab75": plugin type="calico" failed (add): stat /var/lib/calico/nodename: no such file or directory: check that the calico/node container is running and has mounted /var/lib/calico/

pod: coredns-76f75df574-mxsn4 in namespace: kube-system
Events:
  Type     Reason                  Age                From               Message
  ----     ------                  ----               ----               -------
  Warning  FailedScheduling        13m                default-scheduler  0/1 nodes are available: 1 node(s) had untolerated taint {node.kubernetes.io/not-ready: }. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
  Warning  FailedCreatePodSandBox  10m                kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "b540694b788130a411f2359c77690ffb47a533a8d666673d0d6d7602fed7ce55": plugin type="calico" failed (add): stat /var/lib/calico/nodename: no such file or directory: check that the calico/node container is running and has mounted /var/lib/calico/

pod: coredns-76f75df574-sdsnz in namespace: kube-system
Events:
  Type     Reason                  Age                From               Message
  ----     ------                  ----               ----               -------
  Warning  FailedScheduling        13m                default-scheduler  0/1 nodes are available: 1 node(s) had untolerated taint {node.kubernetes.io/not-ready: }. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
  Warning  FailedCreatePodSandBox  10m                kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "863e1a88b024e4dcf774900d7a57d3e2edf55f3483697fe4164ff4e070c9e90d": plugin type="calico" failed (add): stat /var/lib/calico/nodename: no such file or directory: check that the calico/node container is running and has mounted /var/lib/calico/

After a reboot:
[administrator@k8s-control-plane-1 ~]$ kubectl describe pod calico-node-5rrf9 -n calico-system
Events:
  Type     Reason     Age   From     Message
  ----     ------     ----  ----     -------
  Warning  Unhealthy  42m   kubelet  Readiness probe failed: 2024-01-10 23:05:07.799 [INFO][3875] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with <IP_ADDRESS>
  Warning  Unhealthy  41m  kubelet  Readiness probe failed: 2024-01-10 23:05:37.773 [INFO][4392] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: felix is not ready: readiness probe reporting 503
  Warning  Unhealthy  41m  kubelet  Readiness probe failed: 2024-01-10 23:06:07.775 [INFO][4906] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with <IP_ADDRESS>
  Warning  Unhealthy  41m  kubelet  Readiness probe failed: 2024-01-10 23:06:07.831 [INFO][4918] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with <IP_ADDRESS>
  Normal   SandboxChanged  40m                kubelet  Pod sandbox changed, it will be killed and re-created.
  Normal   Pulled          40m                kubelet  Container image "docker.io/calico/pod2daemon-flexvol:v3.27.0" already present on machine
  Normal   Created         40m                kubelet  Created container flexvol-driver
  Normal   Started         40m                kubelet  Started container flexvol-driver
  Normal   Pulled          40m                kubelet  Container image "docker.io/calico/cni:v3.27.0" already present on machine
  Normal   Created         40m                kubelet  Created container install-cni
  Normal   Started         40m                kubelet  Started container install-cni
  Normal   Pulled          40m                kubelet  Container image "docker.io/calico/node:v3.27.0" already present on machine
  Normal   Created         40m                kubelet  Created container calico-node
  Normal   Started         40m                kubelet  Started container calico-node
  Normal   SandboxChanged  37m                kubelet  Pod sandbox changed, it will be killed and re-created.
  Normal   Pulled          37m                kubelet  Container image "docker.io/calico/pod2daemon-flexvol:v3.27.0" already present on machine
  Normal   Created         37m                kubelet  Created container flexvol-driver
  Normal   Started         37m                kubelet  Started container flexvol-driver
  Normal   Pulled          37m                kubelet  Container image "docker.io/calico/cni:v3.27.0" already present on machine
  Normal   Created         37m                kubelet  Created container install-cni
  Normal   Started         37m                kubelet  Started container install-cni
  Normal   Pulled          37m                kubelet  Container image "docker.io/calico/node:v3.27.0" already present on machine
  Normal   Created         37m                kubelet  Created container calico-node
  Normal   Started         37m                kubelet  Started container calico-node
  Warning  Unhealthy       37m (x2 over 37m)  kubelet  Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/calico/bird.ctl: connect: connection refused
  Warning  Unhealthy       17m                kubelet  Readiness probe failed: 2024-01-10 23:30:04.826 [INFO][1512] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with <IP_ADDRESS>
  Warning  Unhealthy  16m  kubelet  Readiness probe failed: 2024-01-10 23:30:34.836 [INFO][1524] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with <IP_ADDRESS>
  Warning  Unhealthy  16m  kubelet  Readiness probe failed: 2024-01-10 23:31:04.847 [INFO][1850] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with <IP_ADDRESS>
  Warning  Unhealthy  16m  kubelet  Readiness probe failed: 2024-01-10 23:31:04.890 [INFO][1863] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with <IP_ADDRESS>
  Warning  Unhealthy  15m  kubelet  Readiness probe failed: 2024-01-10 23:31:34.827 [INFO][2304] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with <IP_ADDRESS>
  Warning  Unhealthy  15m  kubelet  Readiness probe failed: 2024-01-10 23:32:04.847 [INFO][2800] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with <IP_ADDRESS>
  Warning  Unhealthy  15m  kubelet  Readiness probe failed: 2024-01-10 23:32:13.365 [INFO][2998] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with <IP_ADDRESS>
[administrator@k8s-control-plane-1 ~]$ sudo netstat -anp |grep 179
tcp        0      0 <IP_ADDRESS>:179             <IP_ADDRESS>:*               LISTEN      6129/bird
tcp        0      0 <IP_ADDRESS>:179            <IP_ADDRESS>:41777          ESTABLISHED 6129/bird
unix  3      [ ]         STREAM     CONNECTED     24179    2030/pipewire-pulse
[administrator@k8s-control-plane-1 ~]$ sudo lsof -i :179
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
bird    6129 root    7u  IPv4  38392      0t0  TCP *:bgp (LISTEN)
bird    6129 root    8u  IPv4  38422      0t0  TCP k8s-control-plane-1:bgp->k8s-worker-node-1:41777 (ESTABLISHED)
[administrator@k8s-control-plane-1 ~]$ kubectl exec -it calico-node-5rrf9 -n calico-system -- /bin/bash -c "birdcl -s /var/run/calico/bird.ctl"
Defaulted container "calico-node" out of: calico-node, flexvol-driver (init), install-cni (init)
BIRD v0.3.3+birdv1.6.8 ready.
bird>
[root@k8s-control-plane-1 ~]# calicoctl node checksystem
Checking kernel version...
                5.14.0-404.el9.x86_64                                   OK
Checking kernel modules...
WARNING: Unable to detect the xt_u32 module as Loaded/Builtin module or lsmod
                xt_u32                                                  FAIL
WARNING: Unable to detect the xt_icmp module as Loaded/Builtin module or lsmod
                xt_icmp                                                 FAIL
                xt_multiport                                            OK
                ipt_ipvs                                                OK
                ipt_rpfilter                                            OK
WARNING: Unable to detect the ipt_set module as Loaded/Builtin module or lsmod
                ipt_set                                                 FAIL
                xt_addrtype                                             OK
                xt_set                                                  OK
                ip6_tables                                              OK
                ip_tables                                               OK
                xt_bpf                                                  OK
                xt_mark                                                 OK
                ipt_REJECT                                              OK
                xt_rpfilter                                             OK
                nf_conntrack_netlink                                    OK
                xt_conntrack                                            OK
WARNING: Unable to detect the xt_icmp6 module as Loaded/Builtin module or lsmod
                xt_icmp6                                                FAIL
                ip_set                                                  OK
                vfio-pci                                                OK
System doesn't meet one or more minimum systems requirements to run Calico
[root@k8s-control-plane-1 ~]# ls /lib/modules/$(uname -r)/kernel/net/netfilter/
ipset                          nf_conntrack_pptp.ko.xz   nf_nat_irc.ko.xz           nf_synproxy_core.ko.xz  nft_flow_offload.ko.xz  nft_quota.ko.xz          xt_AUDIT.ko.xz      xt_CONNSECMARK.ko.xz  xt_helper.ko.xz     xt_mark.ko.xz        xt_policy.ko.xz    xt_state.ko.xz
ipvs                           nf_conntrack_sane.ko.xz   nf_nat.ko.xz               nf_tables.ko.xz         nft_fwd_netdev.ko.xz    nft_redir.ko.xz          xt_bpf.ko.xz        xt_conntrack.ko.xz    xt_hl.ko.xz         xt_MASQUERADE.ko.xz  xt_quota.ko.xz     xt_statistic.ko.xz
nf_conncount.ko.xz             nf_conntrack_sip.ko.xz    nf_nat_sip.ko.xz           nft_chain_nat.ko.xz     nft_hash.ko.xz          nft_reject_inet.ko.xz    xt_cgroup.ko.xz     xt_cpu.ko.xz          xt_HL.ko.xz         xt_multiport.ko.xz   xt_rateest.ko.xz   xt_string.ko.xz
nf_conntrack_amanda.ko.xz      nf_conntrack_snmp.ko.xz   nf_nat_tftp.ko.xz          nft_compat.ko.xz        nft_limit.ko.xz         nft_reject.ko.xz         xt_CHECKSUM.ko.xz   xt_CT.ko.xz           xt_HMARK.ko.xz      xt_nat.ko.xz         xt_RATEEST.ko.xz   xt_tcpmss.ko.xz
nf_conntrack_broadcast.ko.xz   nf_conntrack_tftp.ko.xz   nfnetlink_cthelper.ko.xz   nft_connlimit.ko.xz     nft_log.ko.xz           nft_reject_netdev.ko.xz  xt_CLASSIFY.ko.xz   xt_dccp.ko.xz         xt_IDLETIMER.ko.xz  xt_NETMAP.ko.xz      xt_realm.ko.xz     xt_TCPMSS.ko.xz
nf_conntrack_ftp.ko.xz         nf_dup_netdev.ko.xz       nfnetlink_cttimeout.ko.xz  nft_counter.ko.xz       nft_masq.ko.xz          nft_socket.ko.xz         xt_cluster.ko.xz    xt_devgroup.ko.xz     xt_iprange.ko.xz    xt_NFLOG.ko.xz       xt_recent.ko.xz    xt_TCPOPTSTRIP.ko.xz
nf_conntrack_h323.ko.xz        nf_flow_table_inet.ko.xz  nfnetlink_hook.ko.xz       nft_ct.ko.xz            nft_nat.ko.xz           nft_synproxy.ko.xz       xt_comment.ko.xz    xt_dscp.ko.xz         xt_ipvs.ko.xz       xt_NFQUEUE.ko.xz     xt_REDIRECT.ko.xz  xt_TEE.ko.xz
nf_conntrack_irc.ko.xz         nf_flow_table.ko.xz       nfnetlink.ko.xz            nft_dup_netdev.ko.xz    nft_numgen.ko.xz        nft_tproxy.ko.xz         xt_connbytes.ko.xz  xt_DSCP.ko.xz         xt_length.ko.xz     xt_osf.ko.xz         xt_sctp.ko.xz      xt_TPROXY.ko.xz
nf_conntrack.ko.xz             nf_log_syslog.ko.xz       nfnetlink_log.ko.xz        nft_fib_inet.ko.xz      nft_objref.ko.xz        nft_tunnel.ko.xz         xt_connlabel.ko.xz  xt_ecn.ko.xz          xt_limit.ko.xz      xt_owner.ko.xz       xt_SECMARK.ko.xz   xt_TRACE.ko.xz
nf_conntrack_netbios_ns.ko.xz  nf_nat_amanda.ko.xz       nfnetlink_osf.ko.xz        nft_fib.ko.xz           nft_osf.ko.xz           nft_xfrm.ko.xz           xt_connlimit.ko.xz  xt_esp.ko.xz          xt_LOG.ko.xz        xt_physdev.ko.xz     xt_set.ko.xz
nf_conntrack_netlink.ko.xz     nf_nat_ftp.ko.xz          nfnetlink_queue.ko.xz      nft_fib_netdev.ko.xz    nft_queue.ko.xz         xt_addrtype.ko.xz        xt_connmark.ko.xz   xt_hashlimit.ko.xz    xt_mac.ko.xz        xt_pkttype.ko.xz     xt_socket.ko.xz

@phantomsixthplayer Its not clear to me from the diags provided that you've hit this problem.  The problem discussed in this PR is how to handle when BIRD is hung and unresponsive.  Whereas the diags you've provided show an expected readiness check failure when a BGP connection cannot be established (to <IP_ADDRESS>)


Child issues not coming under parent Epic in ADO

Child issues not coming under parent Epic in ADO

Closing due to missing repro steps. Please open a new support issue and provide the information in the template.


Default to empty string for String based fields

If both default and server_default are None then set them to empty strings as default. As we’re already forcing nullable=False on the field this feels pretty sensible.
This commit is backwards incompatible for MySQL users as they now need to set the option text_server_defaults=False if they use Text columns in their models. Added the ability to pass in options directly to make_lazy_configured to ease the pain somewhat. I've added some documentation on this. While I was at it I also added documentation about auto_now=True not working below MySQL 5.6.5.

Travis gives error "Invalid default value for 'created_at'" for MySQL. Can't recreate this locally when I run DB=mysql py.test...

I've fixed the Travis issue. Do you think this could be merged now @kvesteri?

Thanks for the PR. Could you split this to multiple commits (and even multiple PRs)? As for the string defaults I'm not sure if its a good idea:

How can you override this behaviour on column level? This is a common use case for me as on some projects I've generated forms using WTForms-Alchemy and their it makes all the difference if a string column is not nullable but has a default or if it doesn't have default.

I'll look into it splitting up the PR when I have some time over.
I pushed a new version that allows setting whether server_default for strings through the setting string_server_defaults. Calling make_lazy_configured(sa.orm.mapper, string_server_defaults=False, text_server_defaults=False) disables this behavior globally. I see no reason why passing it to __lazy_options__ wouldn't work. But I could add a test for that when I have time.

Hmm I'm not sure about adding two different options for text and string. Since text in sqlalchemy world is just a subclass of string:
In [7]: issubclass(sa.Text, sa.String)
Out[7]: True

Also to make it possible for user to be able to override this behaviour on column level I would like this option to be more explicit. For example we could have an option string_server_default which the user can set to empty string thus enforcing all string columns to have empty string default.
The more I think about in the future we could introduce some kind of simple rule system for this Rule(condition, action) where both condition and action would be some kind of callables. But I have to think about that more. Just food for thought :)

The reason I added a different option for text is to help out MySQL users as server defaults for TEXT is not supported (not even in 5.7).
Interesting idea about adding Rule. Perhaps we could start out simple for this case though by defaulting to None for {string/text}_server_default which would mean that no default is added.
DEFAULT_OPTIONS {
    ...
    'string_server_default': None,
    'text_server_default': None,
}

Because of my OCD I re-did the tests to use pytest fixtures. Removed the DB env var and added DSN instead to make it more explicit. I'll add as a new PR. When that has been merged I'll add another PR for passing in default settings to make_lazy_configured, then finally for the originally intended PR 😉

Good stuff. I would still leave out text_server_default option and just make a special rule for not applying string_server_default option on MySQL text fields (this should be documented of course).

Okay so their only choice would be to completely turn off server defaults for strings on the entire table / mapper? Maybe it's not such a big deal. 😅

No, what I meant is that let's say I'm MySQL user and I have string_server_defaults=''. This rule would be then applied to all string fields except TEXT fields.

Okay but how do we know that the user is a MySQL user when we're setting up the columns? We don't have access to any sort of engine bind when make_lazy_configured is called.

Could we have some kind of SQLAlchemy expression that compiles itself to None for MySQL text type?

Interesting idea. I haven't worked too much with custom expressions to know if it's possible. I'm guessing you're about one million times more suitable to find out 😉

It should be pretty straight-forward for you by following the guidelines found here: http://docs.sqlalchemy.org/en/latest/core/compiler.html#further-examples

Hmm I'll see if I have some time to do that some day.

I'm going to go ahead and close this PR. After much consideration I think not having this "feature" in SQLAlchemy-Defaults matches much better with how Flask-Admin and your WTForms-Alchemy handles defaulted-columns as not required fields.


Please add an option to remove blur effect

Hi.
Backdrop filter with blur effect is very laggy on some devices (I try on Huawei Y360 android 4.4), so, please add a bool parameter to remove the backdropfilter widget.

Thank you for using it.
I'm working on adding a blur option.
It will be released soon, so please be patient.

@amir14a
Added the withBlur option in v5.0.2.
You can also see it in the example with the "Not blur" button.


Docs: Unpin Sphinx

When Sphinx 4.x was initially released there were rendering issues with it building the ATS docs. To address this we simply pinned to the 3.x releases. Currently the latest Sphinx release is v6.1.3 and I noticed that unpinning doesn't have issues with our code anymore. This therefore unpins Sphinx. This also addresses a deprecated use of set_class from traffic-server.py.

Cherry-picked to v9.2.x


Implement risks

These should live in the risks project. Simple examples would be a delta to a single asset. More useful and interesting examples would be a report showing delta, gamma and optionally cross gamma to all assets matching some criteria.
The single asset risks would be a nice easy project for someone with not much financial knowledge.I am thinking:

Delta and gamma
Dividend risk
Yield risk (PV01)
Vega and volgamma
Cost-of-carry risk
Vanna (bump to the spot and bump to vol)

Implemented Delta and Gamma, and Vega and Volga


bug: slow response after terminate the conversation

Describe the bug
close / terminate the conversation of the streaming output will introduce slow performance of new chat
To Reproduce
Steps to reproduce the behavior:

start the check enable with stream
when nitro streaming text output, close the chat from client
in server log, it displayed "Task completed, release it - llamaCPP.cc:416"
start the new chat, it will be slow response until restart nitro from server

Desktop (please complete the following information):

OS: Mac
Browser chrome

Sus: The streaming task is still going on in the background. Hopefully the new Cortex revamp addressed this @vansangpfiev

To test with new Cortex, I guess that is about caching stuff or so, it's also depend on conversation length, remaining resources. It's a bit unclear how to measure. Open back if you get a new clue or information @cht132 @vansangpfiev


Use typescript

I would love to use typescript for better DX, making this issue because I want to merge a PR but I'm not sure if it would be accepted. Thanks :)

If you want to contribute, then you are welcome!


CouldNotCreateMail with attachment

Hi! I have the following code. When i add the attachment the mail can not be created. Windows 10 UWP. With EASendMailRT it works.
        using (SmtpClient client = new SmtpClient("smtp.host.com", 465, true<EMAIL_ADDRESS>"123"))
        {
            var emailMessage = new EmailMessage();

            emailMessage.To.Add(new EmailRecipient("to@email.com"));
            emailMessage.Subject = "A new email has arrived";
            emailMessage.Body = "Export File";

            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            Windows.Storage.StorageFile attachmentFile = await storageFolder.GetFileAsync("export.txt");

            if (attachmentFile != null)
            {

                var stream = RandomAccessStreamReference.CreateFromFile(attachmentFile);

                emailMessage.Attachments.Add(new EmailAttachment(attachmentFile.Name, stream));

                SmtpResult ex = await client.SendMailAsync(emailMessage);

                var messageDialog = new MessageDialog("Email Code: " + ex.ToString());

                await messageDialog.ShowAsync();
            }
        }

Hello and thank you for creating the ticket. Could you please provide me with the following information:

What is the SmtpResult code?
What is the size of the attachment?

Hi! Thanks four your response. The SmtpResult is "CouldNotCreateMail" and the file size is 16KB.

Hi, any updates about this issue?. I am having same problem.

I have not been able to reproduce. I assume the mail server could block potential attachments.

Hi again. In my case I am using 1and1 smtp server (smtp.1and1.es). It was responding 501 syntax error - line too long 1and1 after I send message section:
SmtpResponse repsonseMessage = await Socket.Send(await BuildSmtpMailInput(message));
I notice it was because fileEncoded was very long to 1and1 smtp restriction. So I modify BuildSmtpMailInput method
string fileEncoded = await _encodeToBase64(attachment.Data);                     List<string> splitData = new List<string>(Regex.Split(fileEncoded, @"(?<=\G.{100})", RegexOptions.Singleline));                     string splitFile = "";                     foreach (var s in splitData)                     {                         splitFile += s + Environment.NewLine;                     }                     mailInput.Append(Environment.NewLine);                     mailInput.Append(splitFile);
It is works for me.

Hi again. In my case I am using 1and1 smtp server (smtp.1and1.es). It was responding 501 syntax error - line too long after I send message section:
SmtpResponse repsonseMessage = await Socket.Send(await BuildSmtpMailInput(message));
I notice it was because fileEncoded was very long to 1and1 smtp restriction. So I modify BuildSmtpMailInput method
`                    string fileEncoded = await _encodeToBase64(attachment.Data);
                List<string> splitData = new List<string>(Regex.Split(fileEncoded, @"(?<=\G.{100})", RegexOptions.Singleline));

                string splitFile = "";

                foreach (var s in splitData)
                {
                    splitFile += s + Environment.NewLine;
                }

                mailInput.Append(Environment.NewLine);

                mailInput.Append(splitFile);

                mailInput.Append(Environment.NewLine);

`
It is works for me.

Hi again. In my case I am using 1and1 smtp server (smtp.1and1.es). It was responding 501 syntax error - line too long after I send message section:
SmtpResponse repsonseMessage = await Socket.Send(await BuildSmtpMailInput(message));
I notice it was because fileEncoded was very long to 1and1 smtp restriction. So I modifyed BuildSmtpMailInput method
                string fileEncoded = await _encodeToBase64(attachment.Data);
                List<string> splitData = new List<string>(Regex.Split(fileEncoded, @"(?<=\G.{100})", RegexOptions.Singleline));
                string splitFile = "";
                foreach (var s in splitData)
                {
                    splitFile += s + Environment.NewLine;
                }
                mailInput.Append(Environment.NewLine);
                mailInput.Append(splitFile);
                mailInput.Append(Environment.NewLine);

It worked for me.


Update requirements to specify both test and doccumentation packages required

Do this when migrating to pyproject.toml

Done with #237


Experimental support for decorators

I am able to install and start a local version of your repo but when i open a component in my editor, say the Sidebar class i get an error:

experimental support for decorators is a feature that is subject to change in a future release

Have you run into this before?
I am running tsc -v 1.8.10, if that helps?

You should be using TypeScript 2.x since I'm using the include property in my tsconfig.json.

Upgraded to 2.0.0, then to Version 2.1.0-dev.20161002 and still receiving the error

What editor are you using? If it's VS Code, you might need to make sure you configure it to use 2.x.

I'm using Sublime Text, weird though, magically the errors just disappeared and I don't know why lol, thanks for the speedy replies

Well that works then. 👍


fix: clarify that discriminated unions do not support singletons

Change Summary

clarify the error message raised when marking a field as a discriminated union is invalid
document that singleton unions (unions with only a single type variant) are not supported by pydantic

Related issue number

Closes #3636
Checklist

[x] Unit tests for the changes exist
[x] Tests pass on CI and coverage remains at 100%
[x] Documentation reflects the changes where applicable
[x] changes/<pull request or issue id>-<github username>.md file added describing change
(see changes/README.md for details)
[x] My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

please review

thanks so much.


Return value type should correspond to the the type of the uris argument passed in

I propose that the return value of api functions should be different if the uris argument is a single string vs a list of strings. It seems very cumbersome to have to extract the result of an api function from a dict/list when a single value is passed in. E.g.:
my_dataset = 'd269b0e2de134bdba5b08c5d99eb96ac'
dict_of_metadata = quest.api.get_metadata(my_dataset)
my_dataset_metadata = dict_of_metadata[my_metadata]

It would seem more natural to me to have the following when a single uri is passed in:
my_dataset = 'd269b0e2de134bdba5b08c5d99eb96ac'
my_dataset_metadata = quest.api.get_metadata(my_dataset)

The current behavior could be preserved when a list of uris are passed in:
my_datasets = ['d269b0e2de134bdba5b08c5d99eb96ac', 'd8abf13fe7044c35881bf36fafaafeda']
dict_of_metadata = quest.api.get_metadata(my_datasets)
my_1st_dataset_metadata = dict_of_metadata[my_datasets[0]]
my_2nd_dataset_metadata = dict_of_metadata[my_datasets[1]]

I would agree.


Modify drawing GND and Vcc on breadboard

(cherry picked from commit 73144fdc6fd263834669840a6744034611209726)

Thank you for your pull request.


bfs matlab: Add support for reading input file / or generate input data

-------------- bfs,matlab,none-matlab,mba-2011,matlab-vm --------------
{ type: 'experiment',
'short-name': 'default',
'input-size': 'medium',
'iteration-number': 1 }
************** Iteration 0 ************
                        < M A T L A B (R) >
              Copyright 1984-2015 The MathWorks, Inc.
               R2015b (<IP_ADDRESS>7246) 64-bit (maci64)
                          August 20, 2015

To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
----------------------------------------------------
Your MATLAB license will expire in 52 days.
Please contact your system administrator or
MathWorks to renew this license.
----------------------------------------------------

Academic License

Initializing graph
Undefined function or variable 'setRandomSeed'.

In runner, when the size of input node is not 3000000, it needs an extra csv which contains the expected data.  Unfortunately, it is not there.  The execution time with 3000000 nodes seems a little bit long (get stuck in the graph initialization).
expected_costs = csvread(output_cost_file_path);


[c++ deploy] How to manage resources for multiple tvm instances in single application?

Hi there,
I have a c++ application and it will run multiple tvm instances in parallel, and I wish each tvm instance can use 4 cpus to optimize the execution time. (e.g: on a machine with 20 cores, I will run 5 tvm instances and each instances will use and only use their assigned 4 cores).
If I don't need them to run in parallel, I can use environment variable e.g: export TVM_NUM_THREADS=4 to set the cpu usage for entire application, but I don't know what would be the best practice to set such limitation for every instances (who may run in parallel) inside the application.
Any insights? Thanks in advance!

I presume that the concurrency created by parallel execution is at the model level. In that case, you would want to create some model-level memory and processor allocations. You could do this at the process level, and manage TVM invokations, or you can leverage the whole container ecosystem. Although, container schedulers like k8s tend to want resource guarantees, so the container route will increase your overall resource requirements.

Thanks for the great discussion, for this kind of topic, we generally encourage opening a thread in https://discuss.tvm.ai/, let us move the discussion there :)

Hi @Ravenwater, thanks for your reply, the concurrency I'm talking about is out side model, for example: our TVM model will handle entire user request. When we have multiple user requests happening concurrently, we will create multiple TVM model instance, and each instance handle each request. We wish each TVM model instance can get their designated resource (cpu) and do not interfere with each other.

@tqchen What would be the best practice to move this topic? Shall I just post the exact same question in https://discuss.tvm.ai/ and add a link to this thread?


Page title shows as Language detection

In tab page title, it shows Language detection prebuilt AI model. I think that should be Text recognition prebuilt AI model.

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

ID: c38c8c14-4bce-09c9-f711-511a49a9e6d3
Version Independent ID: 02df0034-6281-2b7a-825a-313f55a35da5
Content: Language detection prebuilt AI model -  AI Builder
Content Source: ai-builder-docs/prebuilt-text-recognition.md
Service: powerapps
GitHub Login: @alanabrito
Microsoft Alias: alanab

Thanks for logging this. There must have been a glitch, as this is showing "Text Recognition" for me.

Strange @Dean-Haas  ... I tried again, in another computer and with a private session, but title tab still different:

I see. this fix will publish at 5pm Redmond time. Thank you!


Does the IMU need to be strictly time synchronized with the laser?

Thanks for sharing your excellent work!
Does the IMU need to be strictly time synchronized with the laser，and how to achieve it？
Does this have a big impact on the effect of laser deskew?

It doesn't have to. I am not using any hardware sync except ROS timestamps.
It does have an impact on accuracy and deskew. But not big from my own experience.
If hardware sync is available, you should definitely use it.


Add snippets for VSCode DX

Description
Snippets are a really handy way in VSCode to write common/repetitive chunks of code. I added a few that I've used in the past to make it quicker to add debug pragmas and Check function calls quickly. This list can definitely expand in the future (tests are another really helpful area for this) but just wanted to get it started.
https://github.com/user-attachments/assets/c5f3006e-f364-4918-8811-820c69cbf78a
(I specifically really want the debug pragma one because I always forget the syntax and you can't use intellisense for it)

Issue number and link
no issue

Testing plan

Use any file in vscode
Type the start of the snippets and hit Tab (or your completion key)
Try them out

Author checklist

[ ] I have submitted a Contributor License Agreement
[ ] I have added my name to CONTRIBUTORS.md
[ ] I have updated CHANGES.md with a short summary of my change
[ ] I have added or updated unit tests to ensure consistent code coverage
[ ] I have updated the inline documentation, and included code examples where relevant
[ ] I have performed a self-review of my code

Seems handy. @lukemckinstry Can you take a review pass and merge if happy?


Upgrading from v3.0.1 to v4.0.0 triggers warnings in Nuxt

Upgrading from v3.0.1 to v4.0.0 triggers these warnings in Nuxt
WARN  [vite:css] Nested CSS was detected, but CSS nesting has not been configured correctly.                                             8:34:19 PM
Please enable a CSS nesting plugin *before* Tailwind in your configuration.
See how here: https://tailwindcss.com/docs/using-with-preprocessors#nesting

When I downgrade back to v3.0.1 the warnings go away.
Relevant parts of my nuxt.config.ts:
modules: [
    '@nuxtjs/tailwindcss',
],
postcss: {
    plugins: {
      'postcss-advanced-variables': {},
      '@csstools/postcss-global-data': {
        files: ['assets/css/base/custom-media.css'],
      },
      'postcss-preset-env': {
        stage: 1,
        features: {
          'relative-color-syntax': { preserve: true },
        },
      },
    },
  },

I know that I don't have tailwindcss/nesting and tailwindcss in my postcss plugins but that shouldn't be necessary because of the nuxtjs/tailwindcss module. I tried adding them anyway just to see what would happen but the warnings didn't go away.

postcss-advanced-variables is unrelated to nested CSS.
Closing as this is not an issue here.
Happy to re-open if you can provide a minimal reproduction that does provide the issue is with this plugin.


Update license in flit package metadata to match LICENSE file

Resolves #269

@eganjs This is great! Thank you!


Refactor: remove unused "filter" in QueryCommand & getProcessedFilter

QueryCommand: remove unused "filter"
SolrIndexSearcher.getProcessedFilter: remove unused setFilter param

Background:
While looking at SolrIndexSearcher.getProcessedFilter (on multiple occassions), it seemed to me the setFilter param was needless because a caller could simply provide the DocSet as a Query via DocSet.makeQuery (new in Solr 9).  Then I realized that nobody actually passes setFilter any way so I simply removed it, leading me to remove QueryCommand.filter in-kind.  Maybe it was used a long time ago; this is old code.
Not sure this needs a JIRA; it's a refactoring.  I'm thinking of only doing this in Solr 10 for back-compat sake.

I think this PR is ready except fixing conflicts & adding a CHANGES.txt.


Signed MacOS app crashes with (Code Signature Invalid)

Describe the bug
Signed MacOS app crashes with (Code Signature Invalid). It passes verification in the Transporter app.
Affected platforms

Desktop

Versions

kotlin.code.style=official
kotlin.version=1.7.10 (tested also on 1.8.10)
agp.version=7.3.0
compose.version=1.2.0 (tested also on 1.3.1)
jdk-<IP_ADDRESS>.jdk
on MacOS Ventura 13.1 M1pro
XCode Version 14.2 (14C18)

To Reproduce
I am trying to create a .pkg to upload it to the Mac AppStore with the TestFlight enabled..

Create a project in IntelliJ:

Certificates:

Add two certificates to the Keychain Access:
Mac App Distribution
Mac Installer Distribution

Register App IDs:

Prepare Provisioning Profiles:

(Make sure that the provisioning profiles are prepared for the right certificates)

Configure Gradle DSL:

Copiy EmbeddedForComposeForMacOs.provisionprofile to the projectDir and rename to:
embedded.provisionprofile
Copy runtimeComposeForMacOs.provisionprofile to the projectDir and rename to:
runtime.provisionprofile
Add entitlements files:
In my case in entitlements.plist I used these values:
...
<key>com.apple.application-identifier</key>
<string>6B2GN3FRAK.com.rjuszczyk.composeformacos</string>
<key>com.apple.developer.team-identifier</key>
<string>6B2GN3FRAK</string>
...

Create the app in the appstoreconnect.apple.com:

Run packagePkg task

Drag and drop generated .pkg to Transporter app and click Verify

I was getting this error:

So I specified javaHome to point to x64 jdk in (build.gradle)

javaHome = "/Library/Java/JavaVirtualMachines/jdk-<IP_ADDRESS>.jdk/Contents/Home/"
Clean and run packagePkg again and check it in the Transporter app
Now it verifies without errors:

But when I try to run the .app from build/compose/binaries/main/app directory it fails with error:

Then I published it to the App Store Connect and added a test group and added a version to TestFlight which then I downloaded via the TestFlight app and tried to open:

But when I click OPEN, nothing happens.
Expected behavior

The .app should not crash with Code Signature Invalid.
The .pkg should install (now nothing happens).
The TestFlight build should open in TestFlight (now nothing happens)

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


Netty 4 threading model question

Is the following statement true, false, or undefined behavior?

An invocation of write or writeAndFlush happens-before the invocation of any ChannelFutureListener callbacks associated with the write operation.

To elaborate: any thread can call channel.write(), and the threading model states that "the ChannelFutureListeners added to ChannelFuture are always invoked by the EventLoop thread assigned to the future's associated Channel." By cases:

If write is invoked from the EventLoop thread, the ChannelFutureListeners will be invoked from the same thread, which trivially implies a happens-before relationship.
If write is invoked from another thread, a write task will be created and invoked on the EventExecutor associated with the tail of the pipeline. EventExecutor is a subtype of java.util.concurrent.Executor, which states: "Memory consistency effects: Actions in a thread prior to submitting a Runnable object to an Executor happen-before its execution begins, perhaps in another thread."

Keep in mind that I am not asking about ordering guarantees of writes made from different threads, I'm just asking about the presence or absence of a memory barrier between the channel.write() call and the invocation of the callback.

@rschmitt yes thats correct

Thanks!
By the way, I suggest removing the mention of ChannelHandlerInvoker from the documentation, as it appears to have been removed before the release of 4.1.0-Final.

@normanmaurer


use AZURE_SUBSCRIPTION parameter for multiple subscriptions

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