sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [Caffe2] I don't knw whether GPU support is right, is there something wrong with Hypothesis?
Labels: caffe2

## Issue description
I install Caffe2 based on the website:
https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile

After command 'sudo make install -j20' is finished,  i type:
cd ~ && python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"

Then, the result is 'Sucess'.

After that, i want to know whether GPU support is right ,i type command:
python caffe2/python/operator_test/activation_ops_test.py

Then, theresult is :

![image](https://user-images.githubusercontent.com/39788863/43703708-3690ba42-9990-11e8-977c-fec3a17d351c.png)

------------------------------------------------------------------------------------------------------------
[Here is the txt version]

pascal@rog:~/pytorch$ python caffe2/python/operator_test/activation_ops_test.py
/home/pascal/pytorch/build/caffe2/python/hypothesis_test_util.py:75: HypothesisDeprecationWarning:
The min_satisfying_examples setting has been deprecated and disabled, due to
overlap with the filter_too_much healthcheck and poor interaction with the
max_examples setting.

  verbosity=hypothesis.Verbosity.verbose))
/home/pascal/pytorch/build/caffe2/python/hypothesis_test_util.py:84: HypothesisDeprecationWarning:
The min_satisfying_examples setting has been deprecated and disabled, due to
overlap with the filter_too_much healthcheck and poor interaction with the
max_examples setting.

  verbosity=hypothesis.Verbosity.verbose))
/home/pascal/pytorch/build/caffe2/python/hypothesis_test_util.py:92: HypothesisDeprecationWarning:
The min_satisfying_examples setting has been deprecated and disabled, due to
overlap with the filter_too_much healthcheck and poor interaction with the
max_examples setting.

  verbosity=hypothesis.Verbosity.verbose))

----------------------------------------------------------------------------------------------------

It looks like warnings？ Do my caffe2 have GPU support? I'm quite curious.

My **- hypothesis** version is 3.66.26 , when i change it to 3.40.0, nothing happended. 
Nothing was printed. So do i have GPU support?


- Caffe2,Build from source
Do everything on the website: https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile

- OS: Ubuntu 16.04
- PyTorch version: The newest one
- Python version: Anaconda 3.6.5
- CUDA/cuDNN version: 9.2.88,  7.1.4
- GPU models and configuration: GTX1080ti * 2
- GCC version (if compiling from source):6.4.0
- CMake version: 3.5.1
- Versions of any other relevant libraries: OpenCV 3.4.0

**- hypothesis                3.66.26**
Repository: rust
Issue: noalias is not enough
Labels: A-LLVM,I-slow,C-enhancement,A-codegen,T-compiler,C-optimization

Somebody on the internet (https://blog.dend.ro/rust-and-the-case-of-the-redundant-comparison/) complained that something like this:

```rust
fn vec_clear(x: &mut i32) {
    if *x != 0 {
        *x = 0;
    }
}
```

generates a conditional store: 

```asm
    cmpl    $0, (%rdi)
    je      .LBB0_2
    movl    $0, (%rdi)
.LBB0_2:  
    retq
```

on `x86_64` instead of just an unconditional store `movl $0, (%rdi); retq`.

Taking a look at the optimized LLVM-IR:

```llvm
define void @vec_clear(i32* noalias nocapture dereferenceable(4) %x) {
start:
  %0 = load i32, i32* %x, align 4
  %1 = icmp eq i32 %0, 0
  br i1 %1, label %bb2, label %bb1

bb1:
  store i32 0, i32* %x, align 4
  br label %bb2

bb2:
  ret void
}
```

shows the issue.

The LLVM-IR generated by rustc is loosing critical information. It marks `i32*` as `noalias`, which means, that no other pointers _in `vec_clear`'s scope_ will alias it. However, outside `vec_clear` scope, other pointers are allowed to alias that memory. That is, if `*x` is zero, other threads could be concurrently reading the memory and if LLVM would generate an unconditional store here, that would introduce a data-race, which means that this optimization is not safe on the LLVM-IR generated by rustc. OTOH, &mut i32` means that the pointer has unique access to the memory, that is, no other pointer can access the memory behind it as long as that pointer is alive. Therefore, transforming the code to an unconditional store does not introduce a data-race. 

Therefore, _I think_ that `noalias` is not enough to perform this optimization and that we would need something stronger for LLVM to be able to perform it. 

---

This also shows that `&mut T` is stronger than C's `restrict` keyword.
Repository: pytorch
Issue: [Caffe 2] How to access/remove Blobs from Workspace?
Labels: caffe2

I'm using the Python version of Caffe2 (inside the docker image caffe2/caffe2:snapshot-py2-cuda9.0-cudnn7-ubuntu16.04).

I loaded a pre-trained ResNet50 from models into Workspace and I would like to re-train it on my own dataset.
In order to do that, I need to remove/modify some layers -- how do I do it via Python API? I'm not interested in the FetchBlob() method which returns a numpy array, I'd like to get a BlobReference object, referring to a particular Blob loaded into the workspace and be able to play with it.
I see that the C++ Workspace class has methods RemoveBlob() and GetBlob(), which are absent in the Python version. I find it hard to believe that the only way to do this in Python is by direct modification of the protobuf files.

Thanks in advance.
Repository: kubernetes
Issue: Allow setting of Hostname also when PodSpec.HostNetwork is true
Labels: sig/network,sig/node,kind/feature,help wanted,triage/accepted

**Is this a BUG REPORT or FEATURE REQUEST?**:

/kind feature


**What happened**:

Based on the [Documentation](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#podspec-v1-core)
> Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.

The "system-defined value" seems to be - according to my observations - the podName when `hostNetwork` is false and the the hostname of the host if `hostNetwork` is true. (Also why this difference? Anyway, lets continue)

I have a Pod with `hostNetwork` set to true and defined an explicit hostname in `PodSpec.Hostname`. The created Containers don't have this hostname.

**What you expected to happen**:

The Pod obtaines the hostname defined in `PodSpec.Hostname`.

**How to reproduce it (as minimally and precisely as possible)**:

`nano -w etcd-pod.yaml`
```yaml
apiVersion: v1
kind: Pod
metadata:
  name: 'etcd-7'
spec:
  hostNetwork: true
  hostname: 'etcd-7'
  containers:
  - name: 'etcd-7'
    image: ubuntu:16.04 # for simplicity
```
`kubectl create -f etcd-pod.yaml`
`kubectl exec -ti etcd-7 -- hostname`
should return etcd-7, but outputs minion-123456

Real World Example (single master node created with kubeadm):
```
:~$ kubectl --context=mgmt-test/admin -n kube-system exec -ti kube-proxy-rmfpq -- hostname # with hostnetwork
k8s-testing-2
:~$ kubectl --context=mgmt-test/admin -n kube-system exec -ti tiller-deploy-5c688d5f9b-mpzft -- hostname # without hostnetwork
tiller-deploy-5c688d5f9b-mpzft
```

**Anything else we need to know?**:

The code [explicitly excludes the case with hostnetwork](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go#L85) and is from 2 years ago.

In CRI, when `hostNetwork` is set to true, the call comes without any hostname information:
```
&RunPodSandboxRequest{
...
Name:etcd-7,
...
Hostname:,
...
}" t=2018-08-06T12:39:40+0000
```
and also no information about the host (the CRI implementation would have to find it out itself). *But this request ist not about the CRI interface, just mentioning followups.*

**Environment**:

- Kubernetes version (use `kubectl version`): 1.11.1 both client & server
- Cloud provider or hardware configuration: *unrelated*
- OS (e.g. from /etc/os-release): *unrelated*
- Kernel (e.g. `uname -a`): *unrelated*
- Install tools: *unrelated*
- Others: CRI Interface affected and maybe DNS affected

I can easily provide a patch/PR, but I assume this case has a reason we probably need to discuss about.

**Proposal**

- If `PodSpec.Hostname` is **set**, the pod obtains that hostname also when `hostNetwork` is set to true (The writer of the PodSpec knows what he wants to do).
- If `PodSpec.Hostname` is **not set**, the result should stay the same (So we don't break anything)
Repository: electron
Issue: The `app.relaunch()` API is confusing
Labels: enhancement :sparkles:

**Is your feature request related to a problem? Please describe.**

It's confusing that you first have to do `app.relaunch()` and then `app.quit()` or `app.exit()`, since `relaunch()` makes you think it will, you know, relaunch.

**Describe the solution you'd like**

It should be made more clear that you're only changing the state, not doing the actual action of relaunching.

Something like:

```js
app.setRelaunch();
```

And then in the next major version, you could deprecate `app.relaunch()`, and then some major versions later, reintroduce `app.relaunch()`, but as a shortcut for:

```js
app.setRelaunch();
app.quit();
```

Where it actually does what you expect.

**Describe alternatives you've considered**

Alternatively, make `app.relaunch()` relaunch right away and accept an option whether it should `quit` or `exit`.
Repository: You-Dont-Know-JS
Issue: ToPrimitive Abstract operation clarification
Labels: for second edition

## Book: Types & Grammar
### Chapter 4: Coercion

**ToString** subchapter says:
"But as shown earlier, if an object has its own toString() method on it, and you use that object in a string-like way, its toString() will automatically be called, and the string result of that call will be used instead.

Note: The way an object is coerced to a string technically goes through the ToPrimitive abstract operation (ES5 spec, section 9.1), but those nuanced details are covered in more detail in the ToNumber section later in this chapter, so we will skip over them here."

**ToNumber** subchapter says:
"To convert to this primitive value equivalent, the ToPrimitive abstract operation (ES5 spec, section 9.1) will consult the value (using the internal DefaultValue operation -- ES5 spec, section 8.12.8) in question to see if it has a valueOf() method. If valueOf() is available and it returns a primitive value, that value is used for the coercion. If not, but toString() is available, it will provide the value for the coercion."

At this point, what if I use this object like a string?
```javascript
var obj = {
    valueOf : function valueOf() { 
    return "valueOf"
    }, 
    toString : function toString() { 
    return "toString"
    }
}

"hi " + obj; 
```
**ToString** subchapter let me think that toString() method will be called, but **ToNumber** subchapter is clearer and I understand that toValue() method, if it exist, will be called instead of toString() method.
And that's what happens:
```javascript
"hi " + obj; // "hi valueOf"
```

Now let's move on to the **Explicitly: Strings <--> Numbers** (sub?)subchaper where you can read:
"String(..) coerces from any other value to a primitive string value, using the rules of the ToString operation discussed earlier."
This is not completely true, because:
```javascript
String(obj);
```
will output "toString", ignoring valueOf() method.
So, the sentence I reported from **Explicitly: Strings <--> Numbers** (sub?)subchaper caused me to expect the same behaviour explained into **ToString** subchapter with **ToNumber** subchapter reference.

I'm not an expert, I'm studying JS using your books so interpret ES5 standard is quite hard for me, but it seems that the [DefaultValue]] internal method of an Object is called with an hint (String/Number) and that hint specifies if valueOf() metod has to be ignored. By default the hint is Number, so maybe a statement like:
```javascript
"hi " + obj; 
```
won't set that hint to String, as it seems to do:
```javascript
String(obj);
```

It could be that ES6 changed this behaviour? Maybe before ES6 the previous instructions led to the same result.
Repository: go
Issue: x/sys/windows/registry: way to get ACL
Labels: help wanted,OS-Windows,NeedsInvestigation,FeatureRequest

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
Go 1.10.3

### Does this issue reproduce with the latest release?


### What operating system and processor architecture are you using (`go env`)?
GOHOSTARCH=amd64
GOHOSTOS=windows

### What did you do?
Using registry package to access the registry keys, values and their ACLs

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.


### What did you expect to see?
NA

### What did you see instead?
NA
Repository: go
Issue: cmd/go: pass information on incompatible versions to consuming modules
Labels: NeedsInvestigation,modules

Consider the following case where you have an app with a dependency on a module (modA) that has a dependency on another module (modB).

App --> modA --> modB

modB is released with a bug. For the examples sake, the bug causes goroutines to not be garbage collected and the number to continue to grow. This bug has been experienced in a real world application.

The developer of modA realizes this bug exists and sets the minimum version to the last stable release that does not contain the bug.

The developer of the App decides to update the dependencies to the latest releases (e.g., `go get -u ./...`). Alternatively, the apps developer could import a second dependency (modC) that also depends on modB but at the latest release because they did not catch the bug. Some bugs don't show up on tests but rather in long running situations which is why I choose the goroutine example.

There is currently no way for the author of modA to pass along information that modB has a bad releases. We need a way to communicate that information for those periods where that release is in the wild and one to use.

Existing tools like glide and dep let you say not to use a release. This is idea shows up in most other languages dependency management as well (e.g., `!=1.2.3`).

An idea was suggested, rather quickly and off the cuff, by @rsc to setup a web service to hold the information on buggy versions that should not be used. There are a few constraints that make this idea difficult:

* Who can post details on what versions of what tools are incompatible? There is an opportunity to troll through manipulation of the data
* How is access handled when packages can be hosted by VCS and you can't always count on GitHub
* There is an information leakage problem where data on the dependencies of a proprietary app could be leaked to this services host. For example, a rival to Google is working on an app but leaking the dependencies they use to Google as a host of the service which gives lots of detail. We shouldn't have a case where data is leaked like that

This is a problem because of two things:

* When not vendoring you lose the ability to easily diff the changes to dependencies
* A mass number of developers never really check the changes to their dependencies when they pull in updates
* A bug like this could be easily missed when updating, even for the trained eye, which I posit few will do

How will the Go toolchain handle this situation?
Repository: TypeScript
Issue: Setting noErrorTruncation to false truncates inferred type of variables/functions; which are not errors
Labels: Bug

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.0.1

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** noErrorTruncation

In TS 2.9, if `noErrorTruncation` is unset, or set to `false`, hovering the cursor over an identifier for type inference in VS code would bring up a tooltip with the inferred type.

In TS 3.0, if `noErrorTruncation` is unset, or set to `false`, the tooltip with the inferred type will be truncated with ellipsis.

**Code**

TS 2.9, with `noErrorTruncation : false`

```ts
    /*snip*/
    __canAccept: {
        page?: string | number | null | undefined;
        itemsPerPage?: string | number | null | undefined;
    };
}
```

TS 3.0 with `noErrorTruncation : false`

```ts
    /*snip*/
    __canAccept: {
        ...;
    };
}
```

**Expected behavior:**

`noErrorTruncation` is about truncating errors.

The tooltips displaying inferred types aren't errors, and should not be affected by this flag.

**Actual behavior:**

`noErrorTruncation` affects tooltips displaying inferred types.

-----

If anyone else is having this problem, just go to your `tsconfig.json`, add the following line,

```json
"noErrorTruncation": true,
```

and restart VS code (or your editor of choice)
Repository: react
Issue: Support cross-renderer portals
Labels: Type: Feature Request,Type: Big Picture,Component: Reconciler,React Core Team

Currently `createPortal` only works within the current renderer.

This means that if you want to embed one renderer into another (e.g. `react-art` in `react-dom`), your only option is to do an imperative render in a commit-time hook like `componentDidMount` or `componentDidUpdate` of the outer renderer's component. In fact that's exactly how `react-art` works today.

With this approach, nested renderers like `react-art` can't read the context of the outer renderers (https://github.com/facebook/react/issues/12796). Similarly, we can't time-slice updates in inner renderers because we only update the inner container at the host renderer's commit time.

At the time we originally discussed portals we wanted to make them work across renderers. So that you could do something like

```js
<div>
  <Portal to={ReactART}>
    <surface>
      <rect />
    </surface>
  </Portal>
</div>
```

But it's not super clear how this should work because renderers can bundle incompatible Fiber implementations. Whose implementation takes charge?

We'll want to figure something out eventually. For now I'm filing this for future reference.
Repository: TypeScript
Issue: Conditional type doesn't narrow primitive types
Labels: Suggestion,In Discussion

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.1.0-dev.201xxxxx

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
type OnlyNumber<T extends number> = T

type ToNumber<T extends number | string> =
    T extends string ? undefined : OnlyNumber<T>
```

**Expected behavior:**
No errors

**Actual behavior:**
Error:
```
index.ts:37:47 - error TS2344: Type 'T' does not satisfy the constraint 'number'.
  Type 'string | number' is not assignable to type 'number'.
    Type 'string' is not assignable to type 'number'.

37     T extends string ? undefined : OnlyNumber<T>
```

**Playground Link:** https://www.typescriptlang.org/play/#src=type%20OnlyNumber%3CT%20extends%20number%3E%20%3D%20T%0D%0A%0D%0Atype%20ToNumber%3CT%20extends%20number%20%7C%20string%3E%20%3D%0D%0A%20%20%20%20T%20extends%20string%20%3F%20undefined%20%3A%20OnlyNumber%3CT%3E%0D%0A

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: You-Dont-Know-JS
Issue: Wrong reference
Labels: for second edition

## Book: Types & Grammar
### Chapter 4: Coercion

**ToNumber** subchapter says:
"ToNumber for a string value essentially works for the most part like the rules/syntax for numeric literals (see Chapter 3)."

But **Numeric Syntax** is explayned in the Chapter 2, not in the Chapter 3.
Repository: godot
Issue: NodePath export for children node crashes the debugger without any information
Labels: bug,topic:editor,confirmed

**Godot version:**
![image](https://user-images.githubusercontent.com/24371247/43739673-dd034f24-9996-11e8-9f5e-5e87012b9bf1.png)



**OS/device including version:**
Windows


**Issue description:**
When exporting a NodePath in a node then assigning a children to it in the inspector, if the children also exported a NodePath and we assigned the parent node to that field
 >> Using get_node(node_path) in the parent will fail. 

**Steps to reproduce:**
1. Create a scene
2. Create a node
3. Attatch a script
```
export(NodePath) onready var node
func _ready(): 
\tnode = get_node(node)
 ```
4. Create a child to the node
5. Assign the child in the node field of the parrent
6. attach the same script as above to the child
7. assign the parent to the field
8. insert breakpoint just before get_node in parent
9. run debugger -> notice debugger crash with 
```
drivers\windows\stream_peer_tcp_winsock.cpp:203 - Server disconnected!
```
[Test.zip](https://github.com/godotengine/godot/files/2264026/Test.zip)