Add artworks count to AreaListItems

@micahwalter I believe this is done now. Though, we don't really have the data to test correctly. But this page shows "0 artworks" for everything https://collections.mplus.org.hk/areas
The logic accounts for plural strings:
const getArtworkCountString  = (artworksLength) => {
  const pluralS = parseInt(artworksLength, 10) !== 1 ? 's' : ''

  return `${artworksLength} artwork${pluralS}`
}


getPoolOfflineMetadata set Cache-Control to "no-store", preventing efficient caching.

cf. https://github.com/input-output-hk/cardano-db-sync/blob/3805d40c3eb448af422ddf4ac024cf95d33f95ad/cardano-smash-server/src/Cardano/SMASH/Server/Impl.hs#L93

This is done in https://github.com/input-output-hk/cardano-db-sync/pull/1092


Prevent Deadlock Queue Fill

So I woke up this morning thinking about this condition.
Given a bounded Clustered Queue, we could end up where our message processor is blocked waiting for a messge processor to unblock the moved or ask commands.
Instead we need to return the processors to operating on the pool. This creates the possibility of temporary thread leakage (for messages that only happen during temporary cluster rebalancing), however this allows us to work on new messages on any worker size meaning we will eventually clear the pool.
I tried a lot of different alternatives, but since we need to wait on the response from the redis server for moved shifts, this appears to be the safest way, and is MUCH safer than what we were doing previously. As we need to ensure work continues through to the server.

Alright, this has been reworked. So we make the cluster slots behavior operate at a higher semantic level than the rest of the commands. As when we refresh we don't want actions to go through the queue but operate independently.
Then we allow work to proceed when we need to resubmit by offering them to the queue, if the queue is full than this is not the
connections problem, we return the error to the user as we can't proceed to do more work. Better to give the user a very rare error on rebalancing than risk deadlocks or leaking resources.
We can add secondary handing on resubmitting under these conditions as well which will make the likelihood of it ever reaching the user smaller.


Create 0000-01-02-ab185491.md

we have created a branch, added a file and the requested a PR.

Okay

Hurrey


Clearer parameter usage instructions

There is no clear guidance on how to use the "verbose" parameter. Current advice states "The Verbose parameter displays a count of all backlogged updates.". I have tried both verbose and /verbose but neither of these appear to work, I get the following errors:
Get-DfsrBacklog : No replicated folders were found on the member. Member name: RACPDCGSC1002 Replicated folder: "*"
Replication group: "verbose"
At line:1 char:1

Get-DfsrBacklog verbose

  + CategoryInfo          : ObjectNotFound: (:) [Get-DfsrBacklog], DfsrException
  + FullyQualifiedErrorId : Get-DfsrBacklog.ReplicatedFolderNotFound,Microsoft.DistributedFileSystemReplication.Comm
 ands.GetDfsrBacklogCommand

Get-DfsrBacklog : No replicated folders were found on the member. Member name: RACPDCGSC1002 Replicated folder: "*"
Replication group: "/verbose"
At line:1 char:1

Get-DfsrBacklog /verbose

  + CategoryInfo          : ObjectNotFound: (:) [Get-DfsrBacklog], DfsrException
  + FullyQualifiedErrorId : Get-DfsrBacklog.ReplicatedFolderNotFound,Microsoft.DistributedFileSystemReplication.Comm
 ands.GetDfsrBacklogCommand

Please clearly define how to use this parameter.

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

ID: 9438ca41-3a69-df95-978e-8777e618202b
Version Independent ID: 731117d6-b101-dd87-1868-ed0bbe93c6be
Content: Get-DfsrBacklog (DFSR)
Content Source: docset/winserver2022-ps/dfsr/Get-DfsrBacklog.md
Product: w10
Technology: windows
GitHub Login: @JasonGerend
Microsoft Alias: jgerend

Seria
Javascrits=java..scrip/dir:http//js-taimes-neuv-roma:ut:8/=
Cfont:(13)visua/basico/blak:plataforma:(Windows)+(kermel)@#import/humor:@0joel empaquet.zlib compremedia y salida bajas la velocidad para que no se dañe
#( en caso de pak) son muchos los factores mas
El de los coques los programas la plataforma que normal mente usan Pero la plataforma es un factor a medias en eso no es se puede esolver facil yo a bri 6
Pak en android 6; siemdo de Windows 10;

Sorry, I do not speak Spanish and the translation into English of this makes no sense at all.

@AreJayAreEm Hello,
Thank you for your feedback. Could you shared the exact command that gives you this error?
Example 3 shows how to use the Verbose parameter.
Let me know if you have any questions.


Query regression in preview 9: Combination of GroupBy, aggregate and let throws

This was reported in the Preview 9 blog post:
This LINQ statement (and other similar statements) was being translated properly till Preview 8:
var queryYearly =
    from h in context.Histories.AsNoTracking() group h by h.HistoryDate.Year into yearGroup
    orderby yearGroup.Key descending
    let Total = yearGroup.Sum(m => m.Fee)
    where Total > 0
    select new
        {
            Year = yearGroup.Key,
            Total
        };

Updated to preview 9 this morning and I am getting the following error:

System.InvalidOperationException  HResult=0x80131509  Message=Processing of the LINQ expression 'GroupBy(KeySelector: DATEPART(year, h.HistoryDate), ElementSelector:EntityShaperExpression: EntityType: Histories ValueBufferExpression:         ProjectionBindingExpression: EmptyProjectionMember IsNullable: False)' by 'RelationalProjectionBindingExpressionVisitor' failed.....

According to @smitpatel:
Let throws us off. If you remove let then it works:
      SELECT DATEPART(year, [b].[HistoryDate]) AS [Year], SUM([b].[Fee]) AS [Total]
      FROM [Blogs] AS [b]
      GROUP BY DATEPART(year, [b].[HistoryDate])
      HAVING SUM([b].[Fee]) > 0
      ORDER BY DATEPART(year, [b].[HistoryDate]) DESC

With let the expression we get is:

value(Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[EFSampleApp.Blog]).AsNoTracking().GroupBy(h => h.HistoryDate.Year).OrderByDescending(yearGroup => yearGroup.Key).Select(yearGroup => new <>f__AnonymousType0`2(yearGroup = yearGroup, Total = yearGroup.Sum(m => m.Fee))).Where(<>h__TransparentIdentifier0 => (<>h__TransparentIdentifier0.Total > 0)).Select(<>h__TransparentIdentifier0 => new <>f__AnonymousType1`2(Year = <>h__TransparentIdentifier0.yearGroup.Key, Total = <>h__TransparentIdentifier0.Total))

Since Select contains reference to grouping which cannot be put in Projection in SelectExpression we throw.

@smitpatel I couldn't see if you created a bug for this, so went ahead and created it with the information you have me. Feel free to edit or close as duplicate as appropriate.

Thanks for reporting this Diego.
I replaced the 'let' clause as a workaround and it's giving the same SQL as with 'let' clause on SQL Profiler. So for the time being i'm good. But it would be nice if it's fixed eventually as the let clause makes LINQ queries cleaner in some cases.

Thanks @jamesport079 for validating the workaround.
Triage decision: we are moving this to the backlog because there is a workaround and fixing the issue would be relatively expensive. We will be monitoring feedback on this and revisit the priority if appropriate.


support a structtag hint to specify that a String should be an address

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

7 of 9 (77.78%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.02%) to 86.417%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

cadence.go
7
9
77.78%

Totals

Change from base Build<PHONE_NUMBER>:
-0.02%

Covered Lines:
3181

Relevant Lines:
3681

💛  - Coveralls


Refactor sqgen-* to standalone library (decoupled from cobra), add lots of tests

For one of my own projects, I wanted to directly call the sqgen-postgres logic, rather than invoke it through a shell command. To do this, I extracted almost all of the sqgen-postgres and sqgen-mysql into the respective sqgen/postgres or sqgen/mysql packages, with a shared sqgen package for simple shared utilities.
As a result, the process of code generation is no longer tied to cobra - the cmd/sqgen-postgres/ and cmd/sqgen-mysql/ packages are now just a thin wrapper around the code generation library in the sqgen/* package.
I also did a decent amount of refactoring within the logic for each of the code generators so that it was a bit easier to test. The few major changes I made were:

No more custom String type, as the QuoteSpace and Export functions were moved into a template.FuncMap and injected into the template - this means that the fields that previously used String can use the string type instead, which simplifies a decent amount of the generation code
The logic for populating the fields of a Table/Function/Field is now a method (called Populate) on the given object. If it needs information about the rest of the functions/tables (i.e. is it a duplicate, is it an overload, etc.), these are passed into the Populate method as arguments - this made the testing for various edge cases a bit simpler.
The generated code is written to an io.Writer, so a writer of any sort can be written to. This is also used for dry-run generation, as os.Stdout is used as the writer, instead of writing to a file.
goimports is added as a dependency, and is used as a library (instead of through a shell command)
For the sqgen-postgres functions command, the pg_catalog.pg_proc.prokind column is not available for Postgres versions lower than 11. I added a check to see which version of Postgres is being generated from (see the queryPgVersion and checkProkindSupport functions in sqgen/postgres/functions.go), and modify the query to use the legacy pg_proc columns to essentially do the same thing as p.prokind = 'f'.

Of course this is a stupid number of changes to add all at once, so I've aimed to test as much of the code as possible, both through unit and integration tests.
In the integration_test.go files, I check the output of the library against the output of sqgen-postgres and sqgen-mysql against the test databases (using the testate) prior to any of the changes that I've made, and there are no differences in the output.
Please let me know if there is anything you'd like me to change/test more, etc. before accepting the PR! I know that this is a large amount of code to change, but the core logic is pretty much the same as before, just structured a bit differently, and with a bunch of tests added.

I've looked at the code, seems good to me. There's some cool tricks in there that I didn't know, like using x/tools/imports to run goimports directly and go/parser to generated code.

Im curious though what's your workflow for calling sqgen from Go code? Are you wiring up golang-migrate to trigger sqgen code generation?

Yeah, that's basically the intended use case - applying migrations would automatically regenerate the schema. I previously had it call sqgen-postgres through a shell command, but calling it through go code seemed a bit more elegant, since I don't have to rely on sqgen-postgres being added to path, and the right version installed etc. - and at little extra cost, just have to open the *sql.DB and the os.File myself.


refactor(pure_pursuit): delete default values

Description
Removed default values defined in declare_parameter function.
pure_pursuit_delete_param.webm
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@TakaHoribe Could you check this PR? :pray:


On demand loading of ScopedRouteConfiguration

Commit Message:
Add a field to the current protobuf of ScopedRouteConfiguration to enable on demand scoped route table loading. The on demand scope route tables will be loaded lazily. The lazy loading feature of route table associated with scope is achieved by extending the current vhds on_demand filter to support lazy loading of RouteConfigurationscoped route discovery service.If a scoped route configuration is set to be loaded lazily, upon a  http request using SRDS, when the corresponding route table of a scope is not found, post a callback to control plane, request the route table from the management server, after the route table has been initialized, continue the filter chain.
Additional Description: Design doc
Risk Level:
Testing: add unit tests and integration test to verifiy behavior changes
Docs Changes:
Release Notes:
[Optional Runtime guard:]
[Optional Fixes #Issue] on demand s/rds
[Optional Deprecated:]

/cc stevenzzzz

gentle ping @lambdai

Yeah, will be good to get @lambdai's take since he is familiar with many of the initialization and thread safety concerns. Thanks.

LGTM modulo coverage validation. @stevenzzzz any additional comments?

LGTM modulo coverage validation. @stevenzzzz any additional comments?

I have been talking to Chaoqin offline regularly, LGTM +1 modulo unresolved replies around clearer comments.


feature:Add bucket_name variable

what

Allow the exact bucket name to be specified, overriding the context.id generated name

why

Allows bucket name to follow different naming convention when required

references

closes #41
this PR is a drop-in replacement for #42, per https://github.com/cloudposse/terraform-aws-lb-s3-bucket/pull/42#issuecomment-876946173

looks like my fork triggers the same permission issue. Closing.


py2exe / python2.7 / syntax error in "yield from" lines

Hi.
I'm a bit confused about my py2exe output right now.
Using ws4py on my webapp works nicely with python2 under windows and linux.
Now I tried to use py2exe which complains about "yield from" statements in ws4py code.
I'm wondering why python2 doesn't complain but py2exe does? Is there some kind of compatibility stuff I'm missing? Because "yield from" is not supported in python2.7 afaik.
Thanks for your response.

I've noticed that I don't use this file and it's most likely for python3 only.

The async_websocket module is used mostly with tulip server, which is for asyncio/tulip on Python 3. py2exe may import it while it should not, if you can put it in a black list, just do it :)


Bug in the implementation of pow

I'm not sure what the preferred way is to contribute to this library, but I'd like to suggest that the implementation for autodiffing pow be updated to the following:
    friend Scalar pow(
            const Scalar& a,
            const int& e)
    {
        TINYAD_CHECK_FINITE_IF_ENABLED_AD(a);
        if constexpr (TINYAD_ENABLE_OPERATOR_LOGGING) TINYAD_DEBUG_VAR(__FUNCTION__);

        if ( e == 0 )
        {
            return chain((PassiveT)1.0,
                        (PassiveT)0.0,
                        (PassiveT)0.0,
                        a);
        }
        else if ( e == 1 )
        {
            return chain( a.val,
                        (PassiveT)1.0,
                        (PassiveT)0.0,
                        a);
        }
        else
        {
            const PassiveT f2 = std::pow(a.val, e - 2);
            const PassiveT f1 = f2 * a.val;
            const PassiveT f = f1 * a.val;

            return chain(
                        f,
                        e * f1,
                        e * (e - 1) * f2,
                        a);

        }

    }

Hi Josh,
Thanks for the suggestion! Do you have an example where the original implementation fails? Or is this a performance optimization?
I think in the case e == 1 it should be chain(a.val, (PassiveT)1.0, (PassiveT)1.0, a). Let me know if you agree.
The best way to contribute is by creating a fork followed by a pull request. This way your contributions can be in your name.
Best
Patrick


Zooming on minimap by pinching zooms whole application

Camunda Modeler Version: 1.8.0

May need to prevent default on pinching.

Fixes it: https://github.com/electron/electron/blob/master/docs/api/web-frame.md#webframesetvisualzoomlevellimitsminimumlevel-maximumlevel

Is this still an issue?


A weird edge case for bleu scoring.

There is an unintuitive functionality of the bleu_score module.
>>> bleu_score.sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(0.5, 0.5))
0.5
>>> bleu_score.sentence_bleu([[1,2,3,4]],[5,6,1,2], weights=(0.5, 0.5))
0.408248290463863
>>> bleu_score.sentence_bleu([[1,2,3,4]],[5,6,2,3], weights=(0, 0.5))
0.5773502691896257
>>> bleu_score.sentence_bleu([[1,2,3,4]],[5,6,7,3], weights=(0, 0.5))
1.0
>>> bleu_score.sentence_bleu([[1,2,3,4]],[5,6,8,7], weights=(0, 0.5))
0

The default SmoothingFunction.method0 skips any fractions that are equal to zero making bleu scores in these cases quite unintuitive. In my opinion this would be more intuitive to have the log(0) evaluate to -inf resulting in the overall bleu score in these cases evaluating to 0. This along with a clearer warning would make this much more intuitive.
To clarify, as seen below it gives a higher bleu for a worse match when i believe it should receive a bleu score of 0.
>>> bleu_score.sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(0.5, 0.5))
0.5
>>> bleu_score.sentence_bleu([[1,2,3,4]],[5,6,1,2], weights=(0.5, 0.5))
0.408248290463863

Just a clarification before diving in. Do you get a warning when you try these fringe cases?

Yes, I receive the warning.

Good. Let's go through the rational of why the outputs are as such:
Firstly, note that un-smoothed BLEU has never been meant for sentence level evaluation, it is advisable to find the optimal smoothing method that your data require, please look at https://github.com/alvations/nltk/blob/develop/nltk/translate/bleu_score.py#L425
If user wants to skip the step to find the optimal smoothing, let's look at the examples you've listed.
First scenario, when your n-gram order is larger than the overlap that exists between the reference and hypothesis, corpus/sentence BLEU will not work in this case. So the results of this cannot be taken into account:
>>> from nltk.translate.bleu_score import sentence_bleu
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(0.5, 0.5))
/usr/local/lib/python2.7/site-packages/nltk/translate/bleu_score.py:490: UserWarning:
Corpus/Sentence contains 0 counts of 2-gram overlaps.
BLEU scores might be undesirable; use SmoothingFunction().
  warnings.warn(_msg)
0.5

Next we have an example where there is 1 bigram and 2 unigram existing overlaps the reference and hypothesis. Seems like it gives a reasonable score.
>>> sentence_bleu([[1,2,3,4]],[5,6,1,2], weights=(0.5, 0.5))
0.408248290463863

Going to the next example using weights=(0, 0.5), this is rather un-intuitive because not assigning scores for lower n-gram defeats the purpose of BLEU where we are matching geometrically across the order of n-grams. But lets see:
>>> sentence_bleu([[1,2,3,4]],[5,6,2,3], weights=(0, 0.5))
0.5773502691896257

From we see that it has the same 1 bigram and 2 unigram match but have a higher score. And this is because the we weigh the bigrams heavier than the unigrams and unigrams has 0 influence. Since there are lesser bigrams than unigrams, naturally the resulting BLEU is higher.
>>> import math
>>> from nltk import ngrams
>>> from nltk.translate.bleu_score import modified_precision

>>> ref, hyp = [1,2,3,4], [5,6,2,3]

>>> list(ngrams(ref, 2)) # 3 bigrams.
[(1, 2), (2, 3), (3, 4)]
>>> list(ngrams(ref, 1)) # 4 unigrams.
[(1,), (2,), (3,), (4,)]

The description of more matches = better BLEU score is intuitive but actually this is only part of the BLEU formulation reflected in the modified precision:
>>> modified_precision([ref], hyp, 2)
Fraction(1, 3)
>>> modified_precision([ref], hyp, 1)
Fraction(2, 4)

>>> m1 = modified_precision([ref], hyp, 1)
>>> m2 = modified_precision([ref], hyp, 2)

If we move forward to the geometric logarithmic mean, we see the modified precision getting a little distorted:
>>> import math
>>> math.log(m1)
-0.6931471805599453
>>> math.log(m2)

-1.0986122886681098
>>> math.exp(0.5 * math.log(m1) + 0.5 * math.log(m2))
0.408248290463863
>>> math.exp(0 * math.log(m1) + 0.5 * math.log(m2))
0.5773502691896257

So from the first 3 examples you've given, the first is invalid (thus the warning), the 2nd and 3rd might not be easy to understand but they are mathematically sound:
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(0.5, 0.5))
0.5
>>> sentence_bleu([[1,2,3,4]],[5,6,1,2], weights=(0.5, 0.5))
0.408248290463863
>>> sentence_bleu([[1,2,3,4]],[5,6,2,3], weights=(0, 0.5))
0.5773502691896257

Note that I've skipped the brevity penalty step but trust me it's 1.0 since the length of the hypothesis is the same as the reference. Please test out for yourself too =)
Moving on, to the 4th example, we use the same modified precision, then compute the geometric logarithmic mean step:
>>> sentence_bleu([[1,2,3,4]],[5,6,7,3], weights=(0, 0.5))
/Users/liling.tan/git-stuff/nltk-alvas/nltk/translate/bleu_score.py:491: UserWarning:
Corpus/Sentence contains 0 counts of 2-gram overlaps.
BLEU scores might be undesirable; use SmoothingFunction().
  warnings.warn(_msg)
1.0

>>> ref, hyp = [1,2,3,4], [5,6,7,3]
>>> modified_precision([ref], hyp, 1)
Fraction(1, 4)
>>> modified_precision([ref], hyp, 2)
Fraction(0, 3)
>>> m1 = modified_precision([ref], hyp, 1)
>>> m2 = modified_precision([ref], hyp, 2)

>>> math.exp(0 * math.log(m1) + 0.5 * math.log(m2))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: math domain error

So the usage of bigram BLEU is not valid too without the proper smoothing function.
Perhaps, the warning didn't show up when you use the BLEU because the warning filter is set to default. I think it's a good idea to force this warning but it does irritate users when it appears too often in a fringe dataset.
Last example is valid, since it returns the expect 0 for 0 matching unigram. In summary:
>>> from nltk.translate.bleu_score import sentence_bleu

# Invalid use of BLEU.
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(0.5, 0.5))
/Users/liling.tan/git-stuff/nltk-alvas/nltk/translate/bleu_score.py:491: UserWarning:
Corpus/Sentence contains 0 counts of 2-gram overlaps.
BLEU scores might be undesirable; use SmoothingFunction().
  warnings.warn(_msg)
0.5

# Valid BLEU score.
>>> sentence_bleu([[1,2,3,4]],[5,6,1,2], weights=(0.5, 0.5))
0.408248290463863

# Logical BLEU score.
>>> sentence_bleu([[1,2,3,4]],[5,6,2,3], weights=(0, 0.5))
0.5773502691896257

# Invalid use of BLEU.
>>> sentence_bleu([[1,2,3,4]],[5,6,7,3], weights=(0, 0.5))
/Users/liling.tan/git-stuff/nltk-alvas/nltk/translate/bleu_score.py:491: UserWarning:
Corpus/Sentence contains 0 counts of 2-gram overlaps.
BLEU scores might be undesirable; use SmoothingFunction().
  warnings.warn(_msg)
1.0

# Valid BLEU score.
>>> sentence_bleu([[1,2,3,4]],[5,6,8,7], weights=(0, 0.5))
0

Now going to the last 2 example. Actually, the first instance is an invalid use of BLEU, you should see this:
>>> from nltk.translate.bleu_score import sentence_bleu

>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(0.5, 0.5))
/Users/liling.tan/git-stuff/nltk-alvas/nltk/translate/bleu_score.py:491: UserWarning:
Corpus/Sentence contains 0 counts of 2-gram overlaps.
BLEU scores might be undesirable; use SmoothingFunction().
  warnings.warn(_msg)
0.5

>>> sentence_bleu([[1,2,3,4]],[5,6,1,2], weights=(0.5, 0.5))
0.408248290463863

Whenever the warning shows up at the nth ngram order (in this case, bigrams), it's usually an misuse of BLEU and it will **only(( take into the account the weights of the n-1th order (in this case, the unigrams).
So if we see the first example with the only weights for the unigram:
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(0,))
1.0

The geometric logarithmic mean is rather mind-warping but the key is the sum of the weights to the n-gram orders must sum to 1.0 to fit the BLEU original idea. E.g.
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(1,))
0.25

In general, whenever the warning pops up, it's an un-BLEU situation where BLEU will fail and there's no active research to patch this other this particular pain, other than researchers creating new "better" scores that has other achilles heel.
In the case that the warning pops-up and user needs a quick-fix, the emulate_multibleu option exist but the weights must be set to the default uniform weights for all 4-grams, e.g.
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], emulate_multibleu=True)
0.0

And if we use multi-bleu.perl:
$ cat ref
1 2 3 4
$ cat hyp
5 6 8 1
$ perl ~/mosesdecoder/scripts/generic/multi-bleu.perl ref < hyp
BLEU = 0.00, 25.0/0.0/0.0/0.0 (BP=1.000, ratio=1.000, hyp_len=4, ref_len=4)

So the question then becomes:

Do we need a feature to automatically readjust weights if the weights users give is "un-BLEU-like"? Currently, the auto_reweigh function works only with the default weights = (0.25, 0.25, 0.25, 0.25).

I'm against this idea since (i) users using custom weights should better understand the BLEU mechanism and tune the weights appropriately if necessary and (ii) if users doesn't want the hassle, they should use the default weights and/or emulate_multibleu option

Should the warning filter be set to always whenever a user uses BLEU?

If there's any active research and proven solution(s) to these sentence BLEU fringe cases, we'll be open to re-implementation of these solutions.
But if it's hot-fixes that results in more wack-a-moles situation of BLEU, then I think the current BLEU version is stable enough with the warnings in-place =)

@benleetownsend I hope the explanation makes sense and show that the current BLEU implementation with the various options is sufficient to overcome the examples you've given.

Thankyou for your detailed response. I agree with everything you've said however I guess my underlying point is that to me the results when you back off to n-1 grams just seems wrong based on the literature I have seen.
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(0.5, 0.5))
/Users/liling.tan/git-stuff/nltk-alvas/nltk/translate/bleu_score.py:491: UserWarning:
Corpus/Sentence contains 0 counts of 2-gram overlaps.
BLEU scores might be undesirable; use SmoothingFunction().
  warnings.warn(_msg)
0.5

In this above case I would say that following the BLEU equation and returning 0 for this case is "undesirable" but unless i've missed something in the literature, the result of 0.5 for this is wrong.
I would suggest either a clearer warning that states that the results are wrong (instead of undesirable) or setting the default "smoothing" mechanism to return sys.float_info.min therefore resulting in a bleu score of 0 in the "invalid use of BLEU" cases.
If you disagree feel free to close this issue. I have resolved this in my project with a custom smoothing function.
Thanks again for your time.

Short questions.
Which dataset are you working on? And how often this happens?

Going back to why adding the sys.float_info.min is not right in the non-smoothing version of BLEU.
When we add sys.float_info.min to the precision for the specific order of n-gram to the unsmoothed BLEU, we have technically provided a laplacian smoothen BLEU score. That's liken to the method1 in https://github.com/nltk/nltk/blob/develop/nltk/translate/bleu_score.py#L496
You could do this if you want the functionality of a smoothen BLEU:
>>> from nltk.translate.bleu_score import sentence_bleu
>>> from nltk.translate.bleu_score import SmoothingFunction
>>> import sys

>>> smoother = SmoothingFunction()

# Laplacian smoothing.
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], smoothing_function=smoother.method1)
0.08034284189446518

# Laplacian smoothing, with altered weights.
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(0.5, 0.5), smoothing_function=smoother.method1)
0.09128709291752769

# Canonical multi-bleu smoothing, aka method4().
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], smoothing_function=smoother.method4)
0.19564209772076444

But we cannot add that in SmoothingFunction.method0 since that's the method0() is default non-smoothen BLEU.

Returning a sys.float_info.min instead of the backoff is not right too.
The BLEU formula is

One reason why hacking the weights without empirical truth is a bad idea because  the weights in BLEU is subjected to exp().
So if we walk down the BLEU calculations, with the usual 0.25 uniform weights, the BLEU score extremely small to 0.
>>> p_n = [0.25, sys.float_info.min, sys.float_info.min, sys.float_info.min]
>>> weights = (0.25, 0.25, 0.25, 0.25)
>>> math.exp(sum(w*math.log(p_i) for w, p_i in zip(weights, p_n)))
1.288229753919562e-231

Using the weights=(0.5, 0.5), goes to 0 too.
>>> p_n = [0.25, sys.float_info.min]
>>> weights = (0.5, 0.5)
>>> math.exp(sum(w*math.log(p_i) for w, p_i in zip(weights, p_n)))
7.458340731200295e-155

Maybe it's not evident but returning the sys.float_info.min will ALWAYS end up with a super small BLEU score. Here's a counter example.
>>> m1 = modified_precision([[1,2,3,4]], [2,3,4,5], 1)
>>> m2 = modified_precision([[1,2,3,4]], [2,3,4,5], 2)
>>> m3 = modified_precision([[1,2,3,4]], [2,3,4,5], 3)
>>> m4 = modified_precision([[1,2,3,4]], [2,3,4,5], 4)
>>> [m1, m2, m3, m4]
[Fraction(3, 4), Fraction(2, 3), Fraction(1, 2), Fraction(0, 1)]
>>> [m1, m2, m3, sys.float_info.min]
[Fraction(3, 4), Fraction(2, 3), Fraction(1, 2), 2.2250738585072014e-308]
>>> p_n = [m1, m2, m3, sys.float_info.min]
>>> weights = (0.25, 0.25, 0.25, 0.25)
>>> math.exp(sum(w*math.log(p_i) for w, p_i in zip(weights, p_n)))
8.636168555094496e-78

The main reason why I've asked about the dataset and how often the problem is occurring is because you might not be anticipating the wave of other problems as the one above.
Once we try to backoff the ngram precision to sys.float_info.min, it creates a whole wave of problems that you have not considered outside your dataset.
In any case, when using sentence BLEU on really loose translation or short sentences, always smooth:
# Laplacian smoothing, with altered weights.
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], weights=(0.5, 0.5), smoothing_function=smoother.method1)
0.09128709291752769

# Canonical multi-bleu smoothing, aka method4().
>>> sentence_bleu([[1,2,3,4]],[5,6,8,1], smoothing_function=smoother.method4)
0.19564209772076444

@alvations Thanks for all the great code in NLTK. We've been using it to some extent when experimenting with dialogue-response modelling systems (or chat-bots) at True AI.
I definitely see the point of warning the user about not using a smoothing function when any of the n-grams evaluates to 0. After having read up on the smoothing functions, we have now started using smoothing function 1 as default.
However, I was still very surprised when I got the results with smoothing function inactivated in the cases when it didn't find any n-grams of a particular order. I got results that I did not expect looking at the equations in Chen et. al (which is one of the papers you mention in the documentation).
The main equation, used to calculate the BLEU score (without smoothing) that you posted above (eq 2 in Chen et. al), and which you use in the code is:

where p_m is defined as (eq 3 in Chen et. al):

However, you're calculating p_m as:

In conclusion you are using a different equation than what you advertise. You mention in the documentation that smoothing function 0 means that no smoothing is used, and that you use the base equations to calculate BLEU in that case. This is simply not true. You are not using the base equation, you are using a modified version to calculate p_m compared to what is mentioned in the paper.

Ah ha, that's a gotcha between the original BLEU vs the Eqn (2) from Chen and Cherry (2014).
Note that in the original BLEU (1992), the p_n needs to move from the decimal space to the logarithmic space, which leads to the the math domain error when p_n = 0:

So in that case, the "hacks" are put to overcome all the fringe cases. The multi-bleu.perl had another strategy to overcome this.
But in the Chen and Cherry formulation, it's a product of the decimals with the inverse power of the N, i.e.

Which would avoid the math domains errors without the log and exp space.

I guess the decision to go with the original log+exp formulation because we decided to go with the implementation that follows closer to the multi-bleu.perl and mteval-v13a.pl implementation that focused more on requiring users to smooth when the  matching ngrams are smaller than 4, which usually doesn't happen in machine translation
But I see now why you would have more problems when using BLEU in dialog systems where the sentences/segments might be really short.

Actually, after the implementation of the SmoothingFunction, I had always wanted the default to be set to smoothened BLEU. But we have to decide on which smoothing method to use as a default so we go with the non-smoothen BLEU with strange backoffs and warnings.

The two equations are actually identical from a mathematical point of view (apart from w_n). The difference is that one has to be careful about what to do when evaluating log(0). Here log(0) should be evaluated to -inf (or something similar if -inf isn't available in the library used to handle math). Evaluating it to 0 breaks the math as pointed out above. Evaluating it to 0, means that a particular sentence will get a better BLEU score even if no n-grams were found of a particular order, than if just one n-gram was found, which is counter intuitive.
Evaluating log(0) is never straight-forward. And need to be handled on a case-by-case basis. math solves this by throwing a ValueError and trusting the user to handle it appropriately. numpy on the other hand returns -inf by default together with a RuntimeWarning. There are arguments both (for and against)[https://www.quora.com/What-is-the-value-of-log-0] using -inf as the result.
However, in this particular application the correct thing would definitely be to use -inf.

Briefly looking at the code the correct way of fixing this would be to change what follows this else-statement to:
p_n_new.append(sys. float_info.min)

The warning could be preserved if you'd like.
I suspect it can be merged with the elif _emulate_multibleu and i < 5: above. I haven't looked into _emulate_multibleu enough to know for certain.

@bamattsson Precisely, they are the same implementation and if the rework of using sys.float_info.min is to be used, the geometric mean computation should also change.
From the example in my previous comment, appending sys.float_info.min may be a bad idea depending on the corpus.
>>> m1 = modified_precision([[1,2,3,4]], [2,3,4,5], 1)
>>> m2 = modified_precision([[1,2,3,4]], [2,3,4,5], 2)
>>> m3 = modified_precision([[1,2,3,4]], [2,3,4,5], 3)
>>> m4 = modified_precision([[1,2,3,4]], [2,3,4,5], 4)
>>> [m1, m2, m3, m4]
[Fraction(3, 4), Fraction(2, 3), Fraction(1, 2), Fraction(0, 1)]
>>> [m1, m2, m3, sys.float_info.min]
[Fraction(3, 4), Fraction(2, 3), Fraction(1, 2), 2.2250738585072014e-308]
>>> p_n = [m1, m2, m3, sys.float_info.min]
>>> weights = (0.25, 0.25, 0.25, 0.25)
>>> math.exp(sum(w*math.log(p_i) for w, p_i in zip(weights, p_n)))
8.636168555094496e-78

Which led to the failing unittest on https://nltk.ci.cloudbees.com/job/pull_request_tests/430/TOXENV=py35-jenkins,jdk=jdk8latestOnlineInstall/testReport/junit/nltk.translate/bleu_score/sentence_bleu/ and thus the failing checks on #1844.
The fix is VERY dependent on what kind of dataset one is working on. This should NEVER be a problem in corpus BLEU because the assumption at corpus level has always been that there are at least 1 4-gram matches between the hypotheses and their references.
So my suggestion is to rework your hotfix as a flag / argument /option that one would pass to sentence bleu. And if you would like, make the flag the default and still go back to the ngram backoff technique when turned off. There were many considerations taken to make the ngram backoff choice. Perhaps reading #1330 might help too.

Actually, looking at the PR carefully. Is it right that the outputs of the test cases using the hotfix you're proposing gives the same output as emulate_multibleu=True?

Resolved in #1844

Thanks @alvations, @bamattsson, @benleetownsend


Fix incorrect brightness after turning on

Resolves #109
Also updated logging to not warn about expected failures and also log what commands are being sent.

I noticed that adaptive lighting sets color temperature every minute, so it might be better to change sendCmd logging to debug


alm.tools hacked?

Hi,
Just a heads-up:
There looks to be some issues with the content on alm.tools compared to alm-tools.github.io. It looks like some spammy links and content has been injected into the site.
Take care.

Yeah, I let the domain go cause I was wasting money on open source projects e.g. typestyle.io / alm.tools (others that didn't take off).
Sad to see someone buy it (that would be okay, I didn't want to camp) and abuse it (not okay 😢, notice buyinstagramlikes.io)  :


Hackday

@garberg fill in!!!
Brainstorm:

Fastnetmon integration
TMS integration

Need to have a lab setup with:

target machine - pooor box in lab
attacking machine - KST5-DDOS-1
mitigation machine - KST5-DDOS-1
flow analyzer - potentially same machine as we run mitigation on?

We'll use KST5-DDOS-1 both for running snabbddos and for sending traffic. It has a 2x10GE card so we'll send traffic from one port and snabbddos will run on the other port. For this to work we need to do VLAN encapsulation of the clean traffic, see #3

:+1:

@garberg / @tlundse can you confirm how KST5-DDOS-1 is wired? Are both ports connected to KST5-PEER-1 ?
One of the ports should have two VLANs, one for dirty traffic going to snabbddos and the other for clean return traffic. The dirty should not be VLAN tagged since we want to optimise for speed and stripping a VLAN tag actually takes a few CPU cycles. The clean side should have a VLAN tag and the logical interface should be in the clean VRF. You fix, yes yes? :)

braindump of things we can do:

get going, at the end of the day we want to trigger an automatic mitigation based on flow information
using fastnetmon
using arbor?
Implement faster table, like patricia, dxr or similar - need C skillz - not really my kind of thang
Statistics ( #9 )
run on 100G box (in TeraStream lab) - problem is we need RSS on NIC to spread load over many Snabb processes and I don't think there is any support for this right now. Think RSS is enabled by registers on the NIC - a bit too low level for my taste


Add preconditions to consumer for refundAddress and fundingKey

Coverage increased (+1.07%) to 92.74% when pulling 72bb83e054efc4cfef02b14b43c61f77f1935fb2 on braydonf:preconditions-consumer into 762330308f4977c28f61a5ddeb9c0a2dbf947b1c on bitpay:master.

LGTM

ACK

So I think now the guide is wrong?
http://bitcore.io/guide/module/channel/index.html


ROX-12355: Refactor Affected Components modal up to Image Overview

Description
Preliminary work to adding the corresponding Dockerfile line where a vulnerable component is introduced into an image during build
Checklist

[ ] Investigated and inspected CI test results

Testing Performed
Verified existing tests still pass
Manual checks:
Observed CVEs

Deferred CVEs

False Positive CVEs

/retest-required


Deploy Alcor k8s cluster and connect microservices to ACA containers

This task provides an alternative for Alcor lxc containers in Distrinet.
If Alcor lxc containers are hard to reach, we can implement Alcor k8s cluster and try to connect these microservices to ACAs containers in Distrinet.
Requirements:

Allocate 1 or 2 physical machines.
Setup a Kubernetes (k8s) Cluster using Ansible script (will provide later).
Deploy Alcor services pods in the k8s cluster
Test connection from Alcor services to ACAs

Just entered this project a few days ago. During this time, I have learned the deployment of K8S and the use of Distrinet. I am preparing to deploy Alcor Controller independently to provide guarantee for the subsequent work.

the deployment and test of controller cluster is still in progress

The current test shows that the traffic from k8s can reach aca in lxd. We can simply forward port on lxd and then let kubenetes take over the rest. But since the current version of dpm can only connect to one port on the corresponding aca node, we cannot deploy multiple lxd containers on one node. There are two options I can think of at the moment：

Modify the code of the relevant parts of dpm so that dpm can establish multiple grpc connections with the same aca node
We implement a kube-proxy like module ourselves, register the ip of the lxd container into alcor, and then configure the corresponding iptables rules on every aca node. One problem with this solution is that we are not sure whether this will conflict  iptables rules configured by kube-proxy.

I think the easiest way to connect alcor services in k8s and aca in lxc container is a gateway or router between two different network segment.

For the connection from aca containers to alcor services, you just need to allow lxc container connecting to the Alcor's service IP.
For the grpc connection from networkconfigmanager in Alcor to aca containers, you probably need to setup a gateway between them.  You can refer to this link for the gateway configuration: https://unix.stackexchange.com/questions/222054/how-can-i-use-linux-as-a-gateway

I think the easiest way to connect alcor services in k8s and aca in lxc container is a gateway or router between two different network segment.

For the connection from aca containers to alcor services, you just need to allow lxc container connecting to the Alcor's service IP.
For the grpc connection from networkconfigmanager in Alcor to aca containers, you probably need to setup a gateway between them.  You can refer to this link for the gateway configuration: https://unix.stackexchange.com/questions/222054/how-can-i-use-linux-as-a-gateway

Sorry, I had read the page you supported and don't totally understand what do you mean. According to my understanding, we use aca as an internal service, and the node where aca is located as a gateway, but this approach requires dpm or ncm to be able to establish grpc connections to multiple ports. The current code shows grpc connections can only be made on port 50001.
At present, I have a new idea, we can use macvlan to make each aca expose an independent ip to the outside, so that each aca seems to be on a separate host. The disadvantage of this method is that our physical machine exposes multiple IPs to the outside world. Do you think we can take this option?


Rename index types

The elasticsearch index will be restructured by dimitris. These changes should be reflected in the portal.

New index catalog with one type resource: http://ariadne-registry.dcu.gr:9200/catalog/_search


TPU hang (when loading data from an external process)

Possibly related to https://github.com/google/jax/issues/9190 but this occurs even without using pytorch dataloaders or fork().
Minimal reproduction in https://gist.github.com/nshepperd/865e192714c815145686089ff9bb9971. This is a significantly reduced script from my actual training code which would constantly hang. The code hangs when trying to move the int32 scalar fail tensor from TPU to cpu, fail = fail.item() at line 89 in bug_repro.py.
The stack trace from gdb with debugging symbols is this:
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffb0e77c08e in absl::lts_20210324::synchronization_internal::Waiter::Wait(absl::lts_20210324::synchronization_internal::KernelTimeout) () from /home/em/.pyenv/lib/python3.8/site-packages/jaxlib/xla_extension.so
#2  0x00007ffb0e77bfa2 in AbslInternalPerThreadSemWait_lts_20210324 () from /home/em/.pyenv/lib/python3.8/site-packages/jaxlib/xla_extension.so
#3  0x00007ffb0e77a59d in absl::lts_20210324::Mutex::Block(absl::lts_20210324::base_internal::PerThreadSynch*) () from /home/em/.pyenv/lib/python3.8/site-packages/jaxlib/xla_extension.so
#4  0x00007ffb0e77b759 in absl::lts_20210324::Mutex::LockSlowWithDeadline(absl::lts_20210324::MuHowS const*, absl::lts_20210324::Condition const*, absl::lts_20210324::synchronization_internal::KernelTimeout, int) ()
   from /home/em/.pyenv/lib/python3.8/site-packages/jaxlib/xla_extension.so
#5  0x00007ffb090ed6f8 in absl::lts_20210324::Mutex::LockSlow(absl::lts_20210324::MuHowS const*, absl::lts_20210324::Condition const*, int) () from /home/em/.pyenv/lib/python3.8/site-packages/jaxlib/xla_extension.so
#6  0x00007ffb0e77bc33 in absl::lts_20210324::Notification::WaitForNotification() const () from /home/em/.pyenv/lib/python3.8/site-packages/jaxlib/xla_extension.so
#7  0x00007ffb09465161 in xla::PyBuffer::AsNumPyArray(pybind11::handle) () from /home/em/.pyenv/lib/python3.8/site-packages/jaxlib/xla_extension.so
#8  0x00007ffb09465859 in pybind11::cpp_function::initialize<xla::PyBuffer::RegisterTypes(pybind11::module_&)::{lambda(xla::PyBuffer::pyobject)#14}, tensorflow::StatusOr<pybind11::object>, xla::PyBuffer::pyobject>(xla::PyBuffer::RegisterTypes(pybind11::module_&)::{lambda(xla::PyBuffer::pyobject)#14}&&, tensorflow::StatusOr<pybind11::object> (*)(xla::PyBuffer::pyobject))::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) ()
   from /home/em/.pyenv/lib/python3.8/site-packages/jaxlib/xla_extension.so
#9  0x00007ffb091b6250 in pybind11::cpp_function::dispatcher(_object*, _object*, _object*) () from /home/em/.pyenv/lib/python3.8/site-packages/jaxlib/xla_extension.so
#10 0x00000000005f5e79 in cfunction_call_varargs (kwargs=<optimized out>, args=<optimized out>, func=<built-in method  of PyCapsule object at remote 0x7ffa57d93840>) at ../Objects/call.c:773
#11 PyCFunction_Call (func=<built-in method  of PyCapsule object at remote 0x7ffa57d93840>, args=<optimized out>, kwargs=<optimized out>) at ../Objects/call.c:773
#12 0x00000000005f6a46 in _PyObject_MakeTpCall (callable=<built-in method  of PyCapsule object at remote 0x7ffa57d93840>, args=<optimized out>, nargs=<optimized out>, keywords=<optimized out>) at ../Include/internal/pycore_pyerrors.h:13
#13 0x0000000000503337 in _PyObject_Vectorcall (nargsf=1, kwnames=0x0, args=0x7fff139b6208, callable=<built-in method  of PyCapsule object at remote 0x7ffa57d93840>) at ../Include/object.h:439
#14 _PyObject_FastCall (nargs=1, args=0x7fff139b6208, func=<built-in method  of PyCapsule object at remote 0x7ffa57d93840>) at ../Include/cpython/abstract.h:147
#15 property_descr_get (self=<optimized out>, obj=<optimized out>, type=<optimized out>) at ../Objects/descrobject.c:1496
#16 0x00000000005c1ed7 in _PyObject_GenericGetAttrWithDict (suppress=0, dict=0x0, name='_value', obj=<DeviceArray at remote 0x7ffaedd1f330>) at ../Objects/object.c:1254
#17 PyObject_GenericGetAttr (name='_value', obj=<DeviceArray at remote 0x7ffaedd1f330>) at ../Objects/object.c:1335
#18 PyObject_GetAttr (v=<DeviceArray at remote 0x7ffaedd1f330>, name='_value') at ../Objects/object.c:941
#19 0x000000000056b32e in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:2966
#20 0x00000000005f6226 in PyEval_EvalFrameEx (throwflag=0, f=Frame 0x7ffaf5cd0520, for file /home/em/jax/jax/interpreters/xla.py, line 1626, in <lambda> (self=<DeviceArray at remote 0x7ffaedd1f330>)) at ../Python/ceval.c:741
#21 function_code_fastcall (globals=<optimized out>, nargs=<optimized out>, args=<optimized out>, co=<optimized out>) at ../Objects/call.c:284
#22 _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at ../Objects/call.c:411
#23 0x00000000005a9123 in _PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7fff139b6450, callable=<function at remote 0x7ff9b69050d0>) at ../Include/cpython/abstract.h:127
#24 _PyObject_FastCall (nargs=<optimized out>, args=0x7fff139b6450, func=<function at remote 0x7ff9b69050d0>) at ../Include/cpython/abstract.h:147
#25 _PyObject_FastCall_Prepend (nargs=<optimized out>, args=<optimized out>, obj=<optimized out>, callable=<function at remote 0x7ff9b69050d0>) at ../Objects/call.c:850
#26 call_unbound (nargs=<optimized out>, args=<optimized out>, self=<optimized out>, func=<function at remote 0x7ff9b69050d0>, unbound=1) at ../Objects/typeobject.c:1453
#27 call_method (obj=<optimized out>, name=<optimized out>, args=<optimized out>, nargs=<optimized out>) at ../Objects/typeobject.c:1485
#28 0x00000000005e58d5 in _PyLong_FromNbInt (integral=<optimized out>) at ../Objects/longobject.c:165
#29 0x00000000005eb29b in PyNumber_Long (o=<DeviceArray at remote 0x7ffaedd1f330>) at ../Objects/abstract.c:1370
#30 long_new_impl (obase=<optimized out>, x=<DeviceArray at remote 0x7ffaedd1f330>, type=0x90b400 <PyLong_Type>) at ../Objects/longobject.c:5119
#31 long_new (type=0x90b400 <PyLong_Type>, args=<optimized out>, kwargs=<optimized out>) at ../Objects/clinic/longobject.c.h:36
#32 0x00000000005f6933 in type_call (kwds=0x0, args=(<DeviceArray at remote 0x7ffaedd1f330>,), type=0x90b400 <PyLong_Type>) at ../Objects/typeobject.c:974
#33 _PyObject_MakeTpCall (callable=<type at remote 0x90b400>, args=<optimized out>, nargs=<optimized out>, keywords=<optimized out>) at ../Objects/call.c:159
#34 0x0000000000570612 in _PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7ffaf5ccfbd8, callable=<type at remote 0x90b400>) at ../Include/cpython/abstract.h:125
#35 _PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7ffaf5ccfbd8, callable=<type at remote 0x90b400>) at ../Include/cpython/abstract.h:115
#36 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x2144000) at ../Python/ceval.c:4963
#37 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:3500
#38 0x00000000005f6226 in PyEval_EvalFrameEx (throwflag=0, f=Frame 0x7ffaf5ccfa60, for file /home/em/jax/jax/interpreters/xla.py, line 1579, in item (self=<DeviceArray at remote 0x7ffaedd1f330>)) at ../Python/ceval.c:741
#39 function_code_fastcall (globals=<optimized out>, nargs=<optimized out>, args=<optimized out>, co=<optimized out>) at ../Objects/call.c:284
#40 _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at ../Objects/call.c:411
#41 0x000000000056b5e0 in _PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7ff7faa665c0, callable=<function at remote 0x7ff9b6903ca0>) at ../Include/cpython/abstract.h:127
#42 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x2144000) at ../Python/ceval.c:4963
#43 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:3486
#44 0x00000000005009e3 in PyEval_EvalFrameEx (throwflag=0,
    f=Frame 0x7ff7faa66420, for file bug_repro.py, line 89, in __iter__ (self=<Even(dataloader=<DataLoader(ds=<DS(gen=<Gen(f=<functools.partial at remote 0x7ff9b3f71b30>) at remote 0x7ff9b3f6d880>, size=None) at remote 0x7ff9552785e0>, num_workers=4, prefetch=16) at remote 0x7ff9b3f7c2b0>, size=180, maxsize=180) at remote 0x7ff9b3f7c370>, it=<generator at remote 0x7ff954ac49e0>, count=0, item=<Tensor at remote 0x7ffaedcfec70>, fail=<DeviceArray at remote 0x7ffaedd1f330>))
    at ../Python/ceval.c:741
#45 gen_send_ex (closing=0, exc=0, arg=0x0, gen=0x7ff954ac4970) at ../Objects/genobject.c:222
#46 gen_iternext (gen=0x7ff954ac4970) at ../Objects/genobject.c:543
#47 0x000000000056b7c9 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:3202
#48 0x00000000005009e3 in PyEval_EvalFrameEx (throwflag=0,
    f=Frame 0x88bb4fd0, for file /home/em/.pyenv/lib/python3.8/site-packages/tqdm/std.py, line 1195, in __iter__ (self=<tqdm(iterable=<Even(dataloader=<DataLoader(ds=<DS(gen=<Gen(f=<functools.partial at remote 0x7ff9b3f71b30>) at remote 0x7ff9b3f6d880>, size=None) at remote 0x7ff9552785e0>, num_workers=4, prefetch=16) at remote 0x7ff9b3f7c2b0>, size=180, maxsize=180) at remote 0x7ff9b3f7c370>, desc='', total=180, leave=True, fp=<DisableOnWriteError(_wrapped=<_io.TextIOWrapper at remote 0x7ffb10d69110>, write=<function at remote 0x7ff7faa63f70>, flush=<function at remote 0x7ff7faa63ee0>) at remote 0x7ffaedd03460>, ncols=119, nrows=61, mininterval=<float at remote 0x7ffb10ac29d0>, maxinterval=<float at remote 0x7ffb10ac29b0>, miniters=0, dynamic_miniters=True, ascii=False, disable=False, unit='it', unit_scale=False, unit_divisor=1000, initial=0, lock_args=None, delay=0, gui=False, dynamic_ncols=False, smoothing=<float at remote 0x7ffb10b9c210>, _ema_dn=<EMA(alpha=<float at remote 0x7ffb10b9c210>, last=0, calls=0) at ...(truncated)) at ../Python/ceval.c:741

This appears to be a regression: this code did not hang in jax 0.2.25 but does in 0.2.27.
I git bisected the jax repo (using bug_bisect.sh from that gist) and the first bad commit appears to be:
96623c3048351d4f43dee8d999fb440ef1a2c557 is the first bad commit
commit 96623c3048351d4f43dee8d999fb440ef1a2c557
Author: Matthew Johnson<EMAIL_ADDRESS>Date:   Wed Jul 22 12:10:43 2020 -0700

    make iter(DeviceArray) return DeviceArrays w/o sync

 jax/_src/lax/lax.py         |  4 ++--
 jax/_src/numpy/lax_numpy.py | 16 ++++++++++++++++
 jax/interpreters/pxla.py    | 36 ++++++++++++++++++++++++++----------
 jax/interpreters/xla.py     |  7 ++-----
 tests/api_test.py           |  2 +-
 tests/lax_test.py           | 11 +++++++++++
 6 files changed, 58 insertions(+), 18 deletions(-)

This looks very likely to be behind the problem somehow.
As for why the hang only occurs when my script is loading data from an external process, it doesn't seem to be deterministic so possibly it is a timing thing.

I've been experiencing the same issue and I managed to find a workaround temporarily. The workaround is to launch the child processes before we touch anything in Jax. I also need to be careful to use the spawn method to start new processes and prevent the child processes from importing Jax (I simply put all my Jax related imports inside a if __name__ == '__main__':). For PyTorch dataloader, I use persistent workers since I need to avoid creating new child processes every time I start iterating through the dataloader.
This issue is also related to #9642. If I call a Jax function that doesn't put any tensors on TPU, launch the dataloader child processes and then start training, I would get that RuntimeError: INTERNAL error message instead of hanging.

Is there any progress on this problem?
I encountered this issue, too. But I was running JAX on GPUs (NVIDIA A100) rather than TPUs. After training for about 2 hours, my program just hung and GPU-Util dropped to 0%. I got a similar stack trace from gdb:
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f0832cf672e in absl::lts_20211102::synchronization_internal::Waiter::Wait(absl::lts_20211102::synchronization_internal::KernelTimeout) () from /home/yousiki/miniconda3/envs/jax/lib/python3.10/site-packages/jaxlib/xla_extension.so
#2  0x00007f0832cf6663 in AbslInternalPerThreadSemWait_lts_20211102 () from /home/yousiki/miniconda3/envs/jax/lib/python3.10/site-packages/jaxlib/xla_extension.so
#3  0x00007f0832cf4b5d in absl::lts_20211102::Mutex::Block(absl::lts_20211102::base_internal::PerThreadSynch*) () from /home/yousiki/miniconda3/envs/jax/lib/python3.10/site-packages/jaxlib/xla_extension.so
#4  0x00007f0832cf5a74 in absl::lts_20211102::Mutex::AwaitCommon(absl::lts_20211102::Condition const&, absl::lts_20211102::synchronization_internal::KernelTimeout) () from /home/yousiki/miniconda3/envs/jax/lib/python3.10/site-packages/jaxlib/xla_extension.so
#5  0x00007f0832cf5ad5 in absl::lts_20211102::Mutex::Await(absl::lts_20211102::Condition const&) () from /home/yousiki/miniconda3/envs/jax/lib/python3.10/site-packages/jaxlib/xla_extension.so
#6  0x00007f082e893d88 in xla::PjRtStreamExecutorExecutable::Execute(absl::lts_20211102::Span<std::vector<xla::PjRtBuffer*, std::allocator<xla::PjRtBuffer*> > const>, xla::ExecuteOptions const&, absl::lts_20211102::optional<std::vector<xla::PjRtFuture<tensorflow::Status>, std::allocator<xla::PjRtFuture<tensorflow::Status> > > >&) () from /home/yousiki/miniconda3/envs/jax/lib/python3.10/site-packages/jaxlib/xla_extension.so
#7  0x00007f082dade964 in jax::PmapFunction::Call(pybind11::args, pybind11::kwargs) () from /home/yousiki/miniconda3/envs/jax/lib/python3.10/site-packages/jaxlib/xla_extension.so
#8  0x00007f082dadfe96 in JaxPmapFunction_tp_call () from /home/yousiki/miniconda3/envs/jax/lib/python3.10/site-packages/jaxlib/xla_extension.so
#9  0x000055f7e976552e in _PyObject_MakeTpCall (tstate=0x55f7e9df43f0, callable=0x7f07d0153690, args=<optimized out>, nargs=<optimized out>, keywords=0x0) at /opt/conda/conda-bld/python-split_1648715631366/work/Objects/call.c:215
#10 0x000055f7e980444b in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x55f7ef227ef8, callable=<optimized out>, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:112
#11 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:123
#12 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7ffeb2405340, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5867
#13 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:4213
#14 0x000055f7e97b2742 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/internal/pycore_ceval.h:46
#15 _PyEval_Vector (tstate=<optimized out>, con=0x7f07e39a8320, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5065
#16 0x000055f7e9727425 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f07e3c6c1b0, callable=0x7f07e39a8310, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:114
#17 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:123
#18 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7ffeb2405570, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5867
#19 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:4213
#20 0x000055f7e97b2742 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/internal/pycore_ceval.h:46
#21 _PyEval_Vector (tstate=<optimized out>, con=0x7f07e39a83b0, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5065
#22 0x000055f7e9727425 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f07e3ee21c8, callable=0x7f07e39a83a0, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:114
#23 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:123
#24 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7ffeb24057a0, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5867
#25 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:4213
#26 0x000055f7e97b2742 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/internal/pycore_ceval.h:46
#27 _PyEval_Vector (tstate=<optimized out>, con=0x7f0827c37e30, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5065
#28 0x000055f7e9727425 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x55f7ee6d9fb8, callable=0x7f0827c37e20, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:114
#29 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:123
#30 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7ffeb24059d0, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5867
#31 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:4213
#32 0x000055f7e97b2742 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/internal/pycore_ceval.h:46
#33 _PyEval_Vector (tstate=<optimized out>, con=0x7f0827c37f50, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5065
#34 0x000055f7e97282a5 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f0955761e60, callable=0x7f0827c37f40, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:114
#35 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:123
#36 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7ffeb2405c00, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5867
#37 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:4181
#38 0x000055f7e97b2742 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/internal/pycore_ceval.h:46
#39 _PyEval_Vector (tstate=<optimized out>, con=0x7ffeb2405d80, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5065
#40 0x000055f7e97c1578 in PyEval_EvalCode (co=0x7f09554fbd60, globals=0x7f095565d600, locals=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:1134
#41 0x000055f7e98b5b1a in builtin_exec_impl.isra.18 (locals=0x7f095565d600, globals=0x7f095565d600, source=0x7f09554fbd60) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/bltinmodule.c:1056
#42 builtin_exec (module=<optimized out>, args=0x55f7e9e90258, nargs=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/clinic/bltinmodule.c.h:371
#43 0x000055f7e976fa61 in cfunction_vectorcall_FASTCALL (func=0x7f09557b0a90, args=0x55f7e9e90258, nargsf=<optimized out>, kwnames=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Objects/methodobject.c:430
#44 0x000055f7e9727425 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x55f7e9e90258, callable=0x7f09557b0a90, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:114
#45 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:123
#46 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7ffeb2405f40, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5867
#47 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:4213
#48 0x000055f7e97b2742 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/internal/pycore_ceval.h:46
#49 _PyEval_Vector (tstate=<optimized out>, con=0x7f0955505d90, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5065
#50 0x000055f7e9727425 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f0955745be0, callable=0x7f0955505d80, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:114
#51 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/cpython/abstract.h:123
#52 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7ffeb2406170, tstate=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5867
#53 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:4213
#54 0x000055f7e97b2742 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1648715631366/work/Include/internal/pycore_ceval.h:46
#55 _PyEval_Vector (tstate=<optimized out>, con=0x7f0955506330, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Python/ceval.c:5065
#56 0x000055f7e976afaa in PyVectorcall_Call (kwargs=<optimized out>, tuple=0x7f0955714380, callable=0x7f0955506320) at /opt/conda/conda-bld/python-split_1648715631366/work/Objects/call.c:255
#57 _PyObject_Call (tstate=<optimized out>, callable=0x7f0955506320, args=0x7f0955714380, kwargs=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Objects/call.c:290
#58 0x000055f7e98b0f7a in pymain_run_module (modname=<optimized out>, set_argv0=1) at /opt/conda/conda-bld/python-split_1648715631366/work/Modules/main.c:297
#59 0x000055f7e98b53c9 in pymain_run_python (exitcode=0x7ffeb24063a0) at /opt/conda/conda-bld/python-split_1648715631366/work/Modules/main.c:585
#60 Py_RunMain () at /opt/conda/conda-bld/python-split_1648715631366/work/Modules/main.c:670
#61 0x000055f7e98b57d9 in Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at /opt/conda/conda-bld/python-split_1648715631366/work/Modules/main.c:1083
#62 0x00007f09558730b3 in __libc_start_main (main=0x55f7e9748650 <main>, argc=9, argv=0x7ffeb24065b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffeb24065a8) at ../csu/libc-start.c:308
#63 0x000055f7e98355d4 in _start ()

I'm using tf.data to load data and clu.metric_writers to write metrics, which may create child process.


Update contributors.js

@dx-dy-dz I think you have pushed to the wrong repo here, this is my fork of AbhayVAshokan's original repo. Only his repo has the hacktoberfest accepted tag

@dx-dy-dz I think you have pushed to the wrong repo here, this is my fork of AbhayVAshokan's original repo. Only his repo has the hacktoberfest accepted tag

Sorry, that was by mistake 😅

No worries 🎉


Data Truncation During CSV Export in DBeaver for Large Workflow Data

Description
When exporting Jira workflows from a PostgreSQL database using DBeaver, I noticed that the data in certain columns is being truncated. Although querying the data directly shows the full content (e.g., 159,402 characters in a specific workflow), the exported CSV file only contains a truncated version of the data (e.g., 33,035 characters for the same workflow). This results in a loss of significant information when exporting workflows with large descriptors.
DBeaver Version
Community Edition <IP_ADDRESS>409221725
Operating System
Windows 11 with latest updates
Database and driver
PostgreSQL 12.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5), 64-bit
JDBC Driver 2.5.1
Steps to reproduce
Steps to Reproduce:

Run Query: Query the Jira workflows from a PostgreSQL database. The descriptor column contains a large amount of data (over 150,000 characters in some cases).

Example query:

SELECT     jw.workflowname,     jw."descriptor" FROM      project p  LEFT OUTER JOIN      nodeassociation na ON na.source_node_id = p.id AND na.sink_node_entity = 'WorkflowScheme' JOIN workflowscheme ws ON ws.id = na.sink_node_id JOIN workflowschemeentity wse ON wse.scheme = ws.id JOIN jiraworkflows jw ON jw.workflowname = wse.workflow JOIN nodeassociation nas ON p.id = nas.source_node_id AND nas.association_type = 'ProjectCategory' GROUP BY      jw.workflowname, jw."descriptor";

Verify Data: In the query result pane, the full workflow descriptor is visible, with no truncation.

Export Data: Use DBeaver's built-in export function to export the result set to a CSV file.

Set delimiter to Tab.
Ensure that all default export settings are used.

Check Exported File: Open the CSV file and inspect the content of the descriptor column. The data will be truncated (in this case, cut down to approximately 33,035 characters).

Expected Result: The exported CSV file should contain the full content of the descriptor field, preserving all characters as seen in the query result.

Actual Result: The data in the descriptor field is truncated in the exported CSV file, resulting in a significant loss of information.

Additional context
No response

OK, it was my bad. I was looking at the information and I noticed that it's Excel and pretty much all of the "viewers" culprit and not DBeaver.
There's a limitation with Excel and other applications when looking at the csv files. In the case of excel, the cell character limit is around the 32 thousand characters but, the csv, if complete, so there's no issue when exporting the file.
My apologies for the confusion.


Question about EOFError

Hello,
Today I try to run python object_detection.py -path ./PropheseeDataset -backbone vgg-11 -T 5 -tbin 2 -b 8 -epochs 2. During the first epoch of training, it reports the 'EOFError', do you know how to solve it?

Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000
Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.000
Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.000
Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.000
Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000
Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.000
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.000
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000
Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.000
Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000
Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000
Epoch 0:  13%|▏| 226/1679 [03:29<22:20,  1.08it/s, loss=4.55, train_loss_bbox_stTraceback (most recent call last):
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/queues.py", line 239, in _feed
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/reduction.py", line 51, in dumps
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/torch/multiprocessing/reductions.py", line 348, in reduce_storage
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/reduction.py", line 198, in DupFd
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/resource_sharer.py", line 48, in init
OSError: [Errno 24] Too many open files
Epoch 0:  14%|▏| 227/1679 [03:30<22:19,  1.08it/s, loss=4.51, train_loss_bbox_stTraceback (most recent call last):
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/queues.py", line 239, in _feed
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/reduction.py", line 51, in dumps
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/torch/multiprocessing/reductions.py", line 348, in reduce_storage
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/reduction.py", line 198, in DupFd
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/resource_sharer.py", line 48, in init
OSError: [Errno 24] Too many open files
Epoch 0:  14%|▏| 228/1679 [03:31<22:18,  1.08it/s, loss=4.55, train_loss_bbox_stTraceback (most recent call last):
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/queues.py", line 239, in _feed
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/reduction.py", line 51, in dumps
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/torch/multiprocessing/reductions.py", line 348, in reduce_storage
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/reduction.py", line 198, in DupFd
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/resource_sharer.py", line 48, in init
OSError: [Errno 24] Too many open files
Epoch 0:  14%|▏| 230/1679 [03:33<22:16,  1.08it/s, loss=4.44, train_loss_bbox_stTraceback (most recent call last):
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/resource_sharer.py", line 149, in _serve
send(conn, destination_pid)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/resource_sharer.py", line 50, in send
reduction.send_handle(conn, new_fd, pid)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/reduction.py", line 183, in send_handle
with socket.fromfd(conn.fileno(), socket.AF_UNIX, socket.SOCK_STREAM) as s:
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/socket.py", line 543, in fromfd
Traceback (most recent call last):
File "/home/lxy/Experiment/object-detection-with-spiking-neural-networks/object_detection.py", line 135, in
nfd = dup(fd)
OSError    main()
File "/home/lxy/Experiment/object-detection-with-spiking-neural-networks/object_detection.py", line 127, in main
: [Errno 24] Too many open files
trainer.fit(module, train_dataloader, val_dataloader)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 553, in fit
self._run(model)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 918, in _run
self._dispatch()
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 986, in _dispatch
self.accelerator.start_training(self)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 92, in start_training
self.training_type_plugin.start_training(trainer)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 161, in start_training
self._results = trainer.run_stage()
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 996, in run_stage
return self._run_train()
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1045, in _run_train
self.fit_loop.run()
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/loops/base.py", line 111, in run
self.advance(*args, **kwargs)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/loops/fit_loop.py", line 200, in advance
epoch_output = self.epoch_loop.run(train_dataloader)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/loops/base.py", line 111, in run
self.advance(*args, **kwargs)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/training_epoch_loop.py", line 118, in advance
_, (batch, is_last) = next(dataloader_iter)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/profiler/base.py", line 104, in profile_iterable
value = next(iterator)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/trainer/supporters.py", line 672, in prefetch_iterator
for val in it:
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/trainer/supporters.py", line 589, in next
return self.request_next_batch(self.loader_iters)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/trainer/supporters.py", line 617, in request_next_batch
return apply_to_collection(loader_iters, Iterator, next_fn)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/utilities/apply_func.py", line 96, in apply_to_collection
return function(data, *args, **kwargs)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/pytorch_lightning/trainer/supporters.py", line 604, in next_fn
batch = next(iterator)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 530, in next
data = self._next_data()
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1207, in _next_data
idx, data = self._get_data()
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1173, in _get_data
success, data = self._try_get_data()
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1011, in _try_get_data
data = self._data_queue.get(timeout=timeout)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/queues.py", line 116, in get
return _ForkingPickler.loads(res)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/site-packages/torch/multiprocessing/reductions.py", line 295, in rebuild_storage_fd
fd = df.detach()
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/resource_sharer.py", line 58, in detach
return reduction.recv_handle(conn)
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/reduction.py", line 189, in recv_handle
return recvfds(s, 1)[0]
File "/home/lxy/anaconda3/envs/SNN-SJ/lib/python3.8/multiprocessing/reduction.py", line 159, in recvfds
raise EOFError
EOFError
Epoch 0:  14%|█▎        | 230/1679 [03:33<22:22,  1.08it/s, loss=4.44, train_loss_bbox_step=2.800, train_loss_classif_step=0.877, train_loss_step=3.680]

Hello,
I have never encountered this error, the one at the beginning "OSError: [Errno 24] Too many open files".
It doesn't seem to come from my code, so you could try some solutions proposed in this stackoverflow thread : Python Subprocess: Too Many Open Files
Good luck!

Thanks, I solved this problem!!! I'm running 'train' code, it may take a day. I would like to ask in advance, will the 'pretrained_model' in 'test' code come out after training?

Hello, unfortunately no if you didn't specify the -save_ckpt parameter.
I will change that so that the default behavior is to save checkpoints. Sorry for the inconvenience.

Oh I see it. I‘m going to retrain and wait for results~

Hello, unfortunately no if you didn't specify the -save_ckpt parameter.

I’d like to ask that the -save_ckpt set up 'save_top_k=3', do I need to adjust the parameters according to the actual epochs?
After training may generate a file named 'ckpt-od-gen1-vgg-11', is that be the path of 'pretrained_model'?

No you don't need to adjust save_top_k, it's the number of checkpoints saved by Pytorch Lightning. 3 means that it will save the 3 best models according to the specified metric. Check out the documentation of Pytorch Lightning for more information.
Yes that would be the path of pretrained model.


ModernizeTypesCastingFixer: replaces *val() calls with type casting operators

@gharlan : I repeated myself again, it will be refactoring when all PRs are in master

intval has a second parameter: http://php.net/manual/de/function.intval.php

doubleval should be fixed, too.
http://php.net/manual/en/function.doubleval.php

@GrahamCampbell : static property + getter which instantiates those tokens then?

No?

See how we already do things here: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/08170a5c403df8f5c1fe16a3c031cfc017cc8a59/Symfony/CS/Tokenizer/Transformers.php#L53.

@gharlan :
doubleval shall be fixed by aliases fixes, but I'll add support
intval - you right here, I'll simply skip transformation if comma token presented among parameter tokens (silly, but no harm to codebase)

@GrahamCampbell : looks good, will keep to proposed solution.

@gharlan @GrahamCampbell : done

Na ja. I'll need to make better check, thanks for verifying...

@gharlan : done, see UT-cases

You have mark this PR (in title) as 2.0, why is that?

@keradus : just following your original proposal to target master which is 2.0 (or?)

But why master? Could you ref that proposal? New features are for newest 1.x line. Is it really needed here to target 2.x line? Sometimes it is useful when we need to have some new transformers applied, but here - I don't see that reason so far.

Here: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1083#issuecomment-84705174

It was other case - it was rewriting existing fixer.

What will be new proposal regarding target branch and squashing my PRs?

Okay, I completed re-factoring and on top of new Util-classes I can simplify my other fixers and make them more reliable.
@keradus : how do we proceed?

What about simply use some abstract base class for common things instead of creating non-related Utils ?

Those methods don't use any parts of abstract fixer, so packing utils code into abstract class makes it definitely compact but we'll break single responsibility approach.
I'd refactor this to have such abstract if we want to define contract for all functions-fixers.
Can you elaborate please from maintenance prospect - if such abstract will make your life easier?

I just don't like Utils classes. How would such an Utils looks like? Please see http://www.yegor256.com/2014/05/05/oop-alternative-to-utility-classes.html#utility-classes-are-evil and mentioned links.

Just to share some experience: when system is huge (like once I'm maintaining), touching any file is a risk. Utils and Factories and Mappers allows to be more confident that you are touching a tiny piece of code without much dependencies.
Nevertheless, my prio is that community here was fine with my code, so I'll introduce and abstract - I saw already some abstracts under Fixers folder.

And still - everything you can write as utils you can write as separate "traditional" class too. Here, when we have multiple fixers to do similar things - it may be cool to move that similarity into trait (oh, wrong PHP version... abstract class)

As agreed abstract will be created.

Status update: abstract class introduced, needs to be UTed.

I think that now it is a good place to resend this PR - please send PR for 1.11 branch and then merge other fixers that change method calls into that new PR.

Any news on that ?

Not yet, lack of time. Will be able to continue in 2 weeks (after 21th August).

ping @kalessil

ping @kalessil ;)

pong @keradus :) Will continue this weekends.

Great to hear! Thanks!

Any news on that @kalessil ? I would really like to see that finished!

Any news on that @kalessil ? I would really like to see that finished!

Any news on that @kalessil ? I would really like to see that finished!

ping @kalessil ;)
that fixer would be great, any chances that you will finish it ?

please finish this @kalessil  :)

@keradus @SpacePossum : I still occupied until mid of November (as you can see pinging takes time =))
I promise to finish max end of November.

I promise to finish max end of November.

I hope it didn't mean Nov 2016? I'm still hoping for this year @kalessil !

@keradus I actually finished (it were needed only UTs for AbstractFunctionReferenceFixer).
Last topic: I need to re-base this branch, which one shall I use for it?

Grea to hear that!
If you rebase it locally on top of 1.12 branch and it will work then send a separate PR instead of this one.
If not rebase it locally on top of current parent, which is master branch - and then push with force.

Ok, will try with 1.12 first

ping @kalessil  :)
would be greater to see this in!

Re-creating PR


[Eloquent] Union Limit Produces invalid query

Laravel Version: 9.6.0
PHP Version: 8.1.16
Database Driver & Version: MariaDB 10.3.34

Description:
Running
class Model extends Illuminate\Database\Eloquent\Model {};
Model::query()->union(Model::query())->limit(1)->toSql();

Produces the following SQL
(select * from `model`) union (select * from `model`) limit 1

Which is invalid SQL and will not run
Here is the SQL that would run correctly
select * from ((select * from `model`) union (select * from `model`)) limit 1

Which is invalid SQL and will not run

What error are you getting?

My bad, seems it does work with MariaDB, but phpMyAdmin and phpStorm are both not happy about this syntax and show an error, and in fact the SQLite driver uses the second syntax


Network statistics description for UX/UI design

Description of fields is ready at google docs https://docs.google.com/spreadsheets/d/1S59kTA4A5sEryVgmJ4hzY0enrAC-feGptWjwQwvVL18/edit?usp=sharing


Device location is not recognized

Briefly summarize your issue:

Device location is incorrect. I've set up the device location per instructions on: https://developer.amazon.com/docs/alexa-voice-service/set-device-location.html
The difference between screenshot in instructions is that I only have 1 entry in settings and it says "This Device" instead of the ProductId. Also, I can't see online/offline status as in screenshot.
Location is set on Zagreb, Croatia. But when I ask: 'What's the weather' I get a weather info for Seattle.
What is the expected behavior?

I should get weather info for correct device location (Zagreb, Croatia) instead of Seattle, WA.
Tell us about your environment:

What version of the AVS Device SDK are you using?
  <1.9.0>

Tell us what hardware you're using:

[ ] Desktop / Laptop
[x] Raspberry Pi
[ ] Other - tell us more:

Tell us about your OS (Type & version):

[ ] Linux
[ ] MacOS
[x] Raspbian Stretch
[ ] Raspbian Jessy
[ ] Other - tell us more:

Hi @mtosic, in the "Authorize and run" step:
https://github.com/alexa/avs-device-sdk/wiki/Raspberry-Pi-Quick-Start-Guide-with-Script#authorize-and-run
Could you double check if you use the same login for both https://amazon.com/us/code during authorization and for your Alexa app when you change the device location?

I only have one account. Everything is synced to alexa mobile app when testing the SDK, so I guess it's working correctly.

Hi @mtosic , have you figured out what's wrong?  I suggest to try with v1.11 and use the script to generate the AlexaConfiguration.json file

I am closing this issue due to inactivity. Please feel free to re-open it if it has been closed in error.


Create latealways.is-not-a.dev.json

Requirements

[x] You have completed your website.
[x] The website is reachable.
[x] The CNAME record doesn't contain https:// or /.
[x] There is sufficient information at the owner field.

Description
I will be using this domain for my personal projects. A roblox game, a stock trading bot, a personal notifier.
Link to Website
latealways.is-not-a.dev
It doesn't really have a website the port 80 or 443 is not always in use since this is not a website it is a server.
Alternate domain: latealways.is-a-good.dev

CLA Assistant Lite bot: Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.

I have read the CLA Document and I hereby sign the CLA

You can retrigger this bot by commenting recheck in this Pull Request

I have read the CLA Document and I hereby sign the CLA


Refactor/guble 52 guble protocol

This includes quite a lot of changes. We should try and merge it sooner then later otherwise the conflicts could be big.
Fixes #52

Coverage remained the same at 75.179% when pulling 1fe2fd4b68df9cfd9b72e1cd2f6f9f118a0ca5f3 on refactor/guble-52-guble-protocol into 2bc1e0529dd49ee35fdd21cbe7735b2879399d20 on master.

looks fine, but now conflicts with the previous merge.

Changes Unknown when pulling 54f582f4452848acabb86e5f87045532818bbae0 on refactor/guble-52-guble-protocol into ** on master**.

Coverage decreased (-0.4%) to 74.727% when pulling cc531557e391e634612617157a7520adfb05d47c on refactor/guble-52-guble-protocol into 1b7e8b5bf10e339f0fa009490009d22f70ae9fec on master.

Coverage remained the same at 75.157% when pulling cf99d85225ff37c3e26fd0508d8cf1f3af75b0b6 on refactor/guble-52-guble-protocol into 1b7e8b5bf10e339f0fa009490009d22f70ae9fec on master.

I will merge this in to master. It also fixed the travis testing.


ES External Versioning support

Rework of PR #43 to fit current master branch
Support for ElasticSearch External Document Versioning as detailed here
Configured as part of the mappings object on a per collection basis with these new properties:
versionType: One of "external" / "external_gt" / "external_gte"
versionField: The field in the source Mongo document to be used for the external version number. If the field value is an ISODate string it will automatically be converted into Unix Time (milliseconds since epoch) as ES only supports integer values for version numbers. This is useful when the versioning is based on a timestamp such as 'createdAt' or 'updatedAt' (for example).
If the both fields are omitted then ES will use its default internal versioning.
Let me know if you have any suggestions/concerns with the implementation.

Hi guys, is there anything I can do to help with getting this PR merged?

Hey Chris, I just got a chance to test this out and it works fine. One more approval and I'll merge it. Sorry for the delay there.


Unable to logout from the default users auth endpoint

Bug Report
Hello and thank you for making payload awesome. I am having a weird issue where I get a 403 response when trying to log out a user who has logged in via the API. I've checked the following:

Users has auth enabled (although a separate Admins collection can only access the dashboard)
I've added the URL of the public site making the request to the cors / csrf array in the payload config.
A user sends a login request to the API which returns the expected JSON response on success.
The /me endpoint is called to verify the user exists on following requests (with credentials included).

Then, I send a POST request to the /users/logout endpoint and get this response back:
{
body: (...)
bodyUsed: false
headers: Headers {}
ok: false
redirected: false
status: 403
statusText: "Forbidden"
type: "cors"
url: "http://localhost:3000/api/users/logout"
}

Expected Behavior
Upon hitting the logout endpoint, there should be a valid response. I'm assuming my configuration is causing this issue, but I've tried to follow the documentation closely.

Current Behavior

Possible Solution

Steps to Reproduce

Detailed Description

Hey @notchris — I'm going to move this to a Discussion instead of an issue, as I think this has to do with your implementation.
Question - are you using Postman or something to test this?
All the logout operation does is simply removes the HTTP-only cookie that is set. But, looking at the code:
https://github.com/payloadcms/payload/blob/master/src/auth/operations/logout.ts
You can see here that a Forbidden error will be thrown if you are trying to logout from a different collection vs. the one that you're logged in as. Basically, you can have more than one collection that supports auth, and you might be logged in with one user in collection A, but hitting the logout route from collection B.
This looks to be the only way that you'd be getting a Forbidden error.


Pzucker/precondition

adds the ability the specify assumptions at the beginning of a program about the variables. Closes #49 ? Does not address idea about soft constraints
It does a string find and replace on variables in smt-lib expressions given to convert them to the internal mangled names.
Contains bug fix for popping BIL Let bindings from the Env.var_map
bug fix for the returned environments from analyze_proj in wp.ml. Should fix #100
Moved smt-lib related functions out of precondition.ml
Adds the ability to create custom preconditions and postconditions in comparative analysis. The variables are referenced by appending "_orig" and "_mod" to variable names.

Example usage
bap resources/sample_binaries/dummy/hello_world.out --pass=wp --wp-compare=true --wp-file1=resources/sample_binaries/equiv_argc/main_1.bpj --wp-file2=resources/sample_binaries/equiv_argc/main_2.bpj --wp-function=main --wp-output-vars=RAX,EAX --wp-precond="(assert (= RDI_mod #x0000000000000003))  (assert (= RDI_orig #x0000000000000003))"

bap resources/sample_binaries/simple_wp/main --pass=wp --wp-precond="(assert (= RDI #x0000000000000002))"

TODO:

Does the naming make sense for precondition? Should it be called assumptions or hypotheses?
I'll also need to rebase off of Chloe's pull request
I still need to add tests
The placement of the new smt-lib code in compare.ml feels a bit ad hoc. Refactor it somewhere?

Looking good other than the conflicts! I agree that the smtlib stuff should be in its own module maybe something like Z3_utils.ml. I'll take a closer look in the morning.

Looks super good! Just a few nitpicks. I agree, putting the smtlib functions in its own module and adding unit test(s) for the compare module is a great idea. Good work! :tada:


Error: Command failed with exit code 1: git config user.name

hi, when I'was not set git config user info ,  execa.command will throw a Error: Command failed with exit code 1: git config user.name
I found it's caused by fetchUser below execa.command not handling errors

https://github.com/geongeorge/Git-User-Switch/blob/master/src/lib/fetchUser.js#L13
https://github.com/geongeorge/Git-User-Switch/blob/master/src/lib/fetchUser.js#L16
https://github.com/geongeorge/Git-User-Switch/blob/master/src/lib/fetchUser.js#L23
https://github.com/geongeorge/Git-User-Switch/blob/master/src/lib/fetchUser.js#L26

I know fetchUser is just for display current git user info which is get from git config user.xxx，
But if not initialized git config user，like Troubleshoot, user experience is not feeling good.
a PR to fix it.

Otherwise，I've read the source code, found git-user reset will only reset user info in the Conf store，but git config user info is still exist. It's puzzle me.
In my opinion，I may want to remove git config user info as well.

I have merged the https://github.com/geongeorge/Git-User-Switch/pull/16
And about removing the git config user, What would happen if we git-user remove the global user? Wouldn't it remove the user from the main config

I agree with

Wouldn't it remove the user from the main config

so, what make me puzzle is,  while git-user --reset the Conf store,  then I run git-user command，initUser will get local git config user info as initialization data without any prompt.
For new users of git-user:

add a prompt selection when initUser will be friendly
add explain about git-user command operating principle in README

git-user store user info list with conf
Conf store's storage path in macOS is：~/Library/Preferences/git-user-switch-nodejs/config.json

I got the fetchUser prompt
Current git user(local) is<EMAIL_ADDRESS>
maybe acceptable to the users