CRITICAL BUG: images.generate does not work on Azure OpenAI

        openai_api_version = "2023-09-01-preview"
        client = AzureOpenAI(azure_endpoint = openai_api_base, api_key=openai_api_key, api_version=openai_api_version)

        response = client.images.generate(
            prompt=prompt,
            size=size,
            n=n
        )

Fails with:
{'error': {'code': '404', 'message': 'Resource not found'}}

Hi @nicolaschaillan, Azure OpenAI Dall-E is not supported in the v1 SDK yet, but support will be added soon.
https://learn.microsoft.com/en-us/azure/ai-services/openai/dall-e-quickstart?tabs=command-line&pivots=programming-language-python#install-the-python-sdk

@nicolaschaillan I will share as soon as I have an ETA. As a stop-gap, it is possible to access Azure OpenAI DALL-E by passing in a httpx custom transport:
import time
import json
import httpx
import openai

class CustomHTTPTransport(httpx.HTTPTransport):
    def handle_request(
        self,
        request: httpx.Request,
    ) -> httpx.Response:
        if "images/generations" in request.url.path and request.url.params[
            "api-version"
        ] in [
            "2023-06-01-preview",
            "2023-07-01-preview",
            "2023-08-01-preview",
            "2023-09-01-preview",
            "2023-10-01-preview",
        ]:
            request.url = request.url.copy_with(path="/openai/images/generations:submit")
            response = super().handle_request(request)
            operation_location_url = response.headers["operation-location"]
            request.url = httpx.URL(operation_location_url)
            request.method = "GET"
            response = super().handle_request(request)
            response.read()

            timeout_secs: int = 120
            start_time = time.time()
            while response.json()["status"] not in ["succeeded", "failed"]:
                if time.time() - start_time > timeout_secs:
                    raise openai.OpenAIError("Operation polling timed out.")

                time.sleep(int(response.headers.get("retry-after")) or 10)
                response = super().handle_request(request)
                response.read()

            if response.json()["status"] == "failed":
                error_data = response.json()["error"]
                message = error_data.get("message", "Operation failed")
                code = error_data.get("code")
                raise openai.OpenAIError(message, code)

            result = response.json()["result"]
            return httpx.Response(
                status_code=200,
                headers=response.headers,
                content=json.dumps(result).encode("utf-8"),
                request=request,
            )

client = openai.AzureOpenAI(
    azure_endpoint="<azure_endpoint>",
    api_key="<api_key>",
    api_version="<api_version>",
    http_client=httpx.Client(
        transport=CustomHTTPTransport(),
    ),
)
image = client.images.generate(prompt="a cute baby seal")
print(image.data[0].url)

Once support is officially added, you can remove the http_client keyword argument and the custom transport class from your code and all should work as expected. Let me know if that helps.

Hey @kristapratico, I made an update to the docs per @nicolaschaillan suggestion. Can you please take a look to see if it works and if there is anything else that I should add? Happy to add any additional details.

@ashjeanbird I'll take a look.
@StephenHodgson yes, the Azure Dall-E endpoint contains a :submit for the initial call. However, it's not enough to just append this to the endpoint. The initial call returns a status monitor which has to be checked until the final result is ready. This code shows how to workaround this for now: https://github.com/openai/openai-python/issues/692#issuecomment-1797181743

Yeah I don't understand why Microsoft went so far different with this endpoint implementation. Super frustrating.

@kristapratico thank you for checking out my PR https://github.com/openai/openai-python/pull/766. I have made a change to reflect the known issues verbiage link and the associated workaround.

@nicolaschaillan @StephenHodgson @ashjeanbird Azure OpenAI now supports Dall-E 3. See this Quickstart for details. It is supported on version 1.2.4 or greater of the openai library.
Please note that if you wish to continue to use Dall-E 2 you must either use the 0.28.1 version of the library or use 1.X version with the workaround.

Are you using Dall-E 2 or 3?
Dall-E 3 is currently only available on SwedenCentral: https://learn.microsoft.com/en-us/azure/ai-services/openai/dall-e-quickstart?tabs=dalle3%2Ccommand-line&pivots=programming-language-python
You'll need to deploy the dall-e-3 model (you can do this from the Azure OpenAI Studio) and then target the deployment name in the method call:
result = client.images.generate(
    model="dalle3", # the name of your DALL-E 3 deployment
    prompt="a close-up of a bear walking through the forest",
)

I'm sorry for the confusion. I'm relaying your feedback to the team.
For clarity,
Azure OpenAI supports two models for image generation: Dall-E 2 and Dall-E 3
Dall-E 2 is available in East US. You can use version 0.28.1 of the openai library to access it. If you want to use this model version with v1.X of the openai library, then you can copy the code from the workaround.
Dall-E 3 is currently only available in SwedenCentral. You can use v1.2.4+ of the openai library to access it. Note that you must first deploy the dall-e-3 model from the Azure OpenAI studio and pass your deployment name in the model parameter when calling the API.
I am reaching out, but not sure yet when Dall-E 3 will be supported in US regions. The model documentation will be updated when it becomes available in more regions: https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#dall-e-models-preview

I'm guessing whenever this goes in https://github.com/Azure/azure-rest-api-specs/pull/26582

I am having this issue as well... If helps anyone, solution below.
Code that I expected to work:
client = AzureOpenAI(
    api_key=os.getenv("AZURE_OPENAI_API_KEY"),
    azure_endpoint=f'https://{os.getenv("AZURE_OPENAI_API_INSTANCE_NAME")}.openai.azure.com',
    api_version=os.getenv('AZURE_OPENAI_API_VERSION'),
)
response = client.images.generate(
    prompt='dancing cat',
    size='512x512',
    n=1
)
image_url = response.data[0].url

Alternative code that works fine:
url = "{}/openai/images/generations:submit?api-version={}".format(
    f'https://{os.getenv("AZURE_OPENAI_API_INSTANCE_NAME")}.openai.azure.com',
    os.getenv('AZURE_OPENAI_API_VERSION')
)
headers= { "api-key": os.getenv("AZURE_OPENAI_API_KEY"), "Content-Type": "application/json" }
body = {
    "prompt": "dancing cat",
    "n": 1,
    "size": '512x512'
}
submission = requests.post(url, headers=headers, json=body)
operation_location = submission.headers['Operation-Location']
status = ""
while (status != "succeeded"):
    time.sleep(3) # workaround rate limit
    response = requests.get(operation_location, headers=headers)
    status = response.json()['status']
image_url = response.json()['result']['data'][0]['url']

@kristapractico Is this workaround (i.e., implementing CustomHTTPTransport ) still required for accessing DALL-E via Azure OpenAI?

@kristapratico Is this workaround (i.e., implementing CustomHTTPTransport ) still required for accessing DALL-E via Azure OpenAI?

The workaround is only necessary if you're using Azure with DALL-E 2. Azure DALL-E 3 is supported by the library.

The workaround is only necessary if you're using Azure with DALL-E 2. Azure DALL-E 3 is supported by the library.

Thanks for the quick reply.
Do you know if that is set to change at some point? Or if you're forever stuck with DALL-E 2, are you forever stuck with CustomHTTPTransport?

The workaround is only necessary if you're using Azure with DALL-E 2. Azure DALL-E 3 is supported by the library.

Thanks for the quick reply.
Do you know if that is set to change at some point? Or if you're forever stuck with DALL-E 2, are you forever stuck with CustomHTTPTransport?

As far as I know, there won't be updates to Azure DALL-E 2 in the future, meaning the workaround will be necessary to use it with this library. Are you able to migrate to DALL-E 3?

Do you know if that is set to change at some point? Or if you're forever stuck with DALL-E 2, are you forever stuck with CustomHTTPTransport?

As far as I know, there won't be updates to Azure DALL-E 2 in the future, meaning the workaround will be necessary to use it with this library. Are you able to migrate to DALL-E 3?

Good to know so I can document this in my client libraries.

@nicolaschaillan I will share as soon as I have an ETA. As a stop-gap, it is possible to access Azure OpenAI DALL-E by passing in a httpx custom transport:
import time
import json
import httpx
import openai

class CustomHTTPTransport(httpx.HTTPTransport):
    def handle_request(
        self,
        request: httpx.Request,
    ) -> httpx.Response:
        if "images/generations" in request.url.path and request.url.params[
           ...

Once support is officially added, you can remove the http_client keyword argument and the custom transport class from your code and all should work as expected. Let me know if that helps.

This workaround does not work with my Azure setup and always hits the "[429 Too Many Requests]" errors.
After some debugging, I was able to fix it by adding a default value for the "retry-after" header:
time.sleep(int(response.headers.get("retry-after", 0)) or 10)

@ronaldchoi thanks for spotting the bug. I'll update the example in my comment.


How does it work?

I tried to look through some code, but java as well as kotlin are not really my type of language. I wondered how it transports the videofeed over the network. Is it some webthing like WebRTC or general streaming protocol with RTSP?
Thanks for your answer in advance.

The app uses WebRTC. There is also a separate connection for signalling, which is a straight web socket. Using this connection, the two phones find each other and connect via WebRTC.

So i could also just use some web frontend to stream the video to a PC for example?

I too would like more information on the output. All I want is a simple open IP camera for android. I had one ages ago but can't find it now, i thought it was just called ipcam, but humanity refuses to do this.

Well, as a user, you need to install the app on 2 phones - one acts as a
camera and the other as a display. No need for a special camera. Run the
app on both phones, and they will connect automatically. Then place one of
the phones at what you want to monitor and see the live stream on the
other. That is all
On Sun, Sep 8, 2024, 12:10 PM Innomen @.***> wrote:

I too would like more information on the output. All I want is a simple
open IP camera for android. I had one ages ago but can't find it now, i
thought it was just called ipcam, but humanity refuses to do this.
—
Reply to this email directly, view it on GitHub
https://github.com/izivkov/RemoteVideoCam/issues/29#issuecomment-2336739840,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA7M37WMP3KUCL2ZQH5G5MDZVRZJBAVCNFSM6AAAAABNIMNLN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWG4ZTSOBUGA
.
You are receiving this because you commented.Message ID:
@.***>

I too would like more information on the output. All I want is a simple open IP camera for android. I had one ages ago but can't find it now, i thought it was just called ipcam, but humanity refuses to do this.

Hey, you could try something like RTSP IP-Cam Viewer or IPCam Demo on FDroid

@izivkov I understand that it just works, but I would like to know, how it works.

@Innomen

I too would like more information on the output. All I want is a simple open IP camera for android. I had one ages ago but can't find it now, i thought it was just called ipcam, but humanity refuses to do this.

Hey, you could try something like RTSP IP-Cam Viewer or IPCam Demo on FDroid

It blows my mind that there isn't a simple camera transmitter app. A client agnostic server that just outputs the video feed to an IP. I find myself very curious why. I was hoping to use this app as one if it outputs internally in some way.

@Playit3110 The way this app works is the following:

The two phones find each other by theyr names. THere is a b uilt DNS server in every WiFi server. Eatch phone name consists of a fixed part + its IP address. This way the phones can find the other phone on the network, and can establish a connection.
This connection server for signalling between phe phones. They can use it to negotiate WebRTC capabilities and establish the WebRTC stream. Normally, this is dome by a WebRTC server somewhere on the web, known to both phones, but in this case they aready have a connection, so they can negotiate direct;y.

@Innomen
This is an RSP server I have used in the past when I was doing some work for the OpenBot project.

Thank you very much


paper1 S17-IR-2030

Btw, please use the gitchangelog conventions for commit messages just like in the other repository.


some question about LabelDataset?

Dear author:
i have some question about the process of generating of the tensor(label_embs) that we use in calculate the loss.
N.shape = [n_labels, n_labels, n_labels]
and when we get the label_embs in batch in next(dataloader), why idx have relation with t,h
   def __getitem__(self, idx):           if idx >= self.len:             raise StopIteration           t = idx//self.items           h = idx%self.items           negs = np.arange(self.items)[self.N[t][h] == 1.0]           negs = negs.repeat(self.nnegs)           np.random.shuffle(negs)           return torch.tensor([t, h, *negs[:self.nnegs]])
in my point of view t&h should relation with the content[idx]['label'] right? and you idea is idx relation with num_of_labels if i was wrong please tell me why?
and another question is why the len of LabelDataset is num_of_labels*num_of_labels , not the len of dataset? so when we get the
getitem of the TextLabelDataset ,
  def __getitem__(self, idx):           text_data = self.text_dataset[idx%len(self.text_dataset)]           label_data = self.label_dataset[idx%len(self.label_dataset)]         return *self.text_dataset[idx%len(self.text_dataset)], self.label_dataset[idx%len(self.label_dataset)]
text_data and label_data may not consistent. if i was wrong please tell me why?
I am looking forward to your rely, thanks a lot~

Thanks for your questions.
Let me begin by clarifying that all sentences and their corresponding labels are stored in TextDataset objects, so when the __getitem__ is called, a tokenized sentence and its corresponding multi-hot encoded label is returned. Thus, the text and labels are always consistent when calculating the first loss term (eq. 3 in the paper).
The purpose of the LabelDataset is to generate samples for the computation of the second loss term (eq. 4 in the paper). Note that this computation is independent of the first loss term, and thus different labels (from the same label set) can be present in the samples used in a single parameter update step.
Going back to what LabelDataset does, the matrix N corresponds to the matrix $\mathcal{L}(l, l')$ in the paper. When __getitem__ is called a $l$ and $l'$ is selected (t and h in code) and nneg number of negative labels are sampled from N. (A fixed number nneg is sampled instead of using the entire $\mathcal{L}(l, l')$ to allow for vectorization.) The LabelLoss function in main.py might also help clarify how the samples from LabelDataset are used in the loss computation (this function is based on a similar one here).
Hope this helps answer your question.

thank you for your reply，now I fully understand your intelligent idea. Thanks a lot for your sharing~


Fix bone gel and bone setter descriptions and names

About the PR

Fixes bonegel and bone setter descriptions to what they are in CM13 along with bone gel name
Bone setter doesn't have a description in CM13, made it blank there too so it doesn't "retracts stuff" anymore
Yippe three (four?) line PR
Fixes this Discord issue
Why / Balance

Technical details

Media
Bone setter, just sitting there lonely with no description

Breaking changes

Changelog

:cl:

fix: Bonegel and bone setter description's and names

You can set the empty description to whatever you want in that case as long as it fits ty


crmsh: Improved command start detection

Found and fixed a corner case if a resource attribute has the same name as a command.

Thanks!


Browser Doesn't Open When Running .plot()

Apologies if I'm missing something very obvious, but when executing raw.plot(), the browser doesn't open a window, even behind other windows. I'm running the script in the tutorial here on an Intel mac with Big Sur:
https://mne.tools/mne-bids/stable/auto_examples/read_bids_datasets.html#sphx-glr-auto-examples-read-bids-datasets-py

Hi @ddcas9,
which operating system are you using?
Try adding the following parameter block=True to your tutorial script like raw.plot(block=True). Does it help?
And thank you for opening this issue, it is not obvious that raw.plot() does not work right out of the box and we need to work on that.

Hi @marsipu,
Right, that works! I should have reviewed the docs a bit more to see that you can do that, it's pretty apparent there! I'll close this.

@ddcas9 Your issue is totally valid, thanks for pointing it out

@ddcas9 Another solution without having to change the tutorial-script would be using the interactive-flag for the python-interpreter:
python -i read_bids_dataset.py


ADMIN COLORED BOXED PANEL

is there any chance to buy the admin boxed panels (the colored ones) to implement it? those boxes give important information to the marketplace. would be great! as in the enterprise admin panel.

Hi,
you can contact Cocolabs to know how to get the admin report bundle: http://www.cocolabs.io/en/contact-us/


{Pipeline} update azdev version to 0.1.29 in pipline

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

Pipeline

/azp run

/azp run


Logs When Application Crash

If I am using the FileLoggingSession , how does i get access to logs if my application crash. As I will not have time to call CloseAndSaveToFileAsync.

This is a platform question, not a samples issue. You can open a support case with our Developer Support team:

Visit http://aka.ms/storesupport and sign-in with your Microsoft account
Under the “App Development” section choose "Windows 10 universal app development", then choose the appropriate problem type and category to get engaged through a formal support channel.


hash_join.rs's create_hashes function panics with float columns with nightly rustc

Describe the bug
passing float arrays to create_hashes results in panics with a message "not implemented" when built with nightly rustc.
To Reproduce
Rustc:
✦ at 11:17:43 ❯ rustc --version
rustc 1.54.0-nightly (b663c0f4f 2021-05-29)

Code:
let random_state = RandomState::with_seeds(0, 0, 0, 0);
let schema = Schema::new(vec![Field::new("c1", DataType::Float32, false)]);
let batch = RecordBatch::try_new(
    Arc::new(schema),
    vec![Arc::new(Float32Array::from(vec![
        0.00005, 0.00002, 0.00003, 0.00001, 0.00004,
    ]))],
)
.unwrap();

let hashes_buff = &mut vec![0; batch.num_rows()];
let hashes = create_hashes(&[batch.columns()[0].clone()], &random_state, hashes_buff)?;

Expected behavior
It should not panic.
Additional context
Upstream issue: https://github.com/tkaitchuck/aHash/issues/93

Interesting find @houqp . I think this needs to be fixed upstream, by e.g. casting to .
Any idea why it's using the fallback code of aHash at your end, what kind of cpu are you using?

This is probably related to Rust's unability to support hash for f32 and f64, as Eq is still not stabilized for them (and Hash and Eq must be consistent).

This is probably related to Rust's unability to support hash for f32 and f64, as Eq is still not stabilized for them (and Hash and Eq must be consistent).

@houqp found an issue https://github.com/tkaitchuck/aHash/issues/93 in upstream (trying to hash an usize). I think it could be solved easily there by casting it to u64. It's not totally clear to me what's the difference between nightly and stable.

My CPU is Intel i7.
I think i found what's causing the difference between stable and nightly: https://github.com/tkaitchuck/aHash/issues/93#issuecomment-855449239. This turned on the specialize feature in ahash, which triggered the fallback code path.
I think ahash just need to implement usize write in this case like @Dandandan suggested. There is nothing much we could do on our end without incurring extra overhead like converting the byte array to u32 or u64 before hashing it.


|Request] Theater.previous / Theater.next

Hi !
I'm just wondering if it's possible to return to the previous scene (or the next) with a simple button press :) ?
Thank you for your time !

Hey there!
Sadly there's no way to play the previous/next scene due to the way the state is handled (related to #50) and it'd involve quite some work :/

Additionally a finish method would be great so that users kann skip the animation and see the final version of the scenario :)

@felixheck Thanks for the suggestion, it definitely makes sense!


Error: call revert exception

I get this error when trying to read my images from the contract under the image listing page. no image is being displayed

This error is shown when the selected network in Metamask doesn't match the network you deployed your contract to.
For example:
If you deployed your contract via npm run deploy:testnet to the polygon mumbai testnet, then the polygon testnet must be selected within Metamask to interact with the contract.
If you give me more details and what you try to achieve I am happy to help you.


[new product] WeeChat

The release dates were taken from the GitHub releases page.
There's no release policy, WeeChat only supports the respective latest version. However, @flashcode (mentioning to give him a heads up about this) isn't creating releases too often, so this shouldn't be an issue.
Not sure whether it's better to reference the changelog (e.g. https://weechat.org/files/doc/weechat/ChangeLog-4.0.0.html) or the release notes (e.g. https://weechat.org/files/doc/weechat/ReleaseNotes-4.0.0.html). The release notes are more important for updates, but don't list all changes.
Preview: https://deploy-preview-3267--endoflife-date.netlify.app/weechat

Hi,
Release notes are just information about manual actions to do after an upgrade, it's not a ChangeLog.
It would be better to point to the ChangeLog for the complete list of changes (which itself recommends to read the release notes).
And I confirm that as of today, only the latest stable is supported, but with the introduction of a "pratical" semantic versioning, this may change in future by supporting older releases or introduce LTS version. Anyway for now, your changes are OK.

By the way, latest versions are 4.0.1 and 4.0.0 (since 4.0.x, the version is on 3 digits).

Release notes are just information about manual actions to do after an upgrade, it's not a ChangeLog.
It would be better to point to the ChangeLog for the complete list of changes (which itself recommends to read the release notes).

Done :+1:

By the way, latest versions are 4.0.1 and 4.0.0 (since 4.0.x, the version is on 3 digits).

endoflife.date only shows the latest version of a release cycle. 4.0 is the release cycle (sometimes also called "branch"), 4.0.1 is the latest version of this cycle. If you release 4.1.0 there's going to be a 4.1 release cycle with 4.1.0 as latest version. For older cycles the cycle name and version just happen to match (at least most of the time, but not always, e.g. 3.7.1). Due to the auto key the service will also learn about any other version (e.g. 4.0.0). This is also used to automatically update the respective latest version (e.g. 4.0.2), or to notify about a new cycle. However, the API will always just expose a cycle's latest version.

FYI, version 4.0.2 was released 1 hour ago.

FYI, version 4.0.2 was released 1 hour ago.

We can use this opportunity to check whether auto updates work :smiley:

Thanks for the contribution @PhrozenByte !

Thanks for the review! :+1: Most changes were incorporated, some additional notes see above.

By the way, as I mentioned earlier, latest WeeChat version is 4.0.2, released on July 12th.

By the way, as I mentioned earlier, latest WeeChat version is 4.0.2, released on July 12th.

Thanks for the info @flashcode. As mentioned by @PhrozenByte in its latest comment, we will use this opportunity to check whether auto updates work as intended.

Ah, sorry, I missed this comment.
Thanks!


[Snyk] Upgrade eslint from 8.46.0 to 8.47.0

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade eslint from 8.46.0 to 8.47.0.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 1 version ahead of your current version.
The recommended version was released 22 days ago, on 2023-08-11.

Release notes

Package name: eslint

8.47.0 - 2023-08-11Features

53d7508 feat: update regex for methods with thisArg (#17439) (Francesco Trotta)

Bug Fixes

631648e fix: do not report on shadowed constructors in no-new-wrappers (#17447) (Francesco Trotta)

Documentation

a766a48 docs: document lack of config file names (#17442) (James)
a1635d6 docs: Update README (GitHub Actions Bot)
47a0859 docs: update require-unicode-regexp.md as following up #17402 (#17441) (SUZUKI Sosuke)
fcdc85d docs: Update README (GitHub Actions Bot)
2a92b6c docs: update with "Specifying Parser Options" (#17435) (Cheol-Won)
d743ed3 docs: add metadata for parser/processor (#17438) (Huáng Jùnliàng)
224376c docs: Update README (GitHub Actions Bot)
a41a8e4 docs: update script names in README (#17432) (Nitin Kumar)

Chores

bf69aa6 chore: Update dependencies (#17456) (Nicholas C. Zakas)
0e45760 chore: package.json update for @ eslint/js release (ESLint Jenkins)
757bfe1 chore: Remove add-to-triage (#17450) (Nicholas C. Zakas)
b066640 chore: standardize npm script names (#17431) (Nitin Kumar)
6b2410f chore: Update add-to-triage.yml (#17444) (Nicholas C. Zakas)

8.46.0 - 2023-07-28Features

8a93438 feat: require-unicode-regexp support v flag (#17402) (SUZUKI Sosuke)
1a2f966 feat: no-useless-escape support v flag (#17420) (Yosuke Ota)
ee68d1d feat: no-empty-character-class support v flag (#17419) (Milos Djermanovic)
853d32b feat: deprecate no-return-await (#17417) (Carlos Lopez)
d4f02e4 feat: no-control-regex support v flag (#17405) (Yosuke Ota)
2a35f3e feat: prefer-named-capture-group support v flag (#17409) (Yosuke Ota)
8ca8b50 feat: Better error message for flat config plugins (#17399) (Nicholas C. Zakas)
509f753 feat: no-misleading-character-class support v flag (#17406) (Yosuke Ota)
3caf514 feat: no-regex-spaces support v flag (#17407) (Yosuke Ota)
b7fad2b feat: prefer-regex-literals support v flag (#17410) (Yosuke Ota)
a6a3ad4 feat: no-useless-backreference support v flag (#17408) (Yosuke Ota)
94954a7 feat: no-invalid-regexp support v flag (#17404) (Yosuke Ota)
1af6eac feat: adds option for allowing empty object patterns as parameter (#17365) (Tanuj Kanti)
cf03104 feat: Improve config error messages (#17385) (Nicholas C. Zakas)

Bug Fixes

9803c7c fix: FlatESLint#getRulesMetaForResults shouldn't throw on unknown rules (#17393) (Milos Djermanovic)
42faa17 fix: Update no-loop-func to not overlap with no-undef (#17358) (Matt Wilkinson)

Documentation

4d474e3 docs: update with TypeScript info (#17423) (James)
091f44e docs: File extension named processor deprecation (#17362) (Matt Wilkinson)
9254a6c docs: Update README (GitHub Actions Bot)
6d6dc51 docs: fix overlapping of open in playground button (#17403) (Tanuj Kanti)
7fc3a2c docs: Add private class features info to no-underscore-dangle (#17386) (Matt Wilkinson)
da73e58 docs: Migrating eslint-env configuration comments (#17390) (Francesco Trotta)
80dffed docs: fix Ignoring Files section in config migration guide (#17392) (Milos Djermanovic)
8a9abb7 docs: Update README (GitHub Actions Bot)
7e9be4b docs: Update README (GitHub Actions Bot)
0b0bbe0 docs: Update README (GitHub Actions Bot)

Chores

d1eb7e4 chore: Update ecosystem dependencies (#17427) (Nicholas C. Zakas)
fab9e97 chore: package.json update for eslint-config-eslint release (ESLint Jenkins)
6246711 chore: package.json update for @ eslint/js release (ESLint Jenkins)
0aa0bc3 chore: Add PRs to triage project (#17421) (Nicholas C. Zakas)

    from eslint GitHub release notes

Commit messages

Package name: eslint

98b155f 8.47.0
928cecc Build: changelog update for 8.47.0
bf69aa6 chore: Update dependencies (#17456)
0e45760 chore: package.json update for @ eslint/js release
631648e fix: do not report on shadowed constructors in `no-new-wrappers` (#17447)
757bfe1 chore: Remove add-to-triage (#17450)
b066640 chore: standardize npm script names (#17431)
a766a48 docs: document lack of config file names (#17442)
a1635d6 docs: Update README
6b2410f chore: Update add-to-triage.yml (#17444)
47a0859 docs: update `require-unicode-regexp.md` as following up #17402 (#17441)
53d7508 feat: update regex for methods with `thisArg` (#17439)
fcdc85d docs: Update README
2a92b6c docs: update with "Specifying Parser Options" (#17435)
d743ed3 docs: add metadata for parser/processor (#17438)
224376c docs: Update README
a41a8e4 docs: update script names in README (#17432)

Compare

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

LGTM


Restic on Solaris (SmartOS) not preserving extended attributes

Output of restic version
restic 0.13.1 compiled with go1.18 on solaris/amd64
On SmartOS joyent_20220714T060459Z
How did you run restic exactly?
/opt/local/bin/restic -r /restic backup /myfiles
Output:
enter password for repository:
repository 29060791 opened successfully, password is correct
created new cache in /root/.cache/restic
no parent snapshot found, will read all files

Files:           1 new,     0 changed,     0 unmodified
Dirs:            2 new,     0 changed,     0 unmodified
Added to the repo: 3.785 KiB

processed 1 files, 9 B in 0:00
snapshot 5d004a47 saved

/opt/local/bin/restic -r /restic restore latest --target /myfiles/restore
Output:
enter password for repository:
repository 29060791 opened successfully, password is correct
restoring <Snapshot 5d004a47 of [/myfiles] at 2022-08-01 21:51:50.405393812 +0000 UTC by root@nas01> to /myfiles/restore

What backend/server/service did you use to store the repository?
Local file system.
Expected behavior
All extended attributes such as ACLs to be full restored.
Original file ACLs:
/usr/bin/ls -alV /myfiles
total 13
drwxr-xr-x   3 root     root           4 Aug.  1 21:42 .
                 owner@:rwxp-DaARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow
drwxr-xr-x  27 root     root         512 Aug.  1 21:31 ..
     0:user::rwx
     1:group::r-x		#effective:r-x
     2:mask:r-x
     3:other:r-x
drwxr-xr-x+  2 root     root           2 Aug.  1 21:42 a
          group:unknown:r-----a-R-c---:-------:allow
          group:unknown:r-----a-R-c---:-------:allow
                 owner@:rwxp-DaARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow
-rw-r--r--+  1 root     root           9 Aug.  1 21:42 test1.txt
          group:unknown:r-----a-R-c---:-------:allow
                 owner@:rw-p--aARWcCos:-------:allow
                 group@:r-----a-R-c--s:-------:allow
              everyone@:r-----a-R-c--s:-------:allow

Actual behavior
Observed file ACLs on restored content:
/usr/bin/ls -alV /myfiles/restore/myfiles/
total 12
drwxr-xr-x   3 root     root           4 Aug.  1 21:51 .
                 owner@:rwxp-DaARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow
drwx------   3 root     root           3 Aug.  1 21:52 ..
                 owner@:rwxp-DaARWcCos:-------:allow
                 group@:------a-R-c--s:-------:allow
              everyone@:------a-R-c--s:-------:allow
drwxr-xr-x   2 root     root           2 Aug.  1 21:49 a
                 owner@:rwxp-DaARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow
-rw-r--r--   1 root     root           9 Aug.  1 21:49 test1.txt
                 owner@:rw-p--aARWcCos:-------:allow
                 group@:r-----a-R-c--s:-------:allow
              everyone@:r-----a-R-c--s:-------:allow

Steps to reproduce the behavior

Perform on SmartOS, global zone. Can be performed in native zone with same result.
Create the repository:

zfs create -o xattr=on -o mountpoint=/restic zones/restic
/opt/local/bin/restic -r /restic init

Create the source files with an ACL:

zfs create -o xattr=on -o mountpoint=/myfiles zones/myfiles
cd /myfiles
mkdir a
echo "testfile" > test1.txt
/usr/bin/chmod A+group:unknown:read_set:allow a test1.txt

Check ACLs:

/usr/bin/ls -alV /myfiles
total 13
drwxr-xr-x   3 root     root           4 Aug.  1 21:42 .
                 owner@:rwxp-DaARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow
drwxr-xr-x  27 root     root         512 Aug.  1 21:31 ..
     0:user::rwx
     1:group::r-x		#effective:r-x
     2:mask:r-x
     3:other:r-x
drwxr-xr-x+  2 root     root           2 Aug.  1 21:42 a
          group:unknown:r-----a-R-c---:-------:allow
          group:unknown:r-----a-R-c---:-------:allow
                 owner@:rwxp-DaARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow
-rw-r--r--+  1 root     root           9 Aug.  1 21:42 test1.txt
          group:unknown:r-----a-R-c---:-------:allow
                 owner@:rw-p--aARWcCos:-------:allow
                 group@:r-----a-R-c--s:-------:allow
              everyone@:r-----a-R-c--s:-------:allow

Backup the directory:

/opt/local/bin/restic -r /restic backup /myfiles

Restore the directory:

/opt/local/bin/restic -r /restic restore latest --target /myfiles/restore

Check ACLs:

/usr/bin/ls -alV /myfiles/restore/myfiles/
total 12
drwxr-xr-x   3 root     root           4 Aug.  1 21:51 .
                 owner@:rwxp-DaARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow
drwx------   3 root     root           3 Aug.  1 21:52 ..
                 owner@:rwxp-DaARWcCos:-------:allow
                 group@:------a-R-c--s:-------:allow
              everyone@:------a-R-c--s:-------:allow
drwxr-xr-x   2 root     root           2 Aug.  1 21:49 a
                 owner@:rwxp-DaARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow
-rw-r--r--   1 root     root           9 Aug.  1 21:49 test1.txt
                 owner@:rw-p--aARWcCos:-------:allow
                 group@:r-----a-R-c--s:-------:allow
              everyone@:r-----a-R-c--s:-------:allow

Do you have any idea what may have caused this?
No.
Do you have an idea how to solve the issue?
Can help test.
Did restic help you today? Did it make you happy in any way?
Yes, saving my data :-)

On Linux the ACLs are stored as an xattr, which makes it easy to backup and restore. Is this also how it works on Solaris/SmartOS? Is there maybe some command similar to getfattr -d -m - filename which on Linux shows all extended attributes set for a file.
Could you run try the following steps, to check whether maybe the ACLs are already included in the backup but just not restored.

Backup a single file with ACLs: restic backup ./file-with-acl (make sure to switch to the directory containing that file first and use a relative path!)
Then run restic cat snapshot <id> with the id returned by the backup command.
Then run restic cat blob <long-id> with the id contained in the "tree": line of the snapshot. What is the output?


Run evaluation on the same device as the model at the end of training

Hello all!
Right now, after training from command line is complete, evaluation routine terminates with the following error:
[2024-04-04 17:30:46][INFO] - Evaluating training dataset
Error executing job with overrides: ['+output_path=model.pt', '+continue_from=null']
Traceback (most recent call last):
  File "/home/chong/mts_venv/lib/python3.10/site-packages/metatensor/models/cli/train.py", line 441, in _train_model_hydra
    _eval_targets(
  File "/home/chong/mts_venv/lib/python3.10/site-packages/metatensor/models/cli/eval.py", line 170, in _eval_targets
    batch_predictions = evaluate_model(model, systems, options, is_training=False)
  File "/home/chong/mts_venv/lib/python3.10/site-packages/metatensor/models/utils/evaluate_model.py", line 111, in evaluate_model
    model_outputs = _get_model_outputs(model, systems, targets)
  File "/home/chong/mts_venv/lib/python3.10/site-packages/metatensor/models/utils/evaluate_model.py", line 272, in _get_model_outputs
    return model(systems, options, check_consistency=True)
  File "/home/chong/mts_venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/chong/mts_venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript, serialized code (most recent call last):
  File "code/__torch__/metatensor/torch/atomistic/model.py", line 41, in forward
    outputs = (_module).forward(systems0, (options).outputs_getter(), (options).selected_atoms_getter(), )
    if check_consistency:
      _10 = _2(systems0, (options).outputs_getter(), (options).selected_atoms_getter(), outputs, )
            ~~ <--- HERE
    else:
      pass
  File "code/__torch__/metatensor/torch/atomistic/outputs.py", line 117, in _check_outputs
    else:
      expected_samples3 = expected_samples2
    _51 = (expected_samples3).union((energy_block).samples_getter(), )
           ~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
    _52 = torch.ne((_51).__len__(), (expected_samples3).__len__())
    if _52:

Traceback of TorchScript, original code (most recent call last):
  File "/home/chong/mts_venv/lib/python3.10/site-packages/metatensor/torch/atomistic/model.py", line 343, in forward

        if check_consistency:
            _check_outputs(
            ~~~~~~~~~~~~~~ <--- HERE
                systems=systems,
                requested=options.outputs,
  File "/home/chong/mts_venv/lib/python3.10/site-packages/metatensor/torch/atomistic/outputs.py", line 92, in _check_outputs
            expected_samples = expected_samples.intersection(selected_systems)

        if len(expected_samples.union(energy_block.samples)) != len(expected_samples):
               ~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
            raise ValueError(
                "invalid samples entries for 'energy' output, they do not match the "
RuntimeError: device mismatch in union: got 'cpu' and 'cuda:0'

As the runtime error reads, there must be a device mismatch somewhere. This should be resolved. I'm marking this as a SOAP-BPNN issue, but might also be the case for the other routines. Thanks!

I think this is what was fixed in https://github.com/lab-cosmo/metatensor/pull/552. We should prepare a release for this and everything else =).
In the mean time you can manually set check_consistency to False in MetatensorAtomisticModel

Fixed by the new releases!


no rss feed available to follow updates

Unlike v3 there is no newsfeed available for subscribing to new releases and changes.

How do you expect people to stay updated?
Is there any reliable, alternative channel than going to the webpage and check manually?
RSS could be used for a lot of stuff like feed readers, they could start triggers and could be used with services like ifttt and they are generally easy to consume and process automatically etc.

I'll have to look into something like this then... Open to help

In order to make use good of the feeds, we would need to re-work the changelog from a singular page to a conglomeration of posts. This could be done, but would take some time to do.

I added an atom feed (https://mtgjson.com/atom.xml) but I think this is as good as it'll get


Add county_id to precinct IDs, use dash to slugify precinct names

Description
I noticed three things about elex-clarity that seemed different than how elex-state handles precincts:

It groups precincts into county/race keys by adding the county ID to the end of race_id. So for a governor's race, for instance, there's one race per county with the precincts as subunits of each county/race pair, e.g. 2022-05-24_GA_R_G_13131 where 13131 is the county FIPS.
It doesn't add county ID to the precinct subunit ID.
It uses an underscore to slugify the precinct name, rather than a dash.

This draft PR does not address 1 and assumes this is expected behavior.
It does address 2 and 3 by adding the county_id to precinct IDs and uses a dash to slugify precinct names after that, so a precinct ID of pearson_city becomes 13003_pearson-city.
Test Steps
elexclarity 113667 GA --level=precinct --countyMapping="$(cat tests/fixtures/mappings/GA_county_fips.json)"

Marking this as ready for review, though it's non-urgent because some of this is being done elsewhere.


Add Block Filtering by Weights during Sampling

What went wrong?
The following image illustrates the weight ranges shift between a cube and its blocks - the more blocks you add to a cube, the smaller its weight range([minWeight, maxWeight]) gets, as a consequence, the less overlaping of weight ranges among the cube blocks. Given enough time, the oldest blocks can even cease to overlap with the cube weights all together,

As an attempt to reduce the sampling overhead, blocks from a chosen cube whose weight range doesn't overlap with the query weight range should be filtered out when sampling the index.
Branch and commit id:

main: 9083396
main-1.0.0: 8bc87dc

Spark version:
3.4.2
Hadoop version:
3.3.3

Merged on https://github.com/Qbeast-io/qbeast-spark/pull/284


How to update time_since_can_sleep in RigidBodyActivation?

default_time_until_sleep() 2.0 is too long , I need to set it to more shorter.

You can modify time_until_sleep through activation_mut, I'm keeping this open because it's not trivial to discover, and we could provide a way to change the default.


When replacing a root in a modal context, present a new modal flow

Currently there's no way to jump from one modal flow to another. The app has to manually dismiss the first modal flow, then request a new modal flow by creating a new visit proposal with a modal context. Here's my proposal: make replace_root consider the given context.

If given context is default, then behavior is unchanged: Dismiss if modal controller, then pop to root, then replace root controller on main stack.
If given context is modal then behavior is now: Dismiss if modal controller, then present a new modal.

In my mind, this makes sense since replacing a modal root restarts the flow, but I'd like to get your thoughts before I move forward with tests.

@olivaresf can you give an example of when you'd want this behavior? Android doesn't allow replacing the "root" with a modal context url. "Root" is always considered the root of the default context.

Of course! For example, a menu presented modally that leads into another, unrelated modal flow. The presenting modal menu may not want to share its stack with the new modal flow due to size (e.g. if the presented modal was only half the screen and the unrelated modal flow requires full height).
In this case, the app is responsible for dismissing the first flow, then calling on TurboNavigator to present a new modal flow. I feel TurboNavigator should handle this interaction. You just call route(url:) and using the presentation and context, it does the right thing.
I think this is a scenario we should support, but it's not a huge deal if we don't feel this is the right approach or if we don't want to solve for this.

I want to make sure I understand this entirely. Currently, if you are in a modal and route to a new modal flow it will push on the modal context, ending with 2 screens on the modal stack. But you want to dismiss then present, ending with a single screen on the modal context. Is that correct?

Yes! That's correct.

@joemasilotti FYI, I discussed this PR with @jayohms today and I'm going to try something different for this scenario. I think it's likely to be a common scenario in mobile, so it's worth looking into.
For now, I'm closing this PR.


Installation fails on Node.js v6

fatal error: too many errors emitted, stopping now:
$ node -v
v6.2.1

$ npm -v
3.9.3

$ npm i gif2webp -g
npm http request GET https://registry.npmjs.org/gif2webp
npm http 200 https://registry.npmjs.org/gif2webp
npm http fetch GET https://registry.npmjs.org/gif2webp/-/gif2webp-0.1.5.tgz
npm http fetch 200 https://registry.npmjs.org/gif2webp/-/gif2webp-0.1.5.tgz

><EMAIL_ADDRESS>install /Users/mathias/.nvm/versions/node/v6.2.1/lib/node_modules/gif2webp
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/gif2webp/src/gif2webp.o
../src/gif2webp.cpp:55:30: error: unknown type name 'Arguments'; did you
      mean 'v8::internal::Arguments'?
Handle<Value> convert (const Arguments& args) {
                             ^~~~~~~~~
                             v8::internal::Arguments
/Users/mathias/.node-gyp/6.2.1/include/node/v8.h:145:7: note:
      'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/gif2webp.cpp:56:17: error: calling a protected constructor of class
      'v8::HandleScope'
    HandleScope scope;
                ^
/Users/mathias/.node-gyp/6.2.1/include/node/v8.h:904:13: note: declared
      protected here
  V8_INLINE HandleScope() {}
            ^
../src/gif2webp.cpp:58:13: error: member access into incomplete type 'const
      v8::internal::Arguments'
    if (args.Length() < 2) {
            ^
/Users/mathias/.node-gyp/6.2.1/include/node/v8.h:145:7: note: forward
      declaration of 'v8::internal::Arguments'
class Arguments;
      ^
../src/gif2webp.cpp:59:62: error: no member named 'New' in 'v8::String'
        return ThrowException (Exception::TypeError (String::New ("W...
                                                     ~~~~~~~~^
../src/gif2webp.cpp:62:15: error: type 'const v8::internal::Arguments' does
      not provide a subscript operator
    if (!args [0]->IsObject()) {
         ~~~~ ^~
../src/gif2webp.cpp:63:62: error: no member named 'New' in 'v8::String'
        return ThrowException (Exception::TypeError (String::New ("F...
                                                     ~~~~~~~~^
../src/gif2webp.cpp:66:15: error: type 'const v8::internal::Arguments' does
      not provide a subscript operator
    if (!args [1]->IsFunction()) {
         ~~~~ ^~
../src/gif2webp.cpp:67:62: error: no member named 'New' in 'v8::String'
        return ThrowException (Exception::TypeError (String::New ("S...
                                                     ~~~~~~~~^
../src/gif2webp.cpp:70:34: error: type 'const v8::internal::Arguments' does
      not provide a subscript operator
    Local<Object> options = args [0]->ToObject();
                            ~~~~ ^~
../src/gif2webp.cpp:72:71: error: no member named 'NewSymbol' in
      'v8::String'
  ...buffer = Local<Object>::Cast (options->Get (String::NewSymbol ("sour...
                                                 ~~~~~~~~^
../src/gif2webp.cpp:74:62: error: no member named 'New' in 'v8::String'
        return ThrowException (Exception::TypeError (String::New ("F...
                                                     ~~~~~~~~^
../src/gif2webp.cpp:79:32: error: no member named 'NewSymbol' in
      'v8::String'
    if (!options->Get (String::NewSymbol ("lossy"))->IsUndefined()) {
                       ~~~~~~~~^
../src/gif2webp.cpp:80:54: error: no member named 'NewSymbol' in
      'v8::String'
        Local<Boolean> value = options->Get (String::NewSymbol ("los...
                                             ~~~~~~~~^
../src/gif2webp.cpp:87:32: error: no member named 'NewSymbol' in
      'v8::String'
    if (!options->Get (String::NewSymbol ("mixed"))->IsUndefined()) {
                       ~~~~~~~~^
../src/gif2webp.cpp:88:54: error: no member named 'NewSymbol' in
      'v8::String'
        Local<Boolean> value = options->Get (String::NewSymbol ("mix...
                                             ~~~~~~~~^
../src/gif2webp.cpp:94:32: error: no member named 'NewSymbol' in
      'v8::String'
    if (!options->Get (String::NewSymbol ("quality"))->IsUndefined()) {
                       ~~~~~~~~^
../src/gif2webp.cpp:95:53: error: no member named 'NewSymbol' in
      'v8::String'
        Local<Number> value = options->Get (String::NewSymbol ("qual...
                                            ~~~~~~~~^
../src/gif2webp.cpp:102:32: error: no member named 'NewSymbol' in
      'v8::String'
    if (!options->Get (String::NewSymbol ("method"))->IsUndefined()) {
                       ~~~~~~~~^
../src/gif2webp.cpp:103:53: error: no member named 'NewSymbol' in
      'v8::String'
        Local<Number> value = options->Get (String::NewSymbol ("meth...
                                            ~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/gif2webp/src/gif2webp.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/mathias/.nvm/versions/node/v6.2.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/Users/mathias/.nvm/versions/node/v6.2.1/bin/node" "/Users/mathias/.nvm/versions/node/v6.2.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mathias/.nvm/versions/node/v6.2.1/lib/node_modules/gif2webp
gyp ERR! node -v v6.2.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/mathias/.nvm/versions/node/v6.2.1/bin/node" "/Users/mathias/.nvm/versions/node/v6.2.1/bin/npm" "i" "gif2webp" "-g"
npm ERR! node v6.2.1
npm ERR! npm  v3.9.3
npm ERR! code ELIFECYCLE

npm ERR<EMAIL_ADDRESS>install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the gif2webp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs gif2webp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls gif2webp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     ~/tmp/npm-debug.log

I have the same error.


Add categories to Cargo.toml

Hi! crates.io now supports categories, which are a curated list
of topics aimed at helping an end-user coming to crates.io looking for
"a crate to do ______".
We're sending pull requests to selected crates to add categories in order to help
populate the categories and seed their usefulness. We've made a guess at the best
category/categories for this crate; if it doesn't fit, please feel free to take
a look at all the available categories and their descriptions and
the slug values that should be specified in your Cargo.toml and pick
different ones. If you have a category in mind that isn't available, you can
send a PR to this file on crates.io to propose additional
categories.
Crates can have up to 5 categories, and uploading categories to crates.io
currently requires publishing a new version with a cargo nightly from 2017-01-18
or later (it needs to contain this PR).
We've published a blog post with further details about categories.
The blog post also talks about the new crates.io support for CI badges, which
you may be interested in adding as well.
Please let me know if you have any questions!

Additionally, it looks like your TOML was malformed (missing a comma) and the multiple license format is supposed to use a slash:

This is a string description of the license for this package. Currently
crates.io will validate the license provided against a whitelist of known
license identifiers from http://spdx.org/licenses/. Multiple licenses can be
separated with a /.

I hope I didn't overstep my bounds!

Not at all! Had the comma fixed locally and on crates, but the slash for licenses was news to me.
Thanks for this, I'll publish in a bit.


Factor tables: adjustments and new tables

[x] adjustment: the countryNumMessages table should contain country names
[ ] new factor table: tagNumPersons: for each Tag, the number of Persons with interest for the Tag
[ ] new factor table: dateLengthCategoryNumMessages: for dates (~1000) and length categories (e.g. 200 buckets: 1..10, 11..20, ..., 1991..2000), the number of mesages
[ ] new factor table: dateTagClassNumMessages: for each day (~1000) and TagClass (~70), the number of Messages

Work ongoing on the factor-table-country branch: https://github.com/ldbc/ldbc_snb_datagen_spark/pull/355


Create Webhook Handler factory

createSaleorWebhookHandler exported from @saleor/app-sdk/handler/next
// src/pages/api/webhooks/order_created.ts

export default createSaleorWebhookHandler({
  eventType: string | string[]
  ...
})

// eg:
const handler: SaleorEventHandler<OrderCreatedDocument | OrderFullfilledDocument> = (req, res) => {
  const {apl, payload, domain, eventType} = req.context;

  // logic
}

export default createSaleorWebhookHandler({
  handler: handler
})

[ ] Check what Saleor event type
[ ] Inject SaleorApp / APL instance
[ ] Validate tokens and headers
[ ] Check payload checksum
[ ] Type extending Next's request with Saleors metadata, eg SaleorEventRequest<PayloadGraphqlDocument>
[ ] Allow multiple event types
[ ] Documentation
[ ] Example

QA made on https://github.com/saleor/saleor-app-slack/pull/23
Here are problems:

Missing docs
When Webhook received empty query, installation failed, instead using some default payload
Wrong requests (eg empty body, wrong method) didn't receive error, error was somewhere silently handled

@krzysztofwolski

Docs PR: #109
Added in #107
Added separate ticket


Add docker and docker-compose support for scripts dev generator

Following the feedback from @JonathanRosado  and @gmatoshp on their experience setting up the hubot script (agm) dev environment and the workflow that they have to use, we would like to recommend that we explore the following approach: (1) we create a dockerized version of hubot with the enterprise integration, (2) in the yo generator for scripts, we could generate a docker-compose.yml that uses the previosuly mentioned docker image, and mounts the appropriate local scripts that you are developing within the /scripts directory in the container. So, to run / play with your hubot script / integration during develpment, you just have to perform docker-compose up.
@edagan @eitanshp @mosheBelostotsky @eitzhaki What do you think?

The fastest way existing is to use the following shell script that updates the files that were changed and bring up hubot. any other solution that will bring/build a docker image will take more time.

you can work on a folder on windows machine
Starting vmware linux server
Mounting the directory to linux as shared one
Creating hubot instance on the linux machine (e.g: /opt/hubot_dev)
Running the following scrtip from the hubot_dev folder in linux machine: (rename the attached file from .txt to .sh
dev_and_run.txt
)

@eitzhaki thanks for your feedback! Regarding the steps above, I think that it is a good approach. In fact, this would be even easier to do in windows if we use docker toolbox. The value added with using docker in general is that you may use the same workflow if you develop in a linux environment, either in our machines or elsewhere. And furthermore, a developer would not have to resort to using rsync or setup explicit symlinks.
I will work with @JonathanRosado and @gmatoshp to do a spike on this and see if it works out.

show me the benefit :)

I remind you guys that people are developing/using our scripts from Windows as well - take that under advisement. Not sure why you need rsync @rqc - once you mount a shared volume from Windows to a VMWare VM, it' automatically updated at all times.

@eitanshp I mentioned rsync because it is being used in the script that @eitzhaki attached above. I didn't write that. Furthermore, I concurred that using VMWare in that way does the job for Windows users, but not for us cool Linux users :wink: That's where docker really shines.

Let's take it offline - I see no need to rsync anything once you use a mounted volume. You have all the files synced by default so regardless of where you work (Windows to Linux VM, Linux to Docker container) the concept remains the same - mounted volume.

Referencing https://github.com/eedevops/generator-hubot-enterprise/pull/7

@JonathanRosado please consider what @mosheBelostotsky mentioned today. That when we use the yo hubot-enterprise generator to generate an instance of hubot and NOT the script structure, then a similar docker-compose.yml could be generated. However, we should think about weather this is a priority use case...

@rqc Will do. As this was not part of the original plan, I'll need an additional user story allocated for this task.

@JonathanRosado ok, create the story, put it in the backlog but I don't think this is priority right now. Make sure you document all images, and how to use the docker-compose.yml in the wiki.

Fixed in https://github.com/eedevops/generator-hubot-enterprise/pull/7 @JonathanRosado thanks for the pull request.


Enhanced sqlite docu for how to use in production

Hi Rene,
I've added a block about running sqlite in production to the docu to improve guidance in valid use cases like running CAP as a proxy for S4.
BR,
Marten

Hi Marten,
Thanks a lot! I'll discuss this and get back to you. :)

Hi Marten,
could you enhance the description of the scenario and the boundary conditions, like losing data when the corresponding container is dropped and restarted? The technical configuration is the easier part compared to judging and identifying if one would really want to SQLite in prod.

Hi Rene,
I encounter the issue with a partner in an S4 transformation. Basically they use their CAP app as a proxy for the S4 API and have no entities to persist. However when trying to start without any database, the server always crashed when trying to do cds.connect.to upon the request. The workaround was to just to add the sqlite db in prod as the requests are anyways forwarded to S4.

4 transformation. Basically they use their CAP app as a proxy for the S4 API and have no entities to persist. However when trying to start without any database, the server always crashed when trying to do cds.connect.to upon the request. The workaround was to just to add the sqlite db in prod as the requests are anyways forwarded to S4.

I rather think that this is a configuration issue on the customer side. If you do not have any database, do not set a cds.requires.db entry in the package.json.

Strangely when they did not, it crashed upon requests.

@schiwekM Do you by any chance have a pointer for me look at the config?

@schiwekM Do you by any chance have a pointer for me look at the config?

Send an email with contact details

@schiwekM I'd propose to close this PR.
I did not hear back and I'm rather sure that this is not required, if you do not have the need for a database.


Puppeteer: downloadFile hangs

What are you trying to achieve?
I'm trying to use the Puppeteer helper's downloadFile method. It hangs.
What do you get instead?
I supply it with an XPath string for a very standard <a> link that downloads a file, then I see the file download in Chrome when running it with show: true; the file shows up on my filesystem under the download directory; but the downloadFile method hangs forever at the line const xRequest = await new Promise((resolve) => { .... I copied the implementation of downloadFile to a local helper with a different name and put a this.debug() after every line of code, and the line that never gets reached (even after waiting about 15 minutes) is the line after awaiting the xRequest.
My code is identical to the example in the 2.0.8 release notes. I have a Scenario with an async (I) => { ... } that calls a Step defined as foo: async function(parm) { ... }. There is nothing unusual or different about my code; the only other helper I have calls page.setExtraHTTPHeaders at the very beginning of the test suite. All of my steps are a boring and typical combination of I.click(), I.wait(), I.fillField, I.attachFile, etc.
Details

CodeceptJS version: 2.1.0
NodeJS Version: 11.14.0
Puppeteer Version: 1.15.0
Operating System: macOS Mojave
Configuration file: Chrome invoked with --no-sandbox --disable-setuid-sandbox; waitForNavigation set to networkidle2; using codeceptjs-cli-reporter, mochawesome and mocha-junit-reporter, screenshotOnFail, stepByStepReport, autoDelay, retryFailedStep, almost all with default settings.

I confirmed that it hangs on RHEL 7.3 also, with a headless browser. So, the issue is not macOS-specific, and it is also reproducible when the browser is headless.

Yeah, happens with me too. Replaced downloadFile with handleDownloads in 2.1.4
See changelog https://codecept.io/changelog#214


Functions in theme config are always undefined

problem
index.ts in theme
export default defineTheme({
  schema: z.object({
    customScript: z.function(),
  })
})

astro.config.ts in playground
integrations: [
  theme({
    config: {
      customScript: () => {
        console.log("test");
      },
    },
  }),
],

file in theme
import config from "theme:config";

console.log(config.customScript); // undefined

possible reason
https://github.com/astrolicious/astro-theme-provider/blob/dd63fc880561282060e4e6d636de66d30cc897a1/package/src/index.ts#L123
using JSON.stringify in this line
possible solution
JSON.stringify(
  Object.fromEntries(
    Object.entries(userConfig).map(([key, value]) =>
      typeof value === 'function'
        ? [key, value.toString()]
        : [key, value]
        )
    )
)

This is a limitation of the config option / ATP in general. The value has to be JSON serializable so that the config can be turned into a virtual module and functions cannot be serialized into JSON.
Supporting something like this may be possible using @inox-tools/inline-mod, more details in this issue here: https://github.com/astrolicious/astro-theme-provider/issues/32


server side version of init

Prerequisites

[x] Checked that your issue isn't already filed by cross referencing issues with the common mistake label

Description

This is a feature suggestion - I was wondering about creating a version of mocha init that would work for server side code rather than client side, e.g. just create a test dir with a single test file that might have some boilerplate code in it ...
It could also update package.json to have:
"test": "mocha test/**/*.js"
I'm thinking about similar server side init things I've seen for the ruby projects bundler and rspec.
I've looked and I don't seem to see the existence or discussion of such a thing.  Would this be desirable for anyone?  I'd find it handy to have when starting up a new project to speed things up a little ...

I would be open to this idea.   Eventually this should expand to use a config file in place of mocha.opts. Thanks!
(I don't suggest creating mocha.opts with any init command)

See #3385 .


Unsupported GPU device: Intel(R) UHD Graphics 770 in version 1.4

Hi,
with
intel-extension-for-pytorch      2.1.10+xpu
intel-extension-for-transformers 1.4
oneapi                           2024.0

Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from intel_extension_for_transformers.transformers.modeling import AutoModelForCausalLM
2024-04-08 13:53:53,822 - datasets - INFO - PyTorch version 2.1.0a0+cxx11.abi available.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_transformers/transformers/__init__.py", line 56, in <module>
    from .modeling import (
  File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_transformers/transformers/modeling/__init__.py", line 22, in <module>
    from .modeling_auto import (AutoModel, AutoModelForCausalLM,
  File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_transformers/transformers/modeling/modeling_auto.py", line 87, in <module>
    if is_ipex_available() and get_gpu_family() != "no_gpu":
  File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_transformers/tools/utils.py", line 63, in get_gpu_family
    assert False, "Unsupported GPU device: {}".format(name)
AssertionError: Unsupported GPU device: Intel(R) UHD Graphics 770
>>> from intel_extension_for_transformers.transformers import AutoModelForCausalLM
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_transformers/transformers/__init__.py", line 56, in <module>
    from .modeling import (
  File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_transformers/transformers/modeling/__init__.py", line 22, in <module>
    from .modeling_auto import (AutoModel, AutoModelForCausalLM,
  File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_transformers/transformers/modeling/modeling_auto.py", line 87, in <module>
    if is_ipex_available() and get_gpu_family() != "no_gpu":
  File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_transformers/tools/utils.py", line 63, in get_gpu_family
    assert False, "Unsupported GPU device: {}".format(name)
AssertionError: Unsupported GPU device: Intel(R) UHD Graphics 770

No error with
intel-extension-for-pytorch      2.1.10+xpu
intel-extension-for-transformers 1.3.2
oneapi                           2024.0

Hi fakezeta,
we did not support old iGPU, please use new iGPU.

thank you, gonna close the issue


Fix phony ci-release target

Good catch! Hopefully this will get merged soon, it's a simple one-line fix :)


Update name in index

The index.md currently states:

When Then Zen is a new project by Christine Dodrill...

But that doesn't seem to be the authors current name. Here Xe writes in Xer blog that Xer new name is Xe.
I don't think I ever wrote a proper english sentence with more Xs in it than the last one.
Long story short, if I understood that name thing right then the index.md should be updated.

Identity is complicated, for professional things like ownership I want to use the name that I use for government and legal interactions. I think it's fine as-is, but I may be updating it to replace my last name as I've just gotten married and haven't decided if I want to assume my husband's last name or not.


Fix UI to display lesson code together with module code

Resolves #164.

Codecov Report

Merging #224 (3f59f7f) into master (30aa897) will increase coverage by 0.10%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master     #224      +/-   ##
============================================
+ Coverage     77.85%   77.96%   +0.10%
  Complexity      699      699
============================================
  Files            97       97
  Lines          2186     2183       -3
  Branches        269      269
============================================
  Hits           1702     1702
+ Misses          387      384       -3
  Partials         97       97

Impacted Files
Coverage Δ

src/main/java/seedu/address/ui/PersonCard.java
0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30aa897...3f59f7f. Read the comment docs.


Error with forgot-password route

https://firebase.google.com/codelabs/firebase-get-to-know-flutter
At step 5. Add RSVP functionality] there is a minor error at line 71 with the new version of Flutter
final arguments = state.queryParameters;
should be replaced with
final arguments = state.uri.queryParameters;

Hi @gianglt. Thanks for filing this. Per this PR https://github.com/flutter/codelabs/pull/1791, I see this has been fixed and should be released soon. See also: firebase-get-to-know-flutter/step_05/lib/main.dart
Thank you!


How to do not dismiss dialog when i pressed the back button?

([x] becomes a filled in checkbox, [ ] is an empty one)

[ ] I understand that dialogs which require a combination of different dialog types provided by this library (e.g. list + progress, input + checkbox) require a custom view.
[ ] I have verified there are no duplicate active or recent bugs, questions, or requests
[ ] I have verified that I am using the latest version of Material Dialogs.
[ ] I have given my issue a non-generic title.
[ ] I have read over the documentation (before asking questions on how to do something).

Include the following:

Material Dialogs version: 0.x.x.x
Device OS version: 7.1.1
Device Manufacturer: Google
Device Name: Pixel XL

Also, please wrap your code with correct syntax highlighting.
System.out.println("Hello, world!");

<LinearLayout ...></LinearLayout>

Reproduction Steps

Expected Result

Actual Result

This is a duplicate of countless issues.


Common.Logging.Core should reference mscorlib <IP_ADDRESS> instead of <IP_ADDRESS> in lib/net40.

The NuGet package for Common.Logging.Core (at least v3.4.1) contains a net40 library that references mscorlib <IP_ADDRESS>. It should reference mscorlib <IP_ADDRESS> like other components such as Common.Logging and Common.Logging.NLog*.
This is causing issues when used with Roslyn and also when used with StackExchange.Precompilation.Build.

I think this is  the reason it wont compile under CPS/net4* of netcore: https://github.com/dotnet/wpf/issues/1451

This issue is making my WPF build fail for the bug mentioned above. This is the ONLY dll I cannot update to use mscorlib 4 insteaf of <IP_ADDRESS>.
References which depend on "mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes" [].
    C:\Users\test\.nuget\packages\common.logging.core\3.4.1\lib\net40\Common.Logging.Core.dll
      Project file item includes which caused reference "C:\Users\test\.nuget\packages\common.logging.core\3.4.1\lib\net40\Common.Logging.Core.dll".
        C:\Users\test\.nuget\packages\common.logging.core\3.4.1\lib\net40\Common.Logging.Core.dll
        C:\Users\test\.nuget\packages\common.logging\3.4.1\lib\net40\Common.Logging.dll

C:\Program Files\dotnet\sdk\3.1.100\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets(225,9): error MC1000: Unknown build error, 'Could not find assembly 'mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.'

From dotnet/wpf#1451. Assumes I have same problem with Microsoft.Bcl.Async. Assemblies in this package depends from mscorlib <IP_ADDRESS>. And I'm trying to use async/await in net40 project. It was all fine before I updated my project to SDK format (Microsoft.NET.Sdk.WindowsDesktop).

Can always use this custom nuget-package from this PR: #176

@snakefoot that package in #176 is not signed and also it is the nlog one not the core one.

That is the problem with OpenSource projects. They only work as long someone thinks it is fun. You can always fork and compile with your own strong-sign-key.
Sent from my Sony Xperia
---- Luigi Grilli wrote ----
@snakefoothttps://github.com/snakefoot that package in #176https://github.com/net-commons/common-logging/pull/176 is not signed and also it is the nlog one not the core one.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/net-commons/common-logging/issues/174?email_source=notifications&email_token=ACXZ7HCC2FAXPBCDWYTPTYTQZR64BA5CNFSM4FM3MHMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHMIQ7Y#issuecomment-567838847, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACXZ7HCXWGKTT3BPQBIBAFTQZR64BANCNFSM4FM3MHMA.

@snakefoot there would be no problems if the snk key was published #11
signing with your own key is pointless unless you re-build all dlls that link to this library. only here on github we are talking about 7.2k projects...

Can understand your frustration. But unless you have a time machine so you can fix the past. Then I think you have to say "thank you for the fish" and move on.
Sent from my Sony Xperia
---- Luigi Grilli wrote ----
@snakefoothttps://github.com/snakefoot there would be no problems if the snk key was published #11https://github.com/net-commons/common-logging/issues/11
signing with your own key is pointless unless you re-build all dlls that link to this library. only here on github we are talking about 7.2k projects...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/net-commons/common-logging/issues/174?email_source=notifications&email_token=ACXZ7HD34BY6EPEMKUY7CVTQZSJ5BA5CNFSM4FM3MHMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHMPUPA#issuecomment-567867964, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACXZ7HFDJAN4WNP424OX5RDQZSJ5BANCNFSM4FM3MHMA.

@snakefoot I quite don't follow. are you a maintainer here?
of course we are grateful for the work. nobody is asking to fix the past. I just need the key to fix it myself.

Nope not a maintainer or janitor. Just aware that this project has very few updates and people are moving on.
Sent from my Sony Xperia
---- Luigi Grilli wrote ----
@snakefoothttps://github.com/snakefoot I quite don't follow. are you a maintainer here?
of course we are grateful for the work. nobody is asking to fix the past. I just need the key to fix it myself.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/net-commons/common-logging/issues/174?email_source=notifications&email_token=ACXZ7HBZK63U7MKJMR5VULTQZSOIHA5CNFSM4FM3MHMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHMSRWI#issuecomment-567879897, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACXZ7HC2P2277ZSMJOKPJD3QZSOIHANCNFSM4FM3MHMA.

Btw. when using NetCore then strong-naming is no longer that important, and GAC is not available. So you could consider making a NetStandard-build without strong-name-key.

.NET Core don't have strict assembly loading and removes the main downside of strong naming.

https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming

Have attached custom build nuget-packages without strong-name-key, that can be used for NetCore3 projects:
Common.Logging.3.4.2.nupkg.zip
Common.Logging.Core.3.4.2.nupkg.zip
Remove .zip extension and upload to your own local nuget-repository.


ISPN-8935 AbstractFileLookup.lookupFileStrict does not work for jar scheme

ok to test

test this please

Squashed and pushed to both master and 9.1.x. Thanks

Suspected the fix is not correct, considering uri jar:file:/path/to/my/jar.jar!/infinispan.xml, AbstractFileLookup.java#L69 extracted insideJarFilePath = "/infinispan.xml". As getAsInputStreamFromClassLoader(...) implementation use ClassLoader.getResourceAsStream(...) to lookup the resource, any resource starting with "/" actually will always return null.


[question] pytorch training

Hi, Now I want to make pytorch learn cifar10, but I get an error.
This is my code and error
dname = "cifar10"
mname = "vgg16"
print('==> Preparing data..')
transform_train = transforms.Compose([
    transforms.RandomCrop(32, padding=4),
    transforms.RandomHorizontalFlip(),
    transforms.ToTensor(),
    transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2023, 0.1994, 0.2010)),
])

trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transform_train)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=128, shuffle=True, num_workers=2)

bs= 16
in_channels=3
img_size=32
num_classes=10
x_test, y_test = get_dataset("cifar10")

data_gen = PyTorchDataGenerator(trainloader, size=len(trainset), batch_size=bs)
# Step 2: Create the modeld
print("===> prepare model")
# net = ResNet34()
if mname == "vgg16":
    model = VGG_CHEST('VGG16', in_channels, num_classes)
if mname == "resnet18":
    model = ResNet(BasicBlock, [2,2,2,2], in_channels, num_classes)

criterion = nn.CrossEntropyLoss()
optimizer = optim.SGD(model.parameters(), lr=0.1, momentum=0.9, weight_decay=1e-4, nesterov=True)
nepoch = 30

classifier = PyTorchClassifier(model=model, loss=criterion,
                            optimizer=optimizer, input_shape=(in_channels, img_size, img_size), nb_classes=num_classes)

print("lerning ...")
classifier.fit_generator(data_gen, nb_epochs=30)

predictions = classifier.predict(x_test)
accuracy = np.sum(np.argmax(predictions, axis=1) == np.argmax(y_test, axis=1)) / len(y_test)
print("Accuracy on benign test examples: {}%".format(accuracy * 100))

classifier.save(f"{mname}_{dname}", "./models/checkpoints/")

Traceback (most recent call last):
  File "train_cifar.py", line 186, in <module>
    classifier.fit_generator(data_gen, nb_epochs=30)
  File "./adversarial-robustness-toolbox/art/classifiers/pytorch.py", line 196, in fit_generator
    o_batch = torch.argmax(o_batch.to(self._device), dim=1)
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

How can i fix?

Hi @nquntan Thank you very much for using ART! I would be interested to find out why this error occurs. Could you please provide the python imports and PyTorch version that you have used for your script above?

$ python --version
3.7.3
$ python -c "import torch; print(torch.__version__)"
1.4.0

The target value was not set to an onehot, which was not good.
However, in pytorch, the behavior was changed by changing the number of batch_size in predict.(test accuracy)
That didn't happen with keras. Why is this?

I would like to find out why too. I would like to try to run your script, could please also share your imports at the top of your script?

import argparse
import os
import random
import sys
from keras.utils import to_categorical
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
import torchvision.transforms as transforms
from art.classifiers import PyTorchClassifier
from art.data_generators import PyTorchDataGenerator
from art.utils import load_dataset, projection, random_sphere
from torch.optim.lr_scheduler import (CosineAnnealingLR, LambdaLR, MultiStepLR,
                                      ReduceLROnPlateau, StepLR)

import torch
import torch.nn as nn
import torch.nn.functional as F

cfg = {
    'VGG11': [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],
    'VGG13': [64, 64, 'M', 128, 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],
    'VGG16': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 'M', 512, 512, 512, 'M', 512, 512, 512, 'M'],
    'VGG19': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 256, 'M', 512, 512, 512, 512, 'M', 512, 512, 512, 512, 'M'],
}

class VGG(nn.Module):
    def __init__(self, vgg_name):
        super(VGG, self).__init__()
        self.features = self._make_layers(cfg[vgg_name])
        self.classifier = nn.Linear(512, 10)

    def forward(self, x):
        out = self.features(x)
        out = out.view(out.size(0), -1)
        out = self.classifier(out)
        return out

    def _make_layers(self, cfg):
        layers = []
        in_channels = 3
        for x in cfg:
            if x == 'M':
                layers += [nn.MaxPool2d(kernel_size=2, stride=2)]
            else:
                layers += [nn.Conv2d(in_channels, x, kernel_size=3, padding=1),
                           nn.BatchNorm2d(x),
                           nn.ReLU(inplace=True)]
                in_channels = x
        layers += [nn.AvgPool2d(kernel_size=1, stride=1)]
        return nn.Sequential(*layers)

class VGG_CHEST(nn.Module):
    def __init__(self, vgg_name, in_channels, num_classes):
        super(VGG_CHEST, self).__init__()
        self.features = self._make_layers(cfg[vgg_name], in_channels)
        self.avgpool = nn.AdaptiveAvgPool2d((7, 7))
        self.classifier = nn.Linear(512, num_classes)

    def forward(self, x):
        bs, _, _, _ = x.shape
        out = self.features(x)
        out = F.adaptive_avg_pool2d(out, 1).reshape(bs, -1)
        out = self.classifier(out)
        return out

    def _make_layers(self, cfg, in_channels):
        layers = []
        for x in cfg:
            if x == 'M':
                layers += [nn.MaxPool2d(kernel_size=2, stride=2)]
            else:
                layers += [nn.Conv2d(in_channels, x, kernel_size=3, padding=1),
                           nn.BatchNorm2d(x),
                           nn.ReLU(inplace=True)]
                in_channels = x
        layers += [nn.AvgPool2d(kernel_size=1, stride=1)]
        return nn.Sequential(*layers)

def test():
    net = VGG_CHEST('VGG11', 2, 1)
    x = torch.randn(2,1,229,229)
    y = net(x)
    print(y.size())

if __name__ == '__main__':
    test()

Here is my code.

It looks like PyTorchDataGenerator is expecting one-hot-encoded labels. If you add these lines to your script it should work:
class OneHot:

    def __init__(self, num_classes):
        self.num_classes = num_classes

    def __call__(self, labels):
        y = torch.eye(self.num_classes)
        return y[labels]

target_transform = transforms.Compose([
    OneHot(num_classes=10),
])

trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transform_train, target_transform=target_transform)

sorry for the late reply and Thanks for the solution.
By the way In PyTorch, when the batch size is changed, test_acc also changes.
ex)
    # prepare model
    model.load_state_dict(checkpoint)
    classifier = PyTorchClassifier(model=model, loss=criterion,  #clip_values=(min_, max_ )
                               optimizer=optimizer, input_shape=(in_channels, img_size, img_size), nb_classes=num_classes)
   pred_y = classifier.predict(x_test, batch_size=bs) # bs=128 to bs=1
   pred_y_max = np.argmax(pred_y, axis=1)
   print(np.sum(pred_y_max != np.argmax(classifier.predict(x_adv, batch_size=bs), axis=1)) / len(y_test))

This really saves my day!


feat: Create OakVideoTranscript and related components

How to review this PR
Leave this text block for the reviewer

Check component hierarchy is followed correctly
Check the design Heuristics have been followed
Check naming conventions have been applied
Check for these gotchyas:

Missing exports for Oak components
Accidental export of Internal components
Snapshots of unexpected components have been modified
Circular dependencies
Code duplication (via not using base components)
Non-functional storybook for this or related components
Sensitve files changed eg. atoms, or style tokens
Relative imports
Default exports

Add your PR description below
Added the following components:

OakVideoTranscript
OakCopyLink
OakSignLanguage

Link to the design doc
https://www.figma.com/design/iTimVTBZ3XcszhRa9KtD7r/Cycle-2-requirements---Teachers?node-id=0-1&node-type=canvas&m=dev
A link to the component in the deployment preview
OakVideoTranscript
https://deploy-preview-330--lively-meringue-8ebd43.netlify.app/?path=/docs/components-organisms-shared-oakvideotranscript--docs
OakSignLanguageButton
https://deploy-preview-330--lively-meringue-8ebd43.netlify.app/?path=/docs/components-molecules-oaksignlanguagebutton--docs
OakCopyLinkButton
https://deploy-preview-330--lively-meringue-8ebd43.netlify.app/?path=/docs/components-molecules-oakcopylinkbutton--docs
Testing instructions
ACs

@weronika-szalas looking good. Just a couple of observations:
-The copy link button has an image with the alt text 'copy' which is very similar to the actual link text so it is being marked up as redundant. We could either expand on the alt text, set it to hidden, or remove it all together? Maybe best to have it as aria-hidden=true ?

How it has been handled on the Share to pupil page:

-The other slight issue (or it could be story book) is the alignment in mobile view looks like it needs padding to the right of the sign language button? Or will we be able to amend this once its in OWA?

Question about the state of the button that says linked copied: could it be visible for longer, e.g. until a user clicks on something else?

We can set the timer to longer but it would be hard to implement it to be visible until the next user click.

Question about the state of the button that says linked copied: could it be visible for longer, e.g. until a user clicks on something else?

We can set the timer to longer but it would be hard to implement it to be visible until the next user click.

I think it would be good for it to be a few seconds longer

@RBrownsett @Monika-Koziol I increased the timer to 4 seconds and buttons alignment on mobile. I will check if possible to hide alt text of the icon easily in this case as we are using a different component to build it then in Pupils.


Special Aggravations section endpoints needs documentation

It's not clear what's the purpose of this section. The name of the section is very strange, not sure what it means. The endpoints themselves are also not clear - what they do / what's the expected argument etc..
Need to add descriptions / change the section name etc.. to make it clear to end users of the API (and to me too) what is the meaning of this section and the endpoints.

fixed in #15


Create dependency-suppressions.xml

checking for dependency suppression

adding dependency suppression file ,
PS , nothing is being supressed at the moment


UI blinking in development

The UI flashes for me in development as it's trying to reload the CSS.

Thank you for reporting, I'll take a look.

This should be fixed now.


Adjust the concept of serialization

In the readme, the example currently available is like below.
from py2k.models import DynamicKafkaModel
from py2k.writer import KafkaWriter

# assuming we have a pandas DataFrame, df
serialized_df = DynamicKafkaModel(df=df,model_name='test_model').from_pandas()

writer = KafkaWriter(
    topic="topic_name",
    schema_registry_config=schema_registry_config,
    producer_config=producer_config
)

writer.write(serialized_df)

This library is about Avro, and in Avro parlance, serialization refers to formatting data as Avro.
In the example above, serialized_df is not in Avro format, so calling it serialized is misleading.
Also, it might be worth to change names across the whole library to refer to serialization only when it is about converting data to Avro, in order to avoid confusing users and contributors.

Adding relevant renaming points from today's discussion,

model_name -> recored_obj_name in DynamicKafkaModel to hide the Pydantic naming
serialzed_df -> records adhering to Kafka parlance
item -> record (same as above)


There's a second version, which should be a second guide.

The version in this repository is functional in nature. Per a suggestion from Rossen, I also wrote an annotation-based version. That's in my own repository for this project, under the annotation-based branch: https://github.com/Buzzardo/gs-reactive-rest-service/tree/annotation-based
That should become a new guide.
WARNING: It needs to be reviewed by people who know that content well.

LGTM. I guess the Quotation has a separate Value because of the structure of the target data in https://gturnquist-quoters.cfapps.io/api/? Maybe the declaration could be nested inside Quotation?
The test needs to be fixed.

Hello @Buzzardo , @dsyer !
Can you please tell if this issue is still active and there can be added the second guide for Reactive based on @annotations, not in functional style?
Sorry if I missed smth and it already exists - then can you please suggest where it is.
Thanks!

I think it would be easier to start again with the conversion to annotations (too much has diverged since Jay did that revision). It's fairly easy to do. IMO the annotations should be the "main" gs-reactive-rest-service, and we should add a new one with the contents of this repo and a-fn suffix.

Hello @dsyer ,
Thank you for the explanation! Yes, this seems to be a good solution :)


Remove easter egg + Small route fix

Hey @pierosavi  👋
Thanks a lot for your contribution! Love the sharp  👀
I have shared the details to claim your swag! 🎁
Happy coding


Improve the doc

Hi, we should improve the content of the doc that is now visible at https://int-nit.github.io/AnDOChecker/

Hi @Slowblitz , I think we should discuss the content of the https://int-nit.github.io/AnDOChecker/ page... This should become the main access point of the users!
So maybe it could include both

the specs (as it is at the moment)
and the doc (what's visible here at the moment: https://github.com/INT-NIT/AnDOChecker, i.e how to install it? how to use it? the existence of the CLI; how to setup the web interface; etc. (we probably don't need the videos, which have a low added value compared to just giving an example)

And then, what we see at https://github.com/INT-NIT/AnDOChecker (through the README.md at the root) should just be a one sentence explanation about AnDO and a link to https://int-nit.github.io/AnDOChecker/
What do you think? (before doing it, I think we should agree on what to do more precisely ;) )
the doc in the README.md file at the root of https://github.com/INT-NIT/AnDOChecker should be updated

Hi @SylvainTakerkart, yes I see what you want to do but I don't know if it's really useful to include the doc in the "gh-pages",
If we include the doc, i.e. how to install it ? Etc… The user have to go on GitHub download the project then go on another site to see how it's works etc, instead of just staying on the GitHub project page (master) seems a bit boring to me.
And yes  I am agree on updated the README.md file at the root of https://github.com/INT-NIT/AnDOChecker.

well, I think the user will never have to go to the github project page, it's only for developers... especially since the installation instruction will only be something like "use pip by typing "pip install AnDOChecker"... no?
so I think the gh-page should become THE webpage for the user...
WDYT?

...for example:
@Slowblitz
for example, with sklearn:

the user webpage: https://scikit-learn.org
the github project page for developers: https://github.com/scikit-learn/scikit-learn
(but they have the installation instruction on both... I think it's mostly important to have the installation instruction available for the users on the "user webpage")

Seems good to have the installation on both the gh-pages and the read me yes .

Also I need to have the access on repo to modify the github pages .

Also I need to have the access on repo to modify the github pages .

it's not configured in the code? can't you do a PR to do this? (I'm ignorant...)
anyhow, I've just added you as a "Maintainer" of the project... tell me if you can do what you need! (if not, I can upgrade you from "Maintainer" to "Admin"... but I just want to test what the "Maintainer" role allows)

@Slowblitz I've just updated https://int-nit.github.io/AnDOChecker/
Can you check it out and let me know if you see things that we should change?
Thanks!

Hi @SylvainTakerkart, seems good to me.
Just little note I have forgotten to add, Ando only works in "Python3", maybe we should add this at the end, and update the "setup.py"  by adding  "python_requires='>=3.6'"  as describe here https://packaging.python.org/tutorials/packaging-projects/.
WDYT?

Hi @SylvainTakerkart, seems good to me.

ok! So we're good to go for the gh pages!

Just little note I have forgotten to add, Ando only works in "Python3", maybe we should add this at the end, and update the "setup.py" by adding "python_requires='>=3.6'" as describe here https://packaging.python.org/tutorials/packaging-projects/.
WDYT?

ok for me!
But also, the main README.md file should be updated, no? So that what's visible on the main page ( https://github.com/INT-NIT/AnDOChecker ) is up to date... Can you do it?

Yes I can update the main README.md but can you be more specific on what to update ?
Do you mean an overall update ? Or just a one sentence explanation about AnDO and a link to https://int-nit.github.io/AnDOChecker/ ?

it would be good to have a general update, no? lots of things have changed... i guess we could have a short description (to be copy-pasted from somewhere else), installation instruction (using pip), a short demo of the CLI (just some lines of code... the videos are probably not needed anymore... WDYT?), plus the link to the gh-pages specs...

Ok for a general update.Yes videos can probably be deleted at this point.

[ ] Short description.
[ ] installation instruction.
[ ]  CLI  exemples .
[ ] link to the gh-pages specs.

@Slowblitz I think most of the content of this issue has been taken care of! Thanks!
However, there's still something: we still have a "doc" and a "docs" directory at the root of the repository... This is not very good ;) Could you try to re-organize  the content of these two directories and/or rename them so that we get something that is a bit cleaner?

Hello,
We just have to remove the "docs" folder we do not need it anymore, do you want a single pull request for that or should I fix it on the current pull request ? #42

Hello,
We just have to remove the "docs" folder we do not need it anymore, do you want a single pull request for that or should I fix it on the current pull request ? #42

ok, just do it in #42 !


Checkmarks are not shown in Print Preview and are not printed in pdf

Affected versions

81.0a1 (2020-08-18)

Affected platforms

Windows 10 64bit
macOS 10.15
Ubuntu 18.04 64bit

Steps to reproduce
pdfjs.renderInteractiveForms - true

Launch Firefox
Access a PDF form with fillable content (eg: http://foersom.com/net/HowTo/data/OoPdfFormExample.pdf)
Tick some checkboxes
Enter some text and some numbers
Enter Print Preview
Print to pdf

Expected result

All the input is saved in Print Preview as well and printed in PDF.

Actual result

Checkmarks are not saved in Print Preview and are not printed on file.

Additional notes

S2 as suggested severity, due to data loss.

Hmm, this looks like it has something to do with that particular PDF, using https://www.irs.gov/pub/irs-pdf/f1040.pdf the checkmarks are saved both in print preview and printed to pdf

I have found the cause and am working on a fix. The problem is that the value given to _renderText is undefined, while it should always be a string. It works if all fields are explicitly changed, but not if some are not changed. This is a strange edge case, but thanks for finding it!

The problem is with the choice widgets where the field value never matches the display value because it's encoded differently (contains the UTF-16 BOM and other characters). This requires two fixes:

if no field value is available (the first few choice widgets), put the first value (default) in the annotation storage so it's never undefined;
if a field value is available, make sure it's decoded first before comparing.


Update go-restful to fix PRISMA-2022-0227

Pull Request Motivation
go-restful is pulled in as an indirect dependency.  The version used has a vulnerability that was fixed back in February (see here).  I am not sure if this is how you'd want this to be fixed, or if you'd rather see if we can trace which direct dependency pulls it in (so I've gone the lowest effort route)
Kind

Release Note

NONE

/ok-to-test

Go seems to be complaining about this change: go: updates to go.mod needed; to update it:
https://prow.build-infra.jetstack.net/view/gs/jetstack-logs/pr-logs/pull/cert-manager_cert-manager/6223/pull-cert-manager-master-e2e-v1-27/1681929209443782656

Thanks @inteon - I'm at a loss how to fix it though, I double checked and running go mod tidy on my branch results in no changes.  Is there something else I'm doing wrong potentially?

I may have figured it out, I need to close this PR and open a new one as I think I've got my branches confused