prepare pipeline job bug fix

Was trying to set up live test pipeline for this pr. The prepare-pipeline job failed due to not being able to find install-pipeline-generation.yml.

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow


Replace enum32 with enum-compat (fixes #89)

Thanks

It's mine precious

What's going on everybody


ConsAggShock: add lifecycle capability

As is, ConsAggShock only works properly with single period / perpetual youth models.  Some things need to change for lifecycle models to work in HARK:

The "actuarial interest factor" has to be calculated as a macro / gen eq object, not simply taken as 1/LivPrb.  This requires creating a new input called Ractuarial (initial guess: 1.0) and having it be tracked and averaged during simulation, then returned as part of dyn_vars.

The aggregate productivity level should be tracked independently, so that newborns can be born with pLvl_init*PLvlNow.

There might be other changes required, but I can't think of them now.

This is being worked on in the branch ConsAggMarkov.

ConsAggMarkov was merged in last year, but this feature was never attempted.

Just to clarify, this is conditional on the model being closed-economy
general equilibrium.
As things stand now, the framework can handle a partial equilibrium model
with a constant interest rate.
A (much) simpler way to move most of the way to where a reasonable person
would say is good enough, would just to assume that the world interest rate
follows an AR(1) process, to estimate that process, and then to assume
people believe that AR(1) process (and not worry to much about "world
general equilibrium" which is nearly a metaphysical concept).
On Mon, Jan 9, 2017 at 5:56 PM Matthew N. White<EMAIL_ADDRESS>wrote:

As is, ConsAggShock only works properly with single period / perpetual
youth models. Some things need to change for lifecycle models to work in
HARK:

The "actuarial interest factor" has to be calculated as a macro / gen
eq object, not simply taken as 1/LivPrb. This requires creating a new input
called Ractuarial (initial guess: 1.0) and having it be tracked and
averaged during simulation, then returned as part of dyn_vars.
2.
The aggregate productivity level should be tracked independently, so
that newborns can be born with pLvl_init*PLvlNow.
There might be other changes required, but I can't think of them now.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/econ-ark/HARK/issues/98, or mute the thread
https://github.com/notifications/unsubscribe-auth/AGRCJPtk8XOrUT4X9JvzJQ3i5r_6pqxhks5rQrs1gaJpZM4Le1Qx
.

--

Chris Carroll

After further discussion (and one comment from Chris in another thread), this would have little impact or effect. I think @Mv77 is working with a version of this in the HANK context, integrating a HARK lifecycle model with the SSJ toolkit.


Align error format with Commonalities guidelines

As discussed in issue #97, we have to align current error model and examples to the guidelines:

Add new status property
Created new Generic500 response and $ref all previous instances

@jlurien Short question: is this PR intended for the minor fix release (which I want to close "now") or already for v0.9? As status is a required field, it might fit better into v0.9.0?

@jlurien Short question: is this PR intended for the minor fix release (which I want to close "now") or already for v0.9? As status is a required field, it might fit better into v0.9.0?

0.9 definitely

Added rewievers @eric-murray @patrice-conil as discussed within our call. @SfnUser please renew your review as well. Thanks!

Hi @jlurien,
Just a sample to illustrate my review
ErrorInfo definition may look like this:
ErrorInfo:
discriminator: type
type: object
required:
- type
- status
- code
- message
properties:
type:
description: The error class name
type: "string"
status:
type: string
pattern: "^[4-5][0-9]{2}$"
description: HTTP status code returned along with this error response
code:
type: string
description: Code given to this error
message:
type: string
description: Detailed error description

Hi @jlurien, Just a sample to illustrate my review ErrorInfo definition may look like this:
ErrorInfo: discriminator: type type: object required: - type - status - code - message properties: type: description: The error class name type: "string" status: type: string pattern: "^[4-5][0-9]{2}$" description: HTTP status code returned along with this error response code: type: string description: Code given to this error message: type: string description: Detailed error description

Hi  @patrice-conil, have you commented in the file? I guess this is about the problem you mentioned in the meeting with allOf for some openapi generator. ErrorModel is defined in the commonalities so any change should be aligned there. But in case we decide to define a discriminator to the base class, we could use the existent status or code for this, along with a mapping. Adding a new required property type is would repeat the same information.
Another alternative, as we are not reusing that much of the base ErrorModel, it is just to add the message property to all GenericXXXResponses and remove the allOf. I would not be surprised if some tool has problems as well with OAS3 mapping as that is not supported in legacy Swagger 2.

Hi @jlurien, yes I commented in the file. and it is indeed linked to the problem that I mentioned last Friday. I agree with you, this mapping should do the trick... but it's quite new and probably not so well supported by generators.
I think simplifying the generation of client side is one way to have a usable API. Perhaps we should spend more time documenting our validation rules than documenting sample responses to describe the behaviour of our proposal.

Hi @jlurien, yes I commented in the file. and it is indeed linked to the problem that I mentioned last Friday. I agree with you, this mapping should do the trick... but it's quite new and probably not so well supported by generators. I think simplifying the generation of client side is one way to have a usable API. Perhaps we should spend more time documenting our validation rules than documenting sample responses to describe the behaviour of our proposal.

I only see the latest comment about Generic404. If mapping is not well supported, I prefer to remove the allOf that adding an additional property @type in the API spec for all errors to overcome the limitation, as that would add too much redundancy in the response:
HTTP 404
{
  "@type": "Generic404",
  "status": "404"
  "code": "NOT_FOUND",
  "message": "Session not found"
}

Please review the latest version. Some comments:

status is now an integer
code values aligned with Commonalities (INVALID_ARGUMENT, UNAUTHENTICATED, PERMISSION_DENIED...)
Specific schemas defined for all errors, so ErrorInfo schema is not used. I have created a new issue in Commonalities to decide whether to reference specific model per error or the common model: https://github.com/camaraproject/WorkingGroups/issues/151. When a common approach is decided we should align this to it.

LGTM, just asking @patrice-conil @maxl2287  @eric-murray for a final review (and closing remarks for the open conversations).

@jlurien would you like to rebase your PR to the updated main branch or should I give it a try to resolve the conflicts (and commit them into your PR)?

Is it intended to approve and merge this PR before Commonalities Issue #151 is resolved?

Is it intended to approve and merge this PR before Commonalities Issue #151 is resolved?

We could merge it as it is now and later update the $refs to the right schemas, and remove the unused ones. Indeed I have intentionally left the ErrorInfo schema even if it is currently unused.


Add support for exists operator in query conditions.

User Story
Add support for exists operator in query conditions.
Acceptance Criteria
Write acceptance criteria for this user story to be completed.
Additional context
Add any other context or screenshots about the feature request here.

Closing as done


Unable to edit already approved kata

It seems now I should have the power.
I tried adding some sample test case on this kata, though, but to no avail: I keep getting a 500 Error.
Let me know if you require screenshots, additional info or the like. Thanks for your kind attention :)

I'm currently mobile, so I can't check this: are you a contributor? Only
contributors can change the kata after it's been approved.

The 500 error is definitely no good. Also is the UI telling you that you have the ability to edit that particular kata?

I just went over the 3000 pts threshold today, so, yeah, I get that kind of
message for any kata, approved or not, whether I am a contributor or not:
[image: Inline image 1]
On Tue, Apr 14, 2015 at 5:27 PM, Jake Hoffner<EMAIL_ADDRESS>wrote:

The 500 error is definitely no good. Also is the UI telling you that you
have the ability to edit that particular kata?
—
Reply to this email directly or view it on GitHub
https://github.com/Codewars/codewars.com/issues/38#issuecomment-92909327
.

As far as I can remember: yes. The "edit this kata" link is there, but
leads to a 500 if one didn't contribute during beta.
Can provide screenshots tomorrow.

Oh, so in other words I can edit approved katas, for example, once the author or an admin approves a translation of mine?
That could do for now [I just wanted to improve some older and not too perfected kata].

Just translated this kata, so once it gets approved, if you remember correctly, I should then be able to edit the kata (and add some random tests).

Not to abuse your patience, but here is another kata that I could fix once my translation gets approved (or I can edit it somehow else).
In case you approve any of them, notify me so that I can fix the issues ASAP :)

@GiacomoSorbi your translations have been approved.

Thanks Jake, but as I just commented, regrettably I seem to still get that nasty 500 when trying to edit the kata, apparently no matter whether I am a contributor or not.

Errata corrige: apparently I get the 500 error only in your old kata, the others seem to be editable now: could it be a matter of having been solved more than X (500, was it?) times?

Yeah I just saw that myself and already filed an issue. I was going to downgrade its rank to 6 or 5 kyu since its an early kata and the scale wasn't as worked out back then.

I see; well, in the meantime thanks for the approval wave and I'll work trying to fix/improve the "unlocked" ones :)

To answer @GiacomoSorbi's question in the thread: No, I can't edit this kata either, but occasionally I was able to edit katas. I don't really know whether this has to do with the state of the kata at the point of translation.
On the other hand, I translated "Is a number prime" after it was published, and I was still able to edit the bug notice last month.

Mh, as that kata has over 2000 positive submissions already and assuming it didn't get more than 1500 in a month, the thing is getting rather mysterious.
Oh, well, we'll see.

For the record: I'm able to edit http://www.codewars.com/kata/collatz (there was an error in my Haskell translation).

Good to know (and I include the kata itself that I just solved and translated, not to mention is somehow refreshing to know that even a coder way better than me can make mistakes in kata translations :p), so let's see if I can too, but so should I, considering that it is a relatively new kata with few successful submissions.

@jhoffner Just curious, why was this closed? Is the issue resolved somehow?


Brainstorm list of potential data sources for GUAC

Starting off a thread to keep track of list of potential data sources! I've learnt of a lot of new ones recently from others and i'm sure there are many more!! Feel free to post any data sources that are interesting for GUAC!

https://github.com/nexB/vulnerablecode/tree/main/vulntotal
https://github.com/nexB/purldb/
https://repology.org/

This looks good - https://osv.dev/

This looks good - https://osv.dev/

The certifier is already using osv.dev! :)


Pushdown dereference expression to Parquet reader

Rebased @qqibrow patch to Presto master. When querying nested data, this patch improved our performance 40x (120 seconds -> 3 seconds). Great work, @qqibrow!

gentle ping

rebase?

@JamesRTaylor many conflicts

This has already been merged as part of another PR.


🌐 Add French translation for Tutorial - Background Tasks

Hey everyone!
Here is the PR to translate the Background Tasks section into french.
See the french translation tracking issue here.
Thanks for the reviews👌

Awesome, thank you @Smlep ! :rocket: :cake:
And thanks for the reviews @NastasiaSaby, @Jefidev, @rjNemo! :bow: :coffee:


Dataclass with __pydantic_config__ extra=allow and __pydantic_extra__ field init=False: combination not allowed

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
I'm following this part of the documentation: https://docs.pydantic.dev/latest/concepts/models/#extra-fields.
It shows that we have to declare the __pydantic_extra__ field with init=False:
class Model(BaseModel):
    __pydantic_extra__: dict[str, int] = Field(init=False)

I'm not using a model though, but a dataclass, and the docs continue with:

The same configurations apply to TypedDict and dataclass' except the config is controlled by setting the __pydantic_config__ attribute of the class to a valid ConfigDict.

So I set this attribute too, in a Pydantic dataclass:
from typing import Any
from pydantic import ConfigDict, Field
from pydantic.dataclasses import dataclass

@dataclass
class Dataclass:
    x: int

    __pydantic_config__ = ConfigDict(extra="allow")
    __pydantic_extra__: dict[str, Any] = Field(init=False)

d = Dataclass(x=1, y=2)
print(d.__pydantic_extra__)

However running the code above fails with:
pydantic.errors.PydanticUserError: Field __pydantic_extra__ has `init=False` and dataclass has config setting `extra="allow"`. This combination is not allowed.

Sure, __pydantic_extra__ is declared as field with init=False. But that's a special field, and that's what the docs instruct us to do, so it shouldn't count I guess?

If I don't declare the __pydantic_extra__ field, then I cannot access it once the dataclass is instantiated:
from typing import Any
from pydantic import ConfigDict
from pydantic.dataclasses import dataclass

@dataclass
class Dataclass:
    x: int

    __pydantic_config__ = ConfigDict(extra="allow")

d = Dataclass(x=1, y=2)
print(d.__pydantic_extra__)

AttributeError: 'Dataclass' object has no attribute '__pydantic_extra__'. Did you mean: '__pydantic_config__'?

If I use the standard library dataclasses.field instead of pydantic.Field, then I don't get the Pydantic error, but the field is still not accessible:
from dataclasses import field
from typing import Any
from pydantic import ConfigDict
from pydantic.dataclasses import dataclass

@dataclass
class Dataclass:
    x: int

    __pydantic_config__ = ConfigDict(extra="allow")
    __pydantic_extra__: dict[str, Any] = field(init=False)

d = Dataclass(x=1, y=2)
print(d.__pydantic_extra__)

AttributeError: 'Dataclass' object has no attribute '__pydantic_extra__'. Did you mean: '__pydantic_config__'?

If I set a default value to the field, then I get the Pydantic error again:
from dataclasses import field
from typing import Any
from pydantic import ConfigDict
from pydantic.dataclasses import dataclass

@dataclass
class Dataclass:
    x: int

    __pydantic_config__ = ConfigDict(extra="allow")
    __pydantic_extra__: dict[str, Any] = field(init=False, default_factory=dict)

d = Dataclass(x=1, y=2)
print(d.__pydantic_extra__)

pydantic.errors.PydanticUserError: Field __pydantic_extra__ has `init=False` and dataclass has config setting `extra="allow"`. This combination is not allowed.

Note that y is accessible on the instance, but I rely on __pydantic_extra__ to know which extra fields were passed.
Also note that I declare the config with __pydantic_config__ and no other way because my dataclass declaration must remain compatible with the standard lib (which doesn't have a config parameter).
Apologies if this was reported somewhere else, I couldn't find  it in the issue tracker.
Example Code
from typing import Any
from pydantic import ConfigDict, Field
from pydantic.dataclasses import dataclass

@dataclass
class Dataclass:
    x: int

    __pydantic_config__ = ConfigDict(extra="allow")
    __pydantic_extra__: dict[str, Any] = Field(init=False)

d = Dataclass(x=1, y=2)
print(d.__pydantic_extra__)

Python, Pydantic & OS Version
pydantic version: 2.10.4
        pydantic-core version: 2.27.2
          pydantic-core build: profile=release pgo=false
                 install path: /tmp/pydantic-repro/.venv/lib/python3.11/site-packages/pydantic
               python version: 3.11.7 (main, Jan  8 2024, 05:55:31) [Clang 17.0.6 ]
                     platform: Linux-6.12.7-arch1-1-x86_64-with-glibc2.40
             related packages: typing_extensions-4.12.2
                       commit: unknown

In the meantime I implement __pydantic_extra__ with a somewhat naive property:
        @property
        def __pydantic_extra__(self) -> dict[str, Any]:
            return {f: None for f in {f for f in dir(self) if not f.startswith("_")} - {f.name for f in fields(self)}}


Chore/third feedback

What does this PR do?
This PR implements feedback given by my Learning Facilitator, Temi Lajumoke
Description of Task to be completed?
Handle potential errors
Go over status codes.
How should this be manually tested?
N/A
Any background context you want to provide?
None
What are the relevant pivotal tracker stories?
N/A
Screenshots (if appropriate)
Questions:
None

Coverage decreased (-1.6%) to 81.799% when pulling 470747117e3ed6f69672e3bdb27e922b13d309e5 on chore/third-feedback into 2043e06bcefce0db44dd1e1693cc6117cff5de82 on staging.

Coverage increased (+2.7%) to 86.067% when pulling b37b187fb72543be2bfcac528a4f72df8b9cdc23 on chore/third-feedback into 2043e06bcefce0db44dd1e1693cc6117cff5de82 on staging.


Can not reproduce the evaluation results of small model on 6k multi-ref dataset

I first extract contexts from test.refs.txt (6000 lines)
cat test.refs.txt | cut -f 1 > test.source

and extract multi ref files (use up to 15 per sample)
for (( i=2; i<=15; i++ ))
do
    cat test.refs.txt | cut -f $i > refs/ref_$i.txt
done

Then use the following script to predict the responses on 6k multi-ref dataset.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
from nltk import word_tokenize
from tqdm import tqdm, trange

model_path = '/path/to/DialoGPT-small'
file_path = '/path/to/test.source'
out_path = '/path/to/gpt_test.txt'

tokenizer = AutoTokenizer.from_pretrained(model_path)
tokenizer.padding_side = "left"
SEP = tokenizer.eos_token
tokenizer.add_special_tokens({'pad_token': SEP})

model = AutoModelForCausalLM.from_pretrained(model_path)
model.eval()
batch_size = 64

# read context
lines = []
with open(file_path, encoding='utf-8') as f:
    for line in f:
        new_line = SEP.join(line.strip().split(' EOS ')[-5:]) + SEP
        lines.append(new_line)

preds = []

# predict
for i in trange(0, len(lines), batch_size):
    batchs = lines[i:i+batch_size]
    batch_encoding = tokenizer.batch_encode_plus(
        batchs,
        max_length=256,
        padding=True, truncation=True,
        return_tensors="pt",
    )
    input_ids = batch_encoding['input_ids']
    attention_mask = batch_encoding['attention_mask']
    dyn_seq_len = input_ids.shape[1]
    preds_ids = model.generate(input_ids, attention_mask=attention_mask, max_length=512, num_beams=1, pad_token_id=tokenizer.eos_token_id)
    preds_ids = preds_ids[:, dyn_seq_len:].tolist()
    batch_preds = [tokenizer.decode(ids, skip_special_tokens=True) for ids in preds_ids]
    preds.extend(batch_preds)

# write predictions
with open(out_path, 'w', encoding='utf-8') as f:
    for pred in preds:
        line = ' '.join(word_tokenize(pred)) + '\n'
        f.write(line)

But there is a big gap between the evaluation results and those described in the paper.
My evaluation results
NIST: [3.372, 3.7761, 3.8364, 3.8455]
BLEU: [0.4679, 0.1924, 0.0928, 0.0505]
METEOR: 0.10545417931305287
Entropy: [4.9949875062421425, 7.123308932861081, 8.000309028686685, 8.413536358302238]
Distinct: [0.0619184959030736, 0.22404933196300103]
avg_len: 13.811166666666667

Described in paper

Experiment
NIST2
NIST4
BLEU2
BLEU4
METEOR
ENT-4
DIST-1
DIST-2
Avg. Len

DialoGPT 117M
2.39
2.41
10.54%
1.55%
7.53%
10.78
8.60%
39.90%
12.8

Here are predictions of the first 20 test samples:
I 'm not fasting , I 'm fasting because I 'm fasting .

I 'm going to be a millionaire by the end of this .
I love this post and the art . Do I 40 love it ? Well it does come framed , and it 's so absurd ... idk I just might .
I 'm not sure I trust him .
I have a few of those . I 'll have to check out the other ones .
I 'm watching the Oilers game on TV .
How hard is it to play snooker ?
Deshaun Watson is playing tonight .
What was your time ?
Artie Burns
What 's a screwdriver ?
I 'm not sure if I 'm missing something , but I do n't get it .
I think it 's a title defense .
I 'm not sure if it 's free , but I 've been to a few parks and they 're pretty cool .
I 'm not sure what you 're trying to say .
I 'm not sure what you 're trying to say .
I have the most chromosomes .
John Wick .

This is the evaluation result of the medium model and the large model. It can be seen that the gap between NIST/BLEU/DIST and the official results is relatively large.
DialoGPT-medium
NIST: [3.6142, 4.1402, 4.2257, 4.2379]
BLEU: [0.5054, 0.2272, 0.1161, 0.0658]
METEOR: 0.11448456319410923
Entropy: [5.110969324425441, 7.4741025550415054, 8.487332812728265, 8.96638167676112]
Distinct: [0.063865246873529, 0.2401520577378657]
avg_len: 13.1005
DialoGPT-large
NIST: [3.9302, 4.5571, 4.6678, 4.6848]
BLEU: [0.5454, 0.2555, 0.1352, 0.0788]
METEOR: 0.11694036328599848
Entropy: [5.376659255260651, 8.038661195818934, 9.129731989024675, 9.630095839832428]
Distinct: [0.07617776246662647, 0.29050042408821036]
avg_len: 11.611
Official

Experiment
NIST2
NIST4
BLEU2
BLEU4
METEOR
ENT-4
DIST-1
DIST-2
Avg. Len

Human response
3.41
4.25
17.90%
7.48%
10.64%
11
14.50%
63.00%
13.1

DialoGPT 117M
2.39
2.41
10.54%
1.55%
7.53%
10.78
8.60%
39.90%
12.8

DialoGPT 345M
3
3.06
16.96%
4.56%
9.81%
9.13
6.80%
26.30%
12.2

DialoGPT 762M
2.84
2.9
18.66%
5.25%
9.66%
9.72
7.76%
29.93%
11.2

I first extract contexts from test.refs.txt (6000 lines)
cat test.refs.txt | cut -f 1 > test.source

and extract multi ref files (use up to 15 per sample)
for (( i=2; i<=15; i++ ))
do
    cat test.refs.txt | cut -f $i > refs/ref_$i.txt
done

Then use the following script to predict the responses on 6k multi-ref dataset.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
from nltk import word_tokenize
from tqdm import tqdm, trange

model_path = '/path/to/DialoGPT-small'
file_path = '/path/to/test.source'
out_path = '/path/to/gpt_test.txt'

tokenizer = AutoTokenizer.from_pretrained(model_path)
tokenizer.padding_side = "left"
SEP = tokenizer.eos_token
tokenizer.add_special_tokens({'pad_token': SEP})

model = AutoModelForCausalLM.from_pretrained(model_path)
model.eval()
batch_size = 64

# read context
lines = []
with open(file_path, encoding='utf-8') as f:
    for line in f:
        new_line = SEP.join(line.strip().split(' EOS ')[-5:]) + SEP
        lines.append(new_line)

preds = []

# predict
for i in trange(0, len(lines), batch_size):
    batchs = lines[i:i+batch_size]
    batch_encoding = tokenizer.batch_encode_plus(
        batchs,
        max_length=256,
        padding=True, truncation=True,
        return_tensors="pt",
    )
    input_ids = batch_encoding['input_ids']
    attention_mask = batch_encoding['attention_mask']
    dyn_seq_len = input_ids.shape[1]
    preds_ids = model.generate(input_ids, attention_mask=attention_mask, max_length=512, num_beams=1, pad_token_id=tokenizer.eos_token_id)
    preds_ids = preds_ids[:, dyn_seq_len:].tolist()
    batch_preds = [tokenizer.decode(ids, skip_special_tokens=True) for ids in preds_ids]
    preds.extend(batch_preds)

# write predictions
with open(out_path, 'w', encoding='utf-8') as f:
    for pred in preds:
        line = ' '.join(word_tokenize(pred)) + '\n'
        f.write(line)

But there is a big gap between the evaluation results and those described in the paper.
My evaluation results
NIST: [3.372, 3.7761, 3.8364, 3.8455]
BLEU: [0.4679, 0.1924, 0.0928, 0.0505]
METEOR: 0.10545417931305287
Entropy: [4.9949875062421425, 7.123308932861081, 8.000309028686685, 8.413536358302238]
Distinct: [0.0619184959030736, 0.22404933196300103]
avg_len: 13.811166666666667

Described in paper
Experiment	NIST2	NIST4	BLEU2	BLEU4	METEOR	ENT-4	DIST-1	DIST-2	Avg. Len
DialoGPT 117M	2.39	2.41	10.54%	1.55%	7.53%	10.78	8.60%	39.90%	12.8
Here are predictions of the first 20 test samples:
I 'm not fasting , I 'm fasting because I 'm fasting .

I 'm going to be a millionaire by the end of this .
I love this post and the art . Do I 40 love it ? Well it does come framed , and it 's so absurd ... idk I just might .
I 'm not sure I trust him .
I have a few of those . I 'll have to check out the other ones .
I 'm watching the Oilers game on TV .
How hard is it to play snooker ?
Deshaun Watson is playing tonight .
What was your time ?
Artie Burns
What 's a screwdriver ?
I 'm not sure if I 'm missing something , but I do n't get it .
I think it 's a title defense .
I 'm not sure if it 's free , but I 've been to a few parks and they 're pretty cool .
I 'm not sure what you 're trying to say .
I 'm not sure what you 're trying to say .
I have the most chromosomes .
John Wick .

Hello!
Could you share the evaluation code you used, please?

The evaluation code is almost the same as the official.
#  Copyright (c) Microsoft Corporation.
#  Licensed under the MIT license.

import re
from collections import defaultdict
import argparse
from pathlib import Path

import os, time, subprocess, io, sys, re, argparse
import numpy as np

py_version = sys.version.split('.')[0]
if py_version == '2':
    open = io.open
else:
    unicode = str

def makedirs(fld):
    if not os.path.exists(fld):
        os.makedirs(fld)

cur_dir = str(Path(__file__).parent)

def str2bool(s):
    # to avoid issue like this: https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse
    if s.lower() in ['t','true','1','y']:
        return True
    elif s.lower() in ['f','false','0','n']:
        return False
    else:
        raise ValueError

def calc_nist_bleu(path_refs, path_hyp, fld_out='temp', n_lines=None):
    # call mteval-v14c.pl
    # ftp://jaguar.ncsl.nist.gov/mt/resources/mteval-v14c.pl
    # you may need to cpan install XML:Twig Sort:Naturally String:Util

    makedirs(fld_out)

    if n_lines is None:
        n_lines = len(open(path_refs[0], encoding='utf-8').readlines())
    # import pdb; pdb.set_trace()
    _write_xml([''], fld_out + '/src.xml', 'src', n_lines=n_lines)
    _write_xml([path_hyp], fld_out + '/hyp.xml', 'hyp')#, n_lines=n_lines)
    _write_xml(path_refs, fld_out + '/ref.xml', 'ref')#, n_lines=n_lines)

    time.sleep(1)
    cmd = [
        'perl',f'{cur_dir}/mteval-v14c.pl',
        '-s', '%s/src.xml'%fld_out,
        '-t', '%s/hyp.xml'%fld_out,
        '-r', '%s/ref.xml'%fld_out,
        ]
    process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
    # import pdb; pdb.set_trace()
    output, error = process.communicate()

    lines = output.decode().split('\n')

    try:
        nist = lines[-6].strip('\r').split()[1:5]
        bleu = lines[-4].strip('\r').split()[1:5]
        return [float(x) for x in nist], [float(x) for x in bleu]

    except Exception:
        print('mteval-v14c.pl returns unexpected message')
        print('cmd = '+str(cmd))
        print(output.decode())
        print(error.decode())
        return [-1]*4, [-1]*4

def calc_cum_bleu(path_refs, path_hyp):
    # call multi-bleu.pl
    # https://github.com/moses-smt/mosesdecoder/blob/master/scripts/generic/multi-bleu.perl
    # the 4-gram cum BLEU returned by this one should be very close to calc_nist_bleu
    # however multi-bleu.pl doesn't return cum BLEU of lower rank, so in nlp_metrics we preferr calc_nist_bleu
    # NOTE: this func doesn't support n_lines argument and output is not parsed yet

    process = subprocess.Popen(
            ['perl', f'{cur_dir}/multi-bleu.perl'] + path_refs,
            stdout=subprocess.PIPE,
            stdin=subprocess.PIPE
            )
    with open(path_hyp, encoding='utf-8') as f:
        lines = f.readlines()
    for line in lines:
        process.stdin.write(line.encode())
    output, error = process.communicate()
    return output.decode()

def calc_meteor(path_refs, path_hyp, fld_out='temp', n_lines=None, pretokenized=True):
    # Call METEOR code.
    # http://www.cs.cmu.edu/~alavie/METEOR/index.html

    makedirs(fld_out)
    path_merged_refs = fld_out + '/refs_merged.txt'
    _write_merged_refs(path_refs, path_merged_refs)
    cmd = [
            'java', '-Xmx1g',    # heapsize of 1G to avoid OutOfMemoryError
            '-jar', f'{cur_dir}/meteor-1.5/meteor-1.5.jar',
            path_hyp, path_merged_refs,
            '-r', '%i'%len(path_refs),     # refCount
            '-l', 'en', '-norm'     # also supports language: cz de es fr ar
            ]
    # print(cmd)
    process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    output, error = process.communicate()
    for line in output.decode().split('\n'):
        if "Final score:" in line:
            return float(line.split()[-1])

    print('meteor-1.5.jar returns unexpected message')
    print("cmd = " + " ".join(cmd))
    print(output.decode())
    print(error.decode())
    return -1

def calc_entropy(path_hyp, n_lines=None):
    # based on Yizhe Zhang's code
    etp_score = [0.0,0.0,0.0,0.0]
    counter = [defaultdict(int),defaultdict(int),defaultdict(int),defaultdict(int)]
    i = 0
    for line in open(path_hyp, encoding='utf-8'):
        i += 1
        words = line.strip('\n').split()
        for n in range(4):
            for idx in range(len(words)-n):
                ngram = ' '.join(words[idx:idx+n+1])
                counter[n][ngram] += 1
        if i == n_lines:
            break

    for n in range(4):
        total = sum(counter[n].values())
        for v in counter[n].values():
            etp_score[n] += - v /total * (np.log(v) - np.log(total))

    return etp_score

def calc_len(path, n_lines):
    l = []
    for line in open(path, encoding='utf8'):
        l.append(len(line.strip('\n').split()))
        if len(l) == n_lines:
            break
    return np.mean(l)

def calc_diversity(path_hyp):
    tokens = [0.0,0.0]
    types = [defaultdict(int),defaultdict(int)]
    for line in open(path_hyp, encoding='utf-8'):
        words = line.strip('\n').split()
        for n in range(2):
            for idx in range(len(words)-n):
                ngram = ' '.join(words[idx:idx+n+1])
                types[n][ngram] = 1
                tokens[n] += 1
    div1 = len(types[0].keys())/tokens[0]
    div2 = len(types[1].keys())/tokens[1]
    return [div1, div2]

def nlp_metrics(path_refs, path_hyp, fld_out='temp',  n_lines=None):
    nist, bleu = calc_nist_bleu(path_refs, path_hyp, fld_out, n_lines)
    meteor = calc_meteor(path_refs, path_hyp, fld_out, n_lines)
    entropy = calc_entropy(path_hyp, n_lines)
    div = calc_diversity(path_hyp)
    avg_len = calc_len(path_hyp, n_lines)
    return nist, bleu, meteor, entropy, div, avg_len

def _write_merged_refs(paths_in, path_out, n_lines=None):
    # prepare merged ref file for meteor-1.5.jar (calc_meteor)
    # lines[i][j] is the ref from i-th ref set for the j-th query

    lines = []
    for path_in in paths_in:
        lines.append([line.strip('\n') for line in open(path_in, encoding='utf-8')])

    with open(path_out, 'w', encoding='utf-8') as f:
        for j in range(len(lines[0])):
            for i in range(len(paths_in)):
                f.write(unicode(lines[i][j]) + "\n")

def _write_xml(paths_in, path_out, role, n_lines=None):
    # prepare .xml files for mteval-v14c.pl (calc_nist_bleu)
    # role = 'src', 'hyp' or 'ref'

    lines = [
        '<?xml version="1.0" encoding="UTF-8"?>',
        '<!DOCTYPE mteval SYSTEM "">',
        '',
        ''%paths_in,
        '',
        '<mteval>',
        ]

    for i_in, path_in in enumerate(paths_in):

        # header ----

        if role == 'src':
            lines.append('<srcset setid="unnamed" srclang="src">')
            set_ending = '</srcset>'
        elif role == 'hyp':
            lines.append('<tstset setid="unnamed" srclang="src" trglang="tgt" sysid="unnamed">')
            set_ending = '</tstset>'
        elif role == 'ref':
            lines.append('<refset setid="unnamed" srclang="src" trglang="tgt" refid="ref%i">'%i_in)
            set_ending = '</refset>'

        lines.append('<doc docid="unnamed" genre="unnamed">')

        # body -----

        if role == 'src':
            body = ['__src__'] * n_lines
        else:
            with open(path_in, 'r', encoding='utf-8') as f:
                body = f.readlines()
            if n_lines is not None:
                body = body[:n_lines]
        #for i in range(len(body)):
        i = 0
        for b in body:
            line = b.strip('\n')
            line = line.replace('&',' ').replace('<',' ')        # remove illegal xml char
            # if len(line) > 0:
            lines.append('
<seg id="%i"> %s </seg>
'%(i + 1, line))
            i += 1

        # ending -----

        lines.append('</doc>')
        if role == 'src':
            lines.append('</srcset>')
        elif role == 'hyp':
            lines.append('</tstset>')
        elif role == 'ref':
            lines.append('</refset>')

    lines.append('</mteval>')
    with open(path_out, 'w', encoding='utf-8') as f:
        f.write(unicode('\n'.join(lines)))

def dialogue_evaluation(hyp_file, ref_file, fld_out):
    nist, bleu, meteor, entropy, div, avg_len = nlp_metrics([ref_file], hyp_file, fld_out)
    results = {
        'NIST-2': nist[1],
        'NIST-4': nist[3],
        'BLEU-2': bleu[1],
        'BLEU-4': bleu[3],
        'METEOR': meteor,
        'Entropy-4': entropy[3],
        'Dist-1': div[0],
        'Dist-2': div[1],
        'avg_len': avg_len
    }
    return results

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--refs_dir', default=None)
    parser.add_argument('--ref_file', default=None)
    parser.add_argument('--hyp_file', required=True)
    parser.add_argument('--fld_out', required=True)

    args = parser.parse_args()
    if args.ref_file is not None:
        refs_files = [args.ref_file]
    else:
        refs_files = list(map(str, Path(args.refs_dir).glob('ref_*.txt')))
    print("references: ", refs_files)
    nist, bleu, meteor, entropy, div, avg_len = nlp_metrics(refs_files, args.hyp_file, args.fld_out)
    print("NIST:", nist)
    print("BLEU:", bleu)
    print("METEOR:", meteor)
    print("Entropy:", entropy)
    print("Distinct:", div)
    print("avg_len:", avg_len)
if __name__ == "__main__":
    main()

Thank you so much.
And one more question: how can I find the test.refs.txt and test.refs.txt files?

preds_ids = model.generate(input_ids, attention_mask=attention_mask, max_length=512, num_beams=1, pad_token_id=tokenizer.eos_token_id)
From DialoGPT paper,

Beam search (with
beam width 10) dramatically improves BLEU and
DIST scores, and marginally improves NIST and
METEOR.

Maybe trying generating responses with num_beams=10 and observe if there is any difference.


Signing MSI attempts dual signing and fails

Since the change in https://github.com/electron-userland/electron-wix-msi/pull/177 to use @electron/windows-sign, the package now tries to dual sign the MSI with both SHA-1 and SHA-256 (which fails):
Error: Signtool exited with code 1. Stderr: SignTool Error: Multiple signature support is not implemented for this filetype.

@electron/windows-sign needs to be able to specify that only a single algorithm is required, and then this package should specify which one to use.

I've just updated to the latest version of everything and getting exactly the same error.  Digging into it and trying a plethora of
approaches and I think this is an issue more relating to windows-sign and MSI's than anything else.  I've even tried multiple versions of signtool.exe to see if that made any difference (which it didn't).
On my Windows 10 machine the only way I've got this working is to set appendSignature to false on line 106 of cjs/signWithSignTool.js - it's a hack and not something I'd necessarily recommend.
Don't quite know if this varies depending on the operating system being used as it's a weird one to have slipped through.

its because electron/windows-sign appends signatures
https://github.com/electron/windows-sign/blob/7527ffff6158ad7b4062e112c448a862f185034d/src/sign-with-signtool.ts#L123
I'm also looking for a way to disable this

want to bump this issue since currently MSI signing is not working.

Running in to this as well. Are there any workarounds?

@alu- I got around this by using hookFunction:
{
        windowsSign: {
          hookFunction: async (fileToSign: string) => {
            const {
              code,
              stderr,
              stdout,
            }: {code: number | null; stderr: string; stdout: string} =
              await new Promise(resolve => {
                const command = process.env.SIGNTOOL_PATH ?? '';
                const hash = 'sha256';
                const args = [
                  'sign',
                  '/tr',
                  process.env.TIMESTAMP_SERVER ?? '',
                  '/td',
                  hash,
                  '/f',
                  process.env.CODE_SIGNING_CERTIFICATE_PATH ?? '',
                  '/p',
                  process.env.CODE_SIGNING_PASSWORD ?? '',
                  '/fd',
                  hash,
                  fileToSign,
                ];
                const fork = spawn(command, args, {
                  env: process.env,
                  cwd: process.cwd(),
                });
                let stdout = '';
                let stderr = '';
                fork.stdout.on('data', data => {
                  stdout += data;
                });
                fork.stderr.on('data', data => {
                  stderr += data;
                });
                fork.on('close', code => {
                  resolve({stdout, stderr, code});
                });
              });

            if (code !== 0) {
              console.error(
                `Signtool exited with code ${code}. Stderr: ${stderr}. Stdout: ${stdout}`,
              );
              // eslint-disable-next-line no-process-exit
              process.exit(1);
            }
          },
        },
// ... other properties
      },

Yay! Using the above mentioned hookFunction did indeed work for me after some customization. Thank you very much Andrey.
For any that comes after I forgot to remove the old references to certificateFile which caused the same error as it tried to sign the file twice, but after I removed that it works.

this  PR has been accepted. These options need to be brought forward into this package


List object relation not being saved automatically

Describe the bug
I have one-to-many relation, one CustomConfig having many CustomFieldConfig:
class: CustomConfig
table: custom_config
fields:
    useRestock: bool
    useLots: bool
    useDecimals: bool
    customFields: List<CustomFieldConfig>?, relation

class: CustomFieldConfig
table: custom_field_config
fields:
    entity: int
    name: String
    required: bool
    options: List<String>?
    type: CustomFieldType

To Reproduce

Insert a CustomConfig with List<CustomFieldConfig> populated

Expected behavior
I expected that when saving CustomConfig it will auto-save the one-to-many relation for CustomFieldConfig. But it's not doing that. Am I supposed to manually manage that? I'm so confused because the docs imply that it's automatically managed for me.
Screenshots

Here's proof that I'm sending non-empty List

Here's screenshot showing that items are null, and in fact there are no rows in the table at all

Serverpod versions

CLI Version: 1.2.5
Library version: 1.2.5

Platform information
Running on Macbook Pro M1

Hey @itsJoKr!
Unfortunately we don't support saving related data in a single query yet. Attaching or detaching related data requires a separate request to the database. You can read more about these operations here: https://docs.serverpod.dev/concepts/database/relation-queries#update
We have an issue tracking that feature here: https://github.com/serverpod/serverpod/issues/1343

I'm so confused because the docs imply that it's automatically managed for me.

It's not good that we give indications that this is handles automatically. Could you give us a pointer to where in the docs we gave this impressions so that we can clarify it?


Minor typo fixes

change Preprocesses the given image for evaluation  ---> Preprocesses the given image for training in function preprocess_for_train()

Hi, When will this branch be merged. @MarkDaoust


Enable config.load_defaults in rails application.rb and determine which defaults we need to modify

We currently disable loading defaults for one known reason, belongs_to_required_by_default.  It's hard to know or remember if there are others we need to change from the defaults. We should try to enable defaults and manually undo specific defaults we still need the old behavior.
As of right now, it's hard to tell what changes we have from the defaults.  At least if we enumerate our needed changes, we can try to fix each one separately and move our application closer to the defaults.
EDIT: Note, rails documents the defaults for each version here: https://guides.rubyonrails.org/configuring.html#versioned-default-values

FWIW, when I changed the manageiq-schema dummy app to Rails 7.0, this was one of the ones I kept in place:
You can see how we load the defaults, and then change 2 settings here: https://github.com/ManageIQ/manageiq-schema/blob/688930bd09ae0c39a91edc8a6770d41234563749/spec/dummy/config/application.rb


Keyring quota exhaustion

Not a cmgr bug, but a potential gotcha that might be good to document, similar to #39.
I've found that it's pretty easy to run into the default keyring quotas when running lots (~200) of containers.
The error bubbles up from runc as:
error: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: join session keyring: create session key: disk quota exceeded: unknown

when creating a build.
This blog post mentions a similar situation, though in their case they were able to work around it by increasing only /proc/sys/kernel/keys/maxbytes. I found that I needed to increase /proc/sys/kernel/keys/maxkeys as well, though mine was originally set to the Ubuntu default 200 rather than the 1000000 mentioned in the blog post.

As a clarification, I think that the non-root keyring limits only come into play when user namespace remapping is enabled for the Docker daemon. Since that's a non-default configuration it's probably not appropriate for the cmgr docs to address it.


[Implement rule] Check for milestone usage

If the project to be checked is on Github, check whether the project is using milestones.

Relevant Github API: https://developer.github.com/v3/issues/milestones/

Moved this to the roadmap--initial implementation will not have github integration.


perlPackages.XSParseKeyword: init at 0.06

Motivation for this change
https://metacpan.org/dist/XS-Parse-Keyword
This is a new dependency for perlPackages.FutureAsyncAwait upgrade (starting with https://metacpan.org/release/PEVANS/Future-AsyncAwait-0.50).
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[X] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[X] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes

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

[X] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 126161 at 12396886 run on aarch64-linux 1

2 packages built successfully:

perl530Packages.XSParseKeyword
perl532Packages.XSParseKeyword

@GrahamcOfBorg build perlPackages.XSParseKeyword perldevelPackages.XSParseKeyword

Thanks! will do the upgrade of perlPackages.FutureAsyncAwait in a bit :muscle:


upgrading from v2.0 to v2.1 fails to update nats

this was made in error, and was actually due to an override


restore predictor images in isvc configmap

Signed-off-by: Suresh Nakkeran<EMAIL_ADDRESS>This PR is to fix the issue that container image becomes empty for old inferenceservices if the Kserve is upgraded from v0.7.0 to v0.8.0.
Solution:
The predictor images are restored in inferenceservice configmap.

/retest

Thanks @Suresh-Nakkeran !
/lgtm
/approve


Layout search

The layout component should have search capability. This would make it easy for sites to have a nice searching experience in the header.
The update would not include typeahead type stuff. Developers would use their own solution for that and apply the mdl-list styling against results to get the proper style for that.

This sounds like something that will be composed out of the modular components from v2, rather than something we should provide as a sufficient component. Closing, but feel free to reopen if you disagree.

We should provide this as a full component, but on its own and not integrated into the core appbar implementation. A new issue was opened just now, so I set that one to the Post-V2 milestone and we can assess it further then once we know what we are dealing with. Depending on how we implement V2 appbar/toolbars it could be tricky.
This is still a piece of core defined functionality and search is fairly major to sites. So, we should provide this behavior imo.


LUCI recipe changes need presubmits or checklists.

Currently, all LUCI recipe changes are speculative. Breaking changes to the recipe are only discovered after the updated recipe is used by all bots (usually on a not entirely obvious commit). After the breaking change has been identified (hopefully by the author who is vigilant for such breaking changes), the tree is stuck in a red state till another patch is manually pushed. While there is a playbook for testing recipe changes on specific bots, there is none for testing the same across all bots.
Tree closures due to this issue are hard to discover, take a long time to patch (manually) and have severe knock on effect for multiple teams. There ought to be a presubmit or playbook for testing recipe changes before they are committed.

This is complete, will start removing the experimental percentage.


DbSet not updated

Unfortunately, this example doesn't fully work as-is.
Often we need to add an entity to an underlying store (likely a List(Of T) during testing), and then verify that it was added correctly. The example doesn't show how to do so. BlogService.AddBlog() returns Nothing and no Blog is added to Context.Blogs.
This can be accomplished by mocking the DbSet.Add() method:
[Fact]
public void CreateBlog_saves_a_blog_via_context()
{
  var data = new List<Blog>
  {
    new Blog { Name = "BBB" },
    new Blog { Name = "ZZZ" },
    new Blog { Name = "AAA" },
  };

  var mockSet = new Mock<DbSet<Blog>>();
  mockSet.Setup(blogs => blogs.Add(It.IsAny<Blog>)).Returns<Blog>(blog =>
  {
    data.Add(blog);
    return blog;
  });

  var mockContext = new Mock<BloggingContext>();
  mockContext.Setup(m => m.Blogs).Returns(mockSet.Object);

  var service = new BlogService(mockContext.Object);
  var blog = service.AddBlog("_ADO.NET Blog", "http://blogs.msdn.com/adonet");
  var blogs = service.GetAllBlogs();

  mockSet.Verify(m => m.Add(It.IsAny<Blog>()), Times.Once());
  mockContext.Verify(m => m.SaveChanges(), Times.Once());

  Assert.NotNull(blog)
  Assert.Equal(4, blogs.Count);
  Assert.Equal("AAA", blogs(1).Name);
  Assert.Equal("BBB", blogs(2).Name);
  Assert.Equal("ZZZ", blogs(3).Name);
}

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

ID: 1a04a5e4-3060-2331-f78d-8b45064b8983
Version Independent ID: 673d9406-3fa1-a9eb-f5cc-a431155e0260
Content: Testing with a mocking framework - EF6
Content Source: entity-framework/ef6/fundamentals/testing/mocking.md
Product: entity-framework
Technology: entity-framework-6
GitHub Login: @ajcvickers
Microsoft Alias: avickers

Thank you for requesting a change to the EF6 documentation. We are prioritizing improvements to the EF Core documentation and at this time we are not making changes to the EF6 documentation.
However, we will consider well-written community pull requests to improve the EF6 documentation. The documentation source is located in the EntityFramework.Docs repository on GitHub. To submit a pull request:

Find the file to update and click on it to open

Click on the edit button (✏) to edit in your web browser

When done, add a title and description, then use the "Create a new branch and start a pull request." option.

(Note that you can also clone the docs repo and do a GitHub PR in the normal way.)


Wants alerting to subgroups in telegram

In one of updates of Telegram messanger added subgroups to group chats.
Please add possibility send messages to subgroups. For will made this need add one field message_thread_id in request for Telegram Bot API.
Thanks

Just add message_thread_id field to <telegram_config> (https://prometheus.io/docs/alerting/latest/configuration/#telegram_config)

Just add message_thread_id field to <telegram_config> (https://prometheus.io/docs/alerting/latest/configuration/#telegram_config)

why should it work if its undocumented? It doesnt seem like a field that would automatically work? :{

@udartsev it does not work as you suggested.
alertmanager config:
  telegram_configs:
    - send_resolved: false
      chat_id: -1001868435535
      message_thread_id: 1486

image: prom/alertmanager:v0.26.0

Error log:
ts=2023-11-08T14:53:42.575Z caller=coordinator.go:118 level=error component=configuration msg="Loading configuration file failed" file=/etc/alertmanager/alertmanager.yml err="yaml: unmarshal errors:\n  line 39: field message_thread_id not found in type config.plain"

not surprising, since it's not documented.

Upvote for this feature, but currently theres no per-topic policies in telegram, such as 'send message' to prevent user messaging in topics planned for alerts. w8ing for yr experience, but seems writing yet another bot paired with alertmanager webhooks is unavoidable to achieve functionality i ve mentioned

Alertmanager may have already implemented this, I'll check it separately on the latest version.
But I found an article (in Russian) in which a person modifies the internal code of Alertmanager to add support for message_thread_id to the function of sending messages to TG.
https://nixhub.ru/posts/alertmanager-to-tg-topics/
I plan to try to make my own build with these changes in the container.

I also want this functionality, it just seems illogical to hack a ready-made solution to add functionality that has been present for more than one year, and then update local images so that it would at least somehow be up to date

we’ve also tested by adding message_thread_id in the config, but it doesn’t seem to be working. @simonpasquier Could you please consider adding this functionality? It would help greatly in classifying alerts more easily. Ideally, it would be best if this functionality could be optional
Thank you!

Currently, the latest kube-prometheus-stack Helm chart uses Alertmanager v0.27 by default. I attempted to override the Alertmanager image to v0.28.0-rc.0 using the following configuration in my values file:
alertmanager:
  enabled: true
  image:
    repository: quay.io/prometheus/alertmanager
    tag: v0.28.0-rc.0

However, the image and tag are not being updated as expected after deploying the chart. Is there a specific way to force the chart to use a custom image and tag for Alertmanager, or are there additional configurations required to achieve this?

@mdraevich
I attempted to update my alertmanager image to version v0.28.0-rc.0 to utilize the message_thread_id feature for Telegram notifications. However, it seems that this version doesn’t support it, as the message_thread_id field doesn’t appear to be applied in the Alertmanager status page.
Below is the relevant section of my configuration:
telegram_configs:
  - bot_token: xxxxxx
    api_url: https://api.telegram.org
    chat_id: -1002485142605
    send_resolved: true
    message_thread_id: 3

The field message_thread_id is defined as per the documentation, but it appears to be ignored in this release candidate. Attached is a screenshot of the Alertmanager status page for reference. Is there a known issue with this version or an alternative approach to achieve thread-specific Telegram notifications?

@ashwaq06
Hello!
Have you updated the CRD in your k8s cluster?
https://github.com/prometheus-operator/prometheus-operator/issues/7122

Hi. Is there any news when it will be possible to use message_thread_id ?


net/http: add switches to accept/send bogus HTTP?

We are writing a reverse proxy that we want to be completely transparent in terms of the HTTP request URI. If a client sends an invalid Request URI, we want to forward it on as is and not modify it in any way.
We have been able to almost achieve this goal using the url.Opaque field, expect for http requests starting with //. In the URL.RequestURI() method here, we see that an explicit check is being made for a prefix of // and the Scheme is appended. This was added for issue https://github.com/golang/go/issues/4860.
The issue https://github.com/golang/go/issues/10433 mentions a workaround for the specific usecase of //, but using RawPath makes URL.RequestURI() return a url-encoded RequestURI through the use of EscapedPath(). This is also a violation of our goal of transparency.
If there is another workaround that we are not aware, help finding that out would be appreciated, otherwise we would ask whether or not this is a feature the Go developers would support.
Reference issue: https://github.com/cloudfoundry/gorouter/issues/60
@crhino && @shashwathi

It's true that in general we don't let you send illegal stuff.
But why can't you send a request with two leading slashes? It would just look like the absolute-path form of http://tools.ietf.org/html/rfc7230#section-5.3 e.g. http://play.golang.org/p/9fU1tChOrU
What are the bytes of the HTTP request you're trying to send?

Here is a playground example of what we are trying to do: http://play.golang.org/p/r5-UXAoBsu
My understanding is that a path beginning with "//" is not allowed, according to http://tools.ietf.org/html/rfc3986#section-3.3. However, many clients allow this to be sent, and as such we want to pass it on unmodified.

My understanding is that a path beginning with "//" is not allowed, according to http://tools.ietf.org/html/rfc3986#section-3.3. However, many clients allow this to be sent, and as such we want to pass it on unmodified.

Go has no problem with them. See the snippet I wrote above (http://play.golang.org/p/9fU1tChOrU) for generating one.

I guess //£^sdf would be a better example of a path which can't be generated with Go.

What I can't quickly find reading https://github.com/cloudfoundry/gorouter/issues/60 is why this matters.
What client is generating GET //foo paths?
What server is requiring //foo requests?

@bradfitz I believe the root problem is that when the client requests GET //foo as it passes through the gorouter transparent proxy it is transformed to http://foo which as it passes onto the final destination server becomes a 404.  Where the final destination server would have handled //foo just fine.  You can see it @crhino playground example that what when the go request handler thinks it got a request for http://foo instead of //foo that was originally sent.
I think you're simple example only deals with generating the request.  I think the problem is on the go request handler side not the go client request side.
Does that help?
Mike

@youngm, can you answer my two questions, though?

@bradfitz In the case of https://github.com/cloudfoundry/gorouter/issues/60 the client is a Commercial off the shelf web based product performing an xhr request.  Because it is a commercial product it is not easily modified unlike a custom build application.  The Server is a Java Tomcat Server.
The javacript in this commercial application is obviously not supposed to send //foo requests.  But, the issue here is that regardless of this client invalid request it should be possible to write a transparent proxy using go http that doesn't munge a request like this.

But, the issue here is that regardless of this client invalid request it should be possible to write a transparent proxy using go http that doesn't munge a request like this.

It should certainly be possible, but the answer might be using the net package and not the net/http package. The net/http package has only been getting stricter over time.
Even if we found a nice way for you to send bogus outgoing HTTP requests, I would want to make it opt-in, so we never speak invalid HTTP by default. But then we'd want to do the same thing for the HTTP server.
For instance, I bet there there already a dozen HTTP requests you won't be able to handle with the net/http server because they're rejected before your Handler gets it. I might even add rejecting bogus Request-Line targets now that I'm aware of it.
So really this bug is about deciding whether we add an opt-in mechanism for both client & server to allow bogus stuff.

@bradfitz I think that sums it up correctly.  Do you want to weigh in @crhino ?  Since has implications for gorouter?

Where this gets interesting is with custom error pages.  We have a project that was already doing some validation of its own and then returning not just a 400 status, but an error page with details (similar to what's suggested in #10123).  Now with Go 1.6, the request doesn't even reach the handler infrastructure, so we don't have the ability to return a custom error page.  It seems like there are two solutions to this:

Allow user of http.Server to disable certain validation as this ticket suggests

Allow user of http.Server to register custom error handlers for any validations that are performed

1 seems easier to implement initially and more broadly applicable.  2 seems more convenient for the specific case of displaying custom error pages.
@bradfitz What do you think?
cc: @uaalto

@bradfitz This is the bug we were just talking about.  Basically our main use for this is that we have an HTTP proxy server that mimics an unconfigured Apache server under certain circumstances.  In the case of a 400 bad request, Apache has specific HTTP headers that it sends when responding, as well as specific HTML body content.  We'd like to be able to continue responding with these.
This may be a slightly different use case than for this original bug, namely we're not interested in being able to handle and process bad requests, we just want to have control over the specifics of the response.  However, if it was possible to let these bad requests just fall through to a regular http.Handler, that would allow us to do what we need.

What client is generating GET //foo paths?

For what it's worth, plenty of browsers (I just verified this in Chrome, Safari, and curl) will send GET //foo if a human user chooses to type http://host//foo into them.  Popular websites seem to vary as to whether or not they ignore extraneous slashes (eg, www.google.com appears to, www.facebook.com appears to not).

I believe our later discussions have leaned towards not supporting this use case for net/http.


Problem while running the example SoftwareRasterization

Ubuntu 18.01
GeForce GTX 1080
Selected device: GeForce GTX 1080
IMAGE(ERROR / SPEC): object: 0x0 type: 0 msgNum: 165676966 - vkCreateImage: usage bit VK_IMAGE_USAGE_STORAGE_BIT is not supported for format VK_FORMAT_B8G8R8A8_UNORM with tiling VK_IMAGE_TILING_LINEAR. The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00979)
IMAGE(ERROR): object: 0x0 type: 0 location: 663 msg_code: 165676966: Object: 0x0 | vkCreateImage: usage bit VK_IMAGE_USAGE_STORAGE_BIT is not supported for format VK_FORMAT_B8G8R8A8_UNORM with tiling VK_IMAGE_TILING_LINEAR. The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00979)
IMAGE(ERROR / SPEC): object: 0x0 type: 0 msgNum: 165676888 - vkCreateImage: The combination of format, type, tiling, usage and flags supplied in the VkImageCreateInfo struct is reported by vkGetPhysicalDeviceImageFormatProperties() as unsupported. The spec valid usage text states 'The combination of format, imageType, tiling, usage, and flags must be supported, as indicated by a VK_SUCCESS return value from vkGetPhysicalDeviceImageFormatProperties invoked with the same values passed to the corresponding parameters.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-00940)
IMAGE(ERROR): object: 0x0 type: 0 location: 708 msg_code: 165676888: Object: 0x0 | vkCreateImage: The combination of format, type, tiling, usage and flags supplied in the VkImageCreateInfo struct is reported by vkGetPhysicalDeviceImageFormatProperties() as unsupported. The spec valid usage text states 'The combination of format, imageType, tiling, usage, and flags must be supported, as indicated by a VK_SUCCESS return value from vkGetPhysicalDeviceImageFormatProperties invoked with the same values passed to the corresponding parameters.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-00940)
ParameterValidation(ERROR / SPEC): object: 0x0 type: 0 msgNum: 4 - vkCmdPipelineBarrier: required parameter pImageMemoryBarriers[0].image specified as VK_NULL_HANDLE
ParameterValidation(ERROR): object: 0x0 type: 0 location: 436 msg_code: 4: Object: 0x0 | vkCmdPipelineBarrier: required parameter pImageMemoryBarriers[0].image specified as VK_NULL_HANDLE
ObjectTracker(ERROR / SPEC): object: 0x0 type: 10 msgNum: 167813121 - Invalid Image Object 0x0. The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-image-parameter)
ObjectTracker(ERROR): object: 0x0 type: 10 location: 198 msg_code: 167813121: Object: 0x0 | Invalid Image Object 0x0. The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-image-parameter)
[1]    24237 segmentation fault (core dumped)  ./SoftwareRasterization

I have encountered this issue with NVIDIA’s driver.  It only supports R8G8B8A8 for storage images with linear tiling.  This is independent of V-EZ itself however and is the application’s responsibility for validating format, usage and layout support.  I’ll implement proper checking in the demo itself.

If anyone is having trouble running this example on an Nvidia GPU
Just change this line
https://github.com/GPUOpen-LibrariesAndSDKs/V-EZ/blob/29d2229e44ee692f74a33b698c80273ebcc67c3e/Samples/SoftwareRasterization/SoftwareRasterization.cpp#L168
to
imageCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;

Tested on a Quadro K2000M, on 426.00. Windows 10.


chore(dependabot): add otel group to dependabot

Adds dependabot rule, to reduce amount of otel dependancies PRs

yamllint

Codecov Report

Merging #2722 (842fa02) into main (3196746) will decrease coverage by 0.35%.
Report is 6 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2722      +/-   ##
==========================================
- Coverage   51.73%   51.39%   -0.35%
==========================================
  Files         162      163       +1
  Lines       10755    10784      +29
==========================================
- Hits         5564     5542      -22
- Misses       4714     4759      +45
- Partials      477      483       +6

see 13 files with indirect coverage changes


[DO NOT MERGE]Delete fact_check_ids

Fact_check_ids have now been replaced by auth_bypass_ids.
[DO NOT MERGE] Do not merge until https://github.com/alphagov/content-store/pull/271 and associated PRs have been deployed.
https://trello.com/c/7oRBYwnn/690-rename-fact-check-id-to-auth-bypass-id

It was a branch of a branch that's now been merged! I'll rebase. Thanks!


Bad Request response when try to paginate after page 10

I'm filtering by category and paginating to fetch the results, but when I try to paginate after page 10 I get Bad Request response from API, this error occurs for all categories.
Working request:
https://www.orgbook.gov.bc.ca/api/v2/search/credential/facets?category%253Aentity_type=XS&ordering=effective_date&page=10&category%3Aentity_type=XS
Failure request (Any number after 10 result in error):
https://www.orgbook.gov.bc.ca/api/v2/search/credential/facets?category%253Aentity_type=XS&ordering=effective_date&page=11&category%3Aentity_type=XS

This is a known issue.  We're limiting paging on purpose to stop people and bots from simply paging through all the records using scripts.  In a typical scenario involving a legitimate user interacting with the UI, or service integration interacting with the API, the query will be more narrow in scope and not require paging beyond 10 pages.

Thanks @WadeBarnes


🔍 - Missing organization feature in cli

when try to explore code-push-standalone I notice there is no way to create an organization. So how do i create a new organization like appcenter-cli?
use case:
currently I have two different organization, let say App A and App Z, in App A and App Z I have different app for feature, bugfix and production.
current situation in Appcenter dashboard:
org: App A
  App: - feature-ios
           - feature-android
           - bugfix-ios
           - bugfix-android
           - production-ios
           - production-android
org: App Z
  App: - feature-ios
           - feature-android
           - bugfix-ios
           - bugfix-android
           - production-ios
           - production-android

so let say I want to invite John Doe to access only App A, Jane Doe for App Z and John Jane can access App A and App Z.
My question is how do I invite other people and manage their access to the Apps?

Standalone version does not support organizations. You can simply run two independent servers - one for each organization.


[SPARK-18058][SQL] [BRANCH-2.0]Comparing column types ignoring Nullability in Union and SetOperation

What changes were proposed in this pull request?
The PR tries to fix SPARK-18058 which refers to a bug that the column types are compared with the extra care about Nullability in Union and SetOperation.
This PR converts the columns types by setting all fields as nullable before comparison
How was this patch tested?
regular unit test cases

Test build #67419 has started for PR 15602 at commit e0d806a.

LGTM - pending jenkins.

Test build #67419 has finished for PR 15602 at commit e0d806a.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/67419/
Test PASSed.

Merging to branch-2.0. Thanks! Can you close this PR?


Some CRTs don't support 200 open files, resulting at least in failing tests.

I'm updating QPDF from 6.0 to 8.4 and one of the new features is that it automatically decides if to keep files open or not. The currently hard coded limit is 200, but my Embarcadero C++Builder only supports 50 files open at the same time for legacy 32 Bit apps. I came across that issue in my own app merging PDFs already and simply fixed it by only opening 35 files at a time at most, so don't run into actual problems with using QPDF itself.
But you have added tests based on the knowledge of the 200 open files and the following fails in my case:
$td->runtest("don't disable keep files open",
			 {$td->COMMAND =>
				  "qpdf --verbose --static-id --empty" .
				  " --pages 1*kfo.pdf -- a.pdf"},
			 {$td->FILE => "enable-kfo.out", $td->EXIT_STATUS => 0},
			 $td->NORMALIZE_NEWLINES);

The reason simply is that the used file name expands to more than 50 files and after file 47 they can't be opened anymore.  If I simply change the files to 11*kfo.pdf instead, reducing the number to 10, and after adopting the expected output as well, the test passes. I'll additionally provide a PR implementing this later as well.
I would be very thankful if you could address this issue somehow. I currently preferred changing the test simply because in your two other tests you are only using a subset of those 200 possible files as well and I need to get things going.
But because your chosen limit of 200 is some arbitrary value anyway, how about reducing it to a safer value like 25 or 35 like I use? That would need adoption of manuals etc. as well.
Checking things for the current runtime wouldn't help me solve this problem necessarily as well, because like can be read in my link to SO, my compiler lacks lots of functions suggested for this purpose. And I'm not sure what of the things my compiler provides is usable for others.
So I guess it's either changing the tests only or simply reducing the hard coded value. Thanks!

Just for reference the code I'm currently using to decide how many open files to support in my own app:
#include <algorithm>
typedef std::list<QpdfPtr> AddedPdfs;

AddedPdfs::size_type	maxPdfsToAddMin(std::min(FOPEN_MAX,		35));
AddedPdfs::size_type	maxPdfsToAdd(	std::max(FOPEN_MAX / 2, (int) maxPdfsToAddMin));

I can definitely add a flag to set the threshold. I probably should have done that to begin with. Somehow I managed to not know about FOPEN_MAX. Thanks for pointing that out. I'll take care of this for my next update to qpdf. It should be a small change. I will change the default to be based on FOPEN_MAX with a cap and will add a command-line flag to change the threshold. I'll look at the test suite and see if I can make it work on systems with smaller maxes than 200 without breaking the intended functionality of the test. A PR is welcome but not required. I doubt it would take me more than a few minutes to address this, though I won't be able to get to it for a bit since I don't have time to work on qpdf most of the time and just take reserved blocks of time for it every few months.

Just don't hurry using FOPEN_MAX, I have no idea which compilers support that. :-) If you really want to make the threshold configurable using a flag, I suggest simply reusing --keep-files-open=...: y|n|35|200|...

I see no real downside to your test change, but I think a better fix is required, such as adding a numeric option to --keep-files-open as you suggested and possibly seeing if FOPEN_MAX is standard or if there's another way. So I'll reopen this issue pending a more complete fix.

By the way @ams-tschoening thanks for all your pull requests!

Thanks for merging! I'm the one still sitting on the broken compiler. :-)

My solution is to add a --keep-files-open-threshold=count parameter. I have also updated the test suite to test with 50 open files. Hopefully this will be sufficient to both enable you to run the test suite and actually work with this in your environment.

Note for myself: I had expected tests to fail with 50 open files at the same time, because from my understanding the C-lib only supported 47 file handles, because of STDIN, *OUT and *ERR being already open. Doesn't seem so for this case currently, but if things fail in future, simply suggest reducing the number to 45 or such again.
Overall test suite        [...]... PASSED

TESTS COMPLETE.  Summary:

Total tests: 2847
Passes: 2844
Failures: 0
Unexpected Passes: 0
Expected Failures: 3
Missing Tests: 0
Extra Tests: 0


merge customization ignored when key is only present on b

I believe the code found here should instead be:
if (isPlainObject(b)) {
-  return cloneDeep(b);
+  customizeObject(a, b, newKey);
}

cloneDeep is problematic when merging in a devServer proxy that relies on agentkeepalive.  That agent in particular is necessary to get around an issue with NTLM auth.
The workaround I'm using now is
const devConfig = merge(common, { /* dev config */ });
devConfig.devServer = getDevServerConfig();

module.exports = devConfig;

If this is agreeable then I will create a PR.
I appreciate all your work with webpack.

Ugh - I'm sorry for the noise.  I shouldn't raise issues when I'm tired.
Allowing customizations for keys that only exist on b may still be a worthwhile feature, but my solution wasn't even half-thought through and I didn't test it at all locally.  I'm also realizing it doesn't make sense to 'merge' configurations that only exist in b, so my workaround is semantically more correct anyway.

No probs. Thanks for solving. 👍


Exception on click chart Issue resolved (#3603, #3606)

In core controller options object param passed in getDatasetAtEvent function

Looks good. Is it possible to add a test for this?

Actually I have no idea how to write JS test :(

Tell me what can I do for it?

It probably needs to live in https://github.com/chartjs/Chart.js/blob/master/test/core.interaction.tests.js  and create a chart then make sure that the return of getElementsForDataset is correct.

While the new version of chart.js is not available with this change, it is possible to use the library in version 2.4.0 and register a plugin with this change to correct the problem.
The plugin would be this:
Chart.plugins.register({
    afterInit: function (chartInstance) {
        chartInstance.getDatasetAtEvent = function (e) {
            return Chart.Interaction.modes.dataset(this, e, this.options);
        };
    }
});

Fixed in #3716


Check for selects/radiobuttons/checkboxes that are required

Otherwise button will start spinning even though form is not posted (due to not being filled correctly)

Great update – thanks! Releasing a new version that includes this now (0.9.5).


Wear & wield commands don't find items by nth

Wear & wield commands don't find items by nth:
Example: wear 2.helmet returns nothing

fixed


Stop shipping CSS and suggest github-markdown-css instead

github-markdown-css was initially suggested as an attempt to reduce bundle size in #2, but at that time I feel this could result in being neglected.
Now that this project is under denoland umbrella and getting proper maintenance, it makes sense to ask: Is bundling CSS necessary? Won't that be too opinionated?
I think it would better to focus on the actual rendering, and dedicate styling to people who are doing it seriously in a standalone object.
This also covers the recently added Katex styles, which is a opt-in feature to begin with.
It may look inconvenient as one has to fetch the style themselves, but I consider this a push for the good: you should use <link rel="stylesheet"> instead of inlining this many styles after all.

People who care about the difference between inlining styles and linking a stylesheet already do what makes sense for them

When the docs say nothing about it, people would not care. Find a real example where:

CSS is served as an actual file
<link rel="stylesheet"> is used to request that file

I definitely think that our current implementation of bundling CSS is suboptimal and could be improved.

Then do not do it at all. This project is initially just for simple markdown rendering for deno.land, the choice to host styles in house only made sense at that time.

Are you referring to github-markdown-css or another project here? Is there more than one project doing this?

As far as I know github-markdown-css is the only one doing similar things. I said people because, well, it's not just one person working on that.

Find a real example where...

Pyro does that, check out the head of the website.

Then do not do it at all.

This seems dubious to me. I call it suboptimal because I rewrote the old implementation to what we have today and know that the build system is pretty fragile. In my eyes, we would ideally switch to github-markdown-css instead of trying to do the generation ourselves. I think we should write docs (in general) and tell people who care that they can use a linked stylesheet.

This project is initially just for simple markdown rendering for deno.land, the choice to host styles in house only made sense at that time.

I think it still has some merit in its simplicity today. That's the big selling point of deno-gfm to me.

I said people because, well, it's not just one person working on that.

Thanks for clarifying, 👍

Pyro does that

I see where you are coming from, but many people are not seasoned enough to make the same choice.

In my eyes, we would ideally switch to github-markdown-css instead of trying to do the generation ourselves.

I probably should have clarified, that is the real thing I want to get rid of. I'm not saying the CSS export should be nuked entirely (which would be very unlikely accepted by the maintainers), it could be changed to re-export github-markdown-css.

I think we should write docs (in general) and tell people who care that they can use a linked stylesheet.

I would certainly resort to better docs if changing actual code is not approved.

I think it still has some merit in its simplicity today. That's the big selling point of deno-gfm to me.

Same for me. I was just stating why does this package bundles styles from the beginning.

I probably should have clarified, that is the real thing I want to get rid of. I'm not saying the CSS export should be nuked entirely (which would very unlikely to be accepted by the maintainers), it could be changed to re-export github-markdown-css.

Ah sorry, I misinterpreted your message. I completely agree with this sentiment. I don't see a reason why a code change would not be accepted especially since it greatly simplifies our fragile workflow.

I don't see a reason why a code change would not be accepted especially since it greatly simplifies our fragile workflow.

I was referring to what I initially suggested: removing CSS from this package directly, which could be deemed too aggressive and breaking for little good.


When I rename a shortcut of a folder, it is no longer a shortcut file

Description
When I rename a shortcut of a folder, it turns into an empty file which cannot jump to the correct space.
Steps To Reproduce
1.Create a shortcut of a folder
2.Rename the shortcut
3.It occurs
Expected behavior
It must correctly rename the shortcut
Files Version
<IP_ADDRESS>
Windows Version
Windows 11 21H2 22000.348
Relevant Assets
No response

Same as #5823

This issue should be resolved with #7015.


utbot_server_restart.sh doesn't shutdown previous running instance

Now restart script just run new instance of utbot server, without kill previous running instance.

@sava-cska could we make input case insensitive? Right now user asked for Y/n choice but if she actually enters Y it wouldn't kill anything.


Add documentation for multiple provider API versions on Pulumi.com

Problem description
In the Pulumi registry on Pulumi.com, only one provider API version is shown:

https://www.pulumi.com/registry/packages/azure-native/api-docs/containerregistry/registry/
Suggestions for a fix
This is how it is handled by Microsoft in their documentation for ARM:

https://learn.microsoft.com/en-us/azure/templates/microsoft.containerregistry/2021-09-01/registries?pivots=deployment-language-bicep

@BoSoeborgPetersen thank you for opening up this issue! imma move this over to the registry repo.


fix(cargo-lints): Don't always inherit workspace lints

When working on changes for #13805, I noticed that we always passed the contents of [workspace.lints.cargo] into the currently implemented lints,  even if [lints] was not specified or did not contain workspace = true. This PR makes it so we only pass in the workspace cargo lints if [lints] contains workspace = true.
You can verify this change by looking at the first commit, where I added a test showing the current behavior, and looking at the second commit and seeing the test output no longer shows a warning about specifying im-a-teapot.

@bors r+

:pushpin: Commit cf197fc499a434f62b7ec80c02d17cc8ea116e89 has been approved by epage
It is now in the queue for this repository.

:hourglass: Testing commit cf197fc499a434f62b7ec80c02d17cc8ea116e89 with merge eee4ea2f5a5fa1ae184a44675315548ec932a15c...

:sunny: Test successful - checks-actions
Approved by: epage
Pushing eee4ea2f5a5fa1ae184a44675315548ec932a15c to master...


AGPUSH-1142: fixed InstallationController.installations property

https://issues.jboss.org/browse/AGPUSH-1142
fixed a mistake of refactoring
(only for master)

@sebastienblanc could you give it a try?

:+1:


rs-dnn does not work with L515

Required Info

Camera Model
{ L515 }

Firmware Version
(realsense viewer v2.49.0)

Operating System & Version
{Win (10)}

Platform
PC

SDK Version
{ 2.0 }

Language
{C++ }

Segment
{object-tracking }

Issue Description
pressed f5 to run the rs-dnn, it builds successfully but theres a bunch of errors. visual code studio version 2019.
How can I get the object detection to show up, or is the code incompatible with L515?
![Screenshot (

1)](https://user-images.githubusercontent.com/91737248/135622397-eef0b720-f181-42ee-ad2d-fb0661f9c6fc.p

ng)

Hi @Uchihasasugey  Whilst the L515 does not support RGB resolutions 640x360 and 640x480 unless firmware <IP_ADDRESS> is installed in the camera, this is likely not the cause of this case's problem.  This is because although the rs-dnn program performs depth-color alignment, it does not specify a particular resolution / FPS configuration for depth and color.  The program should therefore use the default depth and color stream configurations for whichever RealSense depth camera model is attached.
Let's check the OpenCV wrapper and example building process first.  Did you build the librealsense SDK from source code on Windows and then select the DNN example from the 'CV' examples folder and press F5, as described in the instruction page below?
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv

I tried build the OpenCV and librealsense SDK like this, but I noticed when I search for "shared", it looks like there is something missing for OpenCV, even thought the configuring is done

For librealsense SDK, I actually have errors building,

CMake 3.21.3

I see that when searching for 'shared', the Advanced option on your interface is unticked, whilst on the image on the instruction page Advanced is ticked.  Do you see the full list of settings when searching for 'shared' if a tick is placed in the Advanced box, please?

It may also be useful to refer to guides in the links below for installing OpenCV and then the RealSense SDK and OpenCV wrapper on Windows.
https://jessicayin.com/tutorials/#/opencv-34-installation/
https://jessicayin.com/realsense-opencv-installation

After following the guide, the build is successful, but I am not too sure where to find the missing dll?

opencv_dnn is apparently a module of OpenCV relating to DNN functions, and '3415' likely refers to OpenCV version 3.4.15.  Do you know whether 3.4.15 is the OpenCV version that you have installed?

I have installed OpenCV 3.4, directly from the website https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv, do I need to find opencv 3.4.15 then build it using CMake?

The discussion in the link below about another RealSense user's problems with setting up rs-dnn may be helpful.
https://support.intelrealsense.com/hc/en-us/community/posts/1500000714302--Problems-running-opencv-rs-dnn-realsense-camera-examples
Another link describes the particular LNK1104 error that you encountered with opencv_calib, though with an earlier version of OpenCV.
https://stackoverflow.com/questions/24297145/link-fatal-error-lnk1104-cannot-open-file-opencv-calib3d245d-lib-opencv-2/24297480

After deleting the previous OpenCV 3.4 and OpenCV 3.4.15 from the directory and redownloading,configuring and generating with OpenCV 3.4.15, then pressing ctrl+shift+B, I get errors

If I ignore the errors and proceed to generating the librealsense, then pressing F5 on rs-dnn, I get these errors

Do I go back to OpenCV 3.4?

Are you able to uninstall the OpenCV versions that you have installed if you follow the procedure below?

Type programs into the search box at the bottom of your Winows screen, next to the button in the corner where you shut down the PC.  This should allow you to find the Add or remove programs tool.

Scroll down the list of programs to see if you can find entries for the installed OpenCV versions.  Then left-click on a program and click on the Uninstall button that appears.

I am unable to delete from using search, as I cannot find opencv in the lists of apps. Instead I had to delete manually from the directory containing it , C:/git/opencv, where I had copied the opencv zip file and unzipped there.
After deleting all versions of opencv, I downloaded the exe, then did the same steps in https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv but the opencv library did not build successfully, with the same errors again

Is there something wrong with my git or directory? The errors seem to be the same

If you have already successfully installed OpenCV using the .exe installer, may I confirm that you are not installing OpenCV a second time afterwards by building it from source code with Git.  Instead, are you skipping to the Building the OpenCV Samples VisualStudio project section to install the librealsense OpenCV examples?
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv#building-the-opencv-samples-visualstudio-project

I thought I had to build it from source with Git as well. Now after skipping to building the Opencv samples, the configuring of librealsense was successful, but when I tried to add entry OpenCV_DIR, it says that I am missing a cmake file

I managed to find the .cmake previously when building Opencv 3.4  from source, however this time I cannot find it in Opencv 3.4.15

It looks as though the guide is assuming that OpenCV was installed using Git earlier in the first half of the guide, hence the suggested path to OpenCV_DIR being C:/git in the second half of the guide.
When installing OpenCV with the .exe file, I found that the path to the .cmake files will depend on the path that you specified to extract OpenCV to.  For example, the default download location for the installer file on Windows is the Downloads folder of your user directory.  So if you run the file from this location then it will suggest installing the opencv folder in the Downloads folder of your user directory by default.

The OpenCVConfig.cmake file should therefore be located in the opencv/build folder.

So my understanding of the instructions in the red error text is that you place the OpenCVConfig.cmake file in a directory of your choosing and then set OpenCV_DIR to that directory.

My librealsense configured and generated successfully, although I am unable to compile due to these errors

are these normal or did I do something wrong during the buildling?

When I see an SDK library file name that ends in 'd' such as realsense2d.lib then it suggests to me that librealsense was built with CMake without CMAKE_BUILD_TYPE being set to Release.  Otherwise, librealsense can build in Debug mode, which can cause problems.
Is the CMAKE_CONFIGURATION_TYPES option settable to Release if you click the 'Configure' button on the CMake interface?

I got this same error after building with OpenCV 3.4.15. It is the error that occured when I built with Opencv 3.4

how should this error be fixed?

Hi @Uchihasasugey  Do you have an update about this case that you can provide, please?  Thanks!


[pyspark] Add param validation for "objective" and "eval_metric" param, and remove invalid booster params

Added param validation for "objective" and "eval_metric" param
Removed invalid booster params passed to xgboost.train
Allow regressor setting other objective value

CC @trivialfis @wbo4958

Please fix the formatting error: https://github.com/dmlc/xgboost/runs/7824147126?check_suite_focus=true .

CC @trivialfis @wbo4958 Done.

@trivialfis @wbo4958 We can merge this. The test failures are not related to my PR.


Adopt unstorage Cloudflare KV expiring keys

Is your feature request related to a problem? Please describe.
There is currently no way to set an expiration time when setting a key in KV.
Describe the solution you'd like
Adopt the updated bindings from unstorage.
Describe alternatives you've considered
N/A
Additional context
I was requested by Atinux on Discord to open this for tracking purposes.

Thank you for opening and reminding us about it 😄
The opened PR for unstorage has been merged on https://github.com/unjs/unstorage/pull/423
We are now waiting for the stable release to upgrade it.

Let me know if I can help test/verify in a downstream app 🤙🏼

It's live with the v0.7.10!


If you select partner and both on superannuation, then realise you need to remove your partner and so you deselect partner the total income remains at the higher income amount.

Can give me the steps?
I've done this:

say yes i have a partner
give both super (they get 17458.48 ea)
said no to partner

the applicant then has $23058.36
What number are you getting? and what did you expect it to get instead?

@ssibbehh @Br3nda can I close this one?


Added checkBucket to PutObject and NewMultipartUpload.

Without these checks user can unintentionally create bucket, while putting object.

@pavelzhurov Why ErrNoSuchBucketPolicy ?

@kmlebedev My logic was the following: a bucket isn't able to have any Bucket Policy, so for any bucket we can return that there is no such policy. I guess the same logic is applied for GetBucketPolicy.

@kmlebedev My logic was the following: a bucket isn't able to have any Bucket Policy, so for any bucket we can return that there is no such policy. I guess the same logic is applied for GetBucketPolicy.

This is the correct logic, but some s3 client applications may not agree with you.

@kmlebedev Agree, changed response function to WriteEmptyError with 204 code

The lady bucket creation was intentional. Adding an extra check will slow down writes.

Better avoid too many options. How about adding an in memory cache of existing buckets, and only check the bucket if not in the cache?

It seems that at the start of s3 it is not difficult to get a list of packages
@chrislusf But it is not clear how best to update, it seems that you need a subscription to the filer for deletion and addition, approximately how it works on the replicator now. Or is there an easier option?

Metadata event subscription has some delays.
A TTL-Ed cache should work.

@chrislusf but what about putting object immediately after bucket creation? If we use TTLed cache, we should wait at most TTL seconds to put object, because cache hasn't been updated yet. And updating it on PutBucket event won't help, because we can have more than one replica of s3api.

@chrislusf  Yeah, I got it. The problem lies down in the cache update process. Suppose we've initialised it at the startup process, and then periodically updating it using TTL as a sync period value, or on each create bucket event. In first case, after bucket creation, we have to wait until next sync to upload an object in this bucket. In second one, cache will be updated only in the replica which handled PutBucket request.
The only option I see here, is to make TTL very small, but it still will produce occasional errors (especially if user automates buckets/objects creation process).
Maybe there is some other approach which I missed?

Is s3a.exists better than s3a.checkBucket here?

@kmlebedev Agree, changed response function to WriteEmptyError with 204 code

How about NoSuchBucket or InvalidRequest ?

How about NoSuchBucket or InvalidRequest

No need to change handles from cors and policy as they are not implemented

How about put this option into the filer.toml file? Similar to this?
[filer.options]
# with http DELETE, by default the filer would check whether a folder is empty.
# recursive_delete will delete all sub folders and files, similar to "rm -Rf"
recursive_delete = false

@chrislusf Isn't this file reserved for filer options only? If so, we can't put it there, since the check is occurred before s3api calls filer.

How about put this option into the filer.toml file? Similar to this?
[filer.options]
# with http DELETE, by default the filer would check whether a folder is empty.
# recursive_delete will delete all sub folders and files, similar to "rm -Rf"
recursive_delete = false

S3 server does not have a configuration file, it seems to create it?


Add Contributing.md file

I would like to add contributing.md file to your repository. Please assign this issue to me #hacktoberfest

could you please assign hacktoberfest label


[Bug]: Website not working properly

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
Website not working properly there is no UI and taking time to load
Expected behavior
Website not working properly there is no UI and taking time to load
Add ScreenShots

On which device are you experiencing this bug?
Chrome
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository

Is there an existing issue for this?

[x]  I have searched the existing issues

Describe the bug
Website not working properly there is no UI and taking time to load
Expected behavior
Website not working properly there is no UI and taking time to load
Add ScreenShots

On which device are you experiencing this bug?
Chrome
Record

[x]  I have read the Contributing Guidelines
[x]  I'm a GSSOC'24 contributor
[x]  I have starred the repository

Hello @UtkarshBirla28 , Go to client folder and first run "npm install" and then run "npm start"


Bulk or Single Index Settings

Is there a reason for not implementing the Bulk or Single index options used by the config of the previous driver package that is archived? I have some large documents that I like to pull up in bulk with scout but I'd rather not send them in bulk to Elastic.

Hi @dannydinges, I think this option was redundant. Even it's always a bulk request, you can send either one document or a bunch of documents to Elastic:
$model->searchable();   // one document is sent via bulk request
$models->searchable(); // a collection of documents is sent via bulk request

Fair enough that makes sense. I can make a copy of Scout's import command to make this work as you suggested. Thanks!


syncthing: 1.20.2 -> 1.20.3

Description of changes
Update to latest upstream release 1.20.3.

View changes on GitHub

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[x] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 180206 run on x86_64-linux 1

1 package marked as broken and skipped:

syncthing-cli

4 packages built:

qsyncthingtray
syncthing
syncthing-discovery
syncthing-relay

1 package marked as broken and skipped:
syncthing-cli

Ah, that's probably because aliases are disabled by nixpkgs-review? (Seems like a bad way to handle aliases though.) Because syncthing-cli is an alias to syncthing and it works fine.


Create workflow to build and release base docker executor images

Acceptance Criteria

Move Lambda base executor deployment workflow from core covalent to lambda repo
Ensure it can be triggered manually or callable from another workflow

Input variables should include:

Tag/version of lambda executor to use
Version of covalent (to resolve tag for covalent base executor, and also determines which tag to produce for lambda executor (covalent-MAJOR_VERSION))
Is Prerelease flag


Add Storybook support to the repo

User Story
As a developer, i can prototype, demo and document React components, including ones that are already part of the app, as well as ones that might be used in future features.
TODO

[ ] Define acceptance criteria

Faiz, hit me up for access to a repo that demonstrates how to do this.