WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Would be nice to have a core directive to create generic variable contexts at the template.

Example of implementation:

https://gist.github.com/willgm/ffe653a49f36997881575df2e93979bc

This has some benefits like:

Shortcuts for long data structures and/or constant use of pipes:

<ul *context="let user on my?.long?.data?.structure?.with?.user | json">
<li>{{user.name}}</li>
<li>{{user.age}}</li>
<li>{{user.email}}</li>
</ul>

Avoid multiple observer subscriptions at the same template:

<ul *context="let user on user$ | async">
<li>{{user.name}}</li>
<li>{{user.age}}</li>
<li>{{user.email}}</li>
</ul>

Issue 2:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

I'm using Angular 4.0.0 with Webpack 2.3.2 and I get some warnings for the angular core:

Expected behavior

No warnings would be nice :)

Minimal reproduction of the problem with instructions

I think the warnings appear as soon as you try to use webpack 2 in addition with angular 4. So simply setup a angular project with webpack 2.

Please tell us about your environment:

I use npm along with the lite server for development on a Windows machine

Angular version: 4.0.0.

Language: [TypeScript 2.2.1]
Issue 1:
unique() and type() functions are not available in the nodes from graph.nodes() of jit.trace. I used to fetch those before some upgrade I made recently. As @apaszke suggested, It should be present in the internal data structure but the new upgrade just removed it from python scope

for val in trace.graph().nodes():
print(val.unique()) # doesn't have unique
for input_node in val.inputs():
print(input_node.unique()) # has unique

Issue 2:
It seems PyTorch loads the .so using RTLD_GLOBAL which exports many symbols into shared namespace. This can causes crashes when another library is using different version of the symbol with the same name.

In particular, doing import torch; import tensorflow will crash because pytorch .so is exposing pthread symbols

tensorflow/tensorflow#13615 (comment)

TensorFlow recently switched away from RTLD_GLOBAL in tensorflow/tensorflow@5c7f9e31
Issue 1:
Consider special-casing timer channels created with time.Ticker and time.After.
Namely, such chans need to contain next fire time and period. Then receive from such
looks like:

func chanrecv(c *Hchan) {
...
if c.isTimeChan {
for {
next := c.nextTime
if next == -1 {
// already fired one-time timer
blockForever()
}
newTime := -1
if c.period != 0 {
newTime = next + c.period
}
if CAS(&c.nextTime, next, newTime) {
wait := next - now
if wait > 0 {
sleepFor(wait)
}
return
}
}
}
...
}

This has several advantages:
1. No need to stop timers. If nobody waits on a timers, it's just a normal heap object
that can be garbage collected.
2. Faster operation for both blocking and non-blocking case.
3. Faster selects involving time chans.
4. Can combine time.Ticker/After into a single allocation.

Issue 2:
After almost a decade, I have finally implemented #8898, special-casing the channels used for timers (or maybe the timers used for channels) so that the timers are not in the timer heap when there are no channel operations pending on them. This means that the channels and timers can be GC'ed once they are no longer referenced, without having to wait for a timer to expire or explicitly Stop the timer. (By timer here I mean the data structure used by time.After, time.NewTimer, and time.NewTicker.)

This raises a question: do we want to guarantee that all future versions of Go will provide this behavior, so that code can rely on not needing to call the Stop methods? I think we probably should make that guarantee.

I propose we land my CL and document that After can be used without concern for GC and that NewTimer and NewTicker can be used without concern for deferring Stop just for GC. At the moment the doc comment for After describes the problem and basically says "don't use this function a lot". If we accept this proposal, we can remove that text. NewTimer and NewTicker do not mention needing to call Stop, although it is implied by After's doc comment. If we accept this proposal, we can document that Stop is not necessary for GC, so that people can stop calling Stop.
Issue 1:
One of the nice features of the simple query parser is that it is possible to only enable certain operators. It allows to do quite interesting things.

For example, if you are using the keyword analyzer and disable the whitespace operator, the fox | jumped over would be parsed into the fox OR jumped over (the fox would actually be treated as a single token).

One could also prevent users from running too expensive queries that could kill the cluster such as prefix queries.

Issue 2:
The simple_query_string query allows the user to enable/disable parts of the syntax, eg prefixes, phrases etc.

I think it makes sense to support the full syntax by default, but to allow the user to disable the parts that they don't want, eg:

"simple_query_string": {
"query": "....",
"disable": "PREFIX|PHRASE"
}

... in a similar way that we do with flags in the regexp query/filter
Issue 1:
I wrote some code to index/percolate documents, and I have a unit test that creates an index (with a random name) then runs my indexations / search code, then deletes the index. This means that I have percolators with identical IDs in different indexes.

When I percolate my documents, I specify a query string for the percolators :

testindex-2b086e73/doc/a889db29-2409-4174-9425-818eb7293b57?percolate=SourceId:1

And then the result contains duplicate percolator IDs, as if the index name was ignored :

{
"ok" : true,
"_index" : "testindex-17eecc11",
"_type" : "doc",
"_id" : "824f26e4-76a6-4b66-9cb2-f3adc0103586",
"_version" : 1,
"matches" : ["1.789", "1.789", "1.789"]
}

But when I don't specify a query for the percolators (?percolate=*) the result only contains one ID as expected.

Edit:

I feel like it's an intended behavior in (https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/percolator/PercolatorExecutor.java#L345) is it? If yes, how do I filter percolators only on one documenttype/index?

Issue 2:
The current synonym token filter behaviour of replacing the token with the synonym doesn't work well with the completion suggester.

An option to keep the original token would be helpful.

Background:

For synonyms to work well with the completion suggester it's important to define synonyms that map to longer tokens, i.e. ne => north east. (If the synonym mapping was an equivalence instead, such as ne, north east, then someone entering 'north east' would get suggestions for all completions that begin with ne such as neck.)

However, when a user enters "ne" they no longer get suggestions that start with "ne". They only get suggestions that start with "north east".

A workaround is to explicitly include the short form in the synonym mapping: ne => north east, ne.

However, that becomes painful to setup and maintain because a single mapping like exp, expr, express, expw, expy => expressway now has to be written out as five separate mappings!

I think a simple fix would be to add an option to make the synonym token filter add synonyms instead of replacing the original. Need only apply to the last token in the stream.
Issue 1:
Hi, I am facing a problem when I want to read the value of an input that have suggestions from datalist, the value that I get from the input is only what I type with the keyboard not the selected value, i’ll give an example to explain better, for the HTML bellow, if I type ‘on’ than I select the suggestion which is ‘111’ when I try to read the value of the input (document.getElementById(“num”).value) I get ‘on’ instead of ‘111’, any suggestions to fix it??

<input type="text" list="numbrs" id="num"> <datalist id="numbrs"> <option value="111">One</option> <option value="222">two</option> </datalist>

Issue 2:
Electron version: 1.6.2

Operating system: Windows 10 64Bit

Expected behavior

Finish the process and that all files are installed

Actual behavior

The Python Script crashes and throws lots of Errors

How to reproduce

I have Visual Studio 2017 installed!!! (I can't get 2015 anywhere)

I use Python 2.7!!!

I tried it with multiple consoles! (Hyper, Git Bash, Bash, Admin Bash, PowerShell)

$ cd electron

$ python script/bootstrap.py

Console Output

git submodule status vendor/libchromiumcontent

a3cff05 vendor/libchromiumcontent (v51.0.2704.61-323-ga3cff05)

C:\Python27\python.exe C:\Users\user\Documents\electron\script\update.py

Das System kann den angegebenen Pfad nicht finden.

Traceback (most recent call last):

File "vendor\gyp\gyp_main.py", line 16, in

sys.exit(gyp.script_main())

File "vendor\gyp\pylib\gyp_init_.py", line 545, in script_main

return main(sys.argv[1:])

File "vendor\gyp\pylib\gyp_init_.py", line 538, in main

return gyp_main(args)

File "vendor\gyp\pylib\gyp_init_.py", line 514, in gyp_main

options.duplicate_basename_check)

File "vendor\gyp\pylib\gyp_init_.py", line 98, in Load

generator.CalculateVariables(default_variables, params)

File "vendor\gyp\pylib\gyp\generator\ninja.py", line 1685, in CalculateVariables

gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)

File "vendor\gyp\pylib\gyp\msvs_emulation.py", line 1083, in CalculateCommonVariables

msvs_version = gyp.msvs_emulation.GetVSVersion(generator_flags)

File "vendor\gyp\pylib\gyp\msvs_emulation.py", line 934, in GetVSVersion

allow_fallback=False)

File "vendor\gyp\pylib\gyp\MSVSVersion.py", line 447, in SelectVisualStudioVersion

raise ValueError('Could not locate Visual Studio installation.')

ValueError: Could not locate Visual Studio installation.

None

Traceback (most recent call last):

File "script\bootstrap.py", line 299, in

sys.exit(main())

File "script\bootstrap.py", line 67, in main

run_update(defines, args.msvs)

File "script\bootstrap.py", line 270, in run_update

execute_stdout(args)

File "C:\Users\user\Documents\electron\script\lib\util.py", line 181, in execute_stdout

raise e

subprocess.CalledProcessError: Command '['C:\Python27\python.exe', 'C:\Users\user\Documents\electron\script\update.py']' returned non-zero exit status 1
Issue 1:
I have a Dialog component being triggered by onClick of a MenuItem. It opens correctly. But when I try to close the dialog (either via click on backdrop or on close button) the dialog is not correctly dismissed.

This only happens if you use a transition (Slide).

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I would expect the modal to be closed correctly. 😁

Current Behavior

The CSS classes and the DOM modal element aren't removed, so the rest of the sites UI is not clickable anymore.

Element which is created by the dialog but not removed on its close

Steps to Reproduce

Context

This problem makes the UI not useable anymore. I think it is a mandatory feature to toggle dialogs from menus.

Tech
Version

Material-UI
1.0.0-beta.19

React
16.0.0

browser
Firefox, Chrome, Safari (all most recent releases)

etc
macOS 13.10.31.1, Windows 10

Issue 2:
My app break after updated to latest beta.

The dialog always shown. Previous version beta 18 don't have this issue

<Drawer
open={false}
type={window.innerWidth < 768 ? 'responsive' : 'persistent'}
anchor="right"
classes={{ paper: classes.paper, docked: classes.docked }}
>

/// content

</Drawer>

I've tried to set open to false still show the drawer.

Your Environment

Tech
Version

Material-UI
v1.0.0-19 beta

React
16

browser
Chrome

etc
Windows 10
Issue 1:
I'm currently debugging why a particular test suite takes 26s in Deno when it should be faster. Noticed that we spend about 55% of the time on the realpath syscall. The majority of those are coming from ensure_registry_read_permission which tends to trigger two realpath syscalls pretty frequently.

deno/cli/npm/resolvers/common.rs

Lines 93 to 120
in
d43e75c

pub fn ensure_registry_read_permission(

fs: &Arc<dyn FileSystem>,

permissions: &dyn NodePermissions,

registry_path: &Path,

path: &Path,

) -> Result<(), AnyError> {

// allow reading if it's in the node_modules

if path.starts_with(registry_path)

&& path

.components()

.all(|c| !matches!(c, std::path::Component::ParentDir))

{

// todo(dsherret): cache this?

if let Ok(registry_path) = fs.realpath_sync(registry_path) {

match fs.realpath_sync(path) {

Ok(path) if path.starts_with(registry_path) => {

return Ok(());

}

Err(e) if e.kind() == ErrorKind::NotFound => {

return Ok(());

}

_ => {} // ignore

}

}

}

permissions.check_read(path)

}

In my case the node_modules branch inside the if-statement is hit about 100k times. The first realpath call checks the registry path which is always the exact same path for me. The second call against path has lots of duplicated checks too. Did a little analysis and here is a list of the top paths which are checked repeatedly.

7084 "/project/node_modules/.deno/happy-dom@9.20.3/node_modules/happy-dom/package.json"
4660 "/project/node_modules/.deno/@blueprintjs+icons@4.16.0/node_modules/@blueprintjs/package.json"
2320 "/project/node_modules/.deno/@blueprintjs+icons@4.16.0/node_modules/@blueprintjs/icons/lib/cjs/generated-icons/20px/paths"
2320 "/project/node_modules/.deno/@blueprintjs+icons@4.16.0/node_modules/@blueprintjs/icons/lib/cjs/generated-icons/16px/paths"
1952 "/project/node_modules/.deno/@testing-library+user-event@14.4.3/node_modules/@testing-library/user-event/dist/esm/package.json"
1628 "/project/node_modules/.deno/aria-query@5.1.3/node_modules/aria-query/package.json"
1536 "/project/node_modules/.deno/date-fns@2.30.0/node_modules/date-fns/package.json"
902 "/project/node_modules/.deno/aria-query@5.1.3/node_modules/aria-query/lib/etc/roles/literal"
655 "/project/node_modules/.deno/@testing-library+dom@9.3.0/node_modules/@testing-library/package.json"
491 "/project/node_modules/.deno/date-fns@2.30.0/node_modules/date-fns/node_modules"
491 "/project/node_modules/.deno/date-fns@2.30.0/node_modules/@babel/runtime/package.json"
429 "/project/node_modules/.deno/aria-query@5.1.3/node_modules/aria-query/lib/etc/roles/dpub"
374 "/project/node_modules/.deno/call-bind@1.0.2/node_modules/call-bind/package.json"
352 "/project/node_modules/.deno/react@18.2.0/node_modules/react/package.json"

Commenting out the realpath calls inside ensure_registry_read_permission brings down the total test time from 26s to 16s. This leads me to conclude that caching that is very much worth it. There is an older comment by @dsherret which hints at potential gains by caching that already.

Issue 2:
Please run the topmost context in async mode, or allow top level await, akin to

https://bugs.chromium.org/p/v8/issues/detail?id=9344
Issue 1:
Hello!

Currently when running deno lint --unstable I get some issues with no-inferrable-types on fields that I'm actually declaring the type and then assigning a value.

For instance the following snippet causes the output from deno lint:

export function createString(
prefix: string = "",
params: GeneratorParameters = defaultParameters,
): string {
if (!validateGeneratorParameters(params)) {
throw new Error(`The parameters ${params} aren't valid`);
}

const suffix = generateRandomNumber(params).toString();
return prefix !== "" ? prefix + suffix : suffix;
}

(no-inferrable-types) inferrable types are not allowed
prefix: string = "",
^^^^^^^^^^^^^^^^^^^
at E:\Src\dixture\src\_simpleGenerator.ts:45:2

Even tho the lint option is flagged as unstable I was unable to find this reported elsewhere so hopefully this is just a duplicate and this is a know issue 😅

You can find the failing snippet on this GitHub repository, just nevermind the no-explicit-any (as those are intended by me right now 😅)

Issue 2:
Dunno if this makes sense in a Deno context, but I've seen people do things like

import {version} from '../package.json'

but this fails:

error: An unsupported media type was attempted to be imported as a module.
Specifier: https://raw.githubusercontent.com/wrnrlr/as-bind/master/package.json
MediaType: Json

Same failure when importing local copy of same code.
Issue 1:
test-cmd.sh failed with the following:

12:01:47 service "cassandra" created
12:01:47
12:01:47 FAIL!
12:01:47 Get all -l'app=cassandra' {{range.items}}{{range .metadata.labels}}{{.}}:{{end}}{{end}}
12:01:47 Expected: cassandra:cassandra:cassandra:
12:01:47 Got: cassandra:cassandra:cassandra:cassandra:
12:01:47 �(B
12:01:47 1535 ./hack/test-cmd.sh

https://storage.googleapis.com/kubernetes-jenkins/logs/kubernetes-test-go/8954/build-log.txt

Issue 2:
What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): kubeadm

Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST

I would like to specify advertisement ip or hostname for node during the join process. Currently it uses hostname, but kb master could not find the host by it(if it is not in dns or hosts).

Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:16:57Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:10:32Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}

What you expected to happen:

I expect to use IP address instead of hostname to search for kb nodes.

How to reproduce it (as minimally and precisely as possible):

$ kubeadm join --api-advertise-addresses=10.10.10.2 --token=123123 10.10.10.1

Error: unknown flag: --api-advertise-addresses
Usage:
kubeadm join [flags]

Flags:
--token string (required) Shared secret used to secure bootstrap. Must match the output of 'kubeadm init'
Issue 1:
ℹ Computer information

PowerToys version: 0.20.1

PowerToy Utility: FancyZones

Running PowerToys as Admin: No

Windows build number: Version 1909 (OS Build 18363.1016)

📝 Provide detailed reproduction steps (if any)

Start PowerShell

Right click on PowerShell in the taskbar

"Run as Administrator"

Allow Administrator in UAC check

✔️ Expected result

PowerToys gives notive that a privileged program is detected. The new window is not affected by FancyZones.

❌ Actual result

The mouse starts lagging, PowerToys gives notice that a privileged program is detected and while still running PowerToys no longer works. The tray icon is also unresponsive.

Issue 2:
ℹ Computer information

Windows build number: 1909 (Build 18363.997)

PowerToys version: 0.20.1

PowerToy module: maybe fancy zones?

📝 Provide detailed reproduction steps (if any)

Start Powertoys

open task manager and move it

get the message about a program running with administrator privileges

See in task manager that powertoys is now using a full core and it doesn't react to anything any more (settings window can't be opened, fancy zones do nothing, etc...)

✔️ Expected result

Powertoys continue working.

❌ Actual result

Powertoys hangs in an infinite loop.

My guess is that it is somehow related to fancy zones, as it only starts hanging as I actually move the task manager.
Issue 1:
[x ] I have searched the issues of this repository and believe that this is not a duplicate.

Hello,

I have this problem, if I rendered page XX through the server (Express), which uses the alias (as) YY, click on <Link> doesn't work.

Current Behavior

We display the XX page, there is a link to the same page, but with extra param - defined in this way <Link href="/XX?id=1" as="/YY/ 1"> then clicking on it do nothing, no errors in the console.

I noticed that the link works if I change href="/XX?id=1" to href="_random_string_".

Also when I change the subpage to ZZ dynamically and return dynamically to XX, Link works correctly (expected).

Expected Behavior

Clicking on <Link> changes the parameter in the url without changing the page.

Context

Let's say I have a list of recipes in strore and I display them on the page /recipes, when I click on the Link, I do not want to change the page, just add the parameter /recipies/1 and load the selected recipe details.

Environment

Tech
Version

next
5.0

node
9.4.0

Issue 2:
In the projects not using next.js, we use "pm2 start pm2.json. It never generates duplicate pm2 instances.

When using PM2 with next.js, we can't use pm2.json configuration file. The code is like the following:

// package.json

"start": "node --experimental-modules server.mjs"

// deploy.sh

pm2 start npm --name "myproj" -- start

When I run deploy.sh without deleting the existing "myproj" pm2 instance, there would be two "myproj" instances. And it disables the auto-deployment script.

Looking forward to the answer.
Issue 1:
Environment info

transformers version: 4.11.3

Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic

Python version: 3.7.12

PyTorch version (GPU?): 1.9.0+cu111 (False)

Tensorflow version (GPU?): 2.6.0 (False)

Flax version (CPU?/GPU?/TPU?): not installed (NA)

Jax version: not installed

JaxLib version: not installed

Using GPU in script?: no

Using distributed or parallel set-up in script?: no

Information

I'm using t5-base model (yet my test shows the same result for t5-small).

To implement some knowledge-distillation task and "classical" sequence-to-sequence tasks - I'm trying to use batch_size x seq_length x vocab_size array as labels for both kinds of tasks (soft labels in KD case, one-hot hard labels I'm seq2seq case).

So I need to convert tokenizer output from batch_size x seq_length to batch_size x seq_length x vocab_size one-hot array to pass it to my custom loss later.

Yet I found out that I can't just use T5Tokenizer(...).vocab_size to build one-hot matrix - T5ForConditionalGeneration(...).config.vocab_size have different value.

So when I'm trying to build a one-hot vector based on tokenizer vocab size - I'm getting dimension mismatch errors.

The next code shows me different vocabulary sizes when I'm trying to access vocab size through T5Tokenizer and related T5ForConditionalGeneration config:

from transformers import T5ForConditionalGeneration, T5Tokenizer

T5_MODEL = "t5-base"
print("tokenizer", T5Tokenizer.from_pretrained(T5_MODEL).vocab_size)
print("model", T5ForConditionalGeneration.from_pretrained(T5_MODEL).config.vocab_size)

tokenizer 32100
model 32128

Expected behavior

I expected the tokenizer & model to have the same vocabulary size.

Issue 2:
❓ Questions & Help

Pretrained T5Tokenizer has vocab size of 32100 (32000 tokens plus 100 extra_ids) but the shared embedding layer of T5ForConditionalGeneration has size of (32128, 768). I checked the google-research implementation of T5 and also found that they have vocab size of 32100 also.

Where did the extra 28 embeddings come from and how can we map it to the tokenizer?

To reproduce

from transformers import (
T5Tokenizer,
T5ForConditionalGeneration,
)

tokenizer_pretrained = T5Tokenizer.from_pretrained('t5-base')
model_pretrained = T5ForConditionalGeneration.from_pretrained('t5-base')
len(tokenizer_pretrained.get_vocab()), model_pretrained.state_dict()['shared.weight'].shape

Output:

(32100, torch.Size([32128, 768]))