Training and validation accuracy very low in Binary Classification

I'm trying to do binary classification to predict if a person is likely to vote (1) or not (0) based on 50 numeric features. I have 1261382 training examples, and I'm unsure about the batch size and optimal number of epochs I should have. For some reason, my training and validation accuracy is very low - around 0.00063.
Here is my code:
import mxnet as mx
import logging

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)

batch_size = 612

train_iter = mx.io.CSVIter(data_csv="feature_train_v1.csv", data_shape=(50, ),
                   label_csv="label_train_v1.csv", label_shape= (1,), batch_size=batch_size,)

val_iter = mx.io.CSVIter(data_csv = "feature_validate_v1.csv", data_shape=(50, ),
                    label_csv="label_validate_v1.csv", label_shape= (1,), batch_size = batch_size)

net = mx.sym.Variable('data')
h1 = mx.sym.FullyConnected(data=net, name='h1', num_hidden=50)
net = mx.sym.BatchNorm(net, fix_gamma=True)
net = mx.sym.Activation(data=h1, act_type="sigmoid")
net = mx.symbol.Dropout(net)
h2 = mx.sym.FullyConnected(data=net, name = 'h2', num_hidden=1)
softmax = mx.sym.LogisticRegressionOutput(data=h2, name='softmax') # Calculate the Loss !

model = mx.mod.Module(
    softmax,
    data_names = ['data']
)

metric = mx.metric.CrossEntropy()

# train the network
model.fit(train_iter, eval_data=val_iter,
            optimizer_params={'learning_rate':0.1, 'momentum': 0.9},
            num_epoch=100)

model.score(val_iter, metric= metric)

# Predict:

#test_iter = mx.io.CSVIter(data_csv = "feature_test_v1.csv", data_shape=(1,50), batch_size = batch_size)
#model.predict(test_iter).asnumpy()

Any idea what I'm doing wrong or how I can improve the network? Thanks!

What are you dropping out here?
net = mx.symbol.Dropout(net)
I haven't seen that yet but I've just been covering the tutorials. Also maybe try lowering learning rate or momentum?

@Garglesoap  When you call dropout on net, at each training epoch, it drops out random neurons in the layer with a probability of p (0.5 in my example). The first dropout drops out random neurons in the first layer (h1) in the example below, and the second one drops out random neurons in layer h2. By dropping random neurons, dropout prevents overfitting because it forces the network to learn combinations of more robust features instead of only fine tuning weights of features that may be insignificant in a normal neural network. As a result, it might / probably will take longer to train the network.
Here is my fixed network:
from sklearn.metrics import roc_auc_score, auc
import mxnet as mx

batch_size = 10000
train_iter = mx.io.CSVIter(data_csv="feature_train_v1.csv", data_shape=(50, ),
                   label_csv="label_train_v1.csv", label_shape= (1,), batch_size=batch_size,)

val_iter = mx.io.CSVIter(data_csv = "feature_validate_v1.csv", data_shape=(50, ),
                    label_csv="label_validate_v1.csv", label_shape= (1,), batch_size = batch_size)

data = mx.sym.Variable('data')
net = mx.sym.BatchNorm(data, fix_gamma=True)
net = mx.symbol.Dropout(net, p=0.5)
h1 = mx.sym.FullyConnected(data=net, name='h1', num_hidden=50)
net = mx.sym.Activation(data=h1, act_type="relu")

net = mx.sym.BatchNorm(net, fix_gamma=True)
net = mx.symbol.Dropout(net, p=0.5)
h2 = mx.sym.FullyConnected(data=net, name='h2', num_hidden=25)
net = mx.sym.Activation(data=h2, act_type="relu")

net = mx.sym.BatchNorm(net, fix_gamma=True)
h3 = mx.sym.FullyConnected(data=net, name ='h3', num_hidden=1)

softmax = mx.sym.LogisticRegressionOutput(data=h3, name='softmax') # Calculate the Loss !

model = mx.mod.Module(softmax)

# train the network
model.fit( train_iter,
            eval_data=val_iter,
            eval_metric= roc_auc_score,
            optimizer_params={'learning_rate':0.01, 'momentum': 0.9},
            num_epoch=9)

model.score(val_iter, roc_auc_score)

I fixed my error after realizing a few issues.

Since it is a classification problem, it helps to use metrics like AUC or cross entropy.
Try using at least 3 fully connected layers.
If you are doing a classification problem and are using sklearn's AUC function, it won't work for datasets that don't have enough negative labels (in a binary classification function).

I found MXNet's website and tutorial a bit outdated and hard to follow when I was learning it around January. I had to experiment by reading the github repo - you'd probably have to do the same :| .
I no longer use MXNet (I started using pytorch :) ... its nice!), but hope this helps.

Maybe try SoftmaxOutput instead of LogisticRegressionOutput (and set num_hidden=2 ).
At least in my case, it works.


Detect Commutes from Strava Export

https://github.com/martin-ueding/geo-activity-playground/blob/11fb381161dee7e9d04af018f2966c262a40ff09/geo_activity_playground/importers/strava_checkout.py#L207
Had to change this line to is_commute = row["Commute"] == True in order for the condition to trigger succesfully.
Maybe a change on the strava export format?

That's indeed strange. But I've just added a condition that accept either the string "true" or the literal boolean value True. Will be part of 0.20.0.

Version 0.20.0 is released you can update and try it out. If the issue persists, please reopen this ticket.


Improve project close dialog

Summary
This change removes the user configuration setting for preventing the project from closing, and replaces it with a more explicit dialog for the user to choose to close the project, or keep it open (see below screenshot).
Screenshot(s)

Resolves #8

CC: @KaKi87

I got the update, it's perfect, thanks !

Great! Glad you are enjoying it so far!


Run fix in some sort of background thread?

I've tried enabling the fix_on_save flag today, which is really great, but it massively slows down the editing experience. Sublime locks for somewhere between 1-2 seconds while it processes this.
Is there anyway that this can be ran in some sort of background thread so Sublime remains responsive through this duration?

I think https://github.com/xojs/SublimeLinter-contrib-xo/blob/92aa8b3e0d8ac021ce4d34cd7fa9b0cc758b9ed6/linter.py#L172 could use on_pre_save_async instead. But I haven't tested.
https://www.sublimetext.com/docs/3/api_reference.html
// @LuKks

I think https://github.com/xojs/SublimeLinter-contrib-xo/blob/92aa8b3e0d8ac021ce4d34cd7fa9b0cc758b9ed6/linter.py#L172 could use on_pre_save_async instead. But I haven't tested.
https://www.sublimetext.com/docs/3/api_reference.html
// @LuKks

@sindresorhus looks promising! I'm happy to give it a test on my project if someone can publish some sort of pre-release

@sindresorhus looks promising! I'm happy to give it a test on my project if someone can publish some sort of pre-release

@sindresorhus is there a way I can try this out? I've tried modifying the linter.py file inside /home/.config/sublime-text-3/installed packages/SublimeLinter-contrib-xo.sublime-package. Is that the correct way to try and test? At the moment doesn't look like it's working

Ok, confirmed that the change has been made with some logging, unfortunately it doesn't seem to fix the locking issue. Been trying to compare to the prettier plugin which does similar stuff but don't yet understand python well enough to spot the difference.

I tried just changing to on_pre_save_async but works the same (sync), I think we need some code related to threading in Python to make it really async, for example running xo_fix function in another thread.

Hi @IPWright83, did you find any solution to this issue?


Remove unnecessary events message parsing

Summary
This PR aims to fix an unnecessary double message parsing on src/routes/cache-hooks/cache-hooks.service.ts. This led to errors as a wrong assumption was taken: it is not needed to parse messages as a Buffer since amqp-connection-manager's ChannelWrapper class does it automatically.
Changes

Remove unnecessary Buffer-wrappings in end-to-end tests.
Remove unnecessary JSON.parse(Buffer.from(...)) call in CacheHooksService.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
3 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.04%) to 92.346%

Files with Coverage Reduction
New Missed Lines
%

src/routes/transactions/entities/tests/human-description.builder.ts
3
60.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.04%

Covered Lines:
6878

Relevant Lines:
7191

💛  - Coveralls


Missing -thread?

Thank you Jonathan for this fix, which has become necessary due to ocamllabs/ocaml-ctypes#651


Not getting build

python2 $(which scons) -j$(nproc) build/X86_MESI_Two_Level/gem5.opt
I am trying to run this command, but I am not getting what is this (which scons) is referring?Like I am giving command like python2 $scons -j$4 build/X86_MESI_Two_Level/gem5.opt. But there is not build in the root directory, how you are working here then? I need to implement this technique within 2 days, so it would be great if you give me a reply.

@noshintabassum74 $(which scons) runs the command which scons; this command outputs the absolute path of the scons binary.
For example, on my machine:
> which scons
/usr/local/bin/scons

Similarly, the nproc is actually a command that outputs the number of processor cores available on your system.
> nproc
80

The $(...) notation indicates a command substitution, which inserts the output of the enclosed command into the main command.
So, if you directly run the following command on your command line:
> python2 $(which scons) -j$(nproc) build/X86_MESI_Two_Level/gem5.opt

Your shell will automatically run $(which scons) and $(nproc) for you and substitute them into the build command, so it will effectively run this command for you:
> python2 /usr/local/bin/scons -j80 build/X86_MESI_Two_Level/gem5.opt

Note that the command you posted:
> python2 $scons -j$4 build/X86_MESI_Two_Level/gem5.opt

Will try to use $scons and $4 as variables, which are likely not defined previously, so they will be empty, effectively rendering this command incorrectly as:
> python2 -j build/X86_MESI_Two_Level/gem5.opt


Discuss ways to pull instructions out of prose in spec to enable inst/page reference manual

one idea for quickly doing this could be to use asciidoc tags that then could be used to pull out the content with includes: https://docs.asciidoctor.org/asciidoc/latest/directives/include-tagged-regions/ in a separate document.
/cc @kersten1 @wmat @kasanovic

On Tue, Jun 4, 2024 at 1:01 PM Kevin Broch @.***> wrote:

one idea for quickly doing this could be to use asciidoc tags that then
could be used to pull out the content with includes:
https://docs.asciidoctor.org/asciidoc/latest/directives/include-tagged-regions/

Yep.  I actually was thinking a way to exclude non-normative text from
generated documents would be to move all non-normative text into their own
files as tag filtering only works with the include macro.
—

Reply to this email directly, view it on GitHub
https://github.com/riscv-admin/docs-sig/issues/44, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAN6ZEZEASCTILFB564CFDZFXXIBAVCNFSM6AAAAABIY5G7D2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMZTGOJYHA3DONQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Yep. I actually was thinking a way to exclude non-normative text from generated documents would be to move all non-normative text into their own files as tag filtering only works with the include macro.

That's a good point.  And actually I have that example here: https://github.com/riscv-admin/docs-sig/blob/main/projects/csr-format/wavedrom-input.adoc?plain=1#L9
Also if we wanted the potential to leave the non-normative text in the doc as is, we could surround it with https://docs.asciidoctor.org/asciidoc/latest/directives/ifdef-ifndef/ like ifdef::non-norm[] block.
Assuming we are pulling out mostly wavedrom definitions, those could then be used to create the reference model  with one item/page.  Also table format from the wavedrom using a template to generate the table?


Baraag "No images found"

Ripme version: v2.1.2-23-e5438e85
Java version: "18.0.1" 2022-04-19
Operating system: Windows 10 Version 21H2 (OS Build 19044.2486)
Exact URL you were trying to rip when the problem occurred: https://baraag.net/@Necrosmos/media (NSFW)

Expected Behavior
Paste link to baraag gallery
Press the "Rip" button
RipMe downloads all images from the baraag album
Actual Behavior
Paste link to baraag gallery
RipMe states, in green text, "baraag album detected"
Press the "Rip" button
RipMe claims that it starts downloading and that it completes the rip
RipMe states: "No images found at https://baraag.net/@Necrosmos/media"
No images have been downloaded

closing, nobody sent a patch.


Push release

could you may push the new update to release? :D

I expect a 1.1 release today or tomorrow, still solving some issue with the new RCON terminal

done


Avoid clones

How do I avoid the clone here?
[["tETHBTC",0.06817,3299.12048352,0.068325,578.63963126,-0.000794,-0.0115,0.068356,139132.82755374,0.070857,0.066875]]

        let mut res: reqwest::Response = helper::get(&url)?;

        let v: serde_json::Value = res.json()?;
        let v: Option<&Vec<serde_json::Value>> = v.as_array();
        if v.is_none() {
            return Err(Box::new(TickerError::UnexpectedResponse));
        }
        let v = serde_json::Value::Array(v.unwrap().clone());

        let tickers: Vec<TickerResponseTBFX> = serde_json::from_value(v)?;

You can deserialize from request::Response directly to Vec<TickerResponseTBFX> without a serde_json::Value in between.
let tickers: Vec<TickerResponseTBFX> = res.json()?;

Or, since serde_json::Value is an enum, you can use a match.
let tickers: Vec<TickerResponseTBFX> = match res.json()? {
    v @ Value::Array(_) => serde_json::from_value(v)?,
    _ => {
        return Err(Box::new(TickerError::UnexpectedResponse));
    }
};


MPW CI fails with mpw-6b tag and above

Description
We're maintaining all MPW shuttle designs here: https://github.com/The-OpenROAD-Project/OpenLane-MPW-CI
Earlier stable OpenLane tag we tested is  2022.03.03_02.36.44.
CI status available here: https://jenkins.openroad.tools/blue/organizations/jenkins/OpenLane-MPW-CI-Public/detail/PR-20/2/pipeline
Recently I test with OpenLane tag mpw-6b and above tags.
CI status available here: https://jenkins.openroad.tools/blue/organizations/jenkins/OpenLane-MPW-CI-Public/detail/PR-20/10/pipeline/850
All latest OpenLane tags fails for CI for counter designs with hold and setup violations.
@tspyrou told that openrcx data not correlate with latest commits, so timing violations occurs.
So provide a fix with right RC extraction to be passed for timing check post routing.
@dralabeing  FYI

Some discussion of the RC parasitics changing over time in https://github.com/RTimothyEdwards/open_pdks/issues/251

@tspyrou explained that the setrc  tcl file , see example here (https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/platforms/sky130hd/setRC.tcl) must be updated so that the global route based timing estimates will correlate with the signoff values after openrcx. Otherwise optimization will not see slack change and hence the timing violations. This was pending.
@donn what is the status of this?

I think the issue is not the pre detailed routing parasitic capacitance estimates but bad openrcx data that was fixed recently by @donn and @rtimothyedwards.

FYI Those fixes are post mpw-6b

@antonblanchard Thanks for the update and it is good to know that openrcx data updates potentially fixes this problem and that there is better co-relation. (hopefully) from gr timing and openrcx signoff.
@donn will these fixes be committed  into mpw-6b soon ?

With OpenLane tag 2022.04.17_01.59.58 timing violations issue got fixed. Closing this issue.


Clean storage shutdown on startup errors, require initial config

This attempts to fix the storage bootstrapping issue for good (#504).
The storage does no longer start any background processing unless Start() returned without an error.
An initial configuration file is now required (again).
@beorn7

:+1:
Not 100% though if we run into trouble with shutdown timing and such... we should let it bake for a while.

Could you elaborate a bit?
On Tue, May 19, 2015 at 4:32 PM Björn Rabenstein<EMAIL_ADDRESS>wrote:

[image: :+1:]
Not 100% though if we run into trouble with shutdown timing and such... we
should let it bake for a while.
—
Reply to this email directly or view it on GitHub
https://github.com/prometheus/prometheus/pull/704#issuecomment-103524545
.


'type [2147483647]byte larger than address space' when cross compiling

When cross compiling for linux-ppc64le or linux-mipsle, the error /root/go/src/github.com/OneOfOne/xxhash/xxhash_unsafe.go:20:23: type [2147483647]byte larger than address space occurs.
Command:
GOOS=linux GOARCH=ppc64le go build -o executable main

@Thyaris I'm not sure how to fix that for ppc64* except by disabling the unsafe optimizations for those archs, would that be fine with you?
Of course any patches are welcome.

Also does your program work if you use GOOS=linux GOARCH=ppc64le go build -tags safe -o app?

Actually I cannot reproduce this behaviour anymore... But maybe you can try that when you have the time.
I was using the docker image golang:1.10.0, and the code that was causing the error (cause that is the only location in the code that I use xxhash):
func (self *Bean) XXHashSum() ([]byte, error) {
	bytes, err := ioutil.ReadAll(self.file)
	if err != nil {
		return "", errors.New("Couldn't compute file hash, of " + self.uuid.String())
	}
	return XXHash(bytes), nil
}

func XXHash(input []byte) []byte {
	xxhash := xxhash.New64()
	return xxhash.Sum(input)
}

Considering my project, you can remove the unsafe optimizations. We do not have consumers that actually use linux-ppc64le or mipsle, we just have it in our build-process because it's officially supported by Go.
Considering your source code, -tags safe should fix the problem.
The logs were:
Building datacenter-linux-ppc64le...
# github.com/OneOfOne/xxhash
/root/go/src/github.com/OneOfOne/xxhash/xxhash_unsafe.go:20:23: type [2147483647]byte larger than address space
/root/go/src/github.com/OneOfOne/xxhash/xxhash_unsafe.go:29:20: type [2147483647]byte larger than address space
/root/go/src/github.com/OneOfOne/xxhash/xxhash_unsafe.go:39:23: type [2147483647]byte larger than address space
/root/go/src/github.com/OneOfOne/xxhash/xxhash_unsafe.go:47:20: type [2147483647]byte larger than address space
Building datacenter-linux-mipsle...
# github.com/OneOfOne/xxhash
/root/go/src/github.com/OneOfOne/xxhash/xxhash_unsafe.go:20:23: type [2147483647]byte larger than address space
/root/go/src/github.com/OneOfOne/xxhash/xxhash_unsafe.go:29:20: type [2147483647]byte larger than address space
/root/go/src/github.com/OneOfOne/xxhash/xxhash_unsafe.go:39:23: type [2147483647]byte larger than address space
/root/go/src/github.com/OneOfOne/xxhash/xxhash_unsafe.go:47:20: type [2147483647]byte larger than address space

Feel free to close this issue.

Alright fair enough.
Your code is wrong btw, your XXHash func is returning the input + appended empty hash rather than the hash of the input.
func XXHash(input []byte) []byte {
	xxhash := xxhash.New64()
	xxhash.Write(input)
	return xxhash.Sum(nil)
}

Also if you're hashing a file, you might want to use io.Copy on an xxhash.New64 object rather than using ioutil.ReadAll, something along the lines of:
// not tested
func (self *Bean) XXHashSum() ([]byte, error) {
    f, err := os.Open(self.file)
    if err != nil {
        return nil, errors.New("Couldn't compute file hash, of " + self.uuid.String())
    }
    defer f.Close()
    xx := xxhash.New64()
    io.Copy(xx, f)
    return xx.Sum(), nil
}

Thank you for that

Fixed (well, workaround) in https://github.com/OneOfOne/xxhash/commit/c8a32011bfcbf736aeb27d5d077ed081a3626964


Allow phpunit 10

It did not actually use phpunit 10 because other dev dependencies like php-cs-fixer call for phpunit 9. That will get sorted out in due course. No need to rush here.


fix support of OpenStack autoscalling.minRep=0

The semver library returns an error if you try to parse a version with
only major.minor. Provide the semver package the full major.minor.patch
to allow properly detecting whether a version of OpenStack can support
autocaling.minReplicas=0.
xref: https://issues.redhat.com/browse/HIVE-1539

/assign @suhanime
/cc @dgoodwin

LGTM

/lgtm


Terragrunt aware destroy script overwritten on setup

The logic in setup-workspace.sh is overwriting the destroy.sh scripts in each layer folder that were added by https://github.com/IBM/automation-aws-infra-openshift/commit/2b56b54d04770c9b624eaab7ed5acdd573a665a8

@faheemshai can you please verify this


Error when updating Salesforce CLI from command line

Summary
Running sf update updates Salesforce CLI to current version but shows an error when it completes.
Steps To Reproduce
Open terminal window in VsCode.
Run $ sf update
Expected result
After it completes, it should show success.
Actual result
Sf appears to be updated to latest version but it shows an error.  "Error: EPERM: operation not permitted, unlink 'C:\users\8909879\AppData\Local\sf\client\2.17.14-31db5eb\bin\node.exe
Code: EPERM
The batch file cannot be found."
System Information

@salesforce/cli/2.25.7 win32-x64 node-v20.10.0

Additional information

Hi @gsnortland
I recommed use command " npm install -g @salesforce/cli" to update
Regards,

@gsnortland does the file C:\users\8909879\AppData\Local\sf\client\2.17.14-31db5eb\bin\node.exe actually exist?  If so, are the permissions on it set so that it can't be deleted?
Did it upgrade you to the new version and then fail to clean up the old one, or does the error happen before the new one installed?

I recommed use command " npm update -g @salesforce/cli" to update

that works for npm-based installations.  @gsnortland installed via the windows installer.  Don't cross the streams

not resolved. Github actions, mind your business lol.

I think they are diverting the error, I did everything they indicated and I put the image back, but it still doesn't work for me.
nervill@DESKTOP-L91RLI8:~$ node -v
v22.1.0
nervill@DESKTOP-L91RLI8:~$ whereis node
node: /usr/bin/node /usr/include/node /home/nervill/.nvm/versions/node/v22.1.0/bin/node /mnt/c/Program Files/nodejs/node.exe /usr/share/man/man1/node.1.gz
nervill@DESKTOP-L91RLI8:~$ sf --version
›   Warning: @salesforce/cli update available from 2.63.9 to 2.64.8.
@salesforce/cli/2.63.9 wsl-x64 node-v22.1.0
nervill@DESKTOP-L91RLI8:~$ npm update -g @salesforce/cli
added 89 packages, removed 10 packages, and changed 695 packages in 4m
122 packages are looking for funding
run npm fund for details
nervill@DESKTOP-L91RLI8:~$ sf --version
@salesforce/cli/2.64.8 wsl-x64 node-v22.1.0
nervill@DESKTOP-L91RLI8:~$

launch the update inside the old sfdx version like this:
C:\users\8909879\AppData\Local\sf\client\2.17.14-31db5eb\bin> sf update

and you should be able to perform the update. but this is NOT a solution, just a workaround

Hi @Rihan9 , how are you? Do you notice that you are running it in Powershell and I am running it in WSL2 Ubuntu within Windows?


Improve source map handling

This borrows @krisselden's approach from RouteRecognizer to read inline source maps from a Rollup plugin. As far as I can tell it's working perfectly now for app code, although some of our dependencies don't ship source maps.

@tomdale this approach does break on rebuilds, we need to bump broccoli-rollup to the latest version.


discovery: append quic multiaddrs along with tcp,

on handle_pending_outbound_connection.

I have forgotten why we didn't store the ENRs originally.
My initial feeling was that ENRs can be quite large and they are stored in discovery, so perhaps we wanted to avoid cloning them and only get them if we were actually going to use them.
However, your changes here look much nicer. ENRs are not massive anyway, at most 1280 bytes IIRC.


Feature Request: Add the word "Standard" behind the DDoS protection option in the portal accelerator

DDoS protection is expensive, and people might accidentally leave this enabled while deploying this on their own without fully understanding the massive cost implications that come with it. Can we please add that it is DDoS protection Standard to the name of the option in the portal accelerator. Also, in the information bubble next to it can we put a small disclaimer and maybe a link to DDoS protection standard pricing as well as default it to disabled.
This rubbed someone I know the wrong way as they believed that DDoS protection Standard should not be deployed unless there is a specific need as DDoS protection basic is already there. In other words, it should be listed as optional as well.

Hi samsmith-MSFT, thanks for raising your concern. We can certainly provide a little more clarity around the enablement of DDoS protection plans, and will look at including your suggestions. However, enabling DDoS protection is a best practice and we will keep it enabled by default.
We are looking at including DDoS IP Protection as an additional option (more cost effective) as well.

Closing this issue as we've done what we can to accommodate.


Add command to generate coverage

Add command, command setting, and icons for generating coverage.

Will review today. Sorry for the delay.


Update CI to run tests on 5, 6 and latests node version

Update CI to run tests on 5, 6 and latests node versions
Remove 4.1 because it fails randomly.
https://github.com/ericclemmons/unique-selector/blob/master/.travis.yml

Pls comment on the issue if you want to take it.


Pushing a function to the pool

Hello,
Thank you so much for this library. I was wondering why I keep getting an error to push to the pool:
all_errors.cpp:244:25: error: no matching function for call to ‘ctpl::thread_pool::push(int)’
I am following your example to the tee and I am still getting this error. Any ideas?

You need an extra argument in your function
int mytask(int ithread, int i) {
// do stuff with i
}


Is this project dead?

There seem to be issues even running sample code - likely some changes in gunicorn.  They've been outlined in other issues Is this project still being worked on?

Maybe

no, the project is not dead, I just did not have enough time to check issues, I have been busy with other projects.


Removed stray comma in log message

Removed an unneeded comma in a log message, it's not much but I guess all bits help :)

Isn't this oxford comma? https://www.grammarly.com/blog/what-is-the-oxford-comma-and-why-do-people-care-so-much-about-it/

Ah, my bad.
Didn’t want to start a grammar discussion, I just thought it was a mistake :)


Run fast dispatch on unused ETH cores on N300 (L and R devices)

Implemented and pushed to main.
https://github.com/tenstorrent-metal/tt-metal/pull/5919


relation denormalization path

Hi,
I'm currently using eager loading to denormalize some relations at read time.
Ex:
class Client extends Model {
  static get tableName() {
    return 'clients';
  }

  static get relationMappings() {
    const Brand = require('../Brand');

    return {
      brands: {
        relation: Schwifty.Model.ManyToManyRelation,
        modelClass: Brand,
        join: {
          from: 'clients.id',
          through: {
            from: 'rel_clients_brands.brand_id',
            to: 'rel_clients_brands.brand_id',
          },
          to: 'brands.id',
        },
      },
    };
  }

  static get joiSchema() {
    return Joi.object().keys({
  id: Joi.number().description('Auto incrementing field, system generated'),
  brand_id: Joi.number(),
});
  }
}

What I want is to nest the resulted relation like this: result.cache.brands instead of result.brands.
Is this posible?

You could do something like this:
class Client extends Model {
  static get tableName() {
    return 'clients';
  }

  $afterGet() {
    if (this.brands) {
      this.cache.brands = this.brands
      delete this.brands
    }
  }

  static get relationMappings() {
    const Brand = require('../Brand');

    return {
      brands: {
        relation: Schwifty.Model.ManyToManyRelation,
        modelClass: Brand,
        join: {
          from: 'clients.id',
          through: {
            from: 'rel_clients_brands.brand_id',
            to: 'rel_clients_brands.brand_id',
          },
          to: 'brands.id',
        },
      },
    };
  }

  static get joiSchema() {
    return Joi.object().keys({
  id: Joi.number().description('Auto incrementing field, system generated'),
  brand_id: Joi.number(),
});
  }
}

There is no direct support for what you want.


Revert "Merge pull request #3 from tielur/feature/dont-count-hahas-wh…

…en-laughing-at-yourself"
This reverts commit d1ed8296c8d58952d3a714a5fb6f44fae76d8ffb, reversing
changes made to 7b44f3e596cda9f2036424c0470c7025637bb19c.


Deserializing error when running raw queries on SQL functions that return setof

Bug description
I'm working on tests for SQL functions that return either a table or a setof. I can call the functions just fine in my database manager, but when I run a raw query in Prisma I get a deserialization error.
For testing purposes I don't need the output to be deserialized if it is not possible, but from what I can tell there's no way to circumvent this step and to actually get the query to not reject.
How to reproduce

Create SQL function

create or replace function public.record_results(rec public.record) returns setof factor as $$
declare
	result factor;
	factor_cursor cursor for
	select * from factor
	-- where ...
begin
	open factor_cursor;
	loop
		fetch from factor_cursor into result;
		exit when not found;
		-- do stuff ...
		return next result;
	end loop;
	close factor_cursor;
end; $$ language plpgsql STABLE;

Run raw query in Prisma

await prisma.$queryRaw`SELECT record_results(record) FROM record WHERE id = ${record.id};`

Get error

Invalid `prisma.queryRaw()` invocation:··
      Raw query failed. Code: `N/A`. Message: `error deserializing column 0: cannot convert between the Rust type `core::option::Option<alloc::string::String>` and the Postgres type `factor``]

Expected behavior
Get results, like calling the function here in DBeaver:

Prisma information
model factor {
    id               String           @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
    value            Decimal
    scope            Int              @db.SmallInt
    part             String
    some_id          String           @db.Uuid
    some_other_id    String?          @db.Uuid
}

Environment & setup

OS: Fedora 33
Database: PostgreSQL
Node.js version: 12.16.2

Prisma Version
7.5.2

I can reproduce this, looks like we don't handle conversion of type returned by that function. We should add a mapping for that.

Works with cast! Thanks!
await prisma.$queryRaw`SELECT CAST (record_results(record) AS varchar(255)) FROM record WHERE id = ${record.id};`

Yes, I am facing same issue now

Note:
I tried the SQL in PostgreSQL 10.21 and 14.5 and got the following:
Query 1 ERROR: ERROR:  type public.record does not exist

Could someone help to get this reproduced?
We think it might already be fixed.

Note: this is not a bug, as Prisma doesn't currently offer 1st class support for stored functions by design.
Moreover, there's a viable workaround involving CASTs, as reported here.
Before closing this issue, let's make sure we properly document these limitation and workaround in our docs.

We can close this as how to handle unsupported types is already documented: https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#unsupported-types
If someone is interested in being able to use functions more properly, please open a feature request (or search for any existing one, I would be surprised if we don't have one yet).


Enable OpenSSH on Windows nodes in test clusters.

Also switches to the most recent 64-bit version of OpenSSH for Windows.
Tested:
PROJECT=${CLOUDSDK_CORE_PROJECT} KUBERNETES_SKIP_CONFIRM=y NUM_NODES=2
NUM_WINDOWS_NODES=2 KUBE_GCE_ENABLE_IP_ALIASES=true TEST_CLUSTER=true
./cluster/kube-up.sh

What type of PR is this?

Uncomment only one  /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:
/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

cc @yujuhong

PR sent upstream, I'll address any review comments there: https://github.com/kubernetes/kubernetes/pull/74360


WebViewAssetLoader support

Summary
i need to access my local asset, a html file, over https. because some of my js code require Secure_Contexts, so i can't access that html by file:/// protocol.
android x provide a new lib WebViewAssetLoader to achieve this goal. more detail.
there is a example code on android source code to show how we can use WebViewAssetLoader.

according to androidx.webkit's doc, the minimum sdk version to use this library is 14. react-native-webview is 16, so the requirement is fit.
finally we need to add an dependency for build.gradle
dependencies {
    implementation 'androidx.webkit:webkit:1.2.0'
}

Test Plan
according to this doc, after apply WebViewAssetLoader, we can access assets by https://appassets.androidplatform.net/assets/some-assets now.
Compatibility
there is nothing need to do with other platforms

OS
Implemented

iOS
❌

Android
✅

Checklist

[x] I have tested this on a device and a simulator
[x] I added the documentation in README.md
[ ] I mentioned this change in CHANGELOG.md
[ ] I updated the typed files (TS and Flow)
[ ] I added a sample use of the API in the example project (example/App.js)

ok, i'll make it configurable.

Does iOS not have this problem with Secure Contexts and "file://", or are you just not using iOS

Secure context is supported by "file://" protocol of iOS by default. so we don't need to do any magic for it.

Hi, I would like to user WebAssetLoader, could this be merged ?


synapse crashes when trying to send a message

Describe the bug
When trying to send a message (tried with element web and FluffyChat) to a federated chat-room the message is not sent (marked as failed, option to try to send again is shown).
To Reproduce
Steps to reproduce the behavior:

Install synapse-spamcheck-badlist via pip in synapses python environment
Configure synapse to use the module in spam_checker section
Create two tables in synapses database matching the table-names configured in step 2
Restart synapse
Try to send a message in a group-chat

Expected behavior
The message should be sent and visible on all clients connected to the room.
Server:

Homeserver: synapse
Version: 1.26.0

Desktop:

OS: OSX
Browser: Firefox
Version: 78.7
Client: element 1.7.20

Smartphone:

Device: Nokia 8.1
OS: Android 9
Browser: FluffyChat
Version: 0.26.1

Additional context
redacted snipped from synapses homeserver.log:
AttributeError: Not an Aho-Corasick automaton yet: call add_word to add some keys and call make_automaton to convert the trie to an automaton.
0000-00-00 00:00:00,000 - synapse.http.server - 83 - ERROR - PUT-493 - Failed handle request via 'RoomSendEventRestServlet': <XForwardedForRequest at 0x7fa75344da20 method='PUT' uri='/_matrix/client/r0/rooms/!DzntlyFqDwYZSqoYBV%3Amaunium.net/send/m.room.message/FluffyChat%20android-4-1613025057873' clientproto='HTTP/1.1' site='8008'>
Traceback (most recent call last):
  File "/home/***/.local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/home/***/.local/lib/python3.6/site-packages/synapse/rest/client/v1/room.py", line 241, in on_POST
    requester, event_dict, txn_id=txn_id
  File "/home/***/.local/lib/python3.6/site-packages/synapse/handlers/message.py", line 747, in create_and_send_nonmember_event
    spam_error = await self.spam_checker.check_event_for_spam(event)
  File "/home/***/.local/lib/python3.6/site-packages/synapse/events/spamcheck.py", line 60, in check_event_for_spam
    if await maybe_awaitable(spam_checker.check_event_for_spam(event)):
  File "/home/***/src/synapse-spamcheck-badlist/synapse_spamcheck_badlist/bad_list_filter.py", line 145, in check_event_for_spam
    for _ in automaton.iter(text):
AttributeError: Not an Aho-Corasick automaton yet: call add_word to add some keys and call make_automaton to convert the trie to an automaton.
0000-00-00 00:00:00, - synapse.federation.federation_server - 362 - ERROR - PUT-695-$XXXXXX-laAxSkdZ4Y4 - Failed to handle PDU $XXXXXX-laAxSkdZ4Y4
Traceback (most recent call last):
  File "/home/***/.local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/***/.local/lib/python3.6/site-packages/synapse/federation/federation_server.py", line 351, in process_pdus_for_room
    await self._handle_received_pdu(origin, pdu)
  File "/home/***/.local/lib/python3.6/site-packages/synapse/federation/federation_server.py", line 736, in _handle_received_pdu
    pdu = await self._check_sigs_and_hash(room_version, pdu)
AttributeError: Not an Aho-Corasick automaton yet: call add_word to add some keys and call make_automaton to convert the trie to an automaton.

Hmm, I thought this was fixed by https://github.com/matrix-org/synapse-spamcheck-badlist/pull/9. What version are you using?

Hi,
thank you for the swift response. I am using 0.2.0:
$ pip3.6 list --format=columns|grep synapse-spamcheck
synapse-spamcheck-badlist   0.2.0

Apparently the latest version is not published:
$ pip3.6 install --user -U "git+https://github.com/matrix-org/synapse-spamcheck-badlist#egg=synapse-spamcheck-badlist"
Collecting synapse-spamcheck-badlist from git+https://github.com/matrix-org/synapse-spamcheck-badlist#egg=synapse-spamcheck-badlist
  Cloning https://github.com/matrix-org/synapse-spamcheck-badlist to /tmp/pip-build-6vam7cf_/synapse-spamcheck-badlist
Requirement already up-to-date: pyahocorasick in ./.local/lib/python3.6/site-packages (from synapse-spamcheck-badlist)
Requirement already up-to-date: prometheus-client in ./.local/lib/python3.6/site-packages (from synapse-spamcheck-badlist)
Requirement already up-to-date: twisted in ./.local/lib/python3.6/site-packages (from synapse-spamcheck-badlist)
Requirement already up-to-date: zope.interface>=4.4.2 in ./.local/lib/python3.6/site-packages (from twisted->synapse-spamcheck-badlist)
Requirement already up-to-date: constantly>=15.1 in ./.local/lib/python3.6/site-packages (from twisted->synapse-spamcheck-badlist)
Requirement already up-to-date: incremental>=16.10.1 in ./.local/lib/python3.6/site-packages (from twisted->synapse-spamcheck-badlist)
Requirement already up-to-date: attrs>=19.2.0 in ./.local/lib/python3.6/site-packages (from twisted->synapse-spamcheck-badlist)
Requirement already up-to-date: PyHamcrest!=1.10.0,>=1.9.0 in ./.local/lib/python3.6/site-packages (from twisted->synapse-spamcheck-badlist)
Requirement already up-to-date: hyperlink>=17.1.1 in ./.local/lib/python3.6/site-packages (from twisted->synapse-spamcheck-badlist)
Requirement already up-to-date: Automat>=0.3.0 in ./.local/lib/python3.6/site-packages (from twisted->synapse-spamcheck-badlist)
Requirement already up-to-date: setuptools in ./.local/lib/python3.6/site-packages (from zope.interface>=4.4.2->twisted->synapse-spamcheck-badlist)
Requirement already up-to-date: idna>=2.5 in ./.local/lib/python3.6/site-packages (from hyperlink>=17.1.1->twisted->synapse-spamcheck-badlist)
Requirement already up-to-date: six in ./.local/lib/python3.6/site-packages (from Automat>=0.3.0->twisted->synapse-spamcheck-badlist)
Installing collected packages: synapse-spamcheck-badlist
  Running setup.py install for synapse-spamcheck-badlist ... done
Successfully installed synapse-spamcheck-badlist-0.2.0

Or, you just did not bump the version: https://github.com/matrix-org/synapse-spamcheck-badlist/blob/66c31fd7b573e78d6562627ac8f94ffc45ae49fe/setup.py#L5

I... bumped the version and tagged on the wrong branch :facepalm:
Should be fixed now :crossed_fingers:


Deleted Block will make a page unrenderable

Hello @Z3d0X
First, I want to thank you again for such a beautiful implementation of blocks in Filament!
So now, I ran into a problem: I deleted a block after a given page was saved into the database.
I expected that the rendering mechanism ignored the JSON's non-existing blocks, but an exception was thrown.
Is this the desired behavior?
Below is a screenshot and the video link at the timestamp where it happened. It's in Portuguese, but without sound, you realize what happened. After undeleting the block files, it went back to normal
https://youtu.be/4PGkwDa3B4s?t=4643

Hi sorry you ran into this issue. This is a bug yes, deleted blocks should be ignored.
I will work out a fix shortly.
Thank you for bringing this to my attention.
PS: I love the content you made featuring this plugin

Oh, that's nothing. No worries!
PS: Thanks! And soon I'll make it in English also, so it can be viewed by a larger audience. Better to do it on V3, as it should come out in the next month(ish)?!?? 😄


Latest odbc binaries

This change is

Coverage remained the same at 72.504% when pulling cb1f45811d73890ee8b78a2e1b759e752931100a on david-puglielli:odbc-17005-binaries into 35146b77d2bd1ca8e1c683b2abfe93487179e5f1 on Microsoft:dev.

Codecov Report

Merging #637 into dev will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev     #637   +/-   ##
=======================================
  Coverage   77.13%   77.13%
=======================================
  Files          25       25
  Lines        7317     7317
=======================================
  Hits         5644     5644
  Misses       1673     1673

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 35146b7...cb1f458. Read the comment docs.


Retrieve related resources without reference

IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #[issue number] or Closes #[issue number]
Engineer Checklist

[ ] I have written Unit tests for any new feature(s) and edge cases for bug fixes
[ ] I have added any strings visible on UI components to the strings.xml file
[ ] I have updated the  CHANGELOG.md file for any notable changes to the codebase
[ ] I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
[ ] I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
[ ] I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

[ ] I have verified Unit tests have been written for any new feature(s) and edge cases
[ ] I have verified any strings visible on UI components are in the strings.xml file
[ ] I have verifed the CHANGELOG.md file has any notable changes to the codebase
[ ] I have verified the solution has been implemented in a configurable and generic way for reuseable components
[ ] I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

@Lentumunai-Mark created this as a placeholder so we make sure to get these changes into main, probably easier to re-write on main vs merging this PR

@marklosh Can you create another new PR from main branch instead of resolving all these merge conflicts?

@marklosh Can you create another new PR from main branch instead of resolving all these merge conflicts?


add example for Llama3 vllm server

Hello, I am creating this PR to share the example of evaluating by local model using API call (vllm server).
I find this approach can be quite useful when:

server the local annotator on the cluster so that other nodes only need to call API for evaluating.
the user wants to use "weighted"-style annotator similar with weighted_alpaca_eval_gpt4_turbo.

Please let me know if this looks good. I am happy to add more detailed instructions.

To use the API, add the client config local_configs.yaml and activate it:
default:
    - api_key: "token-abc123"
      base_url: "http://localhost:8000/v1"

LGTM, can you add a README.md in src/alpaca_eval/evaluators_configs/weighted_alpaca_eval_vllm_llama3_70b/ that explains the setup and goal? thanks!

LGTM, can you add a README.md in src/alpaca_eval/evaluators_configs/weighted_alpaca_eval_vllm_llama3_70b/ that explains the setup and goal? thanks!

Hi @YannDubs , thanks for looking into the PR! I have added README to provide more info regarding setup.

Hi @YannDubs , I wanted to check in on the PR after adding the README as you suggested. If there’s anything more I can clarify or adjust, please let me know. Thanks again for your feedback so far!

Look great, thanks @cameron-chen
sorry for the delay on that one


build: update npm packages

resolves #20

Thanks! I'll rollback version to 1.5.0 in package.json since this one gets upgraded when we do release 👀

Ah yea, that change wasn't meant to be committed. I was testing the changelog cli upgrade to make sure it still worked. Sorry for the confusion.


Picture.toImage/Scene.toImage does not work if Android app is in background and GPU images are in picture.

Problem already existed here #27438, but got closed. As of today, I still have the same bug, e.g. canvas.drawImage draws nothing and only works if I use intent.putExtra("enable-software-rendering", true), which in turn causes the camera to crash.
I need canvas.drawImage to circle crop an image to display in my notification tray for push notifications.

Logs

[√] Flutter (Channel stable, 1.22.5, on Microsoft Windows [Version 10.0.19041.685], locale fr-FR)
• Flutter version 1.22.5 at E:\Flutter
• Framework revision<PHONE_NUMBER> (4 weeks ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\MrJ\AppData\Local\Android\sdk
• Platform android-30, build-tools 29.0.2
• Java binary at: E:\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[!] Android Studio (version 4.1.0)
• Android Studio at E:\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] Connected device (2 available)
• sdk gphone x86 (mobile)            • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Android SDK built for x86 (mobile) • emulator-5556 • android-x86 • Android 10 (API 29) (emulator)
! Doctor found issues in 2 categories.

@themadmrj
sorry for recycling a code sample, but it seems to work just fine

logs
[  +78 ms] Syncing files to device Pixel 3a...
[   +1 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +1 ms] <- recompile package:issue/main.dart 935c51cd-1e28-41d4-b524-3ac413429b46
[        ] <- 935c51cd-1e28-41d4-b524-3ac413429b46
[  +85 ms] Updating files.
[        ] DevFS: Sync finished
[   +1 ms] Syncing files to device Pixel 3a... (completed in 88ms)
[        ] Synced 0.0MB.
[        ] <- accept
[  +27 ms] Connected to _flutterView/0x756427a690.
[   +3 ms] Flutter run key commands.
[   +2 ms] r Hot reload. 🔥🔥🔥
[   +1 ms] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on Pixel 3a is available at: http://<IP_ADDRESS>:39809/RH2sw-Oxt8Y=/
[        ] Running with unsound null safety
[        ] For more information see https://dart.dev/null-safety/unsound-null-safety
[+1419 ms] I/flutter (30198): building
[+3366 ms] I/flutter (30198): building
[+1279 ms] I/chatty  (30198): uid=10410(com.example.issue) 1.ui identical 1 line
[   +1 ms] I/flutter (30198): building
[ +234 ms] I/flutter (30198): building
[+1802 ms] I/chatty  (30198): uid=10410(com.example.issue) 1.ui identical 2 lines
[        ] I/flutter (30198): building
[ +165 ms] I/flutter (30198): building
[+1832 ms] I/chatty  (30198): uid=10410(com.example.issue) 1.ui identical 1 line
[   +1 ms] I/flutter (30198): building
[ +684 ms] I/flutter (30198): building
[+1627 ms] DevFS: Deleting filesystem on the device (file:///data/user/0/com.example.issue/code_cache/issueBPZIHU/issue/)
[  +31 ms] DevFS: Deleted filesystem on the device (file:///data/user/0/com.example.issue/code_cache/issueBPZIHU/issue/)
[ +366 ms] Failure in ext.flutter.exit: ext.flutter.exit: (-32000) Bad state: The client closed with pending request "ext.flutter.exit".

[   +9 ms] Service protocol connection closed.
[        ] Application finished.
[   +4 ms] executing: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +7 ms] Exit code 0 from: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[        ] 965AY0WP5C tcp:33727 tcp:38829
[   +1 ms] executing: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --remove tcp:33727
[   +9 ms] executing: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +6 ms] Exit code 0 from: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[        ] "flutter run" took 46,041ms.
[ +255 ms] ensureAnalyticsSent: 253ms
[   +5 ms] Running shutdown hooks
[   +1 ms] Shutdown hook priority 4
[   +2 ms] Shutdown hooks complete
[   +3 ms] exiting with code 0

doctor
[✓] Flutter (Channel master, 1.26.0-2.0.pre.275, on Linux, locale en_US.UTF-8)
    • Flutter version 1.26.0-2.0.pre.275 at /home/francesco/snap/flutter/common/flutter
    • Framework revision d9044a8a61 (2 days ago), 2021-01-09 04:04:04 -0500
    • Engine revision caf6a8191f
    • Dart version 2.12.0 (build 2.12.0-204.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/francesco/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_SDK_ROOT = /home/francesco/Android/Sdk
    • Java binary at: /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~20.04-b01)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /snap/bin/chromium

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

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

[✓] Connected device (3 available)
    • Pixel 3a (mobile) • 965AY0WP5C • android-arm64  • Android 11 (API 30)
    • Linux (desktop)   • linux      • linux-x64      • Linux
    • Chrome (web)      • chrome     • web-javascript • Chromium 87.0.4280.141 snap

! Doctor found issues in 1 category.

screenshot

@themadmrj
sorry for recycling a code sample, but it seems to work just fine

logs
[  +78 ms] Syncing files to device Pixel 3a...
[   +1 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +1 ms] <- recompile package:issue/main.dart 935c51cd-1e28-41d4-b524-3ac413429b46
[        ] <- 935c51cd-1e28-41d4-b524-3ac413429b46
[  +85 ms] Updating files.
[        ] DevFS: Sync finished
[   +1 ms] Syncing files to device Pixel 3a... (completed in 88ms)
[        ] Synced 0.0MB.
[        ] <- accept
[  +27 ms] Connected to _flutterView/0x756427a690.
[   +3 ms] Flutter run key commands.
[   +2 ms] r Hot reload. 🔥🔥🔥
[   +1 ms] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on Pixel 3a is available at: http://<IP_ADDRESS>:39809/RH2sw-Oxt8Y=/
[        ] Running with unsound null safety
[        ] For more information see https://dart.dev/null-safety/unsound-null-safety
[+1419 ms] I/flutter (30198): building
[+3366 ms] I/flutter (30198): building
[+1279 ms] I/chatty  (30198): uid=10410(com.example.issue) 1.ui identical 1 line
[   +1 ms] I/flutter (30198): building
[ +234 ms] I/flutter (30198): building
[+1802 ms] I/chatty  (30198): uid=10410(com.example.issue) 1.ui identical 2 lines
[        ] I/flutter (30198): building
[ +165 ms] I/flutter (30198): building
[+1832 ms] I/chatty  (30198): uid=10410(com.example.issue) 1.ui identical 1 line
[   +1 ms] I/flutter (30198): building
[ +684 ms] I/flutter (30198): building
[+1627 ms] DevFS: Deleting filesystem on the device (file:///data/user/0/com.example.issue/code_cache/issueBPZIHU/issue/)
[  +31 ms] DevFS: Deleted filesystem on the device (file:///data/user/0/com.example.issue/code_cache/issueBPZIHU/issue/)
[ +366 ms] Failure in ext.flutter.exit: ext.flutter.exit: (-32000) Bad state: The client closed with pending request "ext.flutter.exit".

[   +9 ms] Service protocol connection closed.
[        ] Application finished.
[   +4 ms] executing: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +7 ms] Exit code 0 from: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[        ] 965AY0WP5C tcp:33727 tcp:38829
[   +1 ms] executing: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --remove tcp:33727
[   +9 ms] executing: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[   +6 ms] Exit code 0 from: /home/francesco/Android/Sdk/platform-tools/adb -s 965AY0WP5C forward --list
[        ] "flutter run" took 46,041ms.
[ +255 ms] ensureAnalyticsSent: 253ms
[   +5 ms] Running shutdown hooks
[   +1 ms] Shutdown hook priority 4
[   +2 ms] Shutdown hooks complete
[   +3 ms] exiting with code 0

doctor
[✓] Flutter (Channel master, 1.26.0-2.0.pre.275, on Linux, locale en_US.UTF-8)
    • Flutter version 1.26.0-2.0.pre.275 at /home/francesco/snap/flutter/common/flutter
    • Framework revision d9044a8a61 (2 days ago), 2021-01-09 04:04:04 -0500
    • Engine revision caf6a8191f
    • Dart version 2.12.0 (build 2.12.0-204.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/francesco/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_SDK_ROOT = /home/francesco/Android/Sdk
    • Java binary at: /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~20.04-b01)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /snap/bin/chromium

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

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

[✓] Connected device (3 available)
    • Pixel 3a (mobile) • 965AY0WP5C • android-arm64  • Android 11 (API 30)
    • Linux (desktop)   • linux      • linux-x64      • Linux
    • Chrome (web)      • chrome     • web-javascript • Chromium 87.0.4280.141 snap

! Doctor found issues in 1 category.

screenshot

I'm not using any widget, perhaps it is related?
Here is my code:
class CircleCropper {
  ui.Image _image;

  Future<File> crop(File file) async {
    _image = await _loadImage(file);

    return _saveCanvas(Size(_image.width.toDouble(), _image.height.toDouble()));
  }

  Future<ui.Image> _loadImage(File file) async {
    final _img = file.readAsBytesSync();

    final Completer<ui.Image> completer = Completer();
    ui.decodeImageFromList(_img, (ui.Image img) {
      completer.complete(img);
    });
    return completer.future;
  }

  Future<File> _saveCanvas(Size size) async {
    final pictureRecorder = ui.PictureRecorder();

    final canvas = Canvas(pictureRecorder);

    _drawCanvas(size, canvas);

    final pic = pictureRecorder.endRecording();
    ui.Image img = await pic.toImage(_image.width, _image.height);
    final byteData = await img.toByteData(format: ui.ImageByteFormat.png);
    final buffer = byteData.buffer.asUint8List();

    final documentDirectory = await getApplicationDocumentsDirectory();
    File file = File(
        "${documentDirectory.path}/${DateTime.now().toUtc().toIso8601String()}.png");
    file.writeAsBytesSync(buffer);

    return file;
  }

  Canvas _drawCanvas(Size size, Canvas canvas) {
    final Rect circle = Rect.fromCircle(
        center: Offset(size.width / 2, size.width / 2),
        radius: math.min(size.width, size.height) / 2);

    Path path = Path()..addOval(circle);

    canvas.clipPath(path);

    canvas.drawImage(_image, Offset.zero, Paint());

    return canvas;
  }
}

I'm not using any widget, perhaps it is related?
Here is my code:
class CircleCropper {
  ui.Image _image;

  Future<File> crop(File file) async {
    _image = await _loadImage(file);

    return _saveCanvas(Size(_image.width.toDouble(), _image.height.toDouble()));
  }

  Future<ui.Image> _loadImage(File file) async {
    final _img = file.readAsBytesSync();

    final Completer<ui.Image> completer = Completer();
    ui.decodeImageFromList(_img, (ui.Image img) {
      completer.complete(img);
    });
    return completer.future;
  }

  Future<File> _saveCanvas(Size size) async {
    final pictureRecorder = ui.PictureRecorder();

    final canvas = Canvas(pictureRecorder);

    _drawCanvas(size, canvas);

    final pic = pictureRecorder.endRecording();
    ui.Image img = await pic.toImage(_image.width, _image.height);
    final byteData = await img.toByteData(format: ui.ImageByteFormat.png);
    final buffer = byteData.buffer.asUint8List();

    final documentDirectory = await getApplicationDocumentsDirectory();
    File file = File(
        "${documentDirectory.path}/${DateTime.now().toUtc().toIso8601String()}.png");
    file.writeAsBytesSync(buffer);

    return file;
  }

  Canvas _drawCanvas(Size size, Canvas canvas) {
    final Rect circle = Rect.fromCircle(
        center: Offset(size.width / 2, size.width / 2),
        radius: math.min(size.width, size.height) / 2);

    Path path = Path()..addOval(circle);

    canvas.clipPath(path);

    canvas.drawImage(_image, Offset.zero, Paint());

    return canvas;
  }
}

@themadmrj
Where are you calling CircleCropper class ? Can you provide full main.dart code that we can copy paste and run to see the issue ?

@themadmrj
Where are you calling CircleCropper class ? Can you provide full main.dart code that we can copy paste and run to see the issue ?

@darshankawar the class is called to generate a circle cropped image to display in the notification tray.
This method gets called to generate the circle cropped image:
/// Downloads an image to display in the notification.
/// Uses the cache manager.
/// Saves a new circle cropped image if specified.
Future<File> _downloadFile(String url, {bool cropCircle = false}) async {
  final file = CustomCacheManager().getSingleFile(url);
  if (!cropCircle) return file;
  return CircleCropper().crop(await file);
}

Like so:
  showNotificationInSystemTray(
    title: _title,
    body: _body,
    image: await _downloadFile(data["image"], cropCircle: true),
    payload: payload,
    isForeground: isForeground);

The method that build the notification:
  void showNotificationInSystemTray({
    String title,
    String body,
    File image,
    NotificationPayload payload,
    bool isForeground,
  }) async {

    final AndroidNotificationDetails androidPlatformChannelSpecifics =
    AndroidNotificationDetails(AppConstants.CHANNEL_ID,
        'App channel',
        'Main app channel',
        enableVibration: true,
        channelShowBadge: true,
        playSound: true,
        largeIcon: image != null ? FilePathAndroidBitmap(image.path) : null,
        showWhen: false);
    final IOSNotificationDetails iosNotificationDetails =
    IOSNotificationDetails(
        presentBadge: true,
        presentSound: true,
        attachments:
        image != null ? [IOSNotificationAttachment(image.path)] : null);
    final NotificationDetails platformChannelSpecifics = NotificationDetails(
        android: androidPlatformChannelSpecifics, iOS: iosNotificationDetails);
    await serviceLocator<FlutterLocalNotificationsPlugin>().show(
        0, title, body, platformChannelSpecifics,
        payload: json.encode(payload));
  }

I can try a build a fully working main.dart, but it will take some time since I have to replicate the use of firebase messaging and everything.

@darshankawar the class is called to generate a circle cropped image to display in the notification tray.
This method gets called to generate the circle cropped image:
/// Downloads an image to display in the notification.
/// Uses the cache manager.
/// Saves a new circle cropped image if specified.
Future<File> _downloadFile(String url, {bool cropCircle = false}) async {
  final file = CustomCacheManager().getSingleFile(url);
  if (!cropCircle) return file;
  return CircleCropper().crop(await file);
}

Like so:
  showNotificationInSystemTray(
    title: _title,
    body: _body,
    image: await _downloadFile(data["image"], cropCircle: true),
    payload: payload,
    isForeground: isForeground);

The method that build the notification:
  void showNotificationInSystemTray({
    String title,
    String body,
    File image,
    NotificationPayload payload,
    bool isForeground,
  }) async {

    final AndroidNotificationDetails androidPlatformChannelSpecifics =
    AndroidNotificationDetails(AppConstants.CHANNEL_ID,
        'App channel',
        'Main app channel',
        enableVibration: true,
        channelShowBadge: true,
        playSound: true,
        largeIcon: image != null ? FilePathAndroidBitmap(image.path) : null,
        showWhen: false);
    final IOSNotificationDetails iosNotificationDetails =
    IOSNotificationDetails(
        presentBadge: true,
        presentSound: true,
        attachments:
        image != null ? [IOSNotificationAttachment(image.path)] : null);
    final NotificationDetails platformChannelSpecifics = NotificationDetails(
        android: androidPlatformChannelSpecifics, iOS: iosNotificationDetails);
    await serviceLocator<FlutterLocalNotificationsPlugin>().show(
        0, title, body, platformChannelSpecifics,
        payload: json.encode(payload));
  }

I can try a build a fully working main.dart, but it will take some time since I have to replicate the use of firebase messaging and everything.

@themadmrj
yours seems to be a snippet from production code rather than a minimal code sample
does this new code sample work for you?

@themadmrj
yours seems to be a snippet from production code rather than a minimal code sample
does this new code sample work for you?

@themadmrj
As mentioned above, we would need a minimal complete reproducible code sample without any 3rd party plugins and that we can simply copy paste and run to see the issue. It doesn't need to use Firebase plugins. You may clone your above code sample to have a minimal use case that'll be enough to replicate the issue.
Thanks.

@themadmrj
As mentioned above, we would need a minimal complete reproducible code sample without any 3rd party plugins and that we can simply copy paste and run to see the issue. It doesn't need to use Firebase plugins. You may clone your above code sample to have a minimal use case that'll be enough to replicate the issue.
Thanks.

Turns out it has nothing to do with notifications, but only with calling the method while the app is in the background. In the following example, you'll see a circle cropped image nicely displayed when the file is fetched while the app is in the foreground. As soon as you background the app, the file is fetched again, but this time the cropping process fails.
Here is the full main.dart
You will need package:path_provider though to save the file.
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'dart:async';
import 'dart:io';
import 'dart:ui' as ui;
import 'dart:math' as math;

import 'package:path_provider/path_provider.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

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

class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
  File _file;

  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance.addObserver(this);
    fetchFileAndCrop();
  }

  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    if (state == AppLifecycleState.paused) {
      fetchFileAndCrop();
    }
  }

  void fetchFileAndCrop() {
    _downloadFile().then((file) => CircleCropper().crop(file).then((croppedFile) {
      _file = croppedFile;
      if (mounted) setState(() {});
    }));
  }

  Future<File> _downloadFile() async {
    var request = await HttpClient().getUrl(Uri.parse("https://i.pinimg.com/originals/f6/97/39/f69739c39850da2797a365c4c76b4009.jpg"));
    var response = await request.close();
    var bytes = await consolidateHttpClientResponseBytes(response);
    String dir = (await getApplicationDocumentsDirectory()).path;
    File file = new File('$dir/bird.jpg');
    await file.writeAsBytes(bytes);
    return file;
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
          child: _file != null ? Image.file(_file) : Container()),
    );
  }

  @override
  void dispose() {
    WidgetsBinding.instance.removeObserver(this);
    super.dispose();
  }
}

class CircleCropper {
  ui.Image _image;

  Future<File> crop(File file) async {
    _image = await _loadImage(file);

    return _saveCanvas(Size(_image.width.toDouble(), _image.height.toDouble()));
  }

  Future<ui.Image> _loadImage(File file) async {
    final _img = file.readAsBytesSync();

    final Completer<ui.Image> completer = Completer();
    ui.decodeImageFromList(_img, (ui.Image img) {
      completer.complete(img);
    });
    return completer.future;
  }

  Future<File> _saveCanvas(Size size) async {
    final pictureRecorder = ui.PictureRecorder();

    final canvas = Canvas(pictureRecorder);

    _drawCanvas(size, canvas);

    final pic = pictureRecorder.endRecording();
    ui.Image img = await pic.toImage(_image.width, _image.height);
    final byteData = await img.toByteData(format: ui.ImageByteFormat.png);
    final buffer = byteData.buffer.asUint8List();

    final documentDirectory = await getApplicationDocumentsDirectory();
    File file = File(
        "${documentDirectory.path}/${DateTime.now().toUtc().toIso8601String()}.png");
    file.writeAsBytesSync(buffer);

    return file;
  }

  Canvas _drawCanvas(Size size, Canvas canvas) {
    final Rect circle = Rect.fromCircle(
        center: Offset(size.width / 2, size.width / 2),
        radius: math.min(size.width, size.height) / 2);

    Path path = Path()..addOval(circle);

    canvas.clipPath(path);

    canvas.drawImage(_image, Offset.zero, Paint());

    return canvas;
  }
}

Turns out it has nothing to do with notifications, but only with calling the method while the app is in the background. In the following example, you'll see a circle cropped image nicely displayed when the file is fetched while the app is in the foreground. As soon as you background the app, the file is fetched again, but this time the cropping process fails.
Here is the full main.dart
You will need package:path_provider though to save the file.
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'dart:async';
import 'dart:io';
import 'dart:ui' as ui;
import 'dart:math' as math;

import 'package:path_provider/path_provider.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

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

class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
  File _file;

  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance.addObserver(this);
    fetchFileAndCrop();
  }

  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    if (state == AppLifecycleState.paused) {
      fetchFileAndCrop();
    }
  }

  void fetchFileAndCrop() {
    _downloadFile().then((file) => CircleCropper().crop(file).then((croppedFile) {
      _file = croppedFile;
      if (mounted) setState(() {});
    }));
  }

  Future<File> _downloadFile() async {
    var request = await HttpClient().getUrl(Uri.parse("https://i.pinimg.com/originals/f6/97/39/f69739c39850da2797a365c4c76b4009.jpg"));
    var response = await request.close();
    var bytes = await consolidateHttpClientResponseBytes(response);
    String dir = (await getApplicationDocumentsDirectory()).path;
    File file = new File('$dir/bird.jpg');
    await file.writeAsBytes(bytes);
    return file;
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
          child: _file != null ? Image.file(_file) : Container()),
    );
  }

  @override
  void dispose() {
    WidgetsBinding.instance.removeObserver(this);
    super.dispose();
  }
}

class CircleCropper {
  ui.Image _image;

  Future<File> crop(File file) async {
    _image = await _loadImage(file);

    return _saveCanvas(Size(_image.width.toDouble(), _image.height.toDouble()));
  }

  Future<ui.Image> _loadImage(File file) async {
    final _img = file.readAsBytesSync();

    final Completer<ui.Image> completer = Completer();
    ui.decodeImageFromList(_img, (ui.Image img) {
      completer.complete(img);
    });
    return completer.future;
  }

  Future<File> _saveCanvas(Size size) async {
    final pictureRecorder = ui.PictureRecorder();

    final canvas = Canvas(pictureRecorder);

    _drawCanvas(size, canvas);

    final pic = pictureRecorder.endRecording();
    ui.Image img = await pic.toImage(_image.width, _image.height);
    final byteData = await img.toByteData(format: ui.ImageByteFormat.png);
    final buffer = byteData.buffer.asUint8List();

    final documentDirectory = await getApplicationDocumentsDirectory();
    File file = File(
        "${documentDirectory.path}/${DateTime.now().toUtc().toIso8601String()}.png");
    file.writeAsBytesSync(buffer);

    return file;
  }

  Canvas _drawCanvas(Size size, Canvas canvas) {
    final Rect circle = Rect.fromCircle(
        center: Offset(size.width / 2, size.width / 2),
        radius: math.min(size.width, size.height) / 2);

    Path path = Path()..addOval(circle);

    canvas.clipPath(path);

    canvas.drawImage(_image, Offset.zero, Paint());

    return canvas;
  }
}

https://user-images.githubusercontent.com/67046386/104279056-aea5d880-54cf-11eb-832e-98e4043b8bb8.mov

flutter doctor -v
[✓] Flutter (Channel beta, 1.25.0-8.2.pre, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-IN)
    • Flutter version 1.25.0-8.2.pre at /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision b0a2299859 (6 days ago), 2021-01-05 12:34:13 -0800
    • Engine revision 92ae191c17
    • Dart version 2.12.0 (build 2.12.0-133.2.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (3 available)
    • sdk gphone x86 64 arm64 (mobile)    • emulator-5554
      • android-x64    • Android 11 (API 30) (emulator)
    • iPhone SE (2nd generation) (mobile) • 6C85835D-FBFD-4AB3-8DE8-B4FAD35E5367
      • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
    • Chrome (web)                        • chrome
      • web-javascript • Google Chrome 87.0.4280.141

• No issues found!

https://user-images.githubusercontent.com/67046386/104279056-aea5d880-54cf-11eb-832e-98e4043b8bb8.mov

flutter doctor -v
[✓] Flutter (Channel beta, 1.25.0-8.2.pre, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-IN)
    • Flutter version 1.25.0-8.2.pre at /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision b0a2299859 (6 days ago), 2021-01-05 12:34:13 -0800
    • Engine revision 92ae191c17
    • Dart version 2.12.0 (build 2.12.0-133.2.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (3 available)
    • sdk gphone x86 64 arm64 (mobile)    • emulator-5554
      • android-x64    • Android 11 (API 30) (emulator)
    • iPhone SE (2nd generation) (mobile) • 6C85835D-FBFD-4AB3-8DE8-B4FAD35E5367
      • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
    • Chrome (web)                        • chrome
      • web-javascript • Google Chrome 87.0.4280.141

• No issues found!

triage: We may lose the GLContext when backgrounded.
We should at least write a test for this, and if it fails, fix the issue.

triage: We may lose the GLContext when backgrounded.
We should at least write a test for this, and if it fails, fix the issue.

@dnfield Is this the same as https://github.com/flutter/flutter/issues/64558 ?

@dnfield Is this the same as https://github.com/flutter/flutter/issues/64558 ?

They might be related although it's still not clear to me what's causing that one. I was not able to reproduce it.
It could be that somehow GL contexts are getting mixed up or recreated or something, and we no longer have the right GL contexgt to render the image.

They might be related although it's still not clear to me what's causing that one. I was not able to reproduce it.
It could be that somehow GL contexts are getting mixed up or recreated or something, and we no longer have the right GL contexgt to render the image.

@dnfield Canvas drawImage not working from running in background（on Android）！test:
//android_intent: ^0.3.7+7
import 'package:android_intent/android_intent.dart';
import 'dart:async';
import 'dart:ui' as ui;

import 'package:flutter/material.dart';

const _url =
    'https://cdn.omlet.co.uk/images/originals/worlds_most_popular_pet_bird.jpg';

class NetworkImageRecorder {
  final NetworkImage image;
  const NetworkImageRecorder({this.image});

  Future<Image> call() async {
    final completer = Completer<ImageInfo>();
    final recorder = ui.PictureRecorder();

    image.resolve(ImageConfiguration()).addListener(ImageStreamListener(
        (ImageInfo info, bool _) => completer.complete(info)));
    AndroidIntent(
    action: 'android.intent.action.MAIN',
    category: 'android.intent.category.HOME').launch();
    await Future.delayed(const Duration(seconds: 2));
    Canvas(recorder)
      ..drawImage((await completer.future).image, Offset.zero, Paint());

    return Image.memory(
        (await (await recorder.endRecording().toImage(1000, 1000))
                .toByteData(format: ui.ImageByteFormat.png))
            .buffer
            .asUint8List());
  }
}

const _decoder = NetworkImageRecorder(image: NetworkImage(_url));

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) => MaterialApp(
        home: Material(
          child: Center(
            child: FutureBuilder<Image>(
              future: _decoder(),
              builder: (context, image) => !image.hasData
                  ? const CircularProgressIndicator()
                  : image.hasError
                      ? const Icon(Icons.error)
                      : image.data,
            ),
          ),
        ),
      );
}

@dnfield Canvas drawImage not working from running in background（on Android）！test:
//android_intent: ^0.3.7+7
import 'package:android_intent/android_intent.dart';
import 'dart:async';
import 'dart:ui' as ui;

import 'package:flutter/material.dart';

const _url =
    'https://cdn.omlet.co.uk/images/originals/worlds_most_popular_pet_bird.jpg';

class NetworkImageRecorder {
  final NetworkImage image;
  const NetworkImageRecorder({this.image});

  Future<Image> call() async {
    final completer = Completer<ImageInfo>();
    final recorder = ui.PictureRecorder();

    image.resolve(ImageConfiguration()).addListener(ImageStreamListener(
        (ImageInfo info, bool _) => completer.complete(info)));
    AndroidIntent(
    action: 'android.intent.action.MAIN',
    category: 'android.intent.category.HOME').launch();
    await Future.delayed(const Duration(seconds: 2));
    Canvas(recorder)
      ..drawImage((await completer.future).image, Offset.zero, Paint());

    return Image.memory(
        (await (await recorder.endRecording().toImage(1000, 1000))
                .toByteData(format: ui.ImageByteFormat.png))
            .buffer
            .asUint8List());
  }
}

const _decoder = NetworkImageRecorder(image: NetworkImage(_url));

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) => MaterialApp(
        home: Material(
          child: Center(
            child: FutureBuilder<Image>(
              future: _decoder(),
              builder: (context, image) => !image.hasData
                  ? const CircularProgressIndicator()
                  : image.hasError
                      ? const Icon(Icons.error)
                      : image.data,
            ),
          ),
        ),
      );
}

That's really helpful, thanks.
I'm pretty certain this has to do with some mixup about the GL context(s) when in the background. I'll try to debug a little further.

That's really helpful, thanks.
I'm pretty certain this has to do with some mixup about the GL context(s) when in the background. I'll try to debug a little further.

Problem definitely goes away if you disable the resource context.

Problem definitely goes away if you disable the resource context.

@dnfield

Problem definitely goes away if you disable the resource context.

How to do disable the resource context？

Sorry that's more of a debugging note for myself.  There's no way to do it without building a custom engine

Sorry that's more of a debugging note for myself. There's no way to do it without building a custom engine

@dnfield Looking forward to an official fix.

https://github.com/flutter/engine/pull/24317 fixes this locally but needs some refinement.

flutter/engine#24317 fixes this locally but needs some refinement.

Nice! Really hope the final version comes soon!

Any change the fix will be merged soon?

The developer’s post said he went on vacation.

The developer’s post said he went on vacation.

18 days ago, I think that vacation is over lol

Same issue here. Canvas drawing does not work properly.

The developer has returned to work, I believe it will be merged soon!

That is good news! Hopefully it gets fixed soon! Thanks for the hard work!
However, if you cannot wait for the fix, and are planning on doing some basic overlaying, you can try image stacking. It worked for my location app as I simply stacked the pin as an image on top of the floor plan. However, I am a beginner so I have no idea whether I am doing things the proper way. Any suggestions are appreciated! Anyways, hope it helps.

Sorry for the delay. I'm back to work this week and hope to get a fix for this merged soon. I had very spotty availability for a little while there while taking care of a newborn :)

look forward to

Ok. Thanks to some help from @jason-simmons I'm seeing that it's Rasterizer::DoMakeRasterSnapshot that's seeing GPU access being enabled but no surface to work with. It endds up going down a software rasterization path which then later gets mixed strangely with GPU operations and things break down.
I have a very hacky patch locally that uses the resource context in the background, and while it fixes this bug I think it introduces some other issues.
I'd like to propose a short term solution of disabling GPU access when the surface is destroyed, and a longer term solution of figuring out how to make the rasterizer work better in this case where we can still access the GPU but need to do one of the following:

Make the rasterizer aware of the IO thread and properly use it and its GL context
Make the raster thread context maintain a 1x1 pbuffer instead of completely getting destroyed when the application goes to the background.

Either of those options are a fair amount of work, especially around testing and making sure it's done in such a way that does not break other platforms (particularly iOS on the GL backend).

To be clearer as well, the real problem here is Picture.toImage (and Scene.toImage), not Canvas.drawImage.

To be clearer as well, the real problem here is Picture.toImage (and Scene.toImage), not Canvas.drawImage.

waiting fixs.

Here's the smallest test I've been able to write that demonstrates this.
import 'dart:async';
import 'dart:typed_data';
import 'dart:ui';

Future<void> main() async {
  // MainActivity has been modified to move us to back in onCreate.

  // A single pixel image.
  const int width = 1;
  final Uint8List pixels = Uint8List.fromList(List<int>.generate(
    width * width * 4,
    (int index) => index % 255,
    growable: false,
  ));

  // As long as we're using the GL backend, this will go down a path that uses
  // a cross context image.
  final Completer<Image> imageCompleter = Completer<Image>();
  decodeImageFromPixels(
    pixels,
    width,
    width,
    PixelFormat.rgba8888,
    (Image image) {
      imageCompleter.complete(image);
    },
  );
  final Image image = await imageCompleter.future;

  // If this code path fails to also use a valid GL context, the image will fail
  // to render when we resume.
  final PictureRecorder recorder = PictureRecorder();
  final Canvas canvas = Canvas(recorder);
  canvas.drawImage(image, Offset.zero, Paint());
  final Picture picture = recorder.endRecording();
  final Image newImage = await picture.toImage(width, width);
  final ByteData data = (await newImage.toByteData())!;
  final Uint8List newPixels = data.buffer.asUint8List();

  for (int index = 0; index < pixels.length; index += 1) {
    if (pixels[index] != newPixels[index]) {
      print('original pixels: $pixels');
      print('new pixels:      $newPixels');
      throw Exception('Pixels do not match starting at position $index');
    }
  }
}

Continuing to poke at a fix for this.

@dnfield Is this issue still being followed up?

I do plan to get back to this at some point, I've just ahd some higher priority work come through in the mean time.

Ok. I've cleaned up the patch I was working on and resolved the threading issues I was seeing. I just have to figure out the best way to get my test case into a test harness.

Quick update: I have not really fully resolved the threading issues yet.
The attempt I linked last week failed if you try to run my test program without ever letting the application show on screen. The most obvious way to fix that involves some unsafe access to the PlatformView. I'm working on figuring out now what to do about that.

Ok, threading issues are indeed resolved.
Right now this is soft-blocked on https://github.com/flutter/flutter/issues/53455 - I'm working on fixing up some build rules there so I can add a proper test harness for this. Another less desirable option would be to add the test harness downstream in flutter/flutter. If I get too blocked on the harness for this I will reconsider doing that.

Added a test to the PR, will now need to go through review.

@dnfield
I use the latest version of Flutter:
[√] Flutter (Channel master, 2.4.0-5.0.pre.79, on Microsoft Windows [Version 10.0.22000.71], locale zh-CN)
    • Flutter version 2.4.0-5.0.pre.79 at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 72ae6e236e (3 hours ago), 2021-07-16 13:46:03 -0400
    • Engine revision 26b6520a0c
    • Dart version 2.14.0 (build 2.14.0-321.0.dev)
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

The bug has not been fixed.

Correct - the fix is still under review.

Correct - the fix is still under review.

Look forward to fix.

The fix has landed in the engine - it will likely take a day or so to roll into the framework, and then a bit longer to become available on dev/beta/stable. But once it's in the framework you should be able to test it out on master.

@dnfield
I use the latest version of Flutter:
Flutter 2.4.0-5.0.pre.127 • channel master • https://github.com/flutter/flutter.git
Framework • revision 0a8c03dc8a (22 minutes ago) • 2021-07-21 12:51:43 -0700
Engine • revision 224fa96049
Tools • Dart 2.14.0 (build 2.14.0-339.0.dev)

The bug has not been fixed.

Yes - it didn't get rolled through yet, had to be reverted due to some flakiness in the test, and is getting relanded here: https://github.com/flutter/engine/pull/27629

@dnfield
Great, it has been fixed in the latest master branch.
Flutter 2.4.0-5.0.pre.137 • channel master • https://github.com/flutter/flutter.git
Framework • revision ae851a730d (4 minutes ago) • 2021-07-21 17:41:03 -0700
Engine • revision 9970b94793
Tools • Dart 2.14.0 (build 2.14.0-341.0.dev)


allow trait method implementations to add ensures clauses

This is completely sound since it lets the trait method implementation promise more than the generic method did.
This will be useful for adding more interesting postconditions when implementing traits from std.

Sounds like a good idea.
This gives ill-typed AIR code: error 'in call to ens%scratch!T.f., expected 5 arguments, found 7 arguments' in expression '(ens%scratch!T.f. $ TYPE%scratch!S. B&. B& B&. B& b~2@)':
trait T<A> {
    proof fn f(a: &A) ensures true;
}
struct S;
impl<B> T<B> for S {
    proof fn f(b: &B) ensures true {  }
}

OK, I had a mistaken assumption that the typ_args for the generic function always contained the typ_args for the non-generic function. This should be fixed now


Clean Code for Blurring and Upscaling Process

I'd like to discuss about changing name of functions and variables related to the upscaling process.

expand_image method in Painting class.

I think expand_image is a good to describe the behavior,
but the upscale_image looks better to express Upscaling Process.

target_size parameter in expand_image method.

it can be mislead users think that they are changing image size as fixed size.
since we're scaling the image, upscaling_ratio seems right. and its type should be float.

blurring method in Painting Class.

A function's name should clearly descible its behavior and its target.
I think blurring should include the target, so **blur_image is more correct.**

what do you think about those? I'd like to hear.

Oh that is gooooood idea.
3 things that you suggest is nive opinion.
Can you help me? try change and PR to us.
Thank you :)

resolved with PR #18
in addition, I'd like to discuss 2 things.

remove is_upscale bool flag.

upscale_image has ratio parameter for now, and I handled that do not perform upscaling image if users sets it as 1.0.
so, why don't we remove is_upscale? then it'll makes user handles upscaling intense easier.
but, default value that is_upscale is false, so idk how do I set default upscaling_ratio value if is_upscale removed.

auto calculation in upscaling.

to fit the image size to 5000 pixel, we are calculating ratio an integer value.
BUT, if the image size is 4999 pixel, the result will be 9998 pixel. is the calculation what you intended?
if not, just calculate it an float. it will be more accurate.

Thanks :)


Remove rootfsSizeInGBLabel and replaced it by rootfsSizeInBytesLabel

Signed-off-by: yanggang<EMAIL_ADDRESS>/kind cleanup
/kind bug
Remove deprecated internal field rootfsSizeInGBLabel and replaced it by rootfsSizeInBytesLabel containerd.io/snapshot/windows/rootfs.sizebytes.
And change the read label in snapshotInfo.Labels , not the key "containerd.io/snapshot/io.microsoft.container.storage.rootfs.size-gb"

@yanggangtony I think we can look at this again now that 1.7 is in, please fix the merge conflicts

Let it close first .
I will do containerd in a few days.


Use locally installed library types, not vendored stubs?

Hi! I think my issue is similar to https://github.com/microsoft/pylance-release/issues/1197, but a little different??
I have cloned the pandas library (https://github.com/pandas-dev/pandas) into a directory at /workspaces/pandas/, and set up a dev environment following their instructions. This includes installing the library as editable (eg pip install -e .). Now, my python interpreter finds the local version of the source code at /workspaces/pandas/pandas, which is great.
However, pylance is not using this local copy for type hints. It is using the stubs under (I'm in a devcontainer in docker, ignore the root weirdness) /root/.vscode-server/extensions/ms-python.vscode-pylance-2022.3.0/dist/bundled/stubs/pandas/. The problem is that as I pull in changes from upstream pandas, the types used in pandas change, but pylance keeps looking at the stale, vendored stubs.
My workaround right now is I just symlinked the fresh copy to where pylance goes looking, so pylance actually uses my fresh version (eg ln -s /workspaces/pandas/pandas /root/.vscode-server/extensions/ms-python.vscode-pylance-2022.3.0/dist/bundled/stubs/pandas. But, this isn't ideal.
pandas doesn't currently have a py.typed file, IDK if that is important.
Is this a bug? Do I need to change configuration somewhere? Let me know if this doesn't make sense, it is confusing and I probably didn't explain it super well. Thank you!

I think you've already identified the problem. The current pandas library doesn't have a "py.typed" file, so type checkers like pyright will look for type information elsewhere before falling back on inferring types from the code. This is the behavior dictated by PEP 561. You should be able to solve the problem by adding an empty "py.typed" file to the root of the pandas directory.

Please reopen this issue if the fix suggested above does not work. Thanks

Hi! So I just did a fresh clone and dev install of pandas, trying to reproduce. After cloning, I added a py.typed file manually before doing the pip install steps (https://pandas.pydata.org/docs/dev/development/contributing_environment.html#creating-a-python-environment). I assumed that then the installed version of pandas would have the py.typed, and pylance would pick it up.
Now it does something even weirder? watch the screencapture below. On some of the old API, such as ArrayLike, it picks up the symbol and can follow it to the definition, in the locally installed dev folder. But, on the newer API (ie that isn't yet in the stubs that are vendored with pylance) such as NDFrameT, pylance can't resolve the symbol, even though that symbol is actually defined in the exact same _typing.py file where ArrayLike is!

Is there some other set of steps I need to be doing for pylance to pick up on the py.typed file? reset some cache? I reloaded the vscode window a bunch.


Possible to add optional/additional fields to application in user app?

Does the API endpoint that is called on application submission allow additional fields in the POST (e.g. address, etc. if person doesn't upload resume or does)? I am about to edit the code, but see no documentation for this or on the Bullhorn Developer site.
Current behavior
The API endpoint in questions is:
https://public-rest5.bullhornstaffing.com/rest-services/{swimlane}/apply/{job_id}/raw
With variables:
externalID=Resume
type=Resume
firstName={first}
lastName={last}
email={email}
phone={phone}
format=pdf

Expected behavior
Some documentation on different fields or a link to documentation on editing API endpoint to allow optional fields.

Currently, we do not support any other parameters than the ones that you listed. There are plans to support additional parameters in the future.
For the time being, you can construct a resume (blob) and send that in the POST call. This would be similar to how Apply with LinkedIn works.
Create the resume file
Send the resume(blob) in the POST call

Thanks, appreciate your prompt response!

Hey dshaw002,
I know you closed the issue, but I just wanted to let you know that we would love to see and help out with your work for this feature. Feel free to ask us any questions if you need help. Then once you are finished, you can submit a Pull Request and we will review and merge your feature for the benefit of all.


[VL] Create Hdfs folder in Gluten side when writing hdfs file

Description
Based on the discussions . We create the not existing hdfs folder in Gluten side.

closed by https://github.com/oap-project/gluten/pull/3428


zd3866092: Redact entire email

We send analytics to the cross gov google analytics app too. They (GOV.UK) have some
script that flags when personal information isn't redacted. While we have
redacted the front part of the email (i.e. everything before the "@"), it's
possible the GOV.UK script is still flagging the emails even though the front
part is redacted. Removing the entire email might solve the problem.

it would be better to extract a function and unit test the function than rely on manual testing


Entry is getting created during cf a when the host is taken already

Hi Colleagues,
When user is pushing an app with the same host which is already taken ideally it shouldnot create any entry during cf a.
C:\Users\XXX\Desktop\kibana-me-logs>cf p
Using manifest file C:\Users\XXX\Desktop\kibana-me-logs\manifest.yml
Creating app kibana in org XXX_trial / space dev as XXXX...
OK
Creating route XXXXXXXXXXXX...
OK
FAILED
Server error, status code: 400, error code: 210003, message: The host is taken: kibana
C:\Users\XXX\Desktop\kibana-me-logs>cf a
Getting apps in org XXXX_trial / space dev as XXXX...
OK
name     requested state   instances   memory   disk   urls
kibana   stopped           0/1         128M     1G
BRs, gowrisankar

@gowrisankar22 This behavior is by design. Routes and Apps are separate concepts in Cloud Foundry, because you may want to bind several different routes to the same app. You may also want to "move" routes from app to another, for example, if you're performing a blue-green deploy.
For example, you could success push you app by adding the --hostname (or it's alias -n) to your cf push command, and get the app to run successfully.

Hi @gowrisankar22, I'm going to close the issue here due to inactivity, but feel free to re-open it if you have more questions.