getting runtime error when trying to run on a gpu node

Please run microk8s inspect and attach the generated tarball to this issue.
Microk8s v.1.21
Error:
Failed to create pod sandbox: rpc error: code = Unknown desc = failed to get sandbox runtime: no runtime for "nvidia" is configured
Troubleshooting:

followed installation process here
tested deployment with microk8s enable gpu

We appreciate your feedback. Thank you for using microk8s.

@joedborg on 1.21 do we still need to manually install nvidia?  O thought the operator will do that when you do microk8s enable gpu?

@balchua I think we need to consider backporting latest/edge GPU fixes into stable.
@inohmonton99 please refresh your cluster to latest/edge, disable and re-enable the GPU addon, that should work for you.

will try that @joedborg and let you know. Thanks!

everything's working now. thanks for the quick solution @joedborg , also with latest/edge I didn't need to install NVIDIA drivers only needed to enable gpu and it installed everything. Awesome!

You're welcome @inohmonton99, thanks for raising the issue.   Yes, MicroK8s will detect whether or not you have drivers already installed and configure the NVIDIA operator accordingly.


Explicitly set gomaxprocs and log its value

Indirectly addresses https://github.com/coreos/etcd/issues/2794.

@bprashanth
The approach looks good to me.
Can you please also change the commit message to etcdmin:.... We add package prefix to commit message. Thanks!

@xiang90 PTAL

LGTM

@bprashanth Thanks!


Markdown code blocks broken after substituted text tokens

The docs appear to be pre-processed with a tokenizer for items like {{% kf-latest-version %}} - however, this substitution appears to be ending code blocks prematurely, causing broken markdown.
Example: Authentication using OIDC in Azure
Note how the original markdown shows:
tar -xvf kfctl_{{% kf-latest-version %}}_<platform>.tar.gz

but the resulting page has the version number and the _.tar.gz is trailing (<platform> part gets eaten by the browser as a HTML tag). Same thing further below with the CONFIG_URI definition, which ends its code block before the trailing double-quote at the end of the line.

/assign @Arhell


chore: review Curation API spec

Reviewers
Functional:
@Bento007
Readability:
@brianraymor @metakuni
Changes

add
remove
modify

Definition of Done (from ticket)
QA steps (optional)
Known Issues

To make this easier to review I suggest putting in swagger up and sharing a link to the API.

General comment - it would be really helpful for reviewers if there were more description(s) in the swagger.

General comment - there should be an explicit description that the API(s) related to the the curator API key are called from the portal and not from curator code. I guess that:
      security:
        - cxguserCookie: []

is an implicit indication.

I've asked @ebezzi to review because we need to align curation API and filter by metadata API changes. One example is that there is now publication metadata included for collections that define a DOI for filter by metadata, which is missing from the curation API.

mean_genes_per_cell should be included with datasets - for download scenarios rather than for curators.

Is there a tombstone attribute for collections in addition to datasets? We have deleted public collections.

The curator_name MUST NOT be included in POST curation/collections because it is set by the BE and NOT the curator to ensure consistency:
{
"name": "string",
"description": "string",
"contact_name": "string",
"contact_email": "string",
"curator_name": "string",
"links": [
{
"link_name": "string",
"link_url": "string",
"link_type": "PROTOCOL"
}
]
}

RE data_submission_policy_version for a collection - while I would want this returned by "some API" to allow me to monitor migration of collections to the next version of the data submission policy (which has happened once), it's unclear whether it's useful to curators since we don't simultaneously support multiple versions of the policy. It's mainly for internal auditing.
@jahilton - any opinions?

RE data_submission_policy_version for a collection...it's unclear whether it's useful to curators

I would not find this useful.

@jahilton and I propose an addition. Similar to the CXG URL, we should add a collection field for the collection_url.

How does a curator update collection information in private collections or revisions - similar to ... Edit Details in the UX?

How does a curator update collection information in private collections or revisions - similar to ... Edit Details in the UX?
It appears that a curator can use PUT /curation/collections/collections_uuid to start or update a revision, but how is the collection information in a private collection updated prior to publication?

The private collection is identified using the private collection id (or, if it's a revision, then the public collection id):
PUT to /curation/collections/{collection_id}. If the collection is private, it is updated in place. If the collection is a revision, it is updated in place. If the collection is public and does not have a revision started, a revision is started and the fields are updated for the revision.

If the collection is public and does not have a revision started, a revision is started and the fields are updated for the revision.

I thought we agreed earlier that no magic would occur. This would fail.

How does POST /curation/auth/token return a token when no parameters are included in the request?

If the collection is public and does not have a revision started, a revision is started and the fields are updated for the revision.

I thought we agreed earlier that no magic would occur. This would fail.

Can you say more? I think the lines around "magic" are blurry. What specific pattern are we using here that is worrying?

I don't think we should start a revision because it was implicitly suggested by the developer performing an update to a public collection. The API should be minimal and not make assumptions.
Curator - Dang, I made a mistake and now I need to go and delete a revision!

RE GET /curation/collections
@jahilton - would you expect that the visibility parameter would allow you to query for multiple "visibilities" - PUBLIC, PRIVATE and/or REVISION? Current, only one can be passed.

I don't think we should start a revision because it was implicitly suggested by the developer performing an update to a public collection. The API should be minimal and not make assumptions.
Curator - Dang, I made a mistake and now I need to go and delete a revision!

This is a very mild implicit step IMO. Furthermore, if a revision exists already, then this is the request pattern they would use to edit the revision. I would bucket the act of forgetting that an old revision exists and accidentally overwriting it in with making the mistake of starting a revision. And we can't prevent all mistakes. I think that if we were to extend that logic we'd want to get rid of the DELETE endpoint for private collections as well.
Thoughts @metakuni @Bento007 ?

RE GET /curation/collections
How are tombstoned collections modeled? (Only datasets have a tombstone) Is this a fourth visibility ?

RE RE [GET /curation/collections] (https://app.swaggerhub.com/apis/danieljhegeman/Curation/1#/default/get_curation_collections) is described as:
Fetch all Collections metadata. Authorization required for private collections. [and revisions of public collections].
Please update the description to document that a limited preview of metadata for datasets is returned in the response. Full dataset metadata is available from GET /curation/collections/{collection_uuid

RE /curation/collections/{collection_uuid}
The documentation states:
Fetch Collection metadata and associated Datasets, public and private.
This could simply be Returns complete collection metadata for the collection identified by uuid.
uuid - The uuid of a collection. To specify the private revision of a public collection, use the uuid of the public collection.
visibility - Available values : PUBLIC, PRIVATE, REVISION
I don't think that the visibility enum makes sense in this case.

If a curator wants to query a public collection, the public uuid is passed. No visibility is required.
If a curators wants to query a private collection, the private uuid is passed. No visibility is required.
If a curator wants to query a revision, the public uuid is passed AND there needs to be an indication that the REVISION is desired. So perhaps we simply need a ?revision=true query?

RE /curation/collections/{collection_uuid}
Why does datasets duplicate information available in the collection metadata?
  "collection_id": "string",
  "collection_visibility": "PUBLIC",

RE /curation/collections/{collection_uuid}
This earlier comment has not been addressed to rename and retype:
  "dataset_deployments": [
    {
      "url": "string"
    }
  ],

RE /curation/collections/{collection_uuid}
mean_genes_per_cell is missing from datasets for each dataset.

RE /curation/collections/{collection_uuid}
published_at is missing for each dataset in datasets.

RE POST /curation/collections
The curator is not allowed to set the curator_name when creating a collection. For consistency, it is set by the BE using Auth0.
{
"name": "string",
"description": "string",
"contact_name": "string",
"contact_email": "string",
~"curator_name": "string",~
"links": [
{
"link_name": "string",
"link_url": "string",
"link_type": "PROTOCOL"
}
]
}

RE POST /curation/collections
Is there supposed to be more information in the swagger response related to the 201?
The HTTP 201 Created success status response code indicates that the request has succeeded and has led to the creation of a resource. The new resource is effectively created before this response is sent back and the new resource is returned in the body of the message, its location being either the URL of the request, or the content of the Location header.

RE PUT /curation/collections/{collection_uuid}
The curator is not allowed to set the curator_name. For consistency, it is set by the BE using Auth0 on collection creation.
{
"name": "string",
"description": "string",
"contact_name": "string",
"contact_email": "string",
~"curator_name": "string",~
"links": [
{
"link_name": "string",
"link_url": "string",
"link_type": "PROTOCOL"
}
]
}

RE PUT /curation/collections/{collection_uuid}
The description states Start a revision of a public Collection, or update its existing revision. Update a private Collection in-place. The Collection metadata fields included in the body of the request are updated.

I strongly recommend that a PUT to a public collection NOT initiate a revision, but return an error.2.
The operation is a full replacement of the collection metadata and not an update (?); otherwise, how could a curator delete an existing link?

@brianraymor Would I correct in surmising that you want specification of a revision to always require 'public_collection_id PLUS visibility = REVISION'?

RE DELETE /curation/collections/{collection_uuid}/datasets
The documentation for the curator_tag and dataset_uuid parameters is unclear. Can you provide examples? If a curator does not pass either, what's the behavior?

RE GET /curation/collections
@jahilton - would you expect that the visibility parameter would allow you to query for multiple "visibilities" - PUBLIC, PRIVATE and/or REVISION? Current, only one can be passed.

I would not expect to be able to query multiple visibilities. Only passing one is fine.

RE DELETE /curation/collections/{collection_uuid}
What is the return status if the collection_uuid is invalid - for example, the resource does not exist or a public collection uuid is specified, but there's no revision in progress.

RE GET /curation/collections/{collection_uuid}/asset
I wish that we had a better term than asset.
Is filetype intentionally missing?
For example, the current API includes with assets:
"filetype": "RDS",
In addition, the documentation for the query parameters is unclear.  Can you provide examples?

RE PUT /curation/collections/{collection_uuid}/datasets/upload-link
Is this used for both uploading a new dataset and replacing an existing dataset? If so, the request body must be clarified. For example, a curator would not define an id for a new dataset.

RE PUT /curation/collections/{collection_uuid}/datasets/upload-s3
There needs to be documentation for how the response is used.
I'm curious why this is a PUT and not a GET. I'm not keen on "upload-s3" since it returns credentials that can be used to upload to s3 using some other API.

RE GET /curation/collections/{collection_uuid}/datasets/status
How is a curator informed that an upload failed due to a schema validation error?

How does a curator cancel an in progress upload of a dataset? This is possible from the UX.
Can a curator delete a private collection or cancel a private revision of a public collection if an upload is in progress? Both are possible in the UX.
A curator cannot publish a collection with an in progress upload because the UX will prevent that.

RE /curation/collections/{collection_uuid}
Why does datasets duplicate information available in the collection metadata?
  "collection_id": "string",
  "collection_visibility": "PUBLIC",

Update: id is not defined in the collection metadata. It should be included.

Addressed in d2e2b452

RE PUT /curation/collections/{collection_uuid}/datasets/upload-s3
There needs to be documentation for how the response is used.
I'm curious why this is a PUT and not a GET. I'm not keen on "upload-s3" since it returns credentials that can be used to upload to s3 using some other API.

I think @Bento007 and I talked about this previously; he may have had a compelling argument for PUT. I agree that GET makes more sense.

RE DELETE /curation/collections/{collection_uuid}
What is the return status if the collection_uuid is invalid - for example, the resource does not exist or a public collection uuid is specified, but there's no revision in progress.

invalid: 401
no revision in progress: 404

mean_genes_per_cell should be included with datasets - for download scenarios rather than for curators.

Ok; the exact features of a dataset that can be sourced by a download link that we provide is not something that lends itself to specification in this API, per se, because we're just returning a link in the download scenario. Do you want (me) to document this somehow for the curators?

RE DELETE /curation/collections/{collection_uuid}/datasets
The documentation for the curator_tag and dataset_uuid parameters is unclear. Can you provide examples? If a curator does not pass either, what's the behavior?

Added documentation for every endpoint that requires one of those two parameters, and added examples for the entities themselves.
If a curator does not pass either, we need to return a 400. Added in b6e73ff5.

RE

mean_genes_per_cell should be included with datasets - for download scenarios rather than for curators.

@danieljhegeman responded:

Ok; the exact features of a dataset that can be sourced by a download link that we provide is not something that lends itself to specification in this API, per se, because we're just returning a link in the download scenario. Do you want (me) to document this somehow for the curators?

When I wrote datasets, I was referring to the dataset metadata returned in the API response. For example, here's a fragment from the current portal API:
    "id": "524e045e-e74c-4e00-9884-d5c3bef3d862",
    "is_primary_data": "SECONDARY",
    "is_valid": false,
    "mean_genes_per_cell": 1316.84206695779,
    "name": "Healthy human liver: hepatic stellate cells",

I'd like to add more details (sample code) for how to use the boto3 package to upload the datasets,

And/or PAWS ? We should be language neutral.

RE DELETE /curation/collections/{collection_uuid}/datasets
The documentation states:
Delete a Dataset. The Dataset MUST NOT belong to a published Collection. MUST indicate the Dataset by providing one of either the curator_tag (non-null) OR the dataset_uuid parameters.
But curators may delete a dataset that belongs to a published collection IF the operation occurs in a private revision of the public collection.
How about:
Delete a Dataset. The collection_uuid MUST reference either a private collection or a private revision of a public collection.

RE DELETE /curation/collections/{collection_uuid}/datasets
The documentation states:
Delete a Dataset. The Dataset MUST NOT belong to a published Collection. MUST indicate the Dataset by providing one of either the curator_tag (non-null) OR the dataset_uuid parameters.
But curators may delete a dataset that belongs to a published collection IF the operation occurs in a private revision of the public collection.
How about:
Delete a Dataset. The collection_uuid MUST reference either a private collection or a private revision of a public collection.

Agreed, your wording is more clear. Changed in 18e6cb68

PAWS

Yes! Stretch goal, likely.
At present I have a python gist that I can pass on to curators. I don't know how to get the links to work in Swagger, and from what I've read, it's not possible.

RE

mean_genes_per_cell should be included with datasets - for download scenarios rather than for curators.

@danieljhegeman responded:

Ok; the exact features of a dataset that can be sourced by a download link that we provide is not something that lends itself to specification in this API, per se, because we're just returning a link in the download scenario. Do you want (me) to document this somehow for the curators?

When I wrote datasets, I was referring to the dataset metadata returned in the API response. For example, here's a fragment from the current portal API:
    "id": "524e045e-e74c-4e00-9884-d5c3bef3d862",
    "is_primary_data": "SECONDARY",
    "is_valid": false,
    "mean_genes_per_cell": 1316.84206695779,
    "name": "Healthy human liver: hepatic stellate cells",

Got it, sorry for the confusion.
Separately, I want to note that mean_genes_per_cell was not mentioned as a desired attribute in @jahilton 's list, but we can add it. Same for is_valid.

Please add mean_genes_per_cell but not is_valid - which I assume has something to do with successful dataset validation.

Please add batch_condition - per the comment in #curation-api.


Remove support for ~/.config makefile inclusion

Submission Checklist

[x] Run unit tests: ./runTests.py src/test/unit
[x] Run cpplint: make cpplint
[x] Declare copyright holder and open-source license: see below

Summary
Counterpart to https://github.com/stan-dev/math/pull/3090
Intended Effect
How to Verify
Side Effects
Documentation
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

How come you want to remove this functionality? I have used this a few times to set things from my home dir as I am not allowed on my cluster to edit the cmdstan install dir. So how can users set stan makefile matters in the future from a user writable directory (meaning their home)? I do have to use the cmdstan installed into the system for compliance reasons.

I see. Thanks for the explanation and the workaround to get the old behaviour.
Could the workaround be added to the example make/local which is distributed possibly? If not enabled, then at least in a commented out variant?
I consider it standard behaviour that programs respect config files residing it in users home directories...but you are right in that this specific option was not documented and I took it from the source.


Missing libgbm-dev dependency -> Error: Failed to launch the browser process

Hi,
I have a problem with running cypress >= 4.2.0 on Gitlab CI. With version 4.1.0 everything is ok.
I use cypress/base:12.16.1 image.
cypress: 4.2.0 - 4.5.0
The error I get:
Error: Failed to launch the browser process!
 /builds/my-secret-app-folder/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
 TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md
     at onClose (/builds/my-secret-app-folder/node_modules/puppeteer/lib/Launcher.js:547:20)
     at Interface.<anonymous> (/builds/my-secret-app-folder/node_modules/puppeteer/lib/Launcher.js:537:65)
 error Command failed with exit code 1.

The temporary solution (I've added the missing dependency by myself in gitlab-ci.yaml
  script:
    - apt-get update
    - apt-get install -y --no-install-recommends libgbm-dev
    - ...rest of my scripts

But I guess it would be nice to have it in the base image :)
I could add it as a new PR but I didn't know if I should edit all Docker files 🤔 or just 12.16.1 (which I use). What is the process of adding a new dependency to cypress-docker-images? :)
Refs:

https://github.com/puppeteer/puppeteer/issues/5661
https://github.com/puppeteer/puppeteer/pull/5667

Ha, I just the same problem running Percy tests in https://github.com/bahmutov/cypress-react-unit-test/issues/216

Yeap :) I forgot to mention that I also use Percy ;)


restart php

Hello,
Is there a reason why it is not possible to restart the php-fpm service from this sdk?

added


BACKLOG-6471 bug fix for when user hits cancel button - ran checkstyle

@mdamour1976

Closing for now - until we get latest round of cleanup (single boolean/variable renames/etc)


is it possible to reorder the endpoints in a tag

I like to order endpoints by "GET",''POST","PUT","PATCH","DELETE", I didn't find any documentation in README, is it possible to order like that.

something like this.

Sorry, I don't know the answer—this is a question about swagger-ui or the swagger-spec itself, not about swagger-blocks.


Give Background Color to Div Element Not Accepting Correct Answer

Challenge give-a-background-color-to-a-div-element has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0.
Please describe how to reproduce this issue, and include links to screenshots if possible.

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

CatPhotoApp

Click here for cat photos.

Things cats love:

cat nip

laser pointers

lasagna

Top 3 things cats hate:

flea treatment

thunder

other cats

<form action="/submit-cat-photo">
 <input type="radio" name="indoor-outdoor" checked> Indoor
 <input type="radio" name="indoor-outdoor"> Outdoor
 <input type="checkbox" name="personality" checked> Loving
 <input type="checkbox" name="personality"> Lazy
 <input type="checkbox" name="personality"> Energetic
 <input type="text" placeholder="cat photo URL" required>
 <button type="submit">Submit</button>
</form>
     ```

@LukaszKolo thanks for the issue but can you be more specific on what bug you are experiencing?

So thats a problem, that code is correct :) and the program says its not correct

"Give your div element the class silver-background.
Your div element should have a silver background."
The second element is not fullfilled

@erictleung  Any ideas what to do with this problem?

the code is correct as you said,
DIV has a silver background color,
first checkbox "Give your div element the class silver-background" is checked green,
the second "Your div element should have a silver background." is red, so I couldnt go further with the course.

@LukaszKolo I would either suggest trying a different browser or jump to a different challenge by navigating through the Challenge Map. I'm not sure how to reproduce your issue. But it looks like you're using Firefox. I'm unable to reproduce your issue on Chrome. Let's see if someone else is able to reproduce the issue on Firefox.

@erictleung  thank you very much :) ill try this way

I encountered the same problem in the latest Firefox 64 bit, Windows 10 64bit 1607.

I am facing a similar problem

Try freecode with Google Chrome. I passed this challenge with Chrome.

I'm facing the same issue on Google Chrome browser on an Android.

Opera, IE maybe then?

I've tried Chrome on Android, Chrome on win 10, and now Firefox. =(

Got it to work only on Edge.

I am using Edge and background does not turn silver, and I have the same code as shown above

Never mind - did a rest and typed in everything again manually instead of copying and pasting - worked!

CatPhotoApp
Click here for cat photos.

Things cats love:

cat nip
laser pointers
lasagna

Top 3 things cats hate:

flea treatment
thunder
other cats

 Indoor
 Outdoor
 Loving
 Lazy
 Energetic

Submit

i mentioned it in css style and wrote the class more precisely and i am still not able to change my background color, and i use chrome.

You forgot to add one more step to this question. The last question it states to: "Your div element should have a silver background."
Apply
.silver-background {
background-color: silver;
}
To the styles area in order to assign the class the Silver color.

Make sure you spelled everything correct.

thank you  @Martian1431    see you answered    i did it

Thankyou @alexiss23!

Thanks @alexiss23 !! you saved my time :)

Reproducible in Chrome for Android (latest version, 58.0.3029.83 as of now).

Mine does NOT work in latest Firefox. DOES work in latest Chrome. I ran it in Chrome and then went back to Firefox to carry on.

Don't work on my site as well :(
`

CatPhotoApp

Click here to view more cat photos.

Things cats love:

cat nip
laser pointers
lasagna

Top 3 things cats hate:

flea treatment
thunder
other cats

 Indoor
 Outdoor
 Loving
 Lazy
 Energetic

Submit

`


Getting PAE matrix

Hi,
Nice work! Would it be possible to also return the PAE matrix for each decoy?
Thank you!

Sure! I think the easiest way to do this is with a slight modification of the Colab notebook that is linked in the README. There's a function in that notebook called _get_score under the "Import Libraries" header. If you replace that with this very slightly modified version:
  def _get_score(self):
    score = copy_dict(self.model.aux["log"])

    score["plddt"] = score["plddt"]
    score["pae"] = 31.0 * score["pae"]
    score["rmsd_io"] = score.pop("rmsd",None)

    i_xyz = self.model._inputs["batch"]["all_atom_positions"][:,1]
    o_xyz = np.array(self.model.aux["atom_positions"][:,1])

    # TMscore to input/output
    if hasattr(self,"wt_batch"):
      n_xyz = self.wt_batch["all_atom_positions"][:,1]
      score["tm_i"] = tmscore(n_xyz,i_xyz)["tms"]
      score["tm_o"] = tmscore(n_xyz,o_xyz)["tms"]

    # TMscore between input and output
    score["tm_io"] = tmscore(i_xyz,o_xyz)["tms"]

    # composite score
    score["composite"] = score["ptm"] * score["plddt"] * score["tm_io"]
    score["pae_full"] = np.copy(self.model.aux["pae"])
    return score

then the full PAE matrix will be part of the output. The only modification here is in the second-to-last line. Then, after running the rest of the notebook, the SCORES variable will have pae_full as one of its features, which you can use however you want. Let me know if that helps!


Add Norwegian MMLU, ARC and HellaSwag

Add a Norwegian translated version of MMLU, ARC and HellaSwag, in the same format (and size) as the other translated ones.

Added in https://github.com/ScandEval/ScandEval/pull/157.


Failed to resolve spinkit dependency

failed to resolve compile 'com.github.ybq:Android-SpinKit:1.0.4'

my problem too

my problem three

Yeah i am also having same issue

That's an issue with https://github.com/ybq/Android-SpinKit - please report it there! 😃


TinyMCE error after upgrading to <IP_ADDRESS>

Hi,
We've upgraded progressively from <IP_ADDRESS> to 2.2.1, 2.3.6 and finally <IP_ADDRESS> and found a problem with TinyMCE in the admin interface. The editor was working on <IP_ADDRESS> but raises the same error on 2.2.1, 2.3.6 and <IP_ADDRESS> after the upgrade. Here's a screenshot of a post which indeed has the contet field filled in.

Any ideas?
Thanks,
JC

Hi @jcarlosgarcia
I tried to reproduce the problem but without success, in the screenshot I can see errors in tinymce. can you try bundle update? if not, contact me on skype owen-2345.
Regards!

Thank you very much @owen2345. Will contact you via Skype.
Best!

Closing this issue as it was a problem with the tinymce-rails gem


Application Exception: The server responded with error 500: 500: Internal Server Error

This is an issue created automatically by GrammarNazi when an exception was captured.
Date (UTC): 11/01/2021 18:10:26
Exception:
Discord.Net.HttpException: The server responded with error 500: 500: Internal Server Error
at GrammarNazi.Core.Utilities.PollyExceptionHandlerHelper.HandleExceptionAndRetry[T](Task action, ILogger logger, CancellationToken cancellationToken, Int32 numberOfTimes) in /src/GrammarNazi.Core/Utilities/PollyExceptionHandlerHelper.cs:line 29
at GrammarNazi.App.HostedServices.DiscordBotHostedService.<>c__DisplayClass8_0.<b__0>d.MoveNext() in /src/GrammarNazi.App/HostedServices/DiscordBotHostedService.cs:line 81
Exception caught counter: 15.

This is a valid issue, but we'll take care of it after #344


Added job to remove uninstalled packs from Mongo database

Useful when changing the mounted pack image, that removes previously installed packs.
Normally the packs have been removed from disk, but are still registered in the Mongo database.
This runs a job as part of registering packs, to check for any packs no longer present on disk and removes them from the DB.

@cognifloyd if you can give me any pointers into the st2 core where we could add those new "primitives" I'd be happy to take a stab at re-implementing this functionality there (and I'd also add some logic to ignore dunder-name packs).
When I took a stab at this originally, I did look at doing it in core, but got lost trying to follow the code to locate the logic where pack loading happens at bootstrap - and therefore where I could add pack un loading


Auto fix outdated links in comments and documentation

Adds \yii\build\helpers\LinkChecker to checking links (caches results)
Adds \yii\build\controller\FixLinksController to finding links, replacing updated links and logging removed links
Adds Github workflow cron-outdated-links.yml runing FixLinksController every day

Q
A

Is bugfix?
❌

New feature?
❌

Breaks BC?
❌

Fixed issues
#19314

Still errors:
❯ ./build/build fix-links
PHP Warning 'yii\base\ErrorException' with message 'Undefined array key "http://www.yiiframework.com"'

in /Users/samdark/src/yii2/build/helpers/LinkChecker.php:72

Stack trace:
#0 /Users/samdark/src/yii2/build/helpers/LinkChecker.php(72): yii\base\ErrorHandler->handleError(2, 'Undefined array...', '/Users/samdark/...', 72)
#1 /Users/samdark/src/yii2/build/helpers/LinkChecker.php(37): yii\build\helpers\LinkChecker->checkUrl('http://www.yiif...')
#2 /Users/samdark/src/yii2/build/controllers/FixLinksController.php(158): yii\build\helpers\LinkChecker->check('http://www.yiif...')
#3 /Users/samdark/src/yii2/build/controllers/FixLinksController.php(77): yii\build\controllers\FixLinksController->findOutdatedLinks('/**\n * @link ht...')
#4 /Users/samdark/src/yii2/build/controllers/FixLinksController.php(41): yii\build\controllers\FixLinksController->fixSources()
#5 [internal function]: yii\build\controllers\FixLinksController->actionIndex()
#6 /Users/samdark/src/yii2/framework/base/InlineAction.php(57): call_user_func_array(Array, Array)
#7 /Users/samdark/src/yii2/framework/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#8 /Users/samdark/src/yii2/framework/console/Controller.php(182): yii\base\Controller->runAction('', Array)
#9 /Users/samdark/src/yii2/framework/base/Module.php(552): yii\console\Controller->runAction('', Array)
#10 /Users/samdark/src/yii2/framework/console/Application.php(180): yii\base\Module->runAction('fix-links', Array)
#11 /Users/samdark/src/yii2/framework/console/Application.php(147): yii\console\Application->runAction('fix-links', Array)
#12 /Users/samdark/src/yii2/framework/base/Application.php(384): yii\console\Application->handleRequest(Object(yii\console\Request))
#13 /Users/samdark/src/yii2/build/build(40): yii\base\Application->run()
#14 {main}

@samdark нет бы, помочь.. поправил

It takes forever to check all links but it seems it works. There are some issues though:

https://www.yiiframework.com/extension/yiisoft/yii2-twig/doc/guide/ is replaced with https://www.yiiframework.com/extension/yiisoft/yii2-twig/doc/guide/2.4/en/. First link always leads to latest version.
Same for https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html.
https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS was replaced with /en-us/docs/web/http/cors.
https://www.microsoft.com/sql-server/ was replaced with https://www.microsoft.com/en-us/sql-server?rtc=1/ i.e. it's language specific URL now instead of generic routing page.
https://www.oracle.com/database/ was replaced with /database/.

Judging on these, I'm not sure it's a good idea to add it to pipeline.

https://www.yiiframework.com/extension/yiisoft/yii2-twig/doc/guide/ is replaced with https://www.yiiframework.com/extension/yiisoft/yii2-twig/doc/guide/2.4/en/. First link always leads to latest version.

Permanent redirects codes: 301 and 308.
Temporary redirects: 302 and 307.
i.е. https://www.yiiframework.com return invalid code. We can skip temporary redirects.

https://www.microsoft.com/sql-server/ was replaced with https://www.microsoft.com/en-us/sql-server?rtc=1/ i.e. it's language specific URL now instead of generic routing page.

English manual must contains links to en pages, Russian manual must contains links to ru pages and etc.

@samdar and why https://www.yiiframework.com redirect twice?

@samdark partially fixed

I'm not sure it's a good idea to add it to pipeline to automatically fix things.

at first, need collect links like as https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html and append to ignore list, at next callings we replaces permanently redirected links .

@samdark add safe mode to collect links without changes in files


Feature/2470 bucket schema

Closes #2470
Document the new influx CLI bucket-schema feature.

Added tutorial for creating and writing to bucket-schema.

Added reference docs for bucket-schema and the bucket schema-type flag.

[ ] Signed the InfluxData CLA
(if necessary)

[ ] Tests pass (no build errors)

[x] Rebased/mergeable

One other thing, but I don't want to hold this PR up for it. Can you add documentation for your new shortcodes to CONTRIBUTING.md? Just so others know what they do and what context they should be used in?

@sanderson, Done.


Fix Travis CI for WinOS + OpenJDK11

As choco install is quite unstable, I give up using choco finally.
Now, On WinOS, I download JDK from java.net.
Hope it can work well  for a long long time!
This PR needs squash and merge

if work a long long time , we need a simple file server


[WHLSL] The interpreter should evaluate arguments right-to-left

Migrated from https://bugs.webkit.org/show_bug.cgi?id=189326:
At 2018-09-05T23:17:52Z<EMAIL_ADDRESS>wrote:
In order to be consistent with C, the arguments of function calls should be evaluated right-to-left. C doesn’t define an evaluation order for operators (like +) but because we treat them as “native functions” we should strictly evaluate them right-to-left.

At 2018-09-05T23:21:52Z<EMAIL_ADDRESS>wrote:
Created attachment 348978
Patch

At 2018-09-06T02:12:39Z<EMAIL_ADDRESS>wrote:
Comment on attachment 348982
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=348982&action=review

Tools/WebGPUShadingLanguageRI/Test.js:7637

   int foo() { return *bar(10) + *bar(20); }

   thread int* bar(int value)

   {

       int x = value;

       return &x;

   }

I don't think we should commit a test that is fundamentally wrong.

At 2018-09-06T00:12:43Z<EMAIL_ADDRESS>wrote:
Created attachment 348982
Patch

At 2018-09-06T01:20:20Z<EMAIL_ADDRESS>wrote:
Comment on attachment 348982
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=348982&action=review
This order is not determined in C or C++, but it is commonly evaluated in a consistent order for reasons.  See https://en.cppreference.com/w/c/language/eval_order
I think it would be great if WHLSL had a defined order, but don't claim it's to be consistent with C.

Tools/ChangeLog:8

   The behavior of the interpreter now matches the behavior of the compiler

What compiler are you talking about?  It's possible the behavior of that compiler is unspecified but it happens to be right-to-left in all the cases you've checked.

At 2018-09-10T23:22:43Z<EMAIL_ADDRESS>wrote:
The most recent patch of https://bugs.webkit.org/show_bug.cgi?id=188641 resolves this, and it would only be a two line change to that patch to resolve this bug.
*** This bug has been marked as a duplicate of bug 188641 ***

At 2018-09-06T02:26:10Z<EMAIL_ADDRESS>wrote:
(In reply to Alex Christensen from comment #3)

Comment on attachment 348982 [details]
Patch
View in context:
https://bugs.webkit.org/attachment.cgi?id=348982&action=review
This order is not determined in C or C++, but it is commonly evaluated in a
consistent order for reasons.  See
https://en.cppreference.com/w/c/language/eval_order
I think it would be great if WHLSL had a defined order, but don't claim it's
to be consistent with C.

Tools/ChangeLog:8

   The behavior of the interpreter now matches the behavior of the compiler

What compiler are you talking about?  It's possible the behavior of that
compiler is unspecified but it happens to be right-to-left in all the cases
you've checked.

The WHLSL -> Metal code generation generates code so that the arguments are explicitly evaluated right-to-left before the function call and are then passed separately.

At 2018-09-06T18:24:10Z<EMAIL_ADDRESS>wrote:
Created attachment 349046
WIP

At 2018-09-13T01:41:25Z<EMAIL_ADDRESS>wrote:
rdar://problem/44402790


Excess re-rendering causes waiting times after cell completion

Describe the bug
for (var i = 0; i <= 100; i++) System.Console.WriteLine(i);

It is expected that such a small number of console writes would complete instantly. Indeed it does, however, excess re-rendering takes place immediately afterwards, costing additional seconds. This waiting time grows with the number of console writes, which is undesirable especially when used inside a loop.
It seems that a render function is called every time console output changes. It would probably be a lot faster if it buffered the output and just rendered it when the end of the cell is reached.

Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

OS

[ ] Windows 11
[x] Windows 10
[ ] macOS
[ ] Linux (Please specify distro)
[ ] iOS
[ ] Android

Frontend

[ ] Jupyter Notebook
[ ] Jupyter Lab
[ ] nteract
[x] Visual Studio Code
[ ] Visual Studio Code Insiders
[ ] Visual Studio
[ ] Other (please specify)

For the solution of buffering output and only rendering at the end, it would probably need to be an opt-in feature to avoid breaking code that may rely on having output written before the cell is done:
printfn "Beginning long computation"
let result = longComputation()
printfn "Done"

Maybe a magic command would be a good way to say that you want a specific cell to only render once at the end?


[Feature 5] Staff

Staff package handles types of employees, payment, and name, id, schedule, other info about workers
Train Drivers (Zoey)

Inspecting the vehicle and engine in preparation for a route
Receiving and interpreting train orders
Monitoring the speed, air pressure and other operational measurements of the train
Maintaining contact with the conductor and informing them of changes to the train's condition

Admins (Grace)

Done


Questions about the waymo_fast_eval

In waymo_fast_eval, a gt.bin file is required, but the author did not provide this file, which makes this function unavailable. I tried to use the convert_pkl_file_to_bin function provided in the source code to convert gt.pkl to gt.bin, but an error message appeared. Can the author provide the gt.bin file? If so, I would be very grateful.

In addition, according to the code of the latest dev branch, the size of voxel on nuscenes is [0.3,0.3,8.0], but in the paper it is [0.075,0.075,0.2]. Why is this? Second, you only introduced centerhead in the paper, but you used transFusionHead in nuscenes. Why?

In waymo_fast_eval, a gt.bin file is required, but the author did not provide this file, which makes this function unavailable. I tried to use the convert_pkl_file_to_bin function provided in the source code to convert gt.pkl to gt.bin, but an error message appeared. Can the author provide the gt.bin file? If so, I would be very grateful.

Download here
compute_detection_metrics_main
gt.bin

In addition, according to the code of the latest dev branch, the size of voxel on nuscenes is [0.3,0.3,8.0], but in the paper it is [0.075,0.075,0.2]. Why is this? Second, you only introduced centerhead in the paper, but you used transFusionHead in nuscenes. Why?

I'm sorry to tell you that these are the two mistakes we made in the paper:

We indeed used the TransFusion-L head on the nuScenes dataset, following HEDNet. In the paper, we only introduce CenterPoint to simplify the description (since the TransFusion-L Head also relies on the CenterPoint classification heatmap to initialize the query, and our adjustments to both heads are made on the classification heatmap), but this might indeed mislead readers. We will clarify this in the updated version of the paper as soon as possible.

SAFDNet is a follow-up work of HEDNet. We initially implemented HEDNet on the nuScenes dataset (based on TransFusion-L) using MMDetection3D and on the Waymo Open dataset (based on CenterPoint) using OpenPCDet. The TransFusion-L uses a 3D hierarchical sparse backbone with a voxel size of [0.075, 0.075, 0.2].  However, the original implementation in OpenPCDet achieved worse results than that in MMDetection3D. To unify the codebase with OpenPCDet, we adopted a 2D single-stride sparse backbone (voxel size [0.3, 0.3, 8.0]), which achieved similar results to the hierarchical one in MMDetection3D, for both SAFDNet and HEDNet on the nuScenes dataset in the release code. In the paper, we directly borrowed the experimental settings from the HEDNet paper, and some mistakes were carried over. We will correct these in the updated version of the paper. Please follow the settings in the released code to run your experiments.

d

In addition, according to the code of the latest dev branch, the size of voxel on nuscenes is [0.3,0.3,8.0], but in the paper it is [0.075,0.075,0.2]. Why is this? Second, you only introduced centerhead in the paper, but you used transFusionHead in nuscenes. Why?

I'm sorry to tell you that these are the two mistakes we made in the paper:

We indeed used the TransFusion-L head on the nuScenes dataset, following HEDNet. In the paper, we only introduce CenterPoint to simplify the description (since the TransFusion-L Head also relies on the CenterPoint classification heatmap to initialize the query, and our adjustments to both heads are made on the classification heatmap), but this might indeed mislead readers. We will clarify this in the updated version of the paper as soon as possible.
SAFDNet is a follow-up work of HEDNet. We initially implemented HEDNet on the nuScenes dataset (based on TransFusion-L) using MMDetection3D and on the Waymo Open dataset (based on CenterPoint) using OpenPCDet. The TransFusion-L uses a 3D hierarchical sparse backbone with a voxel size of [0.075, 0.075, 0.2].  However, the original implementation of TransFusion-L in OpenPCDet achieved worse results than that in MMDetection3D. To unify the codebase with OpenPCDet, we adopted a 2D single-stride sparse backbone (voxel size [0.3, 0.3, 8.0]) for both SAFDNet and HEDNet on the nuScenes dataset in the release code (The single-stride HEDNet achieved similar results to the hierarchical one in MMDetection3D). In the paper, we directly borrowed the experimental settings from the HEDNet paper, and some mistakes were carried over. We will correct these in the updated version of the paper. Please follow the settings in the released code to run your experiments.

Thank you for your reply. Currently, there is still an issue with the operation. Specifically, an error occurred while running the computed_detection_stetrics_main executable file. But without the source code, I cannot view the specific error message. What should I do in this situation

d

In addition, according to the code of the latest dev branch, the size of voxel on nuscenes is [0.3,0.3,8.0], but in the paper it is [0.075,0.075,0.2]. Why is this? Second, you only introduced centerhead in the paper, but you used transFusionHead in nuscenes. Why?

I'm sorry to tell you that these are the two mistakes we made in the paper:

We indeed used the TransFusion-L head on the nuScenes dataset, following HEDNet. In the paper, we only introduce CenterPoint to simplify the description (since the TransFusion-L Head also relies on the CenterPoint classification heatmap to initialize the query, and our adjustments to both heads are made on the classification heatmap), but this might indeed mislead readers. We will clarify this in the updated version of the paper as soon as possible.
SAFDNet is a follow-up work of HEDNet. We initially implemented HEDNet on the nuScenes dataset (based on TransFusion-L) using MMDetection3D and on the Waymo Open dataset (based on CenterPoint) using OpenPCDet. The TransFusion-L uses a 3D hierarchical sparse backbone with a voxel size of [0.075, 0.075, 0.2].  However, the original implementation of TransFusion-L in OpenPCDet achieved worse results than that in MMDetection3D. To unify the codebase with OpenPCDet, we adopted a 2D single-stride sparse backbone (voxel size [0.3, 0.3, 8.0]) for both SAFDNet and HEDNet on the nuScenes dataset in the release code (The single-stride HEDNet achieved similar results to the hierarchical one in MMDetection3D). In the paper, we directly borrowed the experimental settings from the HEDNet paper, and some mistakes were carried over. We will correct these in the updated version of the paper. Please follow the settings in the released code to run your experiments.

Thank you for your reply. Currently, there is still an issue with the operation. Specifically, an error occurred while running the computed_detection_stetrics_main executable file. But without the source code, I cannot view the specific error message. What should I do in this situation

chmod +x computed_detection_stetrics_main


Build is failing with webpack-serve, though working with just webpack --watch

Operating System: Windows 10
Node Version: 8
NPM Version: 6
webpack Version: 4.15
webpack-serve Version: 2.0.2

This issue is for a:

[x] bug
[ ] feature request
[ ] modification request

Code
CLI Command
  $ webpack-serve

webpack.config.js
link to gist
Expected Behavior
That it works with the current settings...
Actual Behavior
It gives the following error:
path.js:28
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.join (path.js:489:7)
    at Compiler.<anonymous> (D:\Projects\mdt-app\toolkit-next\node_modules\spawn-loader\index.js:50:88)
    at hooks.afterCompile.callAsync.err (D:\Projects\mdt-app\toolkit-next\node_modules\webpack\lib\Compiler.js:553:14)

How Do We Reproduce?
Can't share a link, as it's a private repo.
But I can tell you all I already discovered myself. I also don't know if it is because of webpack-serve, or webpack itself though.

In the first setup, I used the same config, but without the output property and with webpack --watch. That was working.
Then I added the output property, and I saw the exact same error popping up. I had set the property to:

{
    filename: '[name].[hash].js',
}

After debugging, I found out that adding the chunkFilename solved the issue, as the chunk files where empty in spawn-loader because of it. So webpack didn't add them because the property was missing.
Then I tried webpack-serve, and I get the error again.

So I think for some reason, webpack doesn't receive a certain property from webpack-serve, or there is another property needed to make it work. That's how far I got. So hopefully, you guys have a better idea of what is causing this.

this happens in output path.

Few things that stand out with your issue:

webpack-serve doesn't appear in your stack trace (nor do any modules in webpack-contrib, which this module depends upon)
webpack-serve isn't in the business of adding compiler-critical values to the configs
webpack-dev-middleware handles running the compiler, and watching for file changes.

No idea why your config isn't working. You should probably knock your config down to a minimal case and build it back up to identify the problem. 99% of the time problems like this exist within the users' config.
Since your repo is closed and can't be shared, I'm afraid you're going to have to debug the problem.

DEPRECATED. Please use webpack-dev-server (he is in support and update mode again). Feel free to create a issue if some features are not implemented in webpack-dev-server.
Why deprecated webpack-serve ?

The author stopped developing the package.
Two development servers are misleading for developers.
Hard to maintain two packages with same purpose.
Some dependencies are not available to fixes/implement new features/etc (https://www.npmjs.com/package/webpack-hot-client and https://github.com/shellscape/koa-static) and there's nothing we can do here.
webpack-dev-server is stable.

Thanks for using webpack! We apologize for the inconvenience. In the future, we will avoid such situations.


New navigation menus, accessibility for images and fontawesome icons

Implemented new navigation menus as found in current wireframes #161
Updated label.required styling to add an '*' to the front of the label
Updated contact us page to use css to apply '*' to labels
Fixed layout issues on org details page
Updated header to use a white background and to replace the roadmap logo with the institution's logo.
Updated dragonfly logo resize to set logo height at 165
Added role="button" to all popover question mark buttons
Added aria tags to fontawesome icons
Added alt text to all images
fixed a few tests affected by the above changes
removed old commented out lines from Org model

Standardized create/update/delete success messages
Updated tests accordingly
Updated positioning of messages

A rake gettext:find may be needed as well, there seem to be quite a few new strings added.


Update for Swift 1.2.

There were a bunch of errors, so I figured I'd fix them, if that is OK with you.  However, no matter what I did, I couldn't get the tests to compile, so I removed them.  It seems to work with the latest Xcode.

thanks!


Some of the listed tags have no related packages

For example #menu tag is listed, but when clicked it just shows "No package found." (https://componette.com/search/menu).

It's under construction. We have to tagged all packages.

Fixed via https://github.com/componette/componette.com/commit/c3fb13a41002da74d4959b62482f67ad98e0a57b & https://github.com/componette/componette.com/commit/1c15a2f25298da571375d4b64f6f79581a58d91f


Adversarials are equals to originals

Hi. I run autoattack using your example autoattack/examples/eval.py:
data_dir = './data_CIFAR10'
save_dir = './results_data_CIFAR10'
norm = 'Linf'
epsilon = 0.5
log_path = './log_file.txt'
version = 'standard'
individual = 'store_true'
n_ex = 100
batch_size = 500

model = models.resnet18(pretrained=True)
model.cuda()
model.eval()

# load data
transform_list = [transforms.ToTensor()]
transform_chain = transforms.Compose(transform_list)
item = datasets.CIFAR10(root=data_dir, train=False, transform=transform_chain, download=True)
test_loader = data.DataLoader(item, batch_size=1000, shuffle=False, num_workers=0)

# create save dir
if not os.path.exists(save_dir):
    os.makedirs(save_dir)

# load attack
from autoattack import AutoAttack
adversary = AutoAttack(model, norm=norm, eps=epsilon, log_path=log_path, version=version)

l = [x for (x, y) in test_loader]
x_test = torch.cat(l, 0)
l = [y for (x, y) in test_loader]
y_test = torch.cat(l, 0)

# example of custom version
if version == 'custom':
    adversary.attacks_to_run = ['apgd-ce', 'fab']
    adversary.apgd.n_restarts = 2
    adversary.fab.n_restarts = 2

# run attack and save images
with torch.no_grad():
    if not individual:
        adv_complete = adversary.run_standard_evaluation(x_test[:n_ex], y_test[:n_ex], bs=batch_size)
        torch.save({'adv_complete': adv_complete}, '{}.pth'.format(save_dir))

    else:
        # individual version, each attack is run on all test points
        adv_complete = adversary.run_standard_evaluation_individual(x_test[:n_ex],
            y_test[:n_ex], bs=batch_size)
        torch.save(adv_complete, '{}.pth'.format(save_dir))

But the result adversarials are equals to original inputs:
for key in adv_complete.keys():
    print(f"{key}: {np.all(adv_complete[key][0].numpy() == x_test[0].numpy())}")

>> apgd-ce: True
>> apgd-t: True
>> fab-t: True
>> square: True

I tried to use epsilon = 8./255. and epsilon = 0.5. The result was not changed((
Could you please explain me where i am wrong?

Hi,
I tried to run the example with the same parameters as yours, and I get the perturbed images as output. Is the log fine (all attacks should give robust accuracy of 0% for epsilon = 8/255)?

Yes, I cloned the last version of the code and set epsilon =  8./255.. Here are my logs:
Files already downloaded and verified
setting parameters for standard version
using standard version including apgd-ce, apgd-t, fab-t, square
robust accuracy by APGD-CE 	 0.00% 	 (time attack: 0.0 s)
robust accuracy by APGD-T 	 0.00% 	 (time attack: 0.0 s)
robust accuracy by FAB-T 	 0.00% 	 (time attack: 0.0 s)
robust accuracy by SQUARE 	 0.00% 	 (time attack: 0.0 s)

But I still become tensors which are equals to input. Did you use last version of code in your test?

Yeah. I think there's some problem in the loading of your model, since the runtime is 0.0s which suggests that all images are already misclassified. Could you please check the clean accuracy of the classifier?

Oh, sorry. I found my error. I used the model pretrained on ImageNet, but call AutoAttac with y_test from CIFAR-10. When I have fix it, everything started work fine


⚠ Cioos National CKAN has degraded performance

In cb95685, Cioos National CKAN (https://catalogue.cioos.ca/) experienced degraded performance:

HTTP code: 200
Response time: 23020 ms

Resolved: Cioos National CKAN performance has improved in ae95514 after 5 minutes.


it's not clear what unit ranges are provided in

Or, rather, "it seems that I'm getting ranges of UTF-16 codepoints, even when my input is a UTF-8-encoded buffer."
~/src/esprima ➜ node
> var esprima = require('./');

Alright. Now we want to investigate how the range behaves with multi-byte sequences:
> var ascii = 'var a = "x";';
> var fancy = 'var a = "☃";';
> JSON.stringify(esprima.parse(ascii, { range: true }))
'{"range":[0,12],"type":"Program","body":[{"range":[0,12],"type":"VariableDeclaration","declarations":[{"range":[4,11],"type":"VariableDeclarator","id":{"range":[4,5],"type":"Identifier","name":"a"},"init":{"range":[8,11],"type":"Literal","value":"x","raw":"\\"x\\""}}],"kind":"var"}]}'
> JSON.stringify(esprima.parse(fancy, { range: true }))
'{"range":[0,12],"type":"Program","body":[{"range":[0,12],"type":"VariableDeclaration","declarations":[{"range":[4,11],"type":"VariableDeclarator","id":{"range":[4,5],"type":"Identifier","name":"a"},"init":{"range":[8,11],"type":"Literal","value":"☃","raw":"\\"☃\\""}}],"kind":"var"}]}'

Okay. That's fine. That's what I'd expect, as I passed in a JavaScript UTF-16 string.
But what if I pass in a Buffer?
> var asciiBuf = new Buffer(ascii, 'utf8');
> var fancyBuf = new Buffer(fancy, 'utf8');
> asciiBuf.length
12
> fancyBuf.length
14

ASCII works fine:
> JSON.stringify(esprima.parse(asciiBuf, { range: true }))
'{"range":[0,12],"type":"Program","body":[{"range":[0,12],"type":"VariableDeclaration","declarations":[{"range":[4,11],"type":"VariableDeclarator","id":{"range":[4,5],"type":"Identifier","name":"a"},"init":{"range":[8,11],"type":"Literal","value":"x","raw":"\\"x\\""}}],"kind":"var"}]}'

But then, chaos strikes!
> JSON.stringify(esprima.parse(fancyBuf, { range: true }))
'{"range":[0,12],"type":"Program","body":[{"range":[0,12],"type":"VariableDeclaration","declarations":[{"range":[4,11],"type":"VariableDeclarator","id":{"range":[4,5],"type":"Identifier","name":"a"},"init":{"range":[8,11],"type":"Literal","value":"☃","raw":"\\"☃\\""}}],"kind":"var"}]}'

What do those ranges mean? They certainly aren't ranges in my input:
> fancyBuf.slice(0, 12).toString()
'var a = "☃'

Why, that omits the last two bytes of my input!
It appears that, even though I passed in a buffer of UTF-8 text, I'm getting ranges of UTF-16 codepoints. Choosing a character that encodes to a UTF-16 surrogate pair:
> var surrogate = 'var a = "𦕈";'

(That's U+26548)
> JSON.stringify(esprima.parse(surrogate, { range: true }));
'{"range":[0,13],"type":"Program","body":[{"range":[0,13],"type":"VariableDeclaration","declarations":[{"range":[4,12],"type":"VariableDeclarator","id":{"range":[4,5],"type":"Identifier","name":"a"},"init":{"range":[8,12],"type":"Literal","value":"𦕈","raw":"\\"𦕈\\""}}],"kind":"var"}]}'
> JSON.stringify(esprima.parse(new Buffer(surrogate, 'utf8'), { range: true }));
'{"range":[0,13],"type":"Program","body":[{"range":[0,13],"type":"VariableDeclaration","declarations":[{"range":[4,12],"type":"VariableDeclarator","id":{"range":[4,5],"type":"Identifier","name":"a"},"init":{"range":[8,12],"type":"Literal","value":"𦕈","raw":"\\"𦕈\\""}}],"kind":"var"}]}'

So it's not even by codepoints -- it's by UTF-16 words?
It would be nice if the range output were given in terms of the input, but at the very least the current behavior should probably be documented.

Internally, Esprima may convert the input to a string. Take a look at the first few lines of parse:
    function parse(code, options) {
        var program, toString;

        toString = String;
        if (typeof code !== 'string' && !(code instanceof String)) {
            code = toString(code);
        }

Could it be the source of confusion when code above is a Buffer?

I get that; it's just -- it seems like it's leaking an implementation detail into the interface. It manifested as a kinda-hairy-bug here:
https://github.com/ianthehenry/browser-unpack/commit/7ca231af39eab56ede6ad7b80f8619033e5e2eaf
Where a module was using the output of range to index into a buffer (and getting bad results because of it).
A more succinct summary: I would expect that I could use the range output to interact with the input, regardless of the input format.
I don't really think the current behavior is that troubling -- once you realize that what units the range is given in -- but it seems like a problem of the documentation.
It would be nice if the range were given relative to the actual input, instead of a differently-encoded version, but that's probably very cumbersome internally due to the nature of JS, and I can't really think of a time where it's not sufficient to just encode it into a string first. (So long as you know to do that!)

We could definitely have Esprima rejects anything that is not a legitimate string. That allows a quick discovery of passing e.g. a Buffer instance.
However, it is a breaking change and it could be done only on the next major version bump.


[RESOLVED] Interface eth0(): High error rate (>2 for 5m)

Problem started at 16:09:29 on 2023.06.15
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Operational data: errors in: 3, errors out: 0
Original problem ID: 28741
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23483&eventid=28741

Problem has been resolved in 6m 0s at 16:15:29 on 2023.06.15
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Original problem ID: 28741