WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hello,

I was trying to create czech lemmatisation analyzer using stemmer override filter and czech dictionary from aspell.

This dictionary contains around 300 000 words in base form and some suffix/prefix rules. After expansion format file looks like this

Aakjaer Aakjaerech Aakjaery Aakjaerům Aakjaerů Aakjaerem Aakjaere Aakjaerovi Aakjaeru Aakjaera Aakjaerové
Aakjaerová Aakjaerovými Aakjaerovým Aakjaerových Aakjaerovou Aakjaerové
Aakjaerův Aakjaerovýma Aakjaerovými Aakjaerových Aakjaerovou Aakjaerovo Aakjaerovy Aakjaerovi Aakjaerovým

each line is one word with its forms.

Because of rules format form => lemma the final rule set is expanded from 300 000 to 4 364 674 lines.

When I was trying on my local machine to index czech wikipedia pages (around 400 000 documents) java.lang.OutOfMemoryError: Java heap space error occured after approx 10 minutes of indexing (log file here)

I'm using snapshot build of elasticsearch (54e7e309a5d407b2fb1123a79e6af9d62e41ea1e), JAVA_OPTS -Xss200000 -Xms2g -Xmx2g with no other indices.

Index settings/mapping and river settings are in separate gist

I was trying to achieve this functionality using synonym token filter, because of better format of synonym rules - form1, form2, form3, form4 => lemma (so number of rules are only about 300 000).

But it's not the same. In the case of using stemmer override filter, when token was not found in rule set, stemmer was used. I probably can do the same by adding keyword marker and stemmer in the filter chain, but I don't think it is the right way to do that.

Please, is there some better 'compressed' format of stemmer override filter rules? Any thoughts how to avoid java.lang.OutOfMemoryError: Java heap space error?

Issue 2:
Elasticsearch version: 5.0.0

Plugins installed: None

JVM version: 1.8.0_101

OS version: Ubuntu 16.04

Description of the problem including expected versus actual behavior:

I have added multiple context mappings to a completion suggester field. In version 2.x and earlier, when filtering on those contexts, suggestions were only returned if they matched all of the contexts. But that does not seem to be the case with 5.0.0.

Steps to reproduce:

Mapping for my suggest field:

"suggest": {
"type": "completion",
"contexts": [
{
"name": "companyContext",
"type": "category"
},
{
"name": "usersContext",
"type": "category"
}
]
}

Index a document with suggest field contexts populated:

"suggest": {
"input": "test team site",
"contexts": {
"companyContext": "vendor",
"usersContext": ["chad", "fred"]
}
}

Run a query supplying only one matching context:

"suggest": {
"suggestions": {
"text": "tes",
"completion": {
"field": "suggest",
"contexts":{
"companyContext": "vendor",
"usersContext": "bill"
}
}
}
}

I would expect that this would not return the indexed document, because the usersContext is not a match. And that was the behavior in 2.x. But in 5.0.0, the document that matches only the companyContext is returned.
Issue 1:
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

When using multiple @ HostListener decorator on same function, such as code below

@HostListener('click', ['$event'])
@HostListener('mouseover', ['$event'])
@HostListener('focus',['$event'])
private eventRouter(e) {
console.log(e);
}

Only the first decorator will be listened, but the function got the latest decorator event, and the middle decorator and the last decorator will never be trigger.

Expected behavior

fix this bug

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Angular version: 2.3.0

Browser: [all ]

Language: [TypeScript 2.0.7]

Node (for AoT issues): node --version =

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

[ ] bug report => search github for a similar issue or PR before submitting
[x] 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

Angular library authors should inline templates (html/css) to ensure overall compatibility between different consumer types.

This can be done with a fairly simple script, but it has a few pitfalls:

special care must be taken to maintain sourcemap lines (inline over TS sources before ngc).

unit testing requires a separate module.id based setup to load templates into karma.

no watch mode.

Expected behavior

Since inlining is heavily encouraged for library AOT compilation, it should be included as an option for ngc (e.g. angularCompilerOptions.inlineTemplates).

Minimal reproduction of the problem with instructions

An example library can be found at https://github.com/filipesilva/angular-quickstart-lib.

What is the motivation / use case for changing the behavior?

Less work for everyone building and shipping components, one less point of failure.

Angular version: 4.x

Language: [ TypeScript 2.x ]

/cc @IgorMinar @jasonaden
Issue 1:
spec:
selector:
app: foobar-service
track: prod
track: post-prod-staging

I can't seem to find how to define IN semantic for svc's selector, I tried to above and it resulted in only the last one being used:

> kubectl describe svc svc-prod-svc
Name: svc-prod-svc
Namespace: default
Labels: <none>
Selector: app=foobar-service,track=post-prod-staging

kubectl should probably notify of duplication and fail, or are least print warning.

Issue 2:
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.):

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

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

Kubernetes version (use kubectl version):

Environment:

Cloud provider or hardware configuration:

OS (e.g. from /etc/os-release):

Kernel (e.g. uname -a):

Install tools:

Others:

What happened:

What you expected to happen:

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

Anything else do we need to know:
Issue 1:
I have been unable to get past a certain line in some of the challenges.

It will literally just stop my cursor and cannot go down further.

I had to spam refresh for it to work in 3 different browsers and have deleted my browser cache but still problem persists.

Windows 10, chrome latest firefox latest and vivaldi latest.

Issue 2:
Challenge Waypoint: Use a CSS Class to Style an Element has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<style>
.red-text {
color: red;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
Issue 1:
Would be nice to, after selecting a package in the settings view, to be able move to the next/previous installed package using the up/down arrow keys.

I'm using Atom 136 on Windows 8.1 64 bit installed via chocolatey.

Issue 2:
(originally reported over at atom/atom#1635)

support/f96903ba9fc811e38844f9159f8f1555

Allow navigation of packages in "Settings" (the left pane with the list of packages) via up/down arrows.

THE KING OF KEYBOARDS WILL THANK YOU

🙇 👑 🔢
Issue 1:
I am using a modal with the remote option. I'd like to be able to execute some code once the modal-body is loaded.

Currently the only events we have available is show and shown. I tried using shown but loading the modal-body occurs after the shown event is fired.

How could I achieve this?

Issue 2:
I think it is a good idea to add 'loaded' callback to modals. Something like that:

this.options.remote && this.$element.find('.modal-body').load(this.options.remote, $.proxy(function() {
this.$element.trigger('loaded')
}, this))

Here's complete code https://gist.github.com/3486192

I can make pull request if this functionality is really needed.
Issue 1:
Rossen Stoyanchev opened SPR-9622 and commented

Affects: 3.1.2

This issue is a backport sub-task of #13856

Issue Links:

#14302 Issue/Problem on redirect after migration project on RequestMappingHandlerMapping/RequestMappingHandlerAdapter ("is duplicated by")

1 votes, 2 watchers

Issue 2:
Rossen Stoyanchev opened SPR-8474 and commented

With suffix pattern matching "/users" also matches to "/users.*". This is useful for content type negotiation - e.g. /users.xml, /users.pdf - but can lead to ambiguity when extracting URI template variables.

For example given "/users/{user}":

"/users/1.json" should extract "1"

"/users/john.j.joe" should extract "john.j.joe"

Currently the above cannot be supported at the same time. You can only turn suffix pattern matching on or off. A simple solution could look for a single "." only but then this would be impossible:

"/users/john.j.joe.json" should extract "john.j.joe"

Ideally the PatternsRequestCondition should be able to decide if the suffix represents a known file extension (.xml, .json) similar to how the ContentNegotiatingViewResolver is configured today.

This should become possible as part of the content negotiation improvements planned for Spring 3.2 (#13057).

Affects: 3.1 M2

This issue is a sub-task of #13057

Issue Links:

#12288 Allow valid file extension paths for content negotiation to be specified ("duplicates")

#14694 404 error when working with .htm servlet-mapping

Referenced from: commits 4fd7645, 9cc4bd8

2 votes, 3 watchers
Issue 1:
HttpCache stores empty content when saving StreamedResponse because StreamedResponse:getContent returns always false

Issue 2:
This is my first Symfony bug report! I'm working with v2.3.4, and the relevant code in master branch hasn't changed since that release.

Yesterday I was building a Silex controller that generates images, and I hoped to use HttpCache so I could delay generating and storing images the right way in the web root.

Using Symfony's built HttpCache\Store class, I found that the method Store::generateContentDigest() and Store::save() were calling BinaryFileResponse::getContent() which returns FALSE. (So does StreamedResponse, so I assume this problem occurs in that case too.)

However, the content digest returned still has a value of en, which determines the save location of the cached response. I think the checks in Store::save() all pass because this directory exists if any prior responses have been successfully cached.

When the application handles other requests for the same file, it considers it a cache hit even though there is no saved content. I don't know if this is related to the code comments in Store::lookup() about returning null and purging the entry from the metadata store.

Ideally, the HttpCache would cache even streaming responses, but this may only have an inelegant solution. Since actual reverse proxy caches like Varnish would be able to cache the streamed response, I don't want to avoid setting appropriate cache headers on the response in my application. I guess HttpCache should refuse to store metadata when Response::getContent() returns false.
Issue 1:
Referring to #10611, my issue just got closed without being solved. One admin just 'assuming' something and then the thread gets closed? Great.

So back on this, the issue still remains. My content shifts a little when theres less than 4 thumbnails. Everything moves about 2cm when there's less than 4 thumbnails.

I wrapped everything in a container, and we are not talking of a scrollbar. I did try to use a clearfix after every 4 thumbnails (4 x 3col = 12col) and that didn't work either.

Please don't just close this like you did last time.

Issue 2:
On this page, click "Launch demo modal", then run this JS in the console:

$("#myModal").modal("hide").modal("show")

The dialog should hide and show again, which it does, but the background overlay also turns completely black and opaque, which it shouldn't.

JsFiddle link: http://jsfiddle.net/fgVv3/12/
Issue 1:
Deno.readTextFile error is not too descriptive my opinion:

error: Uncaught NotFound: No such file or directory (os error 2)
...

Maybe it could include a bit more information, like the path it was trying to read?

error: Uncaught NotFound: No such file or directory (os error 2): "path/to/file.ts"

Issue 2:
Hey,

Thinking about the I/O stuff made me realize that since we don't have defer in JavaScript and we have exceptions so:

func main() {
f, err := os.Open("/tmp/test.txt")
if err != nil {
return
}
defer f.Close();
n, err := fmt.Fprintln(f, "data")
// skip checking n and `err` for brevity but code should
}

Could be:

async function main() {
const f = await createFile('/tmp/test.txt'); // ignore API bikeshed
try {
const n = await f.write(data);
} finally {
f.close();
}
}

Which unlike defer doesn't really stack up too nicely with multiple files:

async function main() {
const f = await createFile('/tmp/test.txt');
try {
try {
const f2 = await createFile('/tmp/test2.txt');
await f.write('data');
await f2.write('data'); // or Promise.all and do it concurrently
} finally {
f2.close(); // by the way - is this synchronous?
}
} finally {
f.close();
}
}

This sort of code is very hard to write correctly - especially if resources are acquired concurrently (we don't await before the first createFile finishes to do the second) and some of them fail.

We can do other stuff instead for resource management:

We can expose disposers for resource management.

We can expose a using function from deno and have a "real" resource" story.

Something else?

Here is what the above example looks like with exposing a using:

import { using } from 'deno'

async function main() {
await using(createFile('/tmp/test.txt'), createFile('/tmp/test2.txt'), async (test1, test2) => {
// when the promise this returns resolves - both files are closed
}); // can .catch here to handle errors or wrap with try/catch
}

We wrote some prior art in bluebird in here - C# also does this with using (I asked before defining using in bluebird and got an interesting perspective from Eric). Python has with and Java has try with resource.

Since this is a problem "browser TypeScript" doesn't really have commonly I suspect it will be a few years before a solution might come from TC39 if at all - issues were opened in TypeScript but it was deemed out of scope. Some CCs to get the discussion started:

@spion who worked on defer for bluebird coroutines and using with me.

@littledan for a TC39 reference and knowing if there is interest in solving this at a language level.

@1st1 who did the work on asynchronous contexts for Python

We also did some discussion in Node but there is no way I'm aware of for Node to do this nicely that won't be super risky - Deno seems like the perfect candidate for a safer API for resource management.

@ry if you prefer this as a PR with a concrete proposal for either approach let me know. Alternatively if you prefer the discussion to happen at a later future point let me know.
Issue 1:
I use examples/pytorch/translation/run_translation.py fine-tune mbart-large-cc25 on my datasets, it automatically runs on CPU. I have 2 GPU, but only one is Nvidia.It is RTX 2080super.

python main.py

--model_name_or_path facebook/mbart-large-cc25

--do_train

--do_eval

--source_lang en_XX

--target_lang zh_CN

--train_file /data/2WangHongyu/bioNMT_WHY/train.json

--validation_file /data/2WangHongyu/bioNMT_WHY/dev.json

--output_dir /output

--per_device_train_batch_size=4

--per_device_eval_batch_size=4

--overwrite_output_dir

--predict_with_generate

--cache_dir /model/2WangHongyu/mbart-large

Issue 2:
-transformers version: 4.5.0

Platform: linux

Python version: 3.8

PyTorch version (GPU?): 1.7.1

Tensorflow version (GPU?):

Using GPU in script?: yes

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

@patrickvonplaten, @patil-suraj

Models: mbart-large-50
Issue 1:
PUT _template/test
{
"template": "i*",
"settings": {
"analysis": {
"analyzer": {
"custom": {
"type": "custom",
"tokenizer": "keyword"
}
}
}
}
}

PUT /_template/test1
{
"template": "index*",
"mappings": {
"type": {
"properties": {
"message": {
"type": "text",
"analyzer": "custom"
}
}
}
}
}

The first template, which can be thought of as the parent template, defines something that is used by the second template: a custom analyzer. The template validator appears to only consider the template as a standalone one, which means that the analyzer does not exist, thus returning:

{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "analyzer [custom] not found for field [message]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [type]: analyzer [custom] not found for field [message]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "analyzer [custom] not found for field [message]"
}
},
"status": 400
}

The template validation should combine matching templates like normal index creation works, which would to ensure that the entire chain is valid or invalid.

Workaround

There is a workaround, which is to manually apply necessary pieces to the sub-template (e.g., duplicating the analyzer in it, which will be only appear once in the resulting index).

Issue 2:
Given the following document

{ ... "input" : ["foobar", "barfoo", "foo"] ... }

and the query foo, the document will show up twice in the result set when using completion suggester. I'm currently using a custom method to clean my input data to make sure the same prefix is not being used twice for a given document but it somehow feels wrong. With a regular search a document will also not show multiple times if a keyword is contained more than once in the document, is the completion suggester working this way by design?
Issue 1:
It parses &bull; in html as ÔÇó:

The following is from the output of a test that should pass:

Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'phpBB ÔÇó Free and Open Source Forum Software'
+'phpBB &bull; Free and Open Source Forum Software'

Issue 2:
Currently, adders and removers must be prefixed with "add" and "remove". When applying DDD, this sometimes doesn't make sense, for example:

class Contact
{
public function addGroup(ContactGroup $group) { }
public function removeGroup(ContactGroup $group) { }
}

Here it would make much more sense to prefix the methods with "join" and "leave":

class Contact
{
public function joinGroup(ContactGroup $group) { }
public function leaveGroup(ContactGroup $group) { }
}

The PropertyAccessor should provide a way to use these methods.
Issue 1:
I am getting error

Could not find "store" in either the context or props of "Connect(Base)". Either wrap the root component in a , or explicitly pass "store" as a prop to "Connect(Base)".

while connecting template component with redux. This seems like it worked in previous version.

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

Expected Behavior

Template component connects to Redux successfully.

Current Behavior

Getting error: Could not find "store" in either the context or props of "Connect(Base)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(Base)".

If I wrap root component with <Provider> from 'react-redux`, it throws error that it expects object, not a function.

Steps to Reproduce (for bugs)

store.js

const initStore = (initialState = {}) => {
createStore(
combineReducers({ someReducer, otherReducer }),
initialState,
composeWithDevTools(
applyMiddleware(thunkMiddleware),
))
}

template.js

class Base extends React.Component {
...
render(){
return (
<div>
{this.props.children}
</div>
)
}
}
...
export default withRedux(Store, mapStateToProps, mapDispatchToProps)(Base)

./pages/index.js

import Template from 'Templates/Base'

export default class Index extends React.Component {
render(){
return (
<Template>
{'index'}
</Template>
)
}
}

Context

I am wrapping all pages in template component which includes methods and components that are reused among all pages.

Your Environment

Tech
Version

next
"^3.0.1-beta.20"

node
6.10.2

OS
Ubuntu/Linux

browser
Chrome 60

Issue 2:
Regrading webpack allow array of config as input, this next.config.js crashes yarn dev

module.exports = {
webpack: (config, { dev }) => {
return [config];
},
};

Console output:

DONE Compiled successfully in 3232ms 12:18:49

(node:4702) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'chunks' of undefined
(node:4702) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:4702) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'chunks' of undefined

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

Expected Behavior

Should work as normal

Current Behavior

Throw an UnhandledPromiseRejectionWarning, the app doesn't work.

Steps to Reproduce (for bugs)

Create a new next app.

Add next.config.js with following content:

module.exports = {
webpack: (config, { dev }) => {
return [config];
},
};

Run yarn dev

Context

I was trying to transpile custom server code using next's webpack config.

Your Environment

Tech
Version

next
3.0.3

node
v8.1.0

OS
macOS Sierra 10.12.6 (16G29)
Issue 1:
Model description

LayoutLMv3 is a pre-trained multimodal Transformer for Document AI with unified text and image masking. The simple unified architecture and training objectives make LayoutLMv3 a general-purpose pre-trained model. For example, LayoutLMv3 can be fine-tuned for both text-centric tasks, including form understanding, receipt understanding, and document visual question answering, and image-centric tasks such as document image classification and document layout analysis.

LayoutLMv3 greatly simplifies training and reduces the number of parameters compared to v3, making it an important milestone in document understanding.

LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei, Preprint 2022.

Open source status

The model implementation is available

The model weights are available

Provide useful links for the implementation

Huggingface Pretrained Download

Issue 2:
❓ Questions & Help

The BertForQuestionAnswering sample code creates duplicate [CLS] tokens. Wondering why:

tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
model = BertForQuestionAnswering.from_pretrained('bert-large-uncased-whole-word-masking-finetuned-squad')
question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
input_text = "[CLS] " + question + " [SEP] " + text + " [SEP]"
input_ids = tokenizer.encode(input_text)
token_type_ids = [0 if i <= input_ids.index(102) else 1 for i in range(len(input_ids))]
start_scores, end_scores = model(torch.tensor([input_ids]), token_type_ids=torch.tensor([token_type_ids]))
all_tokens = tokenizer.convert_ids_to_tokens(input_ids)
print(' '.join(all_tokens[torch.argmax(start_scores) : torch.argmax(end_scores)+1]))
# a nice puppet
tokenizer.decode(input_ids)
#'[CLS] [CLS] who was jim henson? [SEP] jim henson was a nice puppet [SEP] [SEP]'

If I remove the extra [CLS], the extraction doesn't work. It's exactly two tokens off:

input_ids = tokenizer.encode(input_text, add_special_tokens=False)
...rerun same code as above...
print(' '.join(all_tokens[torch.argmax(start_scores) : torch.argmax(end_scores)+1]))
# was a

What am I doing wrong? How can I get the extraction working without duplicate [CLS] tokens? (and duplicate final [SEP] tokens BTW).

The sample code comes right from the docs: https://huggingface.co/transformers/model_doc/bert.html#bertforquestionanswering