text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">๐</g-emoji> Bug</h2>
<p dir="auto">PyTorch Java Native Interface is conflicting with React Native one. (they both use fbjni with a slightly different version).<br>
This cause issue during the android build in an React Native project:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.RuntimeException: Duplicate class com.facebook.jni.CppException found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.CppSystemErrorException found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread$1 found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread$Destructor found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread$DestructorList found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread$DestructorStack found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread$Terminus found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.HybridClassBase found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.HybridData found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.HybridData$Destructor found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.IteratorHelper found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.MapIteratorHelper found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.NativeRunnable found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.ThreadScopeSupport found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.UnknownCppException found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
"><pre class="notranslate"><code class="notranslate">java.lang.RuntimeException: Duplicate class com.facebook.jni.CppException found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.CppSystemErrorException found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread$1 found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread$Destructor found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread$DestructorList found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread$DestructorStack found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.DestructorThread$Terminus found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.HybridClassBase found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.HybridData found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.HybridData$Destructor found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.IteratorHelper found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.MapIteratorHelper found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.NativeRunnable found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.ThreadScopeSupport found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
Duplicate class com.facebook.jni.UnknownCppException found in modules fbjni-java-only-0.0.3.jar (com.facebook.fbjni:fbjni-java-only:0.0.3) and pytorch_android_fbjni-1.4.0-runtime.jar (org.pytorch:pytorch_android_fbjni:1.4.0)
</code></pre></div>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>Create a new React Native project using the CLI: <code class="notranslate">npx react-native init AwesomeProject</code></li>
<li>Add the PyTorch android dependencies:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" implementation 'org.pytorch:pytorch_android:1.4.0'
implementation 'org.pytorch:pytorch_android_torchvision:1.4.0'"><pre class="notranslate"><code class="notranslate"> implementation 'org.pytorch:pytorch_android:1.4.0'
implementation 'org.pytorch:pytorch_android_torchvision:1.4.0'
</code></pre></div>
<ol start="3" dir="auto">
<li>Change the <code class="notranslate">minSdkVersion</code> to 21 in the root android/build.gradle</li>
<li>Sync gradle and build the android app</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">The Application should be able to build without having "duplicate class" issue and start on the device</p>
<h2 dir="auto">Environment</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="โ python collect_env.py
Collecting environment information...
PyTorch version: N/A - 1.4.0
Is debug build: N/A
CUDA used to build PyTorch: N/A
OS: Mac OSX 10.15.5 (x86_64)
GCC version: Could not collect
Clang version: 11.0.3 (clang-1103.0.32.62)
CMake version: Could not collect
Python version: 2.7 (64-bit runtime)
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
Versions of relevant libraries:
[pip] numpy==1.8.0rc1
[conda] Could not collect"><pre class="notranslate"><code class="notranslate">โ python collect_env.py
Collecting environment information...
PyTorch version: N/A - 1.4.0
Is debug build: N/A
CUDA used to build PyTorch: N/A
OS: Mac OSX 10.15.5 (x86_64)
GCC version: Could not collect
Clang version: 11.0.3 (clang-1103.0.32.62)
CMake version: Could not collect
Python version: 2.7 (64-bit runtime)
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
Versions of relevant libraries:
[pip] numpy==1.8.0rc1
[conda] Could not collect
</code></pre></div>
<h2 dir="auto">Additional context</h2>
<p dir="auto">There were some talk on the PyTorch forum <a href="https://discuss.pytorch.org/t/pytorch-not-compatible-with-react-native-library/73841/6" rel="nofollow">here</a> saying that someone (from PyTorch team?) was discussing with the RN Team, but there is no update since March 20 AND the issue come after the reported issue here.</p> | <p dir="auto">This failure occurs when compilation OOMs, but the OOM exit code is not propagated. "Resume build" will not fix errors like this, as resume build will reuse the (corrupted) build product.</p>
<hr>
<p dir="auto">I got this durably on a PR of mine (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="382859312" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/14247" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/14247/hovercard" href="https://github.com/pytorch/pytorch/pull/14247">#14247</a> commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/pytorch/pytorch/commit/a6435488130ef94c5b6c80c5cb10d2a1cf6ff16a/hovercard" href="https://github.com/pytorch/pytorch/commit/a6435488130ef94c5b6c80c5cb10d2a1cf6ff16a"><tt>a643548</tt></a>); this test doesn't seem to fail on master all the time, but I did find the failure on one other PR: <a href="https://ci.pytorch.org/jenkins/job/pytorch-builds/job/py2-clang7-rocmdeb-ubuntu16.04-test/3885/console" rel="nofollow">https://ci.pytorch.org/jenkins/job/pytorch-builds/job/py2-clang7-rocmdeb-ubuntu16.04-test/3885/console</a> for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="385396349" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/14482" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/14482/hovercard" href="https://github.com/pytorch/pytorch/pull/14482">#14482</a> (most other failures are the known SIGIOT problem)</p>
<p dir="auto">Full error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="19:08:19 test_ByteTensor_mode (__main__.TestCuda) ... /usr/bin/python: symbol lookup error: /var/lib/jenkins/.local/lib/python2.7/site-packages/torch/lib/libcaffe2_hip.so: undefined symbol: THCudaByteTensor_mode
19:08:19 Traceback (most recent call last):
19:08:19 File "test/run_test.py", line 431, in <module>
19:08:19 main()
19:08:19 File "test/run_test.py", line 423, in main
19:08:19 raise RuntimeError(message)
19:08:19 RuntimeError: test_cuda failed!"><pre class="notranslate"><code class="notranslate">19:08:19 test_ByteTensor_mode (__main__.TestCuda) ... /usr/bin/python: symbol lookup error: /var/lib/jenkins/.local/lib/python2.7/site-packages/torch/lib/libcaffe2_hip.so: undefined symbol: THCudaByteTensor_mode
19:08:19 Traceback (most recent call last):
19:08:19 File "test/run_test.py", line 431, in <module>
19:08:19 main()
19:08:19 File "test/run_test.py", line 423, in main
19:08:19 raise RuntimeError(message)
19:08:19 RuntimeError: test_cuda failed!
</code></pre></div>
<p dir="auto">log: <a href="https://ci.pytorch.org/jenkins/job/pytorch-builds/job/py2-clang7-rocmdeb-ubuntu16.04-test/3874/console" rel="nofollow">https://ci.pytorch.org/jenkins/job/pytorch-builds/job/py2-clang7-rocmdeb-ubuntu16.04-test/3874/console</a></p> | 0 |
<p dir="auto">Is this captured in the metadata database already and just a matter of surfacing it in the API call, or is it not captured outside of the segments themselves?</p> | <p dir="auto">Storing aggregatorFactories in segment metadata will make it possible to reindex existing segments without having to provide the original aggregators out-of-band. As a bonus, it would also be nice to store the QueryGranularity used for indexing. This isn't required for reindexing, since it would work fine to use QueryGranularity.NONE, but it would still be cool.</p> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">e.g.:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- a/lib/sqlalchemy/sql/operators.py
+++ b/lib/sqlalchemy/sql/operators.py
@@ -1091,18 +1091,19 @@ _PRECEDENCE = {
sub: 7,
concat_op: 6,
- match_op: 6,
- notmatch_op: 6,
-
- ilike_op: 6,
- notilike_op: 6,
- like_op: 6,
- notlike_op: 6,
- in_op: 6,
- notin_op: 6,
-
- is_: 6,
- isnot: 6,
+
+ match_op: 5,
+ notmatch_op: 5,
+
+ ilike_op: 5,
+ notilike_op: 5,
+ like_op: 5,
+ notlike_op: 5,
+ in_op: 5,
+ notin_op: 5,
+
+ is_: 5,
+ isnot: 5,
eq: 5,
ne: 5,"><pre class="notranslate"><code class="notranslate">--- a/lib/sqlalchemy/sql/operators.py
+++ b/lib/sqlalchemy/sql/operators.py
@@ -1091,18 +1091,19 @@ _PRECEDENCE = {
sub: 7,
concat_op: 6,
- match_op: 6,
- notmatch_op: 6,
-
- ilike_op: 6,
- notilike_op: 6,
- like_op: 6,
- notlike_op: 6,
- in_op: 6,
- notin_op: 6,
-
- is_: 6,
- isnot: 6,
+
+ match_op: 5,
+ notmatch_op: 5,
+
+ ilike_op: 5,
+ notilike_op: 5,
+ like_op: 5,
+ notlike_op: 5,
+ in_op: 5,
+ notin_op: 5,
+
+ is_: 5,
+ isnot: 5,
eq: 5,
ne: 5,
</code></pre></div>
<p dir="auto">rationale: MySQL, Oracle and now Postgresql all have relatively flat precedences for these operators:</p>
<p dir="auto">(mysql):<br>
<a href="https://docs.oracle.com/cd/E17952_01/mysql-5.5-en/operator-precedence.html" rel="nofollow">https://docs.oracle.com/cd/E17952_01/mysql-5.5-en/operator-precedence.html</a></p>
<p dir="auto">(oracle):</p>
<p dir="auto"><a href="https://docs.oracle.com/cd/B19306_01/server.102/b14200/conditions001.htm#i1034834" rel="nofollow">https://docs.oracle.com/cd/B19306_01/server.102/b14200/conditions001.htm#i1034834</a></p>
<p dir="auto">pg 9.4, less flat: <a href="https://www.postgresql.org/docs/9.4/static/sql-syntax-lexical.html#SQL-PRECEDENCE-TABLE" rel="nofollow">https://www.postgresql.org/docs/9.4/static/sql-syntax-lexical.html#SQL-PRECEDENCE-TABLE</a></p>
<p dir="auto">pg 9.5, now is more flat: <a href="https://www.postgresql.org/docs/9.5/static/sql-syntax-lexical.html#SQL-PRECEDENCE-TABLE" rel="nofollow">https://www.postgresql.org/docs/9.5/static/sql-syntax-lexical.html#SQL-PRECEDENCE-TABLE</a></p>
<p dir="auto">making these all have the same precedence means we'll just have more parenthesis.</p> | <h3 dir="auto">Describe the bug</h3>
<p dir="auto">Define tables <code class="notranslate">A</code> and <code class="notranslate">B</code> with a relationship defined as <code class="notranslate">A.bs = relationship("B", primaryjoin="foreign(B.a_id) == remote(A.id)")</code>.</p>
<p dir="auto">Trying to query then with <code class="notranslate">aliased</code> classes results in a query with an incorrect join condition:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="a_alias = aliased(A)
b_alias = aliased(B)
query = select(a_alias, b_alias).join(a_alias.bs.of_type(b_alias))
print(query)
SELECT a_1.id, b_1.id AS id_1, b_1.a_id
FROM a AS a_1
JOIN b AS b_1 ON b_1.a_id = a.id"><pre class="notranslate"><span class="pl-s1">a_alias</span> <span class="pl-c1">=</span> <span class="pl-en">aliased</span>(<span class="pl-v">A</span>)
<span class="pl-s1">b_alias</span> <span class="pl-c1">=</span> <span class="pl-en">aliased</span>(<span class="pl-v">B</span>)
<span class="pl-s1">query</span> <span class="pl-c1">=</span> <span class="pl-en">select</span>(<span class="pl-s1">a_alias</span>, <span class="pl-s1">b_alias</span>).<span class="pl-en">join</span>(<span class="pl-s1">a_alias</span>.<span class="pl-s1">bs</span>.<span class="pl-en">of_type</span>(<span class="pl-s1">b_alias</span>))
<span class="pl-en">print</span>(<span class="pl-s1">query</span>)
<span class="pl-v">SELECT</span> <span class="pl-s1">a_1</span>.<span class="pl-s1">id</span>, <span class="pl-s1">b_1</span>.<span class="pl-s1">id</span> <span class="pl-v">AS</span> <span class="pl-s1">id_1</span>, <span class="pl-s1">b_1</span>.<span class="pl-s1">a_id</span>
<span class="pl-v">FROM</span> <span class="pl-s1">a</span> <span class="pl-v">AS</span> <span class="pl-s1">a_1</span>
<span class="pl-v">JOIN</span> <span class="pl-s1">b</span> <span class="pl-v">AS</span> <span class="pl-s1">b_1</span> <span class="pl-v">ON</span> <span class="pl-s1">b_1</span>.<span class="pl-s1">a_id</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span>.<span class="pl-s1">id</span></pre></div>
<p dir="auto">The rendered join incorrectly references table <code class="notranslate">a</code> in its <code class="notranslate">ON</code> clause, which is the non-aliased name of the table related to class <code class="notranslate">A</code>. It should be <code class="notranslate">b_1.a_id = a_1.id</code> instead.</p>
<h3 dir="auto">To Reproduce</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sqlalchemy import Column, ForeignKey, Integer, create_engine, select
from sqlalchemy.orm import Session, aliased, declarative_base, relationship
Base = declarative_base()
class A(Base):
__tablename__ = "a"
id = Column(Integer, primary_key=True)
bs = relationship(
"B",
primaryjoin="foreign(B.a_id) == remote(A.id)",
)
class B(Base):
__tablename__ = "b"
id = Column(Integer, primary_key=True)
a_id = Column(ForeignKey("a.id"))
engine = create_engine("sqlite://")
Base.metadata.create_all(engine)
session = Session(engine)
a_alias = aliased(A)
b_alias = aliased(B)
query = select(a_alias, b_alias).join(a_alias.bs.of_type(b_alias))
session.execute(query).all()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-v">Column</span>, <span class="pl-v">ForeignKey</span>, <span class="pl-v">Integer</span>, <span class="pl-s1">create_engine</span>, <span class="pl-s1">select</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">orm</span> <span class="pl-k">import</span> <span class="pl-v">Session</span>, <span class="pl-s1">aliased</span>, <span class="pl-s1">declarative_base</span>, <span class="pl-s1">relationship</span>
<span class="pl-v">Base</span> <span class="pl-c1">=</span> <span class="pl-en">declarative_base</span>()
<span class="pl-k">class</span> <span class="pl-v">A</span>(<span class="pl-v">Base</span>):
<span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">"a"</span>
<span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">bs</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(
<span class="pl-s">"B"</span>,
<span class="pl-s1">primaryjoin</span><span class="pl-c1">=</span><span class="pl-s">"foreign(B.a_id) == remote(A.id)"</span>,
)
<span class="pl-k">class</span> <span class="pl-v">B</span>(<span class="pl-v">Base</span>):
<span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">"b"</span>
<span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">a_id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">ForeignKey</span>(<span class="pl-s">"a.id"</span>))
<span class="pl-s1">engine</span> <span class="pl-c1">=</span> <span class="pl-en">create_engine</span>(<span class="pl-s">"sqlite://"</span>)
<span class="pl-v">Base</span>.<span class="pl-s1">metadata</span>.<span class="pl-en">create_all</span>(<span class="pl-s1">engine</span>)
<span class="pl-s1">session</span> <span class="pl-c1">=</span> <span class="pl-v">Session</span>(<span class="pl-s1">engine</span>)
<span class="pl-s1">a_alias</span> <span class="pl-c1">=</span> <span class="pl-en">aliased</span>(<span class="pl-v">A</span>)
<span class="pl-s1">b_alias</span> <span class="pl-c1">=</span> <span class="pl-en">aliased</span>(<span class="pl-v">B</span>)
<span class="pl-s1">query</span> <span class="pl-c1">=</span> <span class="pl-en">select</span>(<span class="pl-s1">a_alias</span>, <span class="pl-s1">b_alias</span>).<span class="pl-en">join</span>(<span class="pl-s1">a_alias</span>.<span class="pl-s1">bs</span>.<span class="pl-en">of_type</span>(<span class="pl-s1">b_alias</span>))
<span class="pl-s1">session</span>.<span class="pl-en">execute</span>(<span class="pl-s1">query</span>).<span class="pl-en">all</span>()</pre></div>
<h3 dir="auto">Error</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: a.id
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/gustavo/Gustavo/random/sqlalchemy_aliased_primaryjoin_relationship.py", line 36, in <module>
session.scalars(query).all()
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1771, in scalars
return self.execute(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1712, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 333, in _execute_on_connection
return connection._execute_clauseelement(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
ret = self._execute_context(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
self._handle_dbapi_exception(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
util.raise_(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: a.id
[SQL: SELECT b_1.id, b_1.a_id
FROM a AS a_1 JOIN b AS b_1 ON b_1.a_id = a.id]
(Background on this error at: https://sqlalche.me/e/14/e3q8)"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: a.id
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/gustavo/Gustavo/random/sqlalchemy_aliased_primaryjoin_relationship.py", line 36, in <module>
session.scalars(query).all()
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1771, in scalars
return self.execute(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1712, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 333, in _execute_on_connection
return connection._execute_clauseelement(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
ret = self._execute_context(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
self._handle_dbapi_exception(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
util.raise_(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/home/gustavo/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: a.id
[SQL: SELECT b_1.id, b_1.a_id
FROM a AS a_1 JOIN b AS b_1 ON b_1.a_id = a.id]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
</code></pre></div>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li><strong>OS:</strong> Ubuntu 22.04.1 LTS</li>
<li><strong>Python:</strong> 3.10.4</li>
<li><strong>SQLAlchemy:</strong> 1.4.41</li>
<li><strong>Database:</strong> sqlite-3.38.3</li>
<li><strong>DBAPI:</strong> sqlite (but I also got the same problem using psycopg2)</li>
</ul>
<h3 dir="auto">Additional context</h3>
<p dir="auto">Removing the <code class="notranslate">primaryjoin</code> clause in the <code class="notranslate">relationship</code> definition of <code class="notranslate">A.bs</code> gives the right result.</p> | 0 |
<p dir="auto">rustc panics destructuring a struct-like enum variant in the following code (using this library: <a href="https://github.com/netvl/xml-rs">https://github.com/netvl/xml-rs</a>):</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="extern crate xml;
use xml::reader::events::XmlEvent;
fn main() {
let e = XmlEvent::ProcessingInstruction { name: "Test".to_string(), data: None };
match e {
XmlEvent::ProcessingInstruction { name, data } => {
println!("name: {}, data: {}", name, data);
},
_ => {}
}
}"><pre class="notranslate"><span class="pl-k">extern</span> <span class="pl-k">crate</span> xml<span class="pl-kos">;</span>
<span class="pl-k">use</span> xml<span class="pl-kos">::</span>reader<span class="pl-kos">::</span>events<span class="pl-kos">::</span><span class="pl-v">XmlEvent</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> e = <span class="pl-smi">XmlEvent</span><span class="pl-kos">::</span><span class="pl-smi">ProcessingInstruction</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span><span class="pl-kos">:</span> <span class="pl-s">"Test"</span><span class="pl-kos">.</span><span class="pl-en">to_string</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">data</span><span class="pl-kos">:</span> <span class="pl-v">None</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">match</span> e <span class="pl-kos">{</span>
<span class="pl-smi">XmlEvent</span><span class="pl-kos">::</span><span class="pl-v">ProcessingInstruction</span> <span class="pl-kos">{</span> name<span class="pl-kos">,</span> data <span class="pl-kos">}</span> => <span class="pl-kos">{</span>
<span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"name: {}, data: {}"</span>, name, data<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
_ => <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">the following, however, does not panic for some reason:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="extern crate xml;
use xml::reader::events::XmlEvent;
fn main() {
match (XmlEvent::ProcessingInstruction { name: "Test".to_string(), data: None }) {
XmlEvent::ProcessingInstruction { name, data } => {
println!("name: {}, data: {}", name, data);
},
_ => {}
}
}"><pre class="notranslate"><span class="pl-k">extern</span> <span class="pl-k">crate</span> xml<span class="pl-kos">;</span>
<span class="pl-k">use</span> xml<span class="pl-kos">::</span>reader<span class="pl-kos">::</span>events<span class="pl-kos">::</span><span class="pl-v">XmlEvent</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">match</span> <span class="pl-kos">(</span><span class="pl-smi">XmlEvent</span><span class="pl-kos">::</span><span class="pl-smi">ProcessingInstruction</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span><span class="pl-kos">:</span> <span class="pl-s">"Test"</span><span class="pl-kos">.</span><span class="pl-en">to_string</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">data</span><span class="pl-kos">:</span> <span class="pl-v">None</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">XmlEvent</span><span class="pl-kos">::</span><span class="pl-v">ProcessingInstruction</span> <span class="pl-kos">{</span> name<span class="pl-kos">,</span> data <span class="pl-kos">}</span> => <span class="pl-kos">{</span>
<span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"name: {}, data: {}"</span>, name, data<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
_ => <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="task 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/option.rs:358
stack backtrace:
1: 0x7fa54ecbbe50 - rt::backtrace::imp::write::hf87c140cfcd95fbaBly
2: 0x7fa54ecbf0a0 - failure::on_fail::h343c4b97464b676eZNy
3: 0x7fa54e911fa0 - unwind::begin_unwind_inner::hb4b9831d2f5e86936Qc
4: 0x7fa54e911bd0 - unwind::begin_unwind_fmt::h5c8826b0094c4275hOc
5: 0x7fa54e911b90 - rust_begin_unwind
6: 0x7fa54e95a4a0 - panicking::panic_fmt::h55316e4e118a4d4bcxl
7: 0x7fa54e9581a0 - panicking::panic::h0e0d0e8df2dbf5d1eul
8: 0x7fa54cf64950 - middle::borrowck::move_data::fragments::add_fragment_siblings::hf1c2017286e03984bYg
9: 0x7fa54cf61970 - middle::borrowck::move_data::fragments::fixup_fragment_sets::h5d485254dfae5a72cFg
10: 0x7fa54cf6bb30 - middle::borrowck::move_data::FlowedMoveData<'a, 'tcx>::new::h992ddcd9e1966007F9h
11: 0x7fa54cf76a60 - middle::borrowck::build_borrowck_dataflow_data::ha030304e52c4fd74Pui
12: 0x7fa54cf73ae0 - middle::borrowck::borrowck_fn::h5c20904efff1f8a4Nri
13: 0x7fa54cf75b80 - visit::walk_item::h10222699424413289430
14: 0x7fa54cf748e0 - visit::walk_mod::h7223407092731541154
15: 0x7fa54cf742e0 - middle::borrowck::check_crate::haaa04dfbd8f4f7fbjki
16: 0x7fa54f1309e0 - util::common::time::h6027610953602738173
17: 0x7fa54f0f1300 - driver::phase_3_run_analysis_passes::h63031984c677effauta
18: 0x7fa54f0e0100 - driver::compile_input::h022976239e8f5a3cpba
19: 0x7fa54f17cd80 - run_compiler::h2b243518ea560709z4b
20: 0x7fa54f17cc70 - run::closure.21242
21: 0x7fa54f18e670 - task::TaskBuilder::try_future::closure.22690
22: 0x7fa54ec94410 - task::TaskBuilder::spawn_internal::closure.31179
23: 0x7fa54e90fd70 - task::Task::spawn::closure.5765
24: 0x7fa54e96d280 - rust_try_inner
25: 0x7fa54e96d270 - rust_try
26: 0x7fa54e90fe50 - unwind::try::ha36bc8815a761f13pFc
27: 0x7fa54e90fc10 - task::Task::run::h24525a73fb4c9bb3fOb
28: 0x7fa54e90f800 - task::Task::spawn::closure.5741
29: 0x7fa54e911250 - thread::thread_start::ha943fdda31374bc3i6b
30: 0x7fa5498110c0 - start_thread
31: 0x7fa54e5d5ec9 - __clone
32: 0x0 - <unknown>"><pre class="notranslate"><code class="notranslate">task 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/option.rs:358
stack backtrace:
1: 0x7fa54ecbbe50 - rt::backtrace::imp::write::hf87c140cfcd95fbaBly
2: 0x7fa54ecbf0a0 - failure::on_fail::h343c4b97464b676eZNy
3: 0x7fa54e911fa0 - unwind::begin_unwind_inner::hb4b9831d2f5e86936Qc
4: 0x7fa54e911bd0 - unwind::begin_unwind_fmt::h5c8826b0094c4275hOc
5: 0x7fa54e911b90 - rust_begin_unwind
6: 0x7fa54e95a4a0 - panicking::panic_fmt::h55316e4e118a4d4bcxl
7: 0x7fa54e9581a0 - panicking::panic::h0e0d0e8df2dbf5d1eul
8: 0x7fa54cf64950 - middle::borrowck::move_data::fragments::add_fragment_siblings::hf1c2017286e03984bYg
9: 0x7fa54cf61970 - middle::borrowck::move_data::fragments::fixup_fragment_sets::h5d485254dfae5a72cFg
10: 0x7fa54cf6bb30 - middle::borrowck::move_data::FlowedMoveData<'a, 'tcx>::new::h992ddcd9e1966007F9h
11: 0x7fa54cf76a60 - middle::borrowck::build_borrowck_dataflow_data::ha030304e52c4fd74Pui
12: 0x7fa54cf73ae0 - middle::borrowck::borrowck_fn::h5c20904efff1f8a4Nri
13: 0x7fa54cf75b80 - visit::walk_item::h10222699424413289430
14: 0x7fa54cf748e0 - visit::walk_mod::h7223407092731541154
15: 0x7fa54cf742e0 - middle::borrowck::check_crate::haaa04dfbd8f4f7fbjki
16: 0x7fa54f1309e0 - util::common::time::h6027610953602738173
17: 0x7fa54f0f1300 - driver::phase_3_run_analysis_passes::h63031984c677effauta
18: 0x7fa54f0e0100 - driver::compile_input::h022976239e8f5a3cpba
19: 0x7fa54f17cd80 - run_compiler::h2b243518ea560709z4b
20: 0x7fa54f17cc70 - run::closure.21242
21: 0x7fa54f18e670 - task::TaskBuilder::try_future::closure.22690
22: 0x7fa54ec94410 - task::TaskBuilder::spawn_internal::closure.31179
23: 0x7fa54e90fd70 - task::Task::spawn::closure.5765
24: 0x7fa54e96d280 - rust_try_inner
25: 0x7fa54e96d270 - rust_try
26: 0x7fa54e90fe50 - unwind::try::ha36bc8815a761f13pFc
27: 0x7fa54e90fc10 - task::Task::run::h24525a73fb4c9bb3fOb
28: 0x7fa54e90f800 - task::Task::spawn::closure.5741
29: 0x7fa54e911250 - thread::thread_start::ha943fdda31374bc3i6b
30: 0x7fa5498110c0 - start_thread
31: 0x7fa54e5d5ec9 - __clone
32: 0x0 - <unknown>
</code></pre></div>
<p dir="auto">rustc 0.13.0-nightly (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/8bca470c5acf13aa20022a2c462a89f72de721fc/hovercard" href="https://github.com/rust-lang/rust/commit/8bca470c5acf13aa20022a2c462a89f72de721fc"><tt>8bca470</tt></a> 2014-12-08 00:12:30 +0000)<br>
binary: rustc<br>
commit-hash: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/8bca470c5acf13aa20022a2c462a89f72de721fc/hovercard" href="https://github.com/rust-lang/rust/commit/8bca470c5acf13aa20022a2c462a89f72de721fc"><tt>8bca470</tt></a><br>
commit-date: 2014-12-08 00:12:30 +0000<br>
host: x86_64-unknown-linux-gnu<br>
release: 0.13.0-nightly</p>
<p dir="auto">Ubuntu 14.04.1</p> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 0.13.0-nightly (eedfc0779 2014-11-25 22:36:59 +0000)
binary: rustc
commit-hash: eedfc077964b811315589d9a70293d3ff2eb0e1d
commit-date: 2014-11-25 22:36:59 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 0.13.0-nightly (eedfc0779 2014-11-25 22:36:59 +0000)
binary: rustc
commit-hash: eedfc077964b811315589d9a70293d3ff2eb0e1d
commit-date: 2014-11-25 22:36:59 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-nightly
</code></pre></div>
<p dir="auto"><code class="notranslate">cargo 0.0.1-pre-nightly (1bdfb25 2014-11-20 19:29:22 +0000)</code><br>
<code class="notranslate">Linux DARKBLUE 3.17.2-1-ARCH #1 SMP PREEMPT Thu Oct 30 20:49:39 CET 2014 x86_64 GNU/Linux</code></p>
<p dir="auto">Wish I could offer up the code; but it's a closed source project.<br>
This code does nothing w/ lifetime parameters or stored references, though. There's just a few boxed traits w/ a +'static bound.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/option.rs:357"><pre class="notranslate"><code class="notranslate">error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/option.rs:357
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="stack backtrace:
1: 0x7f0ef3bf26c0 - rt::backtrace::imp::write::haa47b8c121fd0a91H4x
2: 0x7f0ef3bf5790 - failure::on_fail::h677b2ecbbc3adea62wy
3: 0x7f0ef38482b0 - unwind::begin_unwind_inner::h6076ba341dd042bdYQc
4: 0x7f0ef3847f30 - unwind::begin_unwind_fmt::h6dced2c2ae1fae959Nc
5: 0x7f0ef3847ef0 - rust_begin_unwind
6: 0x7f0ef388dab0 - panicking::panic_fmt::h22463fd9b1161919gSl
7: 0x7f0ef388b7b0 - panicking::panic::hfa5ca29d7f8b5263iPl
8: 0x7f0ef25ae0b0 - middle::borrowck::move_data::fragments::add_fragment_siblings::h8118dbea1986aaff4Rg
9: 0x7f0ef25ab0d0 - middle::borrowck::move_data::fragments::fixup_fragment_sets::h1b34a6c0035ee1265yg 10: 0x7f0ef25b4fa0 - middle::borrowck::move_data::FlowedMoveData<'a, 'tcx>::new::he628f6d1fa80b0e3y3h
11: 0x7f0ef25bfc90 - middle::borrowck::build_borrowck_dataflow_data::h16660f26c7d289feIoi
12: 0x7f0ef25bccd0 - middle::borrowck::borrowck_fn::h99143b7aee997f1fGli
13: 0x7f0ef25be390 - visit::walk_expr::h17909264982202915119
14: 0x7f0ef25be390 - visit::walk_expr::h17909264982202915119
15: 0x7f0ef25be8b0 - visit::walk_block::h5615061091049522259
16: 0x7f0ef25bccd0 - middle::borrowck::borrowck_fn::h99143b7aee997f1fGli
17: 0x7f0ef25beda0 - visit::walk_item::h7689556238676702768
18: 0x7f0ef25bdad0 - visit::walk_mod::h6852191264437528935
19: 0x7f0ef25bdad0 - visit::walk_mod::h6852191264437528935
20: 0x7f0ef25bdad0 - visit::walk_mod::h6852191264437528935
21: 0x7f0ef25bd4d0 - middle::borrowck::check_crate::h6431f8fff14c57bbcei
22: 0x7f0ef40810e0 - util::common::time::h1653906380813325966
23: 0x7f0ef4218b40 - driver::driver::phase_3_run_analysis_passes::h1e6ec93ec340b11aVlS
24: 0x7f0ef420dbc0 - driver::driver::compile_input::h3650ea3ea9db5c1312R
25: 0x7f0ef4291a60 - driver::run_compiler::h8c15fe2011461f3690T
26: 0x7f0ef4291950 - driver::run::closure.59868
27: 0x7f0ef4099b60 - task::TaskBuilder::try_future::closure.38986
28: 0x7f0ef3bc33d0 - task::TaskBuilder::spawn_internal::closure.30137
29: 0x7f0ef38460d0 - task::Task::spawn::closure.5703
30: 0x7f0ef38a0760 - rust_try_inner 31: 0x7f0ef38a0750 - rust_try
32: 0x7f0ef38461b0 - unwind::try::he2929ed1852ce283jFc
33: 0x7f0ef3845f70 - task::Task::run::h9debf4f19d281b44cOb
34: 0x7f0ef3845b60 - task::Task::spawn::closure.5679
35: 0x7f0ef38475b0 - thread::thread_start::hbf69e7ffa558b448f6b
36: 0x7f0eee597250 - start_thread
37: 0x7f0ef3518589 - clone
38: 0x0 - <unknown>
Could not compile `kyrie`. "><pre class="notranslate"><code class="notranslate">stack backtrace:
1: 0x7f0ef3bf26c0 - rt::backtrace::imp::write::haa47b8c121fd0a91H4x
2: 0x7f0ef3bf5790 - failure::on_fail::h677b2ecbbc3adea62wy
3: 0x7f0ef38482b0 - unwind::begin_unwind_inner::h6076ba341dd042bdYQc
4: 0x7f0ef3847f30 - unwind::begin_unwind_fmt::h6dced2c2ae1fae959Nc
5: 0x7f0ef3847ef0 - rust_begin_unwind
6: 0x7f0ef388dab0 - panicking::panic_fmt::h22463fd9b1161919gSl
7: 0x7f0ef388b7b0 - panicking::panic::hfa5ca29d7f8b5263iPl
8: 0x7f0ef25ae0b0 - middle::borrowck::move_data::fragments::add_fragment_siblings::h8118dbea1986aaff4Rg
9: 0x7f0ef25ab0d0 - middle::borrowck::move_data::fragments::fixup_fragment_sets::h1b34a6c0035ee1265yg 10: 0x7f0ef25b4fa0 - middle::borrowck::move_data::FlowedMoveData<'a, 'tcx>::new::he628f6d1fa80b0e3y3h
11: 0x7f0ef25bfc90 - middle::borrowck::build_borrowck_dataflow_data::h16660f26c7d289feIoi
12: 0x7f0ef25bccd0 - middle::borrowck::borrowck_fn::h99143b7aee997f1fGli
13: 0x7f0ef25be390 - visit::walk_expr::h17909264982202915119
14: 0x7f0ef25be390 - visit::walk_expr::h17909264982202915119
15: 0x7f0ef25be8b0 - visit::walk_block::h5615061091049522259
16: 0x7f0ef25bccd0 - middle::borrowck::borrowck_fn::h99143b7aee997f1fGli
17: 0x7f0ef25beda0 - visit::walk_item::h7689556238676702768
18: 0x7f0ef25bdad0 - visit::walk_mod::h6852191264437528935
19: 0x7f0ef25bdad0 - visit::walk_mod::h6852191264437528935
20: 0x7f0ef25bdad0 - visit::walk_mod::h6852191264437528935
21: 0x7f0ef25bd4d0 - middle::borrowck::check_crate::h6431f8fff14c57bbcei
22: 0x7f0ef40810e0 - util::common::time::h1653906380813325966
23: 0x7f0ef4218b40 - driver::driver::phase_3_run_analysis_passes::h1e6ec93ec340b11aVlS
24: 0x7f0ef420dbc0 - driver::driver::compile_input::h3650ea3ea9db5c1312R
25: 0x7f0ef4291a60 - driver::run_compiler::h8c15fe2011461f3690T
26: 0x7f0ef4291950 - driver::run::closure.59868
27: 0x7f0ef4099b60 - task::TaskBuilder::try_future::closure.38986
28: 0x7f0ef3bc33d0 - task::TaskBuilder::spawn_internal::closure.30137
29: 0x7f0ef38460d0 - task::Task::spawn::closure.5703
30: 0x7f0ef38a0760 - rust_try_inner 31: 0x7f0ef38a0750 - rust_try
32: 0x7f0ef38461b0 - unwind::try::he2929ed1852ce283jFc
33: 0x7f0ef3845f70 - task::Task::run::h9debf4f19d281b44cOb
34: 0x7f0ef3845b60 - task::Task::spawn::closure.5679
35: 0x7f0ef38475b0 - thread::thread_start::hbf69e7ffa558b448f6b
36: 0x7f0eee597250 - start_thread
37: 0x7f0ef3518589 - clone
38: 0x0 - <unknown>
Could not compile `kyrie`.
</code></pre></div> | 1 |
<h2 dir="auto">Environment info</h2>
<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 3.1.0</li>
<li>Platform: Linux-3.10.0-1127.el7.x86_64-x86_64-with-debian-buster-sid</li>
<li>Python version: 3.7.0</li>
<li>PyTorch version (GPU?): 1.5.1 (True)</li>
<li>Tensorflow version (GPU?): 2.2.0 (False)</li>
<li>Using GPU in script?: yes</li>
<li>Using distributed or parallel set-up in script?: distributed</li>
</ul>
<h3 dir="auto">Who can help</h3>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/LysandreJik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/LysandreJik">@LysandreJik</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sgugger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sgugger">@sgugger</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/patrickvonplaten/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/patrickvonplaten">@patrickvonplaten</a></p>
<h2 dir="auto">Information</h2>
<p dir="auto">Model I am using (Bert, GPT2):</p>
<p dir="auto">The problem arises when using:</p>
<ul class="contains-task-list">
<li>[ X] the official example scripts: (give details below)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> my own modified scripts: (give details below)</li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> an official GLUE/SQUaD task: (give the name)</li>
<li>[X ] my own task or dataset: (give details below)</li>
</ul>
<h2 dir="auto">To reproduce</h2>
<p dir="auto">When I pretrain or fine tune a model (in my case BERT and GPT2) using torch.distributed.launch, the CPU memory usage will grow up to the memory limit (>500GB) until the first process is killed due to this issue. If I train bert-base, it takes around 30 epochs until the first process is killed, but when I train gpt-large, it just need 3 epochs until it is killed. Following is the command line I run to train/fine tune the bert-base (similar with gpt2). The script run_language_modeling.py is a copy of transformers/examples/language-modeling/run_language_modeling.py (vers. 3.1.0)</p>
<p dir="auto">python -m torch.distributed.launch --nproc_per_node=8 <br>
../run_language_modeling.py <br>
--output_dir $model_target <br>
--model_name_or_path $model_source <br>
--config_name $model_source <br>
--tokenizer_name $model_source <br>
--train_data_file $target_train <br>
--eval_data_file $target_test <br>
--save_total_limit 5 <br>
--block_size 128 <br>
--overwrite_output_dir <br>
--fp16 <br>
--num_train_epochs 50 <br>
--do_train --do_eval <br>
--per_device_train_batch_size 32 <br>
--per_device_eval_batch_size 4 <br>
--mlm</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">I would expect that the distributed training run until it is done without any memory issue.<br>
Thanks for checking it.</p> | <h2 dir="auto">Environment info</h2>
<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 3.0.2</li>
<li>Platform: Linux-5.3.0</li>
<li>Python version: 3.6.10</li>
<li>PyTorch version (GPU?): 1.6.0 (True)</li>
<li>Tensorflow version (GPU?): 2.3.0 (True)</li>
<li>Using GPU in script?: Yes</li>
<li>Using distributed or parallel set-up in script?: Distributed</li>
</ul>
<h3 dir="auto">Who can help</h3>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/LysandreJik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/LysandreJik">@LysandreJik</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sgugger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sgugger">@sgugger</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/patrickvonplaten/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/patrickvonplaten">@patrickvonplaten</a></p>
<h2 dir="auto">Information</h2>
<p dir="auto">I am using 8xV100s (32GB). The script (<code class="notranslate">run_training.py</code>) works when running on a single machine but I am running into the <code class="notranslate">CUDA out of memory</code> when trying to run distributed training. The behavior is consistent whether or not <code class="notranslate">fp16</code> is <code class="notranslate">True</code>. I am using the publicly available wikitext data.</p>
<p dir="auto">Model I am using (Bert, XLNet ...): Bert</p>
<p dir="auto">The problem arises when using:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> the official example scripts: (give details below)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> my own modified scripts: (give details below)</li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> an official GLUE/SQUaD task: (give the name)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> my own task or dataset: (give details below)</li>
</ul>
<h2 dir="auto">To reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>My code is <code class="notranslate">run_training.py</code>:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bert_config = BertConfig(hidden_size=768, num_attention_heads=12)
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
model = BertForPreTraining(config=bert_config)
train_dataset = TextDatasetForNextSentencePrediction(tokenizer=tokenizer, file_path=args.train_data_file, block_size=args.max_length)
data_collator = DataCollatorForNextSentencePrediction(tokenizer=tokenizer, mlm_probability=args.mlm_probability)
trainer = Trainer(
model=model,
args=training_args,
data_collator=data_collator,
train_dataset=train_dataset
)
global_steps, training_loss = trainer.train()"><pre class="notranslate"><code class="notranslate">bert_config = BertConfig(hidden_size=768, num_attention_heads=12)
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
model = BertForPreTraining(config=bert_config)
train_dataset = TextDatasetForNextSentencePrediction(tokenizer=tokenizer, file_path=args.train_data_file, block_size=args.max_length)
data_collator = DataCollatorForNextSentencePrediction(tokenizer=tokenizer, mlm_probability=args.mlm_probability)
trainer = Trainer(
model=model,
args=training_args,
data_collator=data_collator,
train_dataset=train_dataset
)
global_steps, training_loss = trainer.train()
</code></pre></div>
<ol start="2" dir="auto">
<li>Run the script in distributed mode:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python -m torch.distributed.launch \
--nnodes={num_nodes} \
--node_rank={rank} \
--nproc_per_node=8 \
--run_training.py \
--max_steps 50 " \
--train_data_file {train_data_file} " \
--eval_data_file {test_data_file} " \
--logging_dir {output_dir} \
--fp16 False " \
--gradient_accumulation_steps 1 " \
--per_gpu_train_batch_size 1 \
--per_gpu_eval_batch_size 1"><pre class="notranslate"><code class="notranslate">python -m torch.distributed.launch \
--nnodes={num_nodes} \
--node_rank={rank} \
--nproc_per_node=8 \
--run_training.py \
--max_steps 50 " \
--train_data_file {train_data_file} " \
--eval_data_file {test_data_file} " \
--logging_dir {output_dir} \
--fp16 False " \
--gradient_accumulation_steps 1 " \
--per_gpu_train_batch_size 1 \
--per_gpu_eval_batch_size 1
</code></pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Given that the script works fine (i.e., not run into the out of memory issue) on a single machine, I would expect multi-node to be the same. Any insight into what might be going on is appreciated!</p> | 1 |
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alefragnani/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alefragnani">@alefragnani</a> on November 4, 2015 1:12</em></p>
<p dir="auto">Is there a <em>correct way</em> to replace core commands?<br>
<em>(of course, if this is something that is available or in the roadmap)</em></p>
<p dir="auto">My intention is to create an extension to replace <em>Edit / Copy (<code class="notranslate">editor.action.clipboardCopyAction</code>)</em> and <em>Edit / Cut (<code class="notranslate">editor.action.clipboardCutAction</code>)</em> commands. So, when there is no selection, the <em>Copy/Cut</em> would use the <em>current word</em> instead of the <em>entire line</em>.</p>
<p dir="auto">About coding, I can:</p>
<ul dir="auto">
<li>Determine the word based on the cursor position</li>
<li>Select the word</li>
<li>Execute <code class="notranslate">vscode.commands.executeCommand("editor.action.clipboardCopyAction")</code></li>
<li>Remove the selection, returning the cursor to its initial position.</li>
</ul>
<p dir="auto">But I was wondering if there is something else that I could (or couldn't) do, like defining the <code class="notranslate">keybindings</code> in <code class="notranslate">package.json</code> to <code class="notranslate">Ctrl + C / Ctrl + X</code>; or define <code class="notranslate">vscode.commands.registerCommand</code> for the core command, with my own code.</p>
<p dir="auto">Thanks in advance</p>
<p dir="auto"><em>Copied from original issue: Microsoft/vscode-extensionbuilders#79</em></p> | <p dir="auto">Currently, reopen files behaviour is slightly weird. If no folders are open, no files are reopened upon restart of VSC. If a folder is open, any files that are opened, inside the opened folder or not, are reopened upon restart of VSC.</p>
<p dir="auto">I would like to see VSC reopen files, regardless the opened folder count. Should probably be settable in the preferences, I can imagine not everyone is interested in this behaviour.</p> | 0 |
<p dir="auto">Tried memory allocation debugging with --track-allocation=user and --track-allocation=all with version 0.3.4 and 0.4: Problem โ *.mem files not written out for user source code on Windows 7. *.mem files written out only for Julia core files.</p> | <p dir="auto">I'm working at packaging entire Julia packages repository for the Nix package manager. One of things that might help me very much is packages' dependencies information. Right now I'm parsing <code class="notranslate">REQUIRES</code> files by myself to make Nix packages -- that's an unfortunate code duplication given that somewhere inside <code class="notranslate">pkg</code> we already have code which does exactly the thing. I imagine this as some function <code class="notranslate">dependencies(pkg :: String) -> Requirement[]</code>.</p> | 0 |
<p dir="auto">Currently, downloaded dependencies seem to be stored with the scheme <code class="notranslate">$DENO_DIR/deps/$PROTOCOL/$ORIGIN/$CHECKSUM</code>. I use neovim and <a href="https://github.com/fannheyward/coc-deno/issues">coc-deno</a>, and when I jump to definition, Iโm sent to these cached files. My current problem is that I donโt get syntax highlighting because for my editor, this works based off file extension. I could probably fix this problem myself with editor configuration but it would be nice if DENO added file extensions so that the cached path was something like <code class="notranslate">$DENO_DIR/deps/$PROTOCOL/$ORIGIN/$CHECKSUM.$EXTENSION</code>.</p>
<p dir="auto">The big thing Iโm thinking about is what the file extension should be. If Deno only intends to store javascript/typescript files in the cache, then maybe <code class="notranslate">.jsx?</code> or <code class="notranslate">.tsx?</code> would suffice? Or maybe Deno could use an algorithm like: check if the URL path has an extension and use that, otherwise, check if the response has a Content-Type header and use the related canonical file extension, otherwise donโt use a file extension.</p> | <p dir="auto">The current cache filenames and layout is unfortunate.</p>
<ol dir="auto">
<li>It breaks code navigation. Code for the Deno runtime can only be written in editors that implement the workarounds to locate the files.</li>
<li>The workarounds required are non-trivial for editors like vim.</li>
<li>Files are extension-less which breaks a lot of editors (no syntax highlighting, etc) such as VSCode.</li>
<li>Editor tab bars are rendered useless. Open these files for viewing in an editor and you have tabs with names like "b7953a2fe90b56defc2c4cbba3f7f8b963cf2a38e587d20c3ffcd11e95f4fb64"</li>
</ol>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="573271390" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/4183" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/4183/hovercard" href="https://github.com/denoland/deno/issues/4183">#4183</a></p>
<p dir="auto">As I suggested in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="569113567" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/4069" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/4069/hovercard?comment_id=592305083&comment_type=issue_comment" href="https://github.com/denoland/deno/issues/4069#issuecomment-592305083">#4069 (comment)</a>, the file names need to be more descriptive.</p>
<ol dir="auto">
<li>All cached files should have an extension. I would suggest TSX for <a href="https://en.wikipedia.org/wiki/MPEG_transport_stream" rel="nofollow">compatibility</a>.</li>
<li>The hash should be prefixed with a descriptive name.</li>
</ol>
<p dir="auto">The proposed filename format is:</p>
<p dir="auto">"[stripped-file-basename]_[hash].[appended-extension-from-content-type]"</p>
<p dir="auto">Example</p>
<blockquote>
<p dir="auto">yaml_b7953a2fe90b56defc2c4cbba3f7f8b963cf2a38e587d20c3ffcd11e95f4fb64.tsx</p>
</blockquote> | 1 |
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong><br>
Requiring or importing a json file starting with a byte order mark \ufeff, commonly added by Microsoft editors, in webpack 4 causes the following error:</p>
<blockquote>
<p dir="auto">Unexpected token ๏ปฟ in JSON at position 0</p>
</blockquote>
<p dir="auto">webpack 3 handles this though.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
<a href="https://github.com/gatimus/webpack-json-bom/tree/webpack-4">https://github.com/gatimus/webpack-json-bom/tree/webpack-4</a><br>
<code class="notranslate">npm start</code></p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
<a href="https://github.com/gatimus/webpack-json-bom/tree/webpack-3">https://github.com/gatimus/webpack-json-bom/tree/webpack-3</a><br>
<code class="notranslate">npm start</code></p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 4.8.3<br>
Node.js version: 8.11.1<br>
Operating System: Win 10</p> | <h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong><br>
Requiring or importing a json file starting with the zero length, white space character, byte order mark (\ufeff), commonly added by Microsoft editors, in webpack 4 causes the following error:</p>
<blockquote>
<p dir="auto">Unexpected token ๏ปฟ in JSON at position 0</p>
</blockquote>
<p dir="auto">webpack 3 handles this with out error though.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
<a href="https://github.com/gatimus/webpack-json-bom/tree/webpack-4">https://github.com/gatimus/webpack-json-bom/tree/webpack-4</a></p>
<ul dir="auto">
<li>clone <a href="https://github.com/gatimus/webpack-json-bom">https://github.com/gatimus/webpack-json-bom</a></li>
<li>checkout branch webpack-4</li>
<li><code class="notranslate">npm i</code></li>
<li><code class="notranslate">npm start</code></li>
</ul>
<blockquote>
<p dir="auto">Unexpected token ๏ปฟ in JSON at position 0</p>
</blockquote>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
<a href="https://github.com/gatimus/webpack-json-bom/tree/webpack-3">https://github.com/gatimus/webpack-json-bom/tree/webpack-3</a></p>
<ul dir="auto">
<li>clone <a href="https://github.com/gatimus/webpack-json-bom">https://github.com/gatimus/webpack-json-bom</a></li>
<li>checkout branch webpack-3</li>
<li><code class="notranslate">npm i</code></li>
<li><code class="notranslate">npm start</code><br>
no errors</li>
</ul>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 4.8.3<br>
Node.js version: 8.11.1<br>
Operating System: Win 10</p>
<p dir="auto">I don't know how webpack 3 handles it but calling <code class="notranslate">.trim()</code> or <code class="notranslate">.replace('\ufeff', '')</code> on the file contents before passing to <code class="notranslate">JSON.parse()</code> would solve.</p> | 1 |
<p dir="auto">Atom is updating fine but 'Help' > 'Release Notes' gives me an old stale version with an active restart and update button.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3242316/5773581/64818ffc-9d64-11e4-9e25-6227464c88ae.jpg"><img src="https://cloud.githubusercontent.com/assets/3242316/5773581/64818ffc-9d64-11e4-9e25-6227464c88ae.jpg" alt="atom" style="max-width: 100%;"></a></p>
<p dir="auto">First time I installed Atom was 2-3 months ago before auto-updating was added (direct, not through chocolatey) so that could potentially be a clue. Haven't tried a complete nuke and re-install yet.</p>
<p dir="auto">Atom 0.174.0 at Win 8.1 64bit</p> | <p dir="auto">I use Atom on two different machines and I'm seeing anomalies when looking at the release notes. On one of my machines the release notes are always blank with only a button showing to view previous release notes. On the other machine the release notes are old. Here is a current screenshot but keep in mind this isn't the only time the release notes have been outdated compared to the release I was using.</p>
<p dir="auto">Currently using Atom 0.136 on Windows 8.1 (on two different systems).</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/190154/4561202/e6b3c3f4-4efa-11e4-917c-87407b1d7419.png"><img src="https://cloud.githubusercontent.com/assets/190154/4561202/e6b3c3f4-4efa-11e4-917c-87407b1d7419.png" alt="atom-release-notes-problem" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">The [src] link at <a href="http://static.rust-lang.org/doc/master/std/prelude/index.html" rel="nofollow">http://static.rust-lang.org/doc/master/std/prelude/index.html</a><br>
points to <a href="http://static.rust-lang.org/doc/master/src/std/home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libstd/lib.rs.html#99" rel="nofollow">http://static.rust-lang.org/doc/master/src/std/home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libstd/lib.rs.html#99</a><br>
instead of <a href="http://static.rust-lang.org/doc/master/src/std/home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libstd/prelude.rs.html" rel="nofollow">http://static.rust-lang.org/doc/master/src/std/home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libstd/prelude.rs.html</a></p>
<p dir="auto">Just a small issue I noticed. I hope reporting it helps!</p> | <p dir="auto">The source link for <a href="http://static.rust-lang.org/doc/master/std/any/index.html" rel="nofollow">Any</a> links to the <a href="http://static.rust-lang.org/doc/master/src/std/home/rustbuild/src/rust-buildbot/slave/doc/build/src/libstd/lib.rs.html#152" rel="nofollow">module declaration</a> in lib.rs instead of the more useful file, any.rs.</p> | 1 |
<p dir="auto">This issue describes a design for an injectable alternative to <code class="notranslate">@CanActivate</code></p>
<p dir="auto">It is both a fresh start and a continuation of the conversations associated with issues <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="58469474" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/748" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/748/hovercard" href="https://github.com/angular/angular/issues/748">#748</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="105758695" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/4112" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/4112/hovercard" href="https://github.com/angular/angular/issues/4112">#4112</a> and tangentially in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="136037476" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/7256" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/7256/hovercard" href="https://github.com/angular/angular/issues/7256">#7256</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="94122106" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/2965" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/2965/hovercard" href="https://github.com/angular/angular/issues/2965">#2965</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="133821990" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/7091" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/7091/hovercard" href="https://github.com/angular/angular/issues/7091">#7091</a></p>
<hr>
<p dir="auto">I've been talking to the team about these router hook methods. I have a good feeling about an emerging design that should arrive before RC. I thought I'd share it here so we can get some feedback.</p>
<p dir="auto">CAVEAT: this is <em>Ward's</em> interpretation of what he <em>thinks</em> he heard which may vary from the team's interpretation and is not necessarily what will happen.</p>
<p dir="auto">As I understand it, <code class="notranslate">CanActivate</code> will become an instance method, probably named <strong><code class="notranslate">routerCanActivate</code></strong>.</p>
<p dir="auto">The catch is that we implement <code class="notranslate">routerCanActivate</code> on (what I call) a <strong>_routing component</strong>_: a component with an attached router and routes and whose template includes a <code class="notranslate"><router-outlet></code>.</p>
<blockquote>
<p dir="auto">We didn't talk about it but I think Angular should ignore it on a non-routing component or perhaps throw an error.</p>
</blockquote>
<p dir="auto">The router will consult this method before pursuing any of the routes that would populate that <code class="notranslate"><router-outlet></code>. It gates navigation to any of the routes configured for this component's router.</p>
<p dir="auto">To be clear, it has no role in allowing/preventing navigation to <em>the routing component itself</em>; only navigation to the routes configured for this routing component's <code class="notranslate"><router-outlet></code>.</p>
<p dir="auto">As an instance method, the <code class="notranslate">routerCanActivate</code> has access to anything we inject into its routing component. The injector (and its scope) is that of this routing component.</p>
<p dir="auto">I think this addresses many concerns:</p>
<ol dir="auto">
<li>We can inject anything we need without crazy hacks</li>
<li>We can scope injection at an appropriate level in the component tree. We don't have to capture the root injector and hope that the service we need has been provided there. We can access services injected "down here", at the local router configuration level.</li>
<li>We can make decisions about whether to allow navigation to a lazy loaded component. Before we would have had to load that component and call its <code class="notranslate">@CanActivate</code>, perhaps only to belatedly disallow it.</li>
</ol>
<p dir="auto">I had a few initial objections:</p>
<ol dir="auto">
<li>I didn't think the routing component should be responsible for <em>can activate</em> decisions about all of its routes.</li>
<li>Why should it know all of the details about whether a route's navigation should be allowed? That's a decision that belongs to the destination component, right?</li>
<li>Some people have used <code class="notranslate">CanActivate</code> to pre-load data from the server for the destination component. There won't be an obvious way to do that with this design which doesn't provide a way to deliver a payload to the destination component.</li>
<li>The <em>can activate</em> logic has access to services at the routing component level and above but not the services (if any) that will be provided by (and therefore scoped at) the destination component itself. That could be too limiting.</li>
</ol>
<p dir="auto">Here is why these objections no longer trouble me.</p>
<ol dir="auto">
<li>
<p dir="auto">If deciding is a burden, the routing component can delegate that burden to a custom injected <code class="notranslate">CanActivateService</code>, scoped to the routing component itself. That service can inject much of what it needs to make decisions. The routing component can stay lean. This is <em>our</em> decision as application developers; Angular 2 neither requires it nor blocks it. I like that.</p>
</li>
<li>
<p dir="auto">While I like the idea that the <em>can activate</em> logic is part of the development of the destination component, that logic doesn't have to be inscribed within the destination component class. We can come up with other patterns that will work well, particularly in concert with the <code class="notranslate">CanActivateService</code> approach I just mentioned. I think we can get the allocation of responsibilities right without too much friction. And this approach does put us in position to gate navigation to a lazy-loaded destination component which I think is the more important benefit.</p>
</li>
<li>
<p dir="auto">Actually, I always thought using <em>can activate</em> logic to pre-load data was a hack. Many folks did that kind of thing with resolve in Angular 1. I never liked it. Please don't bring back <code class="notranslate">resolve</code>!</p>
<p dir="auto">But like/dislike aside, we don't need it in Angular 2. In Angular 2, we have both the <code class="notranslate">routerOnActivate</code> and the <code class="notranslate">ngOnInit</code> hooks (missing in Angular 1) which are fine places to pre-load data.</p>
</li>
<li>
<p dir="auto">I couldn't think of a use case in which it was essential that we consult a service instance created just for the destination component. OTOH, if we <em>could</em> do that, we'd be faced with the obligation to create such a service which brings unwanted complexity of its own.</p>
<p dir="auto">For example, if we allow navigation, we have to make sure that service (whatever it is), is ultimately injected into the destination component. There is no facility for doing that kind of thing today. Today we can't access the internal steps that go into hydrating a component ... and I rather doubt I'd want to risk what comes with breaking into that sausage factory.</p>
<p dir="auto">What if we created that service and then <em>rejected</em> the navigation? What did that service do? Did it know it was going to be created and then thrown away? Does it need to be cleaned up before being thrown away. It's a horrible can of worms.</p>
</li>
</ol>
<p dir="auto">In the end, I think this design will work well for us. It's safe, clean, easy to understand once explained.</p>
<p dir="auto"><strong>Angular consults a routing component's <code class="notranslate">routerCanActivate</code> method before navigating to any of the routes defined for that component's router.</strong></p>
<p dir="auto">I don't know what the method parameters will be. Obviously something about where the router is going. This is a good time for you all to chime in.</p>
<p dir="auto">p.s.: I don't know what will become of the current <code class="notranslate">@CanActivate</code> decorator. I suppose it could live on as a vestigial relic. Personally, I'd vote for it to be deprecated immediately and removed before release.</p>
<p dir="auto">p.p.s.: I have stopped thinking that the <code class="notranslate">routerOnActivate</code> method is or could be a substitute for <code class="notranslate">routerCanActivate</code> (quite apart from the fact that it doesn't work as a substitute today).</p>
<p dir="auto">It should not be involved in the decision about whether we should navigate to this component. It should concentrate on what to do <em>now that we're here</em>. And in that respect it should differentiate from its companion hook method, <code class="notranslate">routerOnReuse</code>, which concerns what to do <em>now that we're back</em>.</p> | <p dir="auto">Puzzling with SubRouters in Angular 2 I stumbled upon this issues</p>
<p dir="auto"><em>Assumption</em>: I'm not very confident due to the state of beta and lack of firm stance in the documentation, but it seems that only root router defined paths will use query (optional) parameters and all sub-routers seems to use <a href="https://www.w3.org/DesignIssues/MatrixURIs.html" rel="nofollow">Matrix URLs</a> for optional parameters.</p>
<p dir="auto">There are couple of issues as of <code class="notranslate">beta-15</code>:</p>
<ol dir="auto">
<li>
<p dir="auto">[routerLink] generates query parameters, instead of matrix ones for links to sub-routes. Is this expected behaviour?</p>
<blockquote>
<p dir="auto">In this case <code class="notranslate">routeParams.get()</code> <strong>doesn't</strong> work probably by design, because it expects matrix params.</p>
</blockquote>
</li>
<li>
<p dir="auto">Router.navigate() <strong>doesn't</strong> convert query parameters to martix one for sub-routes also. Is this expected behavior?</p>
<blockquote>
<p dir="auto">In this case <code class="notranslate">routeParams.get()</code>, also <strong>doesn't</strong> work probably by design, because it expects matrix params.</p>
</blockquote>
</li>
<li>
<p dir="auto">It does so on page reload or direct hit. (Try it: <a href="http://run.plnkr.co/plunks/x7rR4NfZMLYj34IyCiyI/?value=2" rel="nofollow">http://run.plnkr.co/plunks/x7rR4NfZMLYj34IyCiyI/?value=2</a>)</p>
<blockquote>
<p dir="auto"><code class="notranslate">?value=2</code> becomes <code class="notranslate">/;value=2?value=2</code><br>
In this case <code class="notranslate">routeParams.get()</code> <strong>do</strong> work and gets the matrix parameter value!</p>
</blockquote>
</li>
<li>
<p dir="auto">(side issue) On page reload the router (I assume correctly) converts query params to matrix one, but leaves query ones duplicated. (<code class="notranslate">?value=2</code> becomes <code class="notranslate">/;value=2?value=2</code>).</p>
<blockquote>
<p dir="auto">In this case <code class="notranslate">routeParams.get()</code> <strong>do</strong> work and gets the matrix parameter value, <strong>but</strong> leaves duplicates!</p>
</blockquote>
</li>
</ol>
<p dir="auto">To sum it, in current state of <code class="notranslate">[routerLink]</code>, <code class="notranslate">Router.navigate()</code> and <code class="notranslate">routeParams.get()</code> is almost imposible to get sub-routers to work.</p>
<p dir="auto"><strong>Steps to reproduce and a minimal demo of the problem</strong></p>
<p dir="auto"><a href="http://run.plnkr.co/plunks/x7rR4NfZMLYj34IyCiyI/" rel="nofollow">http://run.plnkr.co/plunks/x7rR4NfZMLYj34IyCiyI/</a></p>
<ol dir="auto">
<li>Click a link (Two provided for <code class="notranslate">[routerLink]</code>, <code class="notranslate">Router.navigate()</code> respectively)</li>
<li>Refresh the page (F5 on windows, CMD+R on Mac usually)</li>
</ol>
<p dir="auto"><strong>Current behavior</strong><br>
Inconsistent behavior (not obvious) and lack of documentation for matrix URL strategy for sub-routers.</p>
<p dir="auto"><strong>Expected/desired behavior</strong></p>
<ol dir="auto">
<li>If we are going in the direction of Matrix URLs, support that in <code class="notranslate">[routerLink]</code>, <code class="notranslate">Router.navigate()</code>.<br>
OR</li>
<li>Hack <code class="notranslate">routeParams.get()</code> to fall back to query parameters in scenarios above (I personally not for this, because it will fall in scenarios with multiple sub-routes with optional parameters)</li>
</ol>
<p dir="auto"><strong>Other information</strong></p> | 0 |
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/en/challenges/object-oriented-and-functional-programming/filter-arrays-with-filter" rel="nofollow">filter-arrays-with-filter</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
var oldArray = [1,2,3,4,5,6,7,8,9,10];
// Only change code below this line.
var newArray = oldArray.filter(function(val){
return val < 6;
});
```
"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">oldArray</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">,</span><span class="pl-c1">4</span><span class="pl-kos">,</span><span class="pl-c1">5</span><span class="pl-kos">,</span><span class="pl-c1">6</span><span class="pl-kos">,</span><span class="pl-c1">7</span><span class="pl-kos">,</span><span class="pl-c1">8</span><span class="pl-kos">,</span><span class="pl-c1">9</span><span class="pl-kos">,</span><span class="pl-c1">10</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-c">// Only change code below this line.</span>
<span class="pl-k">var</span> <span class="pl-s1">newArray</span> <span class="pl-c1">=</span> <span class="pl-s1">oldArray</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">val</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s1">val</span> <span class="pl-c1"><</span> <span class="pl-c1">6</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s">``</span>`</pre></div> | <p dir="auto">Challenge <a href="https://www.freecodecamp.com/en/challenges/object-oriented-and-functional-programming/filter-arrays-with-filter" rel="nofollow">filter-arrays-with-filter</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">Using the code below and it should be working but getting error message: "You should only be using filter to make the new array." I have searched and this is the correct code so I don't know what the problem is..</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
var oldArray = [1,2,3,4,5,6,7,8,9,10];
// Only change code below this line.
var newArray = oldArray.filter(function(val) {
return val <= 5;
});
```
"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">oldArray</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">,</span><span class="pl-c1">4</span><span class="pl-kos">,</span><span class="pl-c1">5</span><span class="pl-kos">,</span><span class="pl-c1">6</span><span class="pl-kos">,</span><span class="pl-c1">7</span><span class="pl-kos">,</span><span class="pl-c1">8</span><span class="pl-kos">,</span><span class="pl-c1">9</span><span class="pl-kos">,</span><span class="pl-c1">10</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-c">// Only change code below this line.</span>
<span class="pl-k">var</span> <span class="pl-s1">newArray</span> <span class="pl-c1">=</span> <span class="pl-s1">oldArray</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">val</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s1">val</span> <span class="pl-c1"><=</span> <span class="pl-c1">5</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s">``</span>`</pre></div> | 1 |
<p dir="auto">There are a lot of parts of CSS that are reused in multiple properties, that get duplicated in the XML file, leading to code bloat and risk of inconsistencies.</p>
<p dir="auto">The most obvious one are the colour keywords which are repeated 42 times in css-scheme.xml alone (and there are a lot of colours!, and they're included in other files on top), but there are others such as border-style values (that are in column-rule, etc.), timing functions (transitions, animations, etc)</p>
<p dir="auto">Some things already are reused, such as the length units, and hsla,rgba, etc. Would be nice to expand this.</p> | <p dir="auto">see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="139215201" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3817" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3817/hovercard?comment_id=210062644&comment_type=issue_comment" href="https://github.com/microsoft/vscode/issues/3817#issuecomment-210062644">#3817 (comment)</a></p> | 0 |
<p dir="auto">When using the try!() macro, directly on an iterator element. The compiler crashes, and fails to tell what is wrong with the code.</p>
<p dir="auto">I tried this code:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for try!(element) in elements {
// Do stuff here
}"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-en">try</span><span class="pl-en">!</span><span class="pl-kos">(</span>element<span class="pl-kos">)</span> <span class="pl-k">in</span> elements <span class="pl-kos">{</span>
<span class="pl-c">// Do stuff here</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Cargo crashed when attempting to compile the code. Commenting that part out, or removing the try!() call, caused the code to compile, so I think it is safe to assume that the "try!(element)" part is what is causing the issue.</p>
<h2 dir="auto">Meta</h2>
<p dir="auto"><code class="notranslate">rustc --version --verbose</code>:<br>
rustc 1.2.0 (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/082e4763615bdbe7b4dd3dfd6fc2210b7773edf5/hovercard" href="https://github.com/rust-lang/rust/commit/082e4763615bdbe7b4dd3dfd6fc2210b7773edf5"><tt>082e476</tt></a> 2015-08-03)<br>
binary: rustc<br>
commit-hash: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/082e4763615bdbe7b4dd3dfd6fc2210b7773edf5/hovercard" href="https://github.com/rust-lang/rust/commit/082e4763615bdbe7b4dd3dfd6fc2210b7773edf5"><tt>082e476</tt></a><br>
commit-date: 2015-08-03<br>
host: x86_64-apple-darwin<br>
release: 1.2.0</p>
<p dir="auto">Backtrace:</p>
<p dir="auto">Magnuss-MacBook-Air:stocks Magnus$ RUST_BACKTRACE=1 cargo build --verbose<br>
Fresh rustc-serialize v0.3.15<br>
Compiling stocks v0.1.0 (file:///Users/Magnus/MagnusUlf/Rust/stocks)<br>
Running <code class="notranslate">rustc src/main.rs --crate-name stocks --crate-type bin -g --out-dir /Users/Magnus/MagnusUlf/Rust/stocks/target/debug --emit=dep-info,link -L dependency=/Users/Magnus/MagnusUlf/Rust/stocks/target/debug -L dependency=/Users/Magnus/MagnusUlf/Rust/stocks/target/debug/deps --extern rustc_serialize=/Users/Magnus/MagnusUlf/Rust/stocks/target/debug/deps/librustc_serialize-c1e8163a38ed3d54.rlib</code><br>
error: internal compiler error: unexpected panic<br>
note: the compiler unexpectedly panicked. this is a bug.<br>
note: we would appreciate a bug report: <a href="https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports">https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports</a><br>
thread 'rustc' panicked at 'fold_mac disabled by default', ../src/libsyntax/fold.rs:190</p>
<p dir="auto">stack backtrace:<br>
1: 0x10d92c7b5 - sys::backtrace::write::hf5ea20500b66cd24uns<br>
2: 0x10d935013 - panicking::on_panic::hbe02cb0d925cad49iGw<br>
3: 0x10d8f0dd2 - rt::unwind::begin_unwind_inner::h12ba0ba9dffdecc2uow<br>
4: 0x10b59c1d6 - rt::unwind::begin_unwind::h2011421250315581831<br>
5: 0x10b807e8c - ptr::P::map::h3829385840473244073<br>
6: 0x10b7f808b - ext::expand::expand_expr::closure.64700<br>
7: 0x10b7f61b0 - ext::expand::expand_expr::h00bf5a43419a5a9b93a<br>
8: 0x10b846b90 - fold::noop_fold_stmt::h4092105005077979799<br>
9: 0x10b8228ae - ext::expand::expand_stmt::h8332ca149d4a1896QEb<br>
10: 0x10b84f4a3 - ext::expand::expand_block_elts::closure.65407<br>
11: 0x10b84f156 - iter::FlatMap<I, U, F>.Iterator::next::h7837221099035994564<br>
12: 0x10b84e067 - vec::Vec.FromIterator::from_iter::h4964964009179316507<br>
13: 0x10b84d66d - ext::expand::expand_block_elts::closure.65401<br>
14: 0x10b8098ea - ext::expand::expand_block_elts::h962105c93a5677c6MPb<br>
15: 0x10b84d322 - ext::expand::expand_block::ha3009aa3e00113ce7Ob<br>
16: 0x10b8092bc - ext::expand::expand_and_rename_fn_decl_and_block::h281d482393d5142bbjc<br>
17: 0x10b81085d - ext::expand::expand_item_underscore::h6f178e8b5a32d33fgtb<br>
18: 0x10b8744f4 - fold::Folder::fold_item_simple::h6794700446803303180<br>
19: 0x10b8740c3 - ptr::P::map::h1211983651740850239<br>
20: 0x10b80dd2d - ext::expand::expand_annotatable::hb4dbc2b7d2ec92e58Zb<br>
21: 0x10b809a71 - ext::expand::expand_item::h3540f4af8f7fd9f8Fsb<br>
22: 0x10b81697a - iter::FlatMap<I, U, F>.Iterator::next::h12102230822894758553<br>
23: 0x10b815887 - vec::Vec.FromIterator::from_iter::h16893642646688759245<br>
24: 0x10b81504f - fold::noop_fold_mod::h14542714455252956640<br>
25: 0x10b810fee - ext::expand::expand_item_underscore::h6f178e8b5a32d33fgtb<br>
26: 0x10b8744f4 - fold::Folder::fold_item_simple::h6794700446803303180<br>
27: 0x10b8740c3 - ptr::P::map::h1211983651740850239<br>
28: 0x10b80e7ad - ext::expand::expand_annotatable::hb4dbc2b7d2ec92e58Zb<br>
29: 0x10b809a71 - ext::expand::expand_item::h3540f4af8f7fd9f8Fsb<br>
30: 0x10b87d79f - ext::expand::expand_crate::ha5b4cf319725184aGrc<br>
31: 0x10a252402 - driver::phase_2_configure_and_expand::closure.21456<br>
32: 0x10a206822 - driver::phase_2_configure_and_expand::hcb65c5920cf60903ita<br>
33: 0x10a1f609d - driver::compile_input::hb6d2be5b0fa2247fTba<br>
34: 0x10a2d313f - run_compiler::h21d74b88eec3fe3bx7b<br>
35: 0x10a2d09f3 - boxed::F.FnBox::call_box::h1689969825914258414<br>
36: 0x10a2d01b7 - rt::unwind::try::try_fn::h11273853850686318048<br>
37: 0x10d9bfcc8 - rust_try_inner<br>
38: 0x10d9bfcb5 - rust_try<br>
39: 0x10d91ec95 - rt::unwind::try::inner_try::h480e3107f6a4b5b9nkw<br>
40: 0x10a2d03e8 - boxed::F.FnBox::call_box::h888215220722514405<br>
41: 0x10d933a9d - sys:<g-emoji class="g-emoji" alias="thread" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f9f5.png">๐งต</g-emoji>:Thread:: new::thread_start::hdb3d925f69c5da4aHIv<br>
42: 0x7fff81f3b267 - _pthread_body<br>
43: 0x7fff81f3b1e4 - _pthread_start</p>
<p dir="auto">Could not compile <code class="notranslate">stocks</code>.</p>
<p dir="auto">Caused by:<br>
Process didn't exit successfully: <code class="notranslate">rustc src/main.rs --crate-name stocks --crate-type bin -g --out-dir /Users/Magnus/MagnusUlf/Rust/stocks/target/debug --emit=dep-info,link -L dependency=/Users/Magnus/MagnusUlf/Rust/stocks/target/debug -L dependency=/Users/Magnus/MagnusUlf/Rust/stocks/target/debug/deps --extern rustc_serialize=/Users/Magnus/MagnusUlf/Rust/stocks/target/debug/deps/librustc_serialize-c1e8163a38ed3d54.rlib</code> (exit code: 101)</p> | <p dir="auto">This is currently an error:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#[repr(C)]
enum Foo {
Foo
}"><pre class="notranslate"><span class="pl-c1">#<span class="pl-kos">[</span>repr<span class="pl-kos">(</span><span class="pl-v">C</span><span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">enum</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
<span class="pl-v">Foo</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">which is odd because it looks like a c-like enum. However it also looks like a univariant enum. We should specify which behaviour is correct.</p>
<p dir="auto">More generally, should this be considered a c-like enum, or should it be a univariant enum. This affects several other aspects of the compiler.</p> | 0 |
<p dir="auto">Version: 1.0.0<br>
OS Version: Microsoft Windows NT 10.0.19041.0<br>
IntPtr Length: 8<br>
x64: True<br>
Date: 08/04/2020 14:04:04<br>
Exception:<br>
System.ObjectDisposedException: Cannot access a disposed object.<br>
Object name: 'Timer'.<br>
at System.Timers.Timer.set_Enabled(Boolean value)<br>
at System.Timers.Timer.Start()<br>
at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.UpdateIsVisibleCache()<br>
at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br>
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br>
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br>
at System.Windows.Window.SetRootVisual()<br>
at System.Windows.Window.SetRootVisualAndUpdateSTC()<br>
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br>
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br>
at System.Windows.Window.CreateSourceWindowDuringShow()<br>
at System.Windows.Window.SafeCreateWindowDuringShow()<br>
at System.Windows.Window.ShowHelper(Object booleanBox)<br>
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br>
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)<br>
<a href="https://github.com/microsoft/PowerToys/files/5022245/2020-08-04.txt">2020-08-04.txt</a></p> | <p dir="auto">Popup tells me to give y'all this.</p>
<p dir="auto"><a href="https://github.com/microsoft/PowerToys/files/5009460/2020-07-31.txt">2020-07-31.txt</a></p>
<p dir="auto">Version: 1.0.0<br>
OS Version: Microsoft Windows NT 10.0.19041.0<br>
IntPtr Length: 8<br>
x64: True<br>
Date: 07/31/2020 17:29:59<br>
Exception:<br>
System.ObjectDisposedException: Cannot access a disposed object.<br>
Object name: 'Timer'.<br>
at System.Timers.Timer.set_Enabled(Boolean value)<br>
at System.Timers.Timer.Start()<br>
at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.UpdateIsVisibleCache()<br>
at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br>
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br>
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br>
at System.Windows.Window.SetRootVisual()<br>
at System.Windows.Window.SetRootVisualAndUpdateSTC()<br>
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br>
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br>
at System.Windows.Window.CreateSourceWindowDuringShow()<br>
at System.Windows.Window.SafeCreateWindowDuringShow()<br>
at System.Windows.Window.ShowHelper(Object booleanBox)<br>
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br>
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p> | 1 |
<p dir="auto">I have what appears to be a valid <code class="notranslate">Series</code> with a time series index as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [41]: inactive
Out[41]:
2010-06-10 20:43:07 37.2
2010-06-21 06:37:28 0.0
2009-07-20 06:53:38 0.0
2012-05-17 01:50:13 27.4
2009-07-27 21:09:15 0.0
2010-05-04 09:06:54 0.0
2010-05-06 03:38:54 32.5
2010-05-09 08:33:16 56.9
2010-05-26 18:58:42 0.0
2010-05-31 18:40:41 0.0
2010-06-13 08:46:17 0.0
2010-06-16 18:27:51 0.0
2010-06-19 11:59:48 0.0
2010-06-24 15:24:26 33.4
2010-06-28 10:54:27 0.0
...
2008-11-02 07:35:22 71.2
2008-11-05 17:33:39 97.6
2009-10-22 23:15:39 75.7
2009-10-27 20:55:07 67.5
2009-06-02 13:57:15 35.8
2009-06-06 14:15:41 25.9
2008-11-07 01:22:46 0.0
2009-10-12 17:08:20 100.0
2010-09-19 10:21:39 0.0
2010-09-24 15:46:50 0.0
2010-09-30 16:48:09 0.0
2010-10-08 21:43:10 0.0
2010-10-15 19:27:11 0.0
2010-10-28 19:10:42 0.0
2010-06-13 10:32:45 100.0
Name: pdgt10, Length: 13536, dtype: float64"><pre class="notranslate"><code class="notranslate">In [41]: inactive
Out[41]:
2010-06-10 20:43:07 37.2
2010-06-21 06:37:28 0.0
2009-07-20 06:53:38 0.0
2012-05-17 01:50:13 27.4
2009-07-27 21:09:15 0.0
2010-05-04 09:06:54 0.0
2010-05-06 03:38:54 32.5
2010-05-09 08:33:16 56.9
2010-05-26 18:58:42 0.0
2010-05-31 18:40:41 0.0
2010-06-13 08:46:17 0.0
2010-06-16 18:27:51 0.0
2010-06-19 11:59:48 0.0
2010-06-24 15:24:26 33.4
2010-06-28 10:54:27 0.0
...
2008-11-02 07:35:22 71.2
2008-11-05 17:33:39 97.6
2009-10-22 23:15:39 75.7
2009-10-27 20:55:07 67.5
2009-06-02 13:57:15 35.8
2009-06-06 14:15:41 25.9
2008-11-07 01:22:46 0.0
2009-10-12 17:08:20 100.0
2010-09-19 10:21:39 0.0
2010-09-24 15:46:50 0.0
2010-09-30 16:48:09 0.0
2010-10-08 21:43:10 0.0
2010-10-15 19:27:11 0.0
2010-10-28 19:10:42 0.0
2010-06-13 10:32:45 100.0
Name: pdgt10, Length: 13536, dtype: float64
</code></pre></div>
<p dir="auto">Note also:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [43]: inactive.isnull().sum()
Out[43]: 0
In [45]: inactive.index.size
Out[45]: 13536
In [46]: inactive.values.size
Out[46]: 13536"><pre class="notranslate"><code class="notranslate">In [43]: inactive.isnull().sum()
Out[43]: 0
In [45]: inactive.index.size
Out[45]: 13536
In [46]: inactive.values.size
Out[46]: 13536
</code></pre></div>
<p dir="auto">However, when I try calling <code class="notranslate">inactive.plot()</code> in order to get a time series plot, I receive a puzzling <code class="notranslate">AssertionError</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [40]: inactive.plot()
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-40-cdcfa4d871e5> in <module>()
----> 1 inactive.plot()
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in plot_series(series, label, kind, use_index, rot, xticks, yticks, xlim, ylim, ax, style, grid, legend, logx, logy, secondary_y, **kwds)
1730 secondary_y=secondary_y, **kwds)
1731
-> 1732 plot_obj.generate()
1733 plot_obj.draw()
1734
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in generate(self)
856 self._compute_plot_data()
857 self._setup_subplots()
--> 858 self._make_plot()
859 self._post_plot_logic()
860 self._adorn_subplots()
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in _make_plot(self)
1244 lines = []
1245 labels = []
-> 1246 x = self._get_xticks(convert_period=True)
1247
1248 plotf = self._get_plot_function()
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in _get_xticks(self, convert_period)
1034 x = index._mpl_repr()
1035 elif is_datetype:
-> 1036 self.data = self.data.reindex(index=index.order())
1037 x = self.data.index._mpl_repr()
1038 else:
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in reindex(self, index, method, level, fill_value, limit, copy, takeable)
2649
2650 # GH4246 (dispatch to a common method with frame to handle possibly duplicate index)
-> 2651 return self._reindex_with_indexers(new_index, indexer, copy=copy, fill_value=fill_value)
2652
2653 def _reindex_with_indexers(self, index, indexer, copy, fill_value):
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in _reindex_with_indexers(self, index, indexer, copy, fill_value)
2653 def _reindex_with_indexers(self, index, indexer, copy, fill_value):
2654 new_values = com.take_1d(self.values, indexer, fill_value=fill_value)
-> 2655 return Series(new_values, index=index, name=self.name)
2656
2657 def reindex_axis(self, labels, axis=0, **kwargs):
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in __new__(cls, data, index, dtype, name, copy)
491 else:
492 subarr = subarr.view(Series)
--> 493 subarr.index = index
494 subarr.name = name
495
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/lib.so in pandas.lib.SeriesIndex.__set__ (pandas/lib.c:29092)()
AssertionError: Index length did not match values"><pre class="notranslate"><code class="notranslate">In [40]: inactive.plot()
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-40-cdcfa4d871e5> in <module>()
----> 1 inactive.plot()
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in plot_series(series, label, kind, use_index, rot, xticks, yticks, xlim, ylim, ax, style, grid, legend, logx, logy, secondary_y, **kwds)
1730 secondary_y=secondary_y, **kwds)
1731
-> 1732 plot_obj.generate()
1733 plot_obj.draw()
1734
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in generate(self)
856 self._compute_plot_data()
857 self._setup_subplots()
--> 858 self._make_plot()
859 self._post_plot_logic()
860 self._adorn_subplots()
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in _make_plot(self)
1244 lines = []
1245 labels = []
-> 1246 x = self._get_xticks(convert_period=True)
1247
1248 plotf = self._get_plot_function()
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in _get_xticks(self, convert_period)
1034 x = index._mpl_repr()
1035 elif is_datetype:
-> 1036 self.data = self.data.reindex(index=index.order())
1037 x = self.data.index._mpl_repr()
1038 else:
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in reindex(self, index, method, level, fill_value, limit, copy, takeable)
2649
2650 # GH4246 (dispatch to a common method with frame to handle possibly duplicate index)
-> 2651 return self._reindex_with_indexers(new_index, indexer, copy=copy, fill_value=fill_value)
2652
2653 def _reindex_with_indexers(self, index, indexer, copy, fill_value):
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in _reindex_with_indexers(self, index, indexer, copy, fill_value)
2653 def _reindex_with_indexers(self, index, indexer, copy, fill_value):
2654 new_values = com.take_1d(self.values, indexer, fill_value=fill_value)
-> 2655 return Series(new_values, index=index, name=self.name)
2656
2657 def reindex_axis(self, labels, axis=0, **kwargs):
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in __new__(cls, data, index, dtype, name, copy)
491 else:
492 subarr = subarr.view(Series)
--> 493 subarr.index = index
494 subarr.name = name
495
/Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/lib.so in pandas.lib.SeriesIndex.__set__ (pandas/lib.c:29092)()
AssertionError: Index length did not match values
</code></pre></div>
<p dir="auto">As I have shown above, my index length and my values are the same length.</p>
<p dir="auto">Running a recent (<2 weeks) build from master on OS X 10.8.4 and Python 2.7.2.</p> | <p dir="auto">xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11856129" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/3004" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/3004/hovercard" href="https://github.com/pandas-dev/pandas/issues/3004">#3004</a><br>
xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3440791" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/841" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/841/hovercard" href="https://github.com/pandas-dev/pandas/issues/841">#841</a><br>
xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="39027114" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/7873" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/7873/hovercard" href="https://github.com/pandas-dev/pandas/issues/7873">#7873</a><br>
xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34215786" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/7223" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/7223/hovercard" href="https://github.com/pandas-dev/pandas/issues/7223">#7223</a><br>
xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="48761643" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/8815" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/8815/hovercard" href="https://github.com/pandas-dev/pandas/issues/8815">#8815</a></p>
<p dir="auto">Building on <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/immerrr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/immerrr">@immerrr</a>'s excellent refactor in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="48158607" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/8753" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/8753/hovercard" href="https://github.com/pandas-dev/pandas/pull/8753">#8753</a>, I would like to propose adding a <code class="notranslate">get_nearest</code> method to pandas.Index that does nearest neighbor lookups. The idea is that nearest neighbor lookups are usually the desirable/sane thing to do when using inexact indexes. Eventually, we might want to add an alternative "wrapper index" (like IntervalIndex), e.g., <code class="notranslate">NearestNeighborIndex</code> which switches the default behavior; this would be an intermediate step in that direction.</p>
<p dir="auto">The implementation would be a simple wrapper that calls <code class="notranslate">Index.get_slice_bound</code> twice, once to the left and once to the right. Ideally, this would this would even work for array-like arguments, though perhaps there should be separate <code class="notranslate">get_nearest_loc</code> and <code class="notranslate">get_nearest_indexer</code> methods.</p> | 0 |
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 4.1.0</li>
<li>Operating System / Platform => Ubuntu</li>
<li>Compiler => g++</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">OpenCV should have a feature to select the number of CPU cores used for inference when using OpenVINO inference engine as backend.<br>
Right now, this can be only achieved using OpenVINO IE API.</p>
<hr>
<p dir="auto">In op_inf_engine.cpp file at<br>
<a href="https://github.com/opencv/opencv/blob/master/modules/dnn/src/op_inf_engine.cpp">https://github.com/opencv/opencv/blob/master/modules/dnn/src/op_inf_engine.cpp</a></p>
<p dir="auto">function</p>
<p dir="auto"><code class="notranslate">void InfEngineBackendNet::initPlugin(InferenceEngine::ICNNNetwork& net)</code></p>
<p dir="auto">can accept the number of CPU cores (num_cores) parameter when DNN_TARGET_CPU is selected.</p>
<p dir="auto">This can be further passed as</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="std::map cpu_config<std::string, std::string>
cpu_config[InferenceEngine::PluginConfigParams::KEY_CPU_THREADS_NUM]=std::string(num_cores)
netExec = plugin.LoadNetwork(net, cpu_config);"><pre class="notranslate"><code class="notranslate">std::map cpu_config<std::string, std::string>
cpu_config[InferenceEngine::PluginConfigParams::KEY_CPU_THREADS_NUM]=std::string(num_cores)
netExec = plugin.LoadNetwork(net, cpu_config);
</code></pre></div> | <h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">โ</g-emoji></li>
<li>Operating System / Platform => <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">โ</g-emoji></li>
<li>Compiler => <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">โ</g-emoji></li>
</ul>
<h5 dir="auto">Detailed description</h5>
<h5 dir="auto">Steps to reproduce</h5> | 0 |
<h3 dir="auto">The bug</h3>
<p dir="auto">Let's say I have these two files</p>
<h4 dir="auto">foo.ts</h4>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default class Foo { }"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span></pre></div>
<h4 dir="auto">bar.ts</h4>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Foo from './foo';
let foo = new Foo();"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Foo</span> <span class="pl-k">from</span> <span class="pl-s">'./foo'</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">If I compile these files with</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tsc -t es6 -m commonjs foo.ts bar.ts"><pre class="notranslate"><code class="notranslate">tsc -t es6 -m commonjs foo.ts bar.ts
</code></pre></div>
<p dir="auto">I get this output</p>
<h4 dir="auto">foo.js</h4>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Foo {}
exports.Foo = Foo;"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">Foo</span> <span class="pl-c1">=</span> <span class="pl-v">Foo</span><span class="pl-kos">;</span></pre></div>
<h4 dir="auto">bar.js</h4>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var foo_1 = require('./foo');
let foo = new foo_1.default();"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">foo_1</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'./foo'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-s1">foo_1</span><span class="pl-kos">.</span><span class="pl-c1">default</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Obviously this code will not work.</p>
<h3 dir="auto">Solutions</h3>
<ol dir="auto">
<li>converting module type to <code class="notranslate">ES6</code>, this seems to be the definite solution</li>
<li>converting imports to <code class="notranslate">import * as Foo from './foo'</code> this fixes the produced code but show this error during compile</li>
</ol>
<blockquote>
<p dir="auto">bar.ts(3,11): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.</p>
</blockquote>
<h3 dir="auto">Confusion</h3>
<p dir="auto">Above code works without any workaround when targetting <code class="notranslate">ES5</code>. Is this the intended behavior? If so, shouldn't this be documented somewhere? Also instead of producing a code that does not work, maybe it should just say</p>
<blockquote>
<p dir="auto">commonjs modules cannot be used when targeting ES6</p>
</blockquote>
<p dir="auto">Sorry if this was already reported or was already documented.</p> | <p dir="auto">Using typescript@next and the following compiler options:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""compilerOptions": {
"target": "ES6",
"module": "commonjs",
}"><pre class="notranslate"><span class="pl-ent">"compilerOptions"</span>: {
<span class="pl-ent">"target"</span>: <span class="pl-s"><span class="pl-pds">"</span>ES6<span class="pl-pds">"</span></span>,
<span class="pl-ent">"module"</span>: <span class="pl-s"><span class="pl-pds">"</span>commonjs<span class="pl-pds">"</span></span>,
}</pre></div>
<p dir="auto">A class expression being default exported will be incorrectly compiled into a named export instead.</p>
<p dir="auto">Example:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default class Foo {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">compiles into:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Foo {
}
exports.Foo = Foo;"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">Foo</span> <span class="pl-c1">=</span> <span class="pl-v">Foo</span><span class="pl-kos">;</span></pre></div> | 1 |
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-use-clockwise-notation-to-specify-the-margin-of-an-element" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-use-clockwise-notation-to-specify-the-margin-of-an-element</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">Last paragraph of instructions reads: "Use Clockwise Notation to give <em>an element</em> a margin of 40px on its top and left side, but only 20px on its bottom and right side."</p>
<p dir="auto">But only changing the margin of the green box validates. So the sentence should be changed to: "Use Clockwise Notation to give <em>the green box</em> a margin of 40px on its top and left side, but only 20px on its bottom and right side."</p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-use-clockwise-notation-to-specify-the-margin-of-an-element" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-use-clockwise-notation-to-specify-the-margin-of-an-element</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">The challenge has words:</p>
<blockquote>
<p dir="auto">Use Clockwise Notation to give <strong>_an element</strong>_ a margin of 40px on its top and left side, but only 20px on its bottom and right side.</p>
</blockquote>
<p dir="auto">But <code class="notranslate">green-box</code> is required. It should be:</p>
<blockquote>
<p dir="auto">Use Clockwise Notation to give <strong>_the ".green-box" class</strong>_ a margin of 40px on its top and left side, but only 20px on its bottom and right side.</p>
</blockquote>
<p dir="auto"><sub><strong>Disclamer: English is not my native language. I could be wrong.</strong></sub></p> | 1 |
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong><br>
From a discussion in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="286538675" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/10186" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/10186/hovercard" href="https://github.com/matplotlib/matplotlib/pull/10186">#10186</a>: The data note inserted in the docstring via <code class="notranslate">@_preprocess_data</code> can be displayed in unexpected places in the generated html documentation.</p>
<p dir="auto"><strong>Examples</strong></p>
<ul dir="auto">
<li>in <a href="https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.errorbar.html#matplotlib.axes.Axes.errorbar" rel="nofollow">Other Parmeters</a></li>
<li>in <a href="https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.vlines.html#matplotlib.axes.Axes.vlines" rel="nofollow">See Also</a></li>
</ul>
<p dir="auto"><strong>Reason</strong><br>
I'm not an expert in numpydoc, but from my understanding, this is the issue:</p>
<ul dir="auto">
<li><code class="notranslate">@_preprocess_data</code> just appends an admonition</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".. note::
In addition to the above described arguments, this function can take a
**data** keyword argument. If such a **data** argument is given, the"><pre class="notranslate"><code class="notranslate">.. note::
In addition to the above described arguments, this function can take a
**data** keyword argument. If such a **data** argument is given, the
</code></pre></div>
<ul dir="auto">
<li>In numpydoc, everything is part of some section. Since <code class="notranslate">@_preprocess_data</code> does not add a section, the admonition belongs to whatever section was last. For sections that are plain top-level such as <em>Notes</em> or <em>Examples</em>, this looks ok (though technically the note is part of the example). It goes wrong for differently formatted or reordered sections (e.g. indented <em>Other Parameters</em> or contained in a <em>See Also</em> box). Example docstring:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="See Also
--------
fill_betweenx : Fill between two sets of x-values.
.. note::
In addition to the above described arguments, this function can take a
**data** keyword argument. If such a **data** argument is given, the"><pre class="notranslate"><code class="notranslate">See Also
--------
fill_betweenx : Fill between two sets of x-values.
.. note::
In addition to the above described arguments, this function can take a
**data** keyword argument. If such a **data** argument is given, the
</code></pre></div>
<p dir="auto"><strong>Solution</strong><br>
To do this correctly, the inserted admonition should always be part of a <em>Notes</em> section. There are diffent ways to achieve this:</p>
<ol dir="auto">
<li>Make sure docstrings using <code class="notranslate">@_preprocess_data</code> do always end with a <em>Notes</em> section. Manually add an empty one if there is none.</li>
<li>Let <code class="notranslate">@_preprocess_data</code> add the <em>Notes</em> section. This is not trivial because you may or may not have an <em>Notes</em> section already and duplicated sections are not allowed (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="183279612" data-permission-text="Title is private" data-url="https://github.com/numpy/numpydoc/issues/67" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpydoc/pull/67/hovercard" href="https://github.com/numpy/numpydoc/pull/67">numpy/numpydoc#67</a> could help on this).</li>
<li>Change <code class="notranslate">@_preprocess_data</code> to not append someting, but format. Advantage: This is more explicit and prevents surprises. Disadavantage: The documenter has to know that the note has to be added and do it manually (But at least <code class="notranslate">@_preprocess_data</code> could warn if it could not format its note into the docstring). The docstring could look like this:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Notes
-----
{data_note}"><pre class="notranslate"><code class="notranslate">Notes
-----
{data_note}
</code></pre></div>
<p dir="auto">There may be other options like extending numpydoc to have an additional custom <em>Data Note</em> section, but I don't think its worth the effort.</p>
<p dir="auto">For now, I use option 1. as a simple workaround on a case by case basis (also in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="286538675" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/10186" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/10186/hovercard" href="https://github.com/matplotlib/matplotlib/pull/10186">#10186</a>).<br>
2. would be too much magic.<br>
In the long run, I propose to switch to option 3.</p>
<p dir="auto"><strong>PS</strong><br>
Just got another idea possibly worth considering. If we change to formatting anyway, one could get rid of the admonition and format a custom <em>data</em> entry into the <em>Paramters</em> or <em>Additonal Paramters</em> section:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Parameters
----------
x : array
some text
y : array
other text
{data_param}
color : Color
more params "><pre class="notranslate"><code class="notranslate">Parameters
----------
x : array
some text
y : array
other text
{data_param}
color : Color
more params
</code></pre></div> | <p dir="auto">As shown by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="316339179" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/11094" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/11094/hovercard" href="https://github.com/matplotlib/matplotlib/issues/11094">#11094</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="373384618" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/12612" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/12612/hovercard" href="https://github.com/matplotlib/matplotlib/issues/12612">#12612</a> matplotlib is used inside of webservers to dynamically serve plots. The example should show:</p>
<ol dir="auto">
<li>importance of picking a non-GUI backend (both by setting the backend and explicitly by not using pyplot). Given that these servers are multi-threaded, not using pyplot at all may be the best option to avoid any coupling between workers via pyplot and memory leaks due to pyplot holding references to figures forever. Should probably show use of <code class="notranslate">new_figure_manager</code></li>
<li>saving to a bytesIO buffer to avoid disk</li>
<li>png, svg, and pdf</li>
<li>be applicable to both django and flask (not sure off the top of my head what the differences are), bonus points for cherrypy, aiohttp, tornado, and pyramid</li>
</ol> | 0 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [run "ver" at a command prompt] [Version 10.0.18362.657]
PowerToys version: PowerToysSetup-0.16.0-x64
PowerToy module for which you are reporting the bug (if applicable):"><pre class="notranslate"><code class="notranslate">Windows build number: [run "ver" at a command prompt] [Version 10.0.18362.657]
PowerToys version: PowerToysSetup-0.16.0-x64
PowerToy module for which you are reporting the bug (if applicable):
</code></pre></div>
<h1 dir="auto">Steps to reproduce Editing</h1>
<p dir="auto">After editing Zones, applied layout selected (doesn't mater if predefined or custom) nothing happens. Tried to uninstall PowerToys via Programms and features, runs through the steps and explorer restarts before it completes - PowerToys never gets removed</p>
<h1 dir="auto">Expected behavior</h1>
<h1 dir="auto">Actual behavior</h1>
<h1 dir="auto">Screenshots</h1> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18363.752
PowerToys version: 0.16.0
PowerToy module for which you are reporting the bug (if applicable): FanzyZones"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.18363.752
PowerToys version: 0.16.0
PowerToy module for which you are reporting the bug (if applicable): FanzyZones
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Use Remote Desktop session, FanzyZones is no longer working.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">FanzyZones to work for remote desktop sessions.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">FanzyZones not working for remote desktop sessions.</p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto">[not applicable]</p> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by Thijs Damsma (<a href="https://github.com/tdamsma">@tdamsma</a>)</strong></p>
<p dir="auto">When a distinct query is ordered, the columns on which are sorted are added to the SELECT statement, see example code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy.orm.session import sessionmaker
from sqlalchemy.dialects import postgresql
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer
Base = declarative_base()
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
att1 = Column(Integer)
att2 = Column(Integer)
Session = sessionmaker()
sess = Session()
q = sess.query(User.att2).distinct(User.att1)
print(str(q.statement.compile(dialect=postgresql.dialect())))"><pre class="notranslate"><code class="notranslate">from sqlalchemy.orm.session import sessionmaker
from sqlalchemy.dialects import postgresql
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer
Base = declarative_base()
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
att1 = Column(Integer)
att2 = Column(Integer)
Session = sessionmaker()
sess = Session()
q = sess.query(User.att2).distinct(User.att1)
print(str(q.statement.compile(dialect=postgresql.dialect())))
</code></pre></div>
<p dir="auto">as expected, only user.att2 will be returned:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT DISTINCT ON ("user".att1) "user".att2
FROM "user""><pre class="notranslate"><code class="notranslate">SELECT DISTINCT ON ("user".att1) "user".att2
FROM "user"
</code></pre></div>
<p dir="auto">Now with an order_by statement:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="print(str(q.order_by(User.att1, User.id).statement.compile(
dialect=postgresql.dialect())))"><pre class="notranslate"><code class="notranslate">print(str(q.order_by(User.att1, User.id).statement.compile(
dialect=postgresql.dialect())))
</code></pre></div>
<p dir="auto">not as expected, both user.att2 and user.id will be returned</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT DISTINCT ON ("user".att1) "user".att2, "user".att1, "user".id
FROM "user" ORDER BY "user".att1, "user".id"><pre class="notranslate"><code class="notranslate">SELECT DISTINCT ON ("user".att1) "user".att2, "user".att1, "user".id
FROM "user" ORDER BY "user".att1, "user".id
</code></pre></div>
<p dir="auto">The intended result is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT DISTINCT ON ("user".att1) "user".att2
FROM "user" ORDER BY "user".att1, "user".id"><pre class="notranslate"><code class="notranslate">SELECT DISTINCT ON ("user".att1) "user".att2
FROM "user" ORDER BY "user".att1, "user".id
</code></pre></div> | <p dir="auto"><strong>Migrated issue, originally created by Mehdi GMIRA (<a href="https://github.com/mehdigmira">@mehdigmira</a>)</strong></p>
<p dir="auto">I encountred a bug with the postgres specific "DISTINCT ON" in SQLAlchemy<br>
The real SA query I'm using is more complicated than this, but it sums up to :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="query = db.session.query(c1, c2, c3, c4).distinct(c1, c2).order_by(c1, c2, c3)"><pre class="notranslate"><code class="notranslate">query = db.session.query(c1, c2, c3, c4).distinct(c1, c2).order_by(c1, c2, c3)
</code></pre></div>
<p dir="auto">when i compile the query by doing:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="query.statement.compile(dialect=postgres.dialect())"><pre class="notranslate"><code class="notranslate">query.statement.compile(dialect=postgres.dialect())
</code></pre></div>
<p dir="auto">The actual query is</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT DISTINCT ON (c1, c2) c1, c2, c3, c4, c1, c2, c3 FROM .... ORDER BY c1, c2, c3"><pre class="notranslate"><code class="notranslate">SELECT DISTINCT ON (c1, c2) c1, c2, c3, c4, c1, c2, c3 FROM .... ORDER BY c1, c2, c3
</code></pre></div>
<p dir="auto">As you can see, the columns c1, c2, c3 are repeated. After some investigation, it seems like this is caused by the order_by() part of the query (removing order by removes the repeated columns).<br>
The weird thing is that when actually running the query (query.all()), I only get the column that I requested, and not the repeated ones as in the compiled statement.<br>
This would have been fine with me. But the problem is it's preventing me from using a union(), because SA thinks I'm requesting more columns on one side of union().</p>
<p dir="auto">I think It's a bug, but maybe I'm just doing something wrong.</p> | 1 |
<p dir="auto">Hi,</p>
<p dir="auto">Iยดm working in a laravel app and iยดm trying to make a post request from a Vue JS component like laravel method, so when i make the post request i would like the app go to the url received from the laravel controller on the http post response. I have the next code in my vue JS component methods:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="submit: function() {
const data = {
name: this.name,
};
console.log('submit!')
this.$v.$touch()
if (this.$v.$invalid) {
this.submitStatus = 'ERROR'
} else {
let currentObj = this;
axios.post('/group', data).then(function (response) {
currentObj.output = response.data;
}).catch(function (error) {
currentObj.output = error;
});
}
},"><pre class="notranslate"><code class="notranslate">submit: function() {
const data = {
name: this.name,
};
console.log('submit!')
this.$v.$touch()
if (this.$v.$invalid) {
this.submitStatus = 'ERROR'
} else {
let currentObj = this;
axios.post('/group', data).then(function (response) {
currentObj.output = response.data;
}).catch(function (error) {
currentObj.output = error;
});
}
},
</code></pre></div>
<p dir="auto">When i execute the code, the post request is done, i have the data sent on my database tables, however, the application is not redirected as i expect.</p>
<p dir="auto">How the app can be redirected to the URL returned on laravel controller method?</p> | <h4 dir="auto">Summary</h4>
<p dir="auto">We have a single page app based on Vue.js which uses Axios to make API calls. When a user's session expires, API calls start returning a 302 redirect to the login page. Since its a single page app, sometimes users may just browse around directly in the app, therefore only making AJAX calls and not reloading the main index.html file.</p>
<p dir="auto">When this happens, the 302's are basically swallowed and the user is not redirected and the app breaks.</p>
<p dir="auto">To complicate matters a bit further, the login page is based on a federated login service in Azure, so it's on a different domain. This causes the browser to throw the following CORS error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="XMLHttpRequest cannot load login.microsoftonline.com.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'null' is therefore not allowed access."><pre class="notranslate"><code class="notranslate">XMLHttpRequest cannot load login.microsoftonline.com.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'null' is therefore not allowed access.
</code></pre></div>
<p dir="auto">I tried to use an interceptor but the error.response object is undefined, so I cannot even tell what the HTTP status of the response was. So the best I can come up with is that when error.response is undefined to assume it was a 302 and assume I need to forward the user to the login page:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="axios.interceptors.response.use((response) => {
return response
}, (error) => {
// we can't seem to catch the 302 status code as an error,
// however, since it redirects to another domain (login.microsoftonline.com) it causes
// a CORS error which makes error.response be undefined here. This assumes that any time
// error.response is undefined that we need to redirect to the login page
if (typeof error.response === 'undefined') {
window.location = 'https://login.microsoftonline.com'
} else {
return Promise.reject(error)
}
})"><pre class="notranslate"><code class="notranslate">axios.interceptors.response.use((response) => {
return response
}, (error) => {
// we can't seem to catch the 302 status code as an error,
// however, since it redirects to another domain (login.microsoftonline.com) it causes
// a CORS error which makes error.response be undefined here. This assumes that any time
// error.response is undefined that we need to redirect to the login page
if (typeof error.response === 'undefined') {
window.location = 'https://login.microsoftonline.com'
} else {
return Promise.reject(error)
}
})
</code></pre></div>
<p dir="auto">Is this the best we can do? Any further suggestions?</p>
<h4 dir="auto">Context</h4>
<ul dir="auto">
<li>Vue.js, vue-router single page app</li>
<li>axios version: <em>v0.16.0</em></li>
<li>Environment: <em>chrome 58, windows 10</em></li>
</ul> | 1 |
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">When I upgrade Webpack from 4.29.2 to 4.29.3, import() breaks.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto">Using a relatively straightforward, up-to-date package.json, code that formerly worked using import() stops building after upgrading from 4.29.2 to 4.29.3. The error message is, e.g:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in ./js/registry.js 22:44
Module parse failed: Unexpected token (22:44)
You may need an appropriate loader to handle this file type."><pre class="notranslate"><code class="notranslate">ERROR in ./js/registry.js 22:44
Module parse failed: Unexpected token (22:44)
You may need an appropriate loader to handle this file type.
</code></pre></div>
<p dir="auto">Downgrading to the previous version eliminates this error.</p>
<p dir="auto">In other words, the bug has been easy for me to reproduce/ toggle on/off since I isolated the package version bump which introduced it. (I can induce the bug by <code class="notranslate">rm -rf node_modules/*; npm install</code> after upgrading my <code class="notranslate">package.json</code> and just as easily quell it again by the same operation after downgrading the webpack requirement in <code class="notranslate">package.json</code> back down to 4.29.2.)</p>
<p dir="auto">Apologies, I have not yet had time to come up with a minimal example, but here are my config files.</p>
<p dir="auto">package.json: <a href="https://gist.github.com/1attice/dde6cd694fcb5202ebb78497772417b5">https://gist.github.com/1attice/dde6cd694fcb5202ebb78497772417b5</a><br>
webpack.config.js: <a href="https://gist.github.com/1attice/1eef81fbd36ab67b9bd26600bf320e5b">https://gist.github.com/1attice/1eef81fbd36ab67b9bd26600bf320e5b</a><br>
.babelrc: <a href="https://gist.github.com/1attice/906515f7386b5c36d03dcb420872cb04">https://gist.github.com/1attice/906515f7386b5c36d03dcb420872cb04</a></p>
<p dir="auto">And here is the code that occasions the error:<br>
registry.js: <a href="https://gist.github.com/1attice/bb922e8e3d155db53ad1942de7ccd31c">https://gist.github.com/1attice/bb922e8e3d155db53ad1942de7ccd31c</a></p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">Compilation should proceed normally, as under 4.29.2.</p>
<p dir="auto">webpack version: 4.29.3<br>
Node.js version: 10.14.1<br>
Operating System: MacOS 10.14.2<br>
Additional tools: see package.json</p> | <h1 dir="auto">Bug report</h1>
<p dir="auto">Type definition error for OutputFileSystem when assigning to memory volume.</p>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error TS2322: Type 'MemoryFileSystem' is not assignable to type 'OutputFileSystem'.
Types of property 'mkdir' are incompatible.
Type '{ (path: string, callback: (err: Error | null) => void): void; (path: string, optArg: {}, callback: (err: Error | null, result?: any) => void): void; }' is not assignable to type '(arg0: string, arg1: (arg0?: ErrnoException | undefined) => void) => void'.
Types of parameters 'callback' and 'arg1' are incompatible.
Types of parameters 'arg0' and 'err' are incompatible.
Type 'Error | null' is not assignable to type 'ErrnoException | undefined'.
Type 'null' is not assignable to type 'ErrnoException | undefined'.
"><pre class="notranslate"><code class="notranslate">error TS2322: Type 'MemoryFileSystem' is not assignable to type 'OutputFileSystem'.
Types of property 'mkdir' are incompatible.
Type '{ (path: string, callback: (err: Error | null) => void): void; (path: string, optArg: {}, callback: (err: Error | null, result?: any) => void): void; }' is not assignable to type '(arg0: string, arg1: (arg0?: ErrnoException | undefined) => void) => void'.
Types of parameters 'callback' and 'arg1' are incompatible.
Types of parameters 'arg0' and 'err' are incompatible.
Type 'Error | null' is not assignable to type 'ErrnoException | undefined'.
Type 'null' is not assignable to type 'ErrnoException | undefined'.
</code></pre></div>
<p dir="auto">Reproduce:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import MemoryFs from 'memory-fs';
compiler.outputFileSystem = new MemoryFs(); "><pre class="notranslate"><code class="notranslate">import MemoryFs from 'memory-fs';
compiler.outputFileSystem = new MemoryFs();
</code></pre></div>
<p dir="auto">or</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { Volume } from 'memfs';
compiler.outputFileSystem = createFsFromVolume(new Volume());"><pre class="notranslate"><code class="notranslate">import { Volume } from 'memfs';
compiler.outputFileSystem = createFsFromVolume(new Volume());
</code></pre></div>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">Previously, with webpack v4 it was working when using the DefinitelyTyped webpack definitions.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 5.11.1<br>
Node.js version: 14.15.4</p> | 0 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: xxx</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>xxx</li>
<li>xxx</li>
<li>xxx</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps๏ผ</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.3</li>
<li>Operating System version: xxx</li>
<li>Java version: 1.8.0_181</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>ๅฐspring bootไธdubboๆดๅ็้กน็ฎๆๆwarๅ
ๆพๅจtomcatไธ้ข่ฟ่ก</li>
<li>ๅบ็ฐ30-Nov-2018 13:09:22.070 ไธฅ้ [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file</li>
<li>ๅจๆฌๅฐmainๆนๆณ่ฟ่กๆ ้ฎ้ข๏ผ็จ็spring boot 2.0.2</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps๏ผ</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | 0 |
<p dir="auto">Whenever you start a new challenge, the first time you click on the <strong>CodeMirror-code</strong> section the line of code selected is off by one row from the cursor position. Once you start typing it seems to fix itself.</p>
<p dir="auto">This can be extremely frustrating when you're going through multiple challenges relatively quickly.</p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-target-the-parent-of-an-element-using-jquery" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-target-the-parent-of-an-element-using-jquery</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7389754/9432803/810b00c4-49dd-11e5-9af1-45c7147c084e.png"><img src="https://cloud.githubusercontent.com/assets/7389754/9432803/810b00c4-49dd-11e5-9af1-45c7147c084e.png" alt="screen shot 2015-08-23 at 9 24 41 pm" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">Reopens <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="260637383" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/2993" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/2993/hovercard" href="https://github.com/vercel/next.js/issues/2993">#2993</a>. There was no reason given why they are pinned to patch versions.</p>
<h1 dir="auto">Feature request</h1>
<ul dir="auto">
<li>loosen dependency version restrictions</li>
</ul>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<ul dir="auto">
<li>node_modules/ bloat</li>
<li>patches and features take more time to propagate downstream</li>
</ul>
<h2 dir="auto">Describe the solution you'd like</h2>
<ul dir="auto">
<li>pin to major version (i.e. <code class="notranslate">^</code>)</li>
</ul>
<h2 dir="auto">Describe alternatives you've considered</h2>
<ul dir="auto">
<li>pin to minor version (i.e. <code class="notranslate">~</code>)</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto"><code class="notranslate">yarn check</code> report concerning <code class="notranslate">next</code>. This is run in a monorepo for a component library that uses next for documentation.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="warning "next#@babel/plugin-proposal-class-properties#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-proposal-object-rest-spread#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-syntax-dynamic-import#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-transform-modules-commonjs#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-transform-runtime#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/preset-env#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#autodll-webpack-plugin#webpack@^2.0.0 || ^3.0.0 || ^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#babel-loader#@babel/core@^7.0.0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#babel-loader#webpack@>=2" could be deduped from "4.29.3" to "[email protected]"
warning "next#friendly-errors-webpack-plugin#webpack@^2.0.0 || ^3.0.0 || ^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#@babel/plugin-proposal-class-properties#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-proposal-object-rest-spread#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-syntax-dynamic-import#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-transform-modules-commonjs#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-transform-runtime#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/preset-env#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#autodll-webpack-plugin#webpack@^2.0.0 || ^3.0.0 || ^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#babel-loader#@babel/core@^7.0.0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#babel-loader#webpack@>=2" could be deduped from "4.29.3" to "[email protected]"
warning "next#friendly-errors-webpack-plugin#webpack@^2.0.0 || ^3.0.0 || ^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#webpack-dev-middleware#webpack@^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#webpackbar#webpack@^3.0.0 || ^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#@babel/plugin-proposal-class-properties#@babel/plugin-syntax-class-properties#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]""><pre class="notranslate"><code class="notranslate">warning "next#@babel/plugin-proposal-class-properties#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-proposal-object-rest-spread#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-syntax-dynamic-import#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-transform-modules-commonjs#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-transform-runtime#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/preset-env#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#autodll-webpack-plugin#webpack@^2.0.0 || ^3.0.0 || ^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#babel-loader#@babel/core@^7.0.0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#babel-loader#webpack@>=2" could be deduped from "4.29.3" to "[email protected]"
warning "next#friendly-errors-webpack-plugin#webpack@^2.0.0 || ^3.0.0 || ^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#@babel/plugin-proposal-class-properties#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-proposal-object-rest-spread#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-syntax-dynamic-import#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-transform-modules-commonjs#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/plugin-transform-runtime#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#@babel/preset-env#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#autodll-webpack-plugin#webpack@^2.0.0 || ^3.0.0 || ^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#babel-loader#@babel/core@^7.0.0" could be deduped from "7.2.2" to "@babel/[email protected]"
warning "next#babel-loader#webpack@>=2" could be deduped from "4.29.3" to "[email protected]"
warning "next#friendly-errors-webpack-plugin#webpack@^2.0.0 || ^3.0.0 || ^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#webpack-dev-middleware#webpack@^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#webpackbar#webpack@^3.0.0 || ^4.0.0" could be deduped from "4.29.3" to "[email protected]"
warning "next#@babel/plugin-proposal-class-properties#@babel/plugin-syntax-class-properties#@babel/core@^7.0.0-0" could be deduped from "7.2.2" to "@babel/[email protected]"
</code></pre></div>
<p dir="auto">Switching from exact version matches to major matches reduces the size of my <code class="notranslate">node_modules</code> from 837MB to 785MB. While this isn't much it is still I/O that has to run on install. Every other <code class="notranslate">next</code> version installed locally increases the overall bloat.</p> | <ul dir="auto">
<li>[x ] I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Trying to deploy with now-cli</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Deployment process end with error</p>
<blockquote>
<p dir="auto">Deploying ******</p>
<blockquote>
<p dir="auto">Using Node.js 8.9.1 (default)<br>
Ready! https://****** [4s]<br>
Initializingโฆ<br>
Building<br>
โฒ npm install<br>
โ Using "package-lock.json"<br>
โง Installing 48 main dependenciesโฆ<br>
โ Installed 1119 modules [34s]<br>
โฒ npm run build</p>
<blockquote>
<p dir="auto">[email protected] build /home/nowuser/src<br>
next build<br>
Using external babel configuration<br>
Location: "/home/nowuser/src/.babelrc"<br>
Using "webpack" config function defined in next.config.js.<br>
npm ERR! code ELIFECYCLE<br>
npm ERR! errno 137<br>
npm ERR! [email protected] build: <code class="notranslate">next build</code><br>
npm ERR! Exit status 137<br>
npm ERR!<br>
npm ERR! Failed at the [email protected] build script.<br>
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.<br>
npm ERR! A complete log of this run can be found in:<br>
npm ERR! /home/nowuser/.npm/_logs/2017-12-06T08_26_26_403Z-debug.log</p>
</blockquote>
</blockquote>
</blockquote>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>clone repo <a href="https://github.com/psycura/VisualProposal">https://github.com/psycura/VisualProposal</a></li>
<li>try to deploy to now</li>
</ol>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>4.2.0</td>
</tr>
<tr>
<td>node</td>
<td>8.9.1</td>
</tr>
<tr>
<td>OS</td>
<td>windows 10</td>
</tr>
<tr>
<td>browser</td>
<td>chrome</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">Are there any plans to implement 4D or higher convolutional layers?</p> | <p dir="auto">Are there some plans to include a 4D (and possibly higher dimension generalization) convolution op? Would be nice for doing 3D + time processing for example (for the 4D version).</p>
<p dir="auto">Also, should something be done to offer the user the possibility to choose the shape of the kernel? For example allowing both the natural hyper cube kernel nodes location or a hyper thetrahedron location? Could have consequences on the computing power requested:</p>
<p dir="auto"><a href="http://arxiv.org/pdf/1505.02890v2.pdf" rel="nofollow">http://arxiv.org/pdf/1505.02890v2.pdf</a></p> | 1 |
<h3 dir="auto">Description</h3>
<p dir="auto">When using scrapy-redis or self-defined dupefilters, the speed of item pipeline will be extremely slow. It's not Redis's problem because when I move the deduplication to DownloadMiddleware (check url finger in process_request, add url finger in process_response), the speed of item pipeline returns to normal. Here are two links recording detailed information.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="663590938" data-permission-text="Title is private" data-url="https://github.com/rmax/scrapy-redis/issues/174" data-hovercard-type="issue" data-hovercard-url="/rmax/scrapy-redis/issues/174/hovercard" href="https://github.com/rmax/scrapy-redis/issues/174">rmax/scrapy-redis#174</a><br>
<a href="https://stackoverflow.com/questions/63026873/scarpy-redis-slows-down-item-pipelines" rel="nofollow">https://stackoverflow.com/questions/63026873/scarpy-redis-slows-down-item-pipelines</a></p>
<h3 dir="auto">Steps to Reproduce</h3>
<ol dir="auto">
<li>set DUPEFILTER_CLASS to "project.filename.customize-dupefilter-class"</li>
</ol>
<p dir="auto"><strong>Expected behavior:</strong> Item pipeline's speed should not varies dramartically</p>
<p dir="auto"><strong>Actual behavior:</strong> Item pipeline's speed is extremely slow</p>
<p dir="auto"><strong>Reproduces how often:</strong> Always</p>
<h3 dir="auto">Versions</h3>
<p dir="auto">Scrapy : 2.2.0<br>
lxml : 4.5.2.0<br>
libxml2 : 2.9.10<br>
cssselect : 1.1.0<br>
parsel : 1.6.0<br>
w3lib : 1.22.0<br>
Twisted : 20.3.0<br>
Python : 3.7.7 (default, Mar 10 2020, 15:43:33) - [Clang 11.0.0 (clang-1100.0.33.17)]<br>
pyOpenSSL : 19.1.0 (OpenSSL 1.1.1g 21 Apr 2020)<br>
cryptography : 2.9.2<br>
Platform : Darwin-19.5.0-x86_64-i386-64bit</p> | <h3 dir="auto">headers lowercase</h3>
<p dir="auto">[scrapy can not work when headers are lowercase ]</p>
<h3 dir="auto">Steps to Reproduce</h3>
<ol dir="auto">
<li>i must use lowercase headers key and I use Twisted mapping headers and it doesn't work</li>
</ol>
<p dir="auto"><strong>Expected behavior:</strong> scrapy run with no exception</p>
<p dir="auto"><strong>Actual behavior:</strong> scrapy and twisted does nothing for headers</p>
<p dir="auto"><strong>Reproduces how often:</strong> [What percentage of the time does it reproduce?]</p>
<h3 dir="auto">Versions</h3>
<p dir="auto">Scrapy : 2.0.1<br>
lxml : 4.4.1.0<br>
libxml2 : 2.9.5<br>
cssselect : 1.1.0<br>
parsel : 1.5.2<br>
w3lib : 1.21.0<br>
Twisted : 19.7.0<br>
Python : 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]<br>
pyOpenSSL : 19.0.0 (OpenSSL 1.1.1c 28 May 2019)<br>
cryptography : 2.7<br>
Platform : Windows-10-10.0.18362-SP0</p>
<h3 dir="auto">Additional context</h3>
<p dir="auto">I try to rewrite the Request and Headers class but it gives me a line <code class="notranslate">Please use app access!</code></p> | 0 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The regular expressions in <code class="notranslate">docs/src/modules/utils/parseMarkdown</code> use <code class="notranslate">\n</code> for a new line, while it should be <code class="notranslate">\r\n</code> on windows, which results in those regular expressions can't match any string.</p>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">It should distinguish the current platform and modify the regular expressions.</p>
<h2 dir="auto">Context</h2>
<p dir="auto">It affects the website's content. In API papes, the header information <code class="notranslate">filename: /src/AppBar/AppBar.js</code> will display above the title, and the button <code class="notranslate">EDIT THIS PAGE</code>'s url will be wrong.</p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<p dir="auto">Similar to issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="257161230" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/8169" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/8169/hovercard" href="https://github.com/mui/material-ui/issues/8169">#8169</a>, but that doesn't mention keyboard controls. May be fixed by pull request <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="258191299" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/8227" data-hovercard-type="pull_request" data-hovercard-url="/mui/material-ui/pull/8227/hovercard" href="https://github.com/mui/material-ui/pull/8227">#8227</a> but worth testing.</p>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Select should work exactly the same inside a dialog as on a normal page.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">If you put a Select inside a dialog, the behaviour is very odd. The keyboard control doesn't work very well, tabbing to a select and pressing space opens the menu, but doesn't focus the menu so another tab is required to focus it. Then once closed, focus position is lost and starts at the beginning of the form again</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto"><a href="https://codesandbox.io/s/32v7k6ozo1" rel="nofollow">https://codesandbox.io/s/32v7k6ozo1</a></p>
<ol dir="auto">
<li>Put a select inside a dialog.</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">Trying to put forms inside of a Dialog control.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>1.0.0-beta.10</td>
</tr>
<tr>
<td>React</td>
<td>15.6.1</td>
</tr>
<tr>
<td>browser</td>
<td>all</td>
</tr>
</tbody>
</table> | 0 |
<h3 dir="auto">Bug report</h3>
<p dir="auto">Hi,<br>
I have a notebook that allows to draw geometrical shapes using mouse, and buttons from matplotlib.widgets.<br>
After upgrade from matplotlib 3.1.1 to 3.3.1, my interactive plot has become excruciatingly slow.<br>
It used to work fine with "%matplotlib notebook" under matplotlib 3.3.1.</p>
<p dir="auto">Accessorily, %matplotlib notebook works for me only in chrome with 3.3.1, not firefox anymore.<br>
However, the code works with also with "%matplotlib widgets" and "%matplotlib ipympl"<br>
on both firefox and chrome, but it is slow in all cases with version matplotlib 3.3.1.</p>
<p dir="auto">I can revert to matplotlib 3.1.1 but that considerably restricts my options due to lack of compatibility with other modules I'd like to use jointly (in particular pygimli).</p>
<p dir="auto">Any help appreciated</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Paste your code here
####
# Here is the code example. This is what it does:
# allows to draw polygons with mouse clicks
# automatically labels the polygons each time "next poly" button is clicked
# allows to delete any of the polygons by specifying the label in inteactive text box and clickin g butto "delete poly"
####
# first, import modules:
import numpy as np
%matplotlib notebook
import matplotlib.pyplot as plt
from matplotlib.widgets import Button, TextBox
from operator import itemgetter
##################
# second, define a few functions:
def onclick2(event):
global pos
if event.inaxes in [ax1] and event.button == 1:
ax1.text(event.xdata, event.ydata, 'o', color='r', weight='bold',\
horizontalalignment='center',verticalalignment='center');
pos.append([event.xdata,event.ydata])
#ax1.set_title('%.1f' % pos[-1:][0][0] + ',' + '%.1f' % pos[-1:][0][1])
def f_next(event):
global pos,apos,pop,axpos,aypos,axposp,ayposp
if event.inaxes in [ax_next] and event.button == 1:
pop = np.array(pos).T.tolist()
pos=[]
axpos.append(pop[0])
aypos.append(pop[1])
ax1.clear()
ax1.set_xlim(left,right);ax1.set_ylim(bottom,top)
f_replot()
def f_delone(event):
global axpos,aypos
if event.inaxes in [ax_delone] and event.button == 1:
del axpos[ddata-1]
del aypos[ddata-1]
f_replot()
pos=[]
def getx(lst):
xx=list(map(itemgetter(0), lst))
return(xx)
def gety(lst):
yy=list(map(itemgetter(1), lst))
return(yy)
def f_replot():
ax1.clear()
ax1.set_xlim(left,right);ax1.set_ylim(bottom,top)
for ii in range(len(axpos)):
ax1.plot(axpos[ii],aypos[ii],'o');
ax1.plot(axpos[ii] + [axpos[ii][0]],aypos[ii] + [aypos[ii][0]],'-');
ax1.text(axpos[ii][0],aypos[ii][0], str(1+ii));
for ii in range(len(layers)):
ax1.plot(getx(layers[ii]),gety(layers[ii]),'-')
def f_plotlayers():
ax1.set_xlim(left,right);ax1.set_ylim(bottom,top)
for ii in range(len(layers)):
ax1.plot(getx(layers[ii]),gety(layers[ii]),'-')
def f_textbox(text):
global ddata
ddata = int(text)
def all_buttons():
global ax_next,ax_delall,ax_texbox,ax_delone,ax_save,ax_read,ax_filename
global b_next, b_delall, b_textbox, b_delone, b_save, b_filename, b_read
ax_next = fig0.add_axes([0.10, 0.07+0.2*hi+.5, 0.1, 0.075])
ax_textbox = fig0.add_axes([0.5,0.07+0.2*hi+.5,0.08,0.075])
ax_delone = fig0.add_axes([0.5,0.07+0.11*hi+.5,0.08,0.075])
#
b_next = Button(ax_next, 'Next poly',hovercolor='green')
b_next.on_clicked(f_next)
b_textbox = TextBox(ax_textbox, 'Del. nr:', initial=" ")
b_textbox.on_text_change(f_textbox)
b_delone = Button(ax_delone, 'Del poly', hovercolor='red')
b_delone.on_clicked(f_delone)
###############################################
# third, construct a plot and launch the interaction, by calling "all_buttons() and mpl_connect with "onclick2":
top=10;bottom=-60;left=0;right=256;# model size
layers=[]
# First "layer" is topography [[x0,y0], [x1,y1], ... [xn,yn]] i.e., flat horizontal [[0,0],[333,0]]:
layers.append([[0,0],[50,0],[60,3],[67,4],[70,3],[73,0],[256,0]])
# add as many layers as needed, or none. Negative is down:
layers.append([[0,-20],[256,-20]])
layers.append([[0,-30],[256,-50]])
mle=max([top-bottom,left-right])
hi=(top-bottom)/mle
wi=(right-left)/mle
pos=[]; mona='m_tmp.csv'
fig0 = plt.figure(figsize=(8,4));
ax1 = fig0.add_axes([0.07, 0.07, 0.2*wi, 0.2*hi*2]) #[left bottom width height]
ax1.set_xlim(left,right);ax1.set_ylim(bottom,top)
all_buttons()
f_plotlayers()
if 'axpos' in globals():
for i in range(len(axpos)):
f_replot()
else:
axpos=[]; aypos=[];
#
cid=fig0.canvas.mpl_connect('button_press_event', onclick2)
#
###########################"><pre class="notranslate"><span class="pl-c"># Paste your code here</span>
<span class="pl-c">####</span>
<span class="pl-c"># Here is the code example. This is what it does:</span>
<span class="pl-c"># allows to draw polygons with mouse clicks</span>
<span class="pl-c"># automatically labels the polygons each time "next poly" button is clicked</span>
<span class="pl-c"># allows to delete any of the polygons by specifying the label in inteactive text box and clickin g butto "delete poly"</span>
<span class="pl-c">####</span>
<span class="pl-c"># first, import modules:</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-c1">%</span><span class="pl-s1">matplotlib</span> <span class="pl-s1">notebook</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">widgets</span> <span class="pl-k">import</span> <span class="pl-v">Button</span>, <span class="pl-v">TextBox</span>
<span class="pl-k">from</span> <span class="pl-s1">operator</span> <span class="pl-k">import</span> <span class="pl-s1">itemgetter</span>
<span class="pl-c">##################</span>
<span class="pl-c"># second, define a few functions:</span>
<span class="pl-k">def</span> <span class="pl-en">onclick2</span>(<span class="pl-s1">event</span>):
<span class="pl-k">global</span> <span class="pl-s1">pos</span>
<span class="pl-k">if</span> <span class="pl-s1">event</span>.<span class="pl-s1">inaxes</span> <span class="pl-c1">in</span> [<span class="pl-s1">ax1</span>] <span class="pl-c1">and</span> <span class="pl-s1">event</span>.<span class="pl-s1">button</span> <span class="pl-c1">==</span> <span class="pl-c1">1</span>:
<span class="pl-s1">ax1</span>.<span class="pl-en">text</span>(<span class="pl-s1">event</span>.<span class="pl-s1">xdata</span>, <span class="pl-s1">event</span>.<span class="pl-s1">ydata</span>, <span class="pl-s">'o'</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'r'</span>, <span class="pl-s1">weight</span><span class="pl-c1">=</span><span class="pl-s">'bold'</span>,\
<span class="pl-s1">horizontalalignment</span><span class="pl-c1">=</span><span class="pl-s">'center'</span>,<span class="pl-s1">verticalalignment</span><span class="pl-c1">=</span><span class="pl-s">'center'</span>);
<span class="pl-s1">pos</span>.<span class="pl-en">append</span>([<span class="pl-s1">event</span>.<span class="pl-s1">xdata</span>,<span class="pl-s1">event</span>.<span class="pl-s1">ydata</span>])
<span class="pl-c">#ax1.set_title('%.1f' % pos[-1:][0][0] + ',' + '%.1f' % pos[-1:][0][1])</span>
<span class="pl-k">def</span> <span class="pl-en">f_next</span>(<span class="pl-s1">event</span>):
<span class="pl-k">global</span> <span class="pl-s1">pos</span>,<span class="pl-s1">apos</span>,<span class="pl-s1">pop</span>,<span class="pl-s1">axpos</span>,<span class="pl-s1">aypos</span>,<span class="pl-s1">axposp</span>,<span class="pl-s1">ayposp</span>
<span class="pl-k">if</span> <span class="pl-s1">event</span>.<span class="pl-s1">inaxes</span> <span class="pl-c1">in</span> [<span class="pl-s1">ax_next</span>] <span class="pl-c1">and</span> <span class="pl-s1">event</span>.<span class="pl-s1">button</span> <span class="pl-c1">==</span> <span class="pl-c1">1</span>:
<span class="pl-s1">pop</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-s1">pos</span>).<span class="pl-v">T</span>.<span class="pl-en">tolist</span>()
<span class="pl-s1">pos</span><span class="pl-c1">=</span>[]
<span class="pl-s1">axpos</span>.<span class="pl-en">append</span>(<span class="pl-s1">pop</span>[<span class="pl-c1">0</span>])
<span class="pl-s1">aypos</span>.<span class="pl-en">append</span>(<span class="pl-s1">pop</span>[<span class="pl-c1">1</span>])
<span class="pl-s1">ax1</span>.<span class="pl-en">clear</span>()
<span class="pl-s1">ax1</span>.<span class="pl-en">set_xlim</span>(<span class="pl-s1">left</span>,<span class="pl-s1">right</span>);<span class="pl-s1">ax1</span>.<span class="pl-en">set_ylim</span>(<span class="pl-s1">bottom</span>,<span class="pl-s1">top</span>)
<span class="pl-en">f_replot</span>()
<span class="pl-k">def</span> <span class="pl-en">f_delone</span>(<span class="pl-s1">event</span>):
<span class="pl-k">global</span> <span class="pl-s1">axpos</span>,<span class="pl-s1">aypos</span>
<span class="pl-k">if</span> <span class="pl-s1">event</span>.<span class="pl-s1">inaxes</span> <span class="pl-c1">in</span> [<span class="pl-s1">ax_delone</span>] <span class="pl-c1">and</span> <span class="pl-s1">event</span>.<span class="pl-s1">button</span> <span class="pl-c1">==</span> <span class="pl-c1">1</span>:
<span class="pl-k">del</span> <span class="pl-s1">axpos</span>[<span class="pl-s1">ddata</span><span class="pl-c1">-</span><span class="pl-c1">1</span>]
<span class="pl-k">del</span> <span class="pl-s1">aypos</span>[<span class="pl-s1">ddata</span><span class="pl-c1">-</span><span class="pl-c1">1</span>]
<span class="pl-en">f_replot</span>()
<span class="pl-s1">pos</span><span class="pl-c1">=</span>[]
<span class="pl-k">def</span> <span class="pl-en">getx</span>(<span class="pl-s1">lst</span>):
<span class="pl-s1">xx</span><span class="pl-c1">=</span><span class="pl-en">list</span>(<span class="pl-en">map</span>(<span class="pl-en">itemgetter</span>(<span class="pl-c1">0</span>), <span class="pl-s1">lst</span>))
<span class="pl-k">return</span>(<span class="pl-s1">xx</span>)
<span class="pl-k">def</span> <span class="pl-en">gety</span>(<span class="pl-s1">lst</span>):
<span class="pl-s1">yy</span><span class="pl-c1">=</span><span class="pl-en">list</span>(<span class="pl-en">map</span>(<span class="pl-en">itemgetter</span>(<span class="pl-c1">1</span>), <span class="pl-s1">lst</span>))
<span class="pl-k">return</span>(<span class="pl-s1">yy</span>)
<span class="pl-k">def</span> <span class="pl-en">f_replot</span>():
<span class="pl-s1">ax1</span>.<span class="pl-en">clear</span>()
<span class="pl-s1">ax1</span>.<span class="pl-en">set_xlim</span>(<span class="pl-s1">left</span>,<span class="pl-s1">right</span>);<span class="pl-s1">ax1</span>.<span class="pl-en">set_ylim</span>(<span class="pl-s1">bottom</span>,<span class="pl-s1">top</span>)
<span class="pl-k">for</span> <span class="pl-s1">ii</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-en">len</span>(<span class="pl-s1">axpos</span>)):
<span class="pl-s1">ax1</span>.<span class="pl-en">plot</span>(<span class="pl-s1">axpos</span>[<span class="pl-s1">ii</span>],<span class="pl-s1">aypos</span>[<span class="pl-s1">ii</span>],<span class="pl-s">'o'</span>);
<span class="pl-s1">ax1</span>.<span class="pl-en">plot</span>(<span class="pl-s1">axpos</span>[<span class="pl-s1">ii</span>] <span class="pl-c1">+</span> [<span class="pl-s1">axpos</span>[<span class="pl-s1">ii</span>][<span class="pl-c1">0</span>]],<span class="pl-s1">aypos</span>[<span class="pl-s1">ii</span>] <span class="pl-c1">+</span> [<span class="pl-s1">aypos</span>[<span class="pl-s1">ii</span>][<span class="pl-c1">0</span>]],<span class="pl-s">'-'</span>);
<span class="pl-s1">ax1</span>.<span class="pl-en">text</span>(<span class="pl-s1">axpos</span>[<span class="pl-s1">ii</span>][<span class="pl-c1">0</span>],<span class="pl-s1">aypos</span>[<span class="pl-s1">ii</span>][<span class="pl-c1">0</span>], <span class="pl-en">str</span>(<span class="pl-c1">1</span><span class="pl-c1">+</span><span class="pl-s1">ii</span>));
<span class="pl-k">for</span> <span class="pl-s1">ii</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-en">len</span>(<span class="pl-s1">layers</span>)):
<span class="pl-s1">ax1</span>.<span class="pl-en">plot</span>(<span class="pl-en">getx</span>(<span class="pl-s1">layers</span>[<span class="pl-s1">ii</span>]),<span class="pl-en">gety</span>(<span class="pl-s1">layers</span>[<span class="pl-s1">ii</span>]),<span class="pl-s">'-'</span>)
<span class="pl-k">def</span> <span class="pl-en">f_plotlayers</span>():
<span class="pl-s1">ax1</span>.<span class="pl-en">set_xlim</span>(<span class="pl-s1">left</span>,<span class="pl-s1">right</span>);<span class="pl-s1">ax1</span>.<span class="pl-en">set_ylim</span>(<span class="pl-s1">bottom</span>,<span class="pl-s1">top</span>)
<span class="pl-k">for</span> <span class="pl-s1">ii</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-en">len</span>(<span class="pl-s1">layers</span>)):
<span class="pl-s1">ax1</span>.<span class="pl-en">plot</span>(<span class="pl-en">getx</span>(<span class="pl-s1">layers</span>[<span class="pl-s1">ii</span>]),<span class="pl-en">gety</span>(<span class="pl-s1">layers</span>[<span class="pl-s1">ii</span>]),<span class="pl-s">'-'</span>)
<span class="pl-k">def</span> <span class="pl-en">f_textbox</span>(<span class="pl-s1">text</span>):
<span class="pl-k">global</span> <span class="pl-s1">ddata</span>
<span class="pl-s1">ddata</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-s1">text</span>)
<span class="pl-k">def</span> <span class="pl-en">all_buttons</span>():
<span class="pl-k">global</span> <span class="pl-s1">ax_next</span>,<span class="pl-s1">ax_delall</span>,<span class="pl-s1">ax_texbox</span>,<span class="pl-s1">ax_delone</span>,<span class="pl-s1">ax_save</span>,<span class="pl-s1">ax_read</span>,<span class="pl-s1">ax_filename</span>
<span class="pl-k">global</span> <span class="pl-s1">b_next</span>, <span class="pl-s1">b_delall</span>, <span class="pl-s1">b_textbox</span>, <span class="pl-s1">b_delone</span>, <span class="pl-s1">b_save</span>, <span class="pl-s1">b_filename</span>, <span class="pl-s1">b_read</span>
<span class="pl-s1">ax_next</span> <span class="pl-c1">=</span> <span class="pl-s1">fig0</span>.<span class="pl-en">add_axes</span>([<span class="pl-c1">0.10</span>, <span class="pl-c1">0.07</span><span class="pl-c1">+</span><span class="pl-c1">0.2</span><span class="pl-c1">*</span><span class="pl-s1">hi</span><span class="pl-c1">+</span><span class="pl-c1">.5</span>, <span class="pl-c1">0.1</span>, <span class="pl-c1">0.075</span>])
<span class="pl-s1">ax_textbox</span> <span class="pl-c1">=</span> <span class="pl-s1">fig0</span>.<span class="pl-en">add_axes</span>([<span class="pl-c1">0.5</span>,<span class="pl-c1">0.07</span><span class="pl-c1">+</span><span class="pl-c1">0.2</span><span class="pl-c1">*</span><span class="pl-s1">hi</span><span class="pl-c1">+</span><span class="pl-c1">.5</span>,<span class="pl-c1">0.08</span>,<span class="pl-c1">0.075</span>])
<span class="pl-s1">ax_delone</span> <span class="pl-c1">=</span> <span class="pl-s1">fig0</span>.<span class="pl-en">add_axes</span>([<span class="pl-c1">0.5</span>,<span class="pl-c1">0.07</span><span class="pl-c1">+</span><span class="pl-c1">0.11</span><span class="pl-c1">*</span><span class="pl-s1">hi</span><span class="pl-c1">+</span><span class="pl-c1">.5</span>,<span class="pl-c1">0.08</span>,<span class="pl-c1">0.075</span>])
<span class="pl-c">#</span>
<span class="pl-s1">b_next</span> <span class="pl-c1">=</span> <span class="pl-v">Button</span>(<span class="pl-s1">ax_next</span>, <span class="pl-s">'Next poly'</span>,<span class="pl-s1">hovercolor</span><span class="pl-c1">=</span><span class="pl-s">'green'</span>)
<span class="pl-s1">b_next</span>.<span class="pl-en">on_clicked</span>(<span class="pl-s1">f_next</span>)
<span class="pl-s1">b_textbox</span> <span class="pl-c1">=</span> <span class="pl-v">TextBox</span>(<span class="pl-s1">ax_textbox</span>, <span class="pl-s">'Del. nr:'</span>, <span class="pl-s1">initial</span><span class="pl-c1">=</span><span class="pl-s">" "</span>)
<span class="pl-s1">b_textbox</span>.<span class="pl-en">on_text_change</span>(<span class="pl-s1">f_textbox</span>)
<span class="pl-s1">b_delone</span> <span class="pl-c1">=</span> <span class="pl-v">Button</span>(<span class="pl-s1">ax_delone</span>, <span class="pl-s">'Del poly'</span>, <span class="pl-s1">hovercolor</span><span class="pl-c1">=</span><span class="pl-s">'red'</span>)
<span class="pl-s1">b_delone</span>.<span class="pl-en">on_clicked</span>(<span class="pl-s1">f_delone</span>)
<span class="pl-c">###############################################</span>
<span class="pl-c"># third, construct a plot and launch the interaction, by calling "all_buttons() and mpl_connect with "onclick2":</span>
<span class="pl-s1">top</span><span class="pl-c1">=</span><span class="pl-c1">10</span>;<span class="pl-s1">bottom</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">60</span>;<span class="pl-s1">left</span><span class="pl-c1">=</span><span class="pl-c1">0</span>;<span class="pl-s1">right</span><span class="pl-c1">=</span><span class="pl-c1">256</span>;<span class="pl-c"># model size</span>
<span class="pl-s1">layers</span><span class="pl-c1">=</span>[]
<span class="pl-c"># First "layer" is topography [[x0,y0], [x1,y1], ... [xn,yn]] i.e., flat horizontal [[0,0],[333,0]]:</span>
<span class="pl-s1">layers</span>.<span class="pl-en">append</span>([[<span class="pl-c1">0</span>,<span class="pl-c1">0</span>],[<span class="pl-c1">50</span>,<span class="pl-c1">0</span>],[<span class="pl-c1">60</span>,<span class="pl-c1">3</span>],[<span class="pl-c1">67</span>,<span class="pl-c1">4</span>],[<span class="pl-c1">70</span>,<span class="pl-c1">3</span>],[<span class="pl-c1">73</span>,<span class="pl-c1">0</span>],[<span class="pl-c1">256</span>,<span class="pl-c1">0</span>]])
<span class="pl-c"># add as many layers as needed, or none. Negative is down:</span>
<span class="pl-s1">layers</span>.<span class="pl-en">append</span>([[<span class="pl-c1">0</span>,<span class="pl-c1">-</span><span class="pl-c1">20</span>],[<span class="pl-c1">256</span>,<span class="pl-c1">-</span><span class="pl-c1">20</span>]])
<span class="pl-s1">layers</span>.<span class="pl-en">append</span>([[<span class="pl-c1">0</span>,<span class="pl-c1">-</span><span class="pl-c1">30</span>],[<span class="pl-c1">256</span>,<span class="pl-c1">-</span><span class="pl-c1">50</span>]])
<span class="pl-s1">mle</span><span class="pl-c1">=</span><span class="pl-en">max</span>([<span class="pl-s1">top</span><span class="pl-c1">-</span><span class="pl-s1">bottom</span>,<span class="pl-s1">left</span><span class="pl-c1">-</span><span class="pl-s1">right</span>])
<span class="pl-s1">hi</span><span class="pl-c1">=</span>(<span class="pl-s1">top</span><span class="pl-c1">-</span><span class="pl-s1">bottom</span>)<span class="pl-c1">/</span><span class="pl-s1">mle</span>
<span class="pl-s1">wi</span><span class="pl-c1">=</span>(<span class="pl-s1">right</span><span class="pl-c1">-</span><span class="pl-s1">left</span>)<span class="pl-c1">/</span><span class="pl-s1">mle</span>
<span class="pl-s1">pos</span><span class="pl-c1">=</span>[]; <span class="pl-s1">mona</span><span class="pl-c1">=</span><span class="pl-s">'m_tmp.csv'</span>
<span class="pl-s1">fig0</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">8</span>,<span class="pl-c1">4</span>));
<span class="pl-s1">ax1</span> <span class="pl-c1">=</span> <span class="pl-s1">fig0</span>.<span class="pl-en">add_axes</span>([<span class="pl-c1">0.07</span>, <span class="pl-c1">0.07</span>, <span class="pl-c1">0.2</span><span class="pl-c1">*</span><span class="pl-s1">wi</span>, <span class="pl-c1">0.2</span><span class="pl-c1">*</span><span class="pl-s1">hi</span><span class="pl-c1">*</span><span class="pl-c1">2</span>]) <span class="pl-c">#[left bottom width height]</span>
<span class="pl-s1">ax1</span>.<span class="pl-en">set_xlim</span>(<span class="pl-s1">left</span>,<span class="pl-s1">right</span>);<span class="pl-s1">ax1</span>.<span class="pl-en">set_ylim</span>(<span class="pl-s1">bottom</span>,<span class="pl-s1">top</span>)
<span class="pl-en">all_buttons</span>()
<span class="pl-en">f_plotlayers</span>()
<span class="pl-k">if</span> <span class="pl-s">'axpos'</span> <span class="pl-c1">in</span> <span class="pl-en">globals</span>():
<span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-en">len</span>(<span class="pl-s1">axpos</span>)):
<span class="pl-en">f_replot</span>()
<span class="pl-k">else</span>:
<span class="pl-s1">axpos</span><span class="pl-c1">=</span>[]; <span class="pl-s1">aypos</span><span class="pl-c1">=</span>[];
<span class="pl-c">#</span>
<span class="pl-s1">cid</span><span class="pl-c1">=</span><span class="pl-s1">fig0</span>.<span class="pl-s1">canvas</span>.<span class="pl-en">mpl_connect</span>(<span class="pl-s">'button_press_event'</span>, <span class="pl-s1">onclick2</span>)
<span class="pl-c">#</span>
<span class="pl-c">###########################</span></pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45072850/93027361-20464680-f604-11ea-8695-d387f8e7ea4a.png"><img src="https://user-images.githubusercontent.com/45072850/93027361-20464680-f604-11ea-8695-d387f8e7ea4a.png" alt="image" style="max-width: 100%;"></a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# If applicable, paste the console output here
#
#"><pre class="notranslate"><code class="notranslate"># If applicable, paste the console output here
#
#
</code></pre></div>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto"><strong>Matplotlib version</strong><br>
matplotlib 3.1.1</p>
<ul dir="auto">
<li>Operating system: linux mint</li>
<li>Matplotlib version: 3.3.1</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): nbAgg</li>
<li>Python version: 3.7.8</li>
<li>Jupyter version (if applicable):<br>
jupyter core : 4.6.3<br>
jupyter-notebook : 6.1.4<br>
qtconsole : 4.7.5<br>
ipython : 7.17.0<br>
ipykernel : 5.3.4<br>
jupyter client : 6.1.6<br>
jupyter lab : not installed<br>
nbconvert : 5.6.1<br>
ipywidgets : 7.5.1<br>
nbformat : 5.0.7<br>
traitlets : 4.3.3</li>
<li>Other libraries:</li>
</ul>
<p dir="auto">installed with conda</p>
<p dir="auto">the working environment was installed from conda. Channels are:</p>
<ul dir="auto">
<li>gimli</li>
<li>anaconda</li>
<li>conda-forge</li>
<li>defaults<br>
######################################################</li>
</ul> | <h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">I encountered a performance regression starting in Matplotlib v3.3.0 when using a figure with a button widget. Any mouse motion appears to trigger canvas draw events. The issue bisected to commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/matplotlib/matplotlib/commit/f6b88917ac2a1c2fdfe25c144d1b81bd7003b3d1/hovercard" href="https://github.com/matplotlib/matplotlib/commit/f6b88917ac2a1c2fdfe25c144d1b81bd7003b3d1"><tt>f6b8891</tt></a> and is not present in v3.2.2.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from matplotlib import pyplot as plt
from matplotlib.widgets import Button
if __name__ == "__main__":
def on_draw(evt):
global redraw_count
redraw_count += 1
btn.label.set_text(btn_txt.format(redraw_count))
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
redraw_count = 0
btn_txt = "Redraws: {}"
btn = Button(ax, btn_txt.format(redraw_count))
fig.canvas.mpl_connect("draw_event", on_draw)
plt.show()
"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">widgets</span> <span class="pl-k">import</span> <span class="pl-v">Button</span>
<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>:
<span class="pl-k">def</span> <span class="pl-en">on_draw</span>(<span class="pl-s1">evt</span>):
<span class="pl-k">global</span> <span class="pl-s1">redraw_count</span>
<span class="pl-s1">redraw_count</span> <span class="pl-c1">+=</span> <span class="pl-c1">1</span>
<span class="pl-s1">btn</span>.<span class="pl-s1">label</span>.<span class="pl-en">set_text</span>(<span class="pl-s1">btn_txt</span>.<span class="pl-en">format</span>(<span class="pl-s1">redraw_count</span>))
<span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()
<span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>)
<span class="pl-s1">redraw_count</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>
<span class="pl-s1">btn_txt</span> <span class="pl-c1">=</span> <span class="pl-s">"Redraws: {}"</span>
<span class="pl-s1">btn</span> <span class="pl-c1">=</span> <span class="pl-v">Button</span>(<span class="pl-s1">ax</span>, <span class="pl-s1">btn_txt</span>.<span class="pl-en">format</span>(<span class="pl-s1">redraw_count</span>))
<span class="pl-s1">fig</span>.<span class="pl-s1">canvas</span>.<span class="pl-en">mpl_connect</span>(<span class="pl-s">"draw_event"</span>, <span class="pl-s1">on_draw</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<p dir="auto">Motion anywhere in the figure increments the number of redraw events. The issue appears to result from the comparison between the Button's stored color value and the Axes's returned facecolor (see <a href="https://github.com/matplotlib/matplotlib/blob/v3.3.1/lib/matplotlib/widgets.py#L214">here</a>). The default Button color is given and stored as a string of a float, while the Axes <code class="notranslate">get_facecolor</code> returns a tuple in RGBA format.</p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">Redraws are only triggered when moving into or out of the button to show the hover color change. A workaround is to give the <code class="notranslate">color</code> and <code class="notranslate">hovercolor</code> parameters to <code class="notranslate">Button</code> as RGBA values, such as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="btn = Button(ax, "Label", color=(0.2, 0.3, 0.4, 1.0), hovercolor=(0.3, 0.4, 0.5, 1.0))"><pre class="notranslate"><code class="notranslate">btn = Button(ax, "Label", color=(0.2, 0.3, 0.4, 1.0), hovercolor=(0.3, 0.4, 0.5, 1.0))
</code></pre></div>
<p dir="auto">A fix would be to convert the found color value in the <code class="notranslate">Button._motion</code> function to RGBA when comparing with the current facecolor, such as this change in the <code class="notranslate">Button</code> class (after adding an import to <code class="notranslate">colors</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" def _motion(self, event):
if self.ignore(event):
return
c = self.hovercolor if event.inaxes == self.ax else self.color
# changed c to colors.to_rgba(c)
if colors.to_rgba(c) != self.ax.get_facecolor():
self.ax.set_facecolor(c)
if self.drawon:
self.ax.figure.canvas.draw()"><pre class="notranslate"><code class="notranslate"> def _motion(self, event):
if self.ignore(event):
return
c = self.hovercolor if event.inaxes == self.ax else self.color
# changed c to colors.to_rgba(c)
if colors.to_rgba(c) != self.ax.get_facecolor():
self.ax.set_facecolor(c)
if self.drawon:
self.ax.figure.canvas.draw()
</code></pre></div>
<p dir="auto">If this seems reasonable, I can submit a PR.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: macOS 10.15.5</li>
<li>Matplotlib version: 3.3.1 (tested on latest commit, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/matplotlib/matplotlib/commit/ce6ac2d174e396abab9e17577f3721f33bd7d41f/hovercard" href="https://github.com/matplotlib/matplotlib/commit/ce6ac2d174e396abab9e17577f3721f33bd7d41f"><tt>ce6ac2d</tt></a>)</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): MacOSX</li>
<li>Python version: 3.7.6</li>
<li>Jupyter version (if applicable): n/a</li>
<li>Other libraries: n/a</li>
</ul> | 1 |
<h1 dir="auto">Examples bug report</h1>
<h2 dir="auto">Example name</h2>
<p dir="auto">with-ant-design-less<br>
<a href="https://github.com/zeit/next.js/tree/canary/examples/with-ant-design-less">https://github.com/zeit/next.js/tree/canary/examples/with-ant-design-less</a></p>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">When I click on a Link to a page that uses any antd component, it doesn't work and when I click on a Link to a page that doesn't use any antd component, it works.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">I create a codesandbox to reproduce te bug <a href="https://codesandbox.io/s/nextjs-ant-design-8t41c" rel="nofollow">https://codesandbox.io/s/nextjs-ant-design-8t41c</a></p>
<ul dir="auto">
<li>Click on "Go to page with antd" doesn't work</li>
<li>Click on "Go to page without antd" works</li>
</ul>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">The Link redirect to page that uses antd</p>
<h2 dir="auto">System information</h2>
<p dir="auto">Dependencies:<br>
"@zeit/next-less": "1.0.1",<br>
"antd": "3.25.1",<br>
"babel-plugin-import": "1.12.2",<br>
"less": "3.10.3",<br>
"less-vars-to-js": "1.3.0",<br>
"next": "latest",<br>
"null-loader": "3.0.0",<br>
"react": "^16.7.0",<br>
"react-dom": "^16.7.0"</p> | <p dir="auto">This is bug report</p>
<p dir="auto">Link does not work with css-module imported. That happens when page with Link has no css, and linked page has. No errors in console, so im not sure about reasons, but there is minimal repo to reproduce:<br>
<a href="https://github.com/standy/next-css-error">https://github.com/standy/next-css-error</a></p>
<p dir="auto">Bug appears in <code class="notranslate">[email protected]</code> + <code class="notranslate">[email protected]</code>,<br>
Older <code class="notranslate">[email protected]</code> + <code class="notranslate">[email protected]</code> works fine</p> | 1 |
<hr>
<h2 dir="auto">Caravel 0.9.0</h2>
<p dir="auto">How to recreate</p>
<ol dir="auto">
<li>After setting Mysql ( Ver 14.14 Distrib 5.7.10 ) as source in <a href="http://127.0.0.1:8088/databaseview/add" rel="nofollow">http://127.0.0.1:8088/databaseview/add</a></li>
<li>Added a table "daily_inventory_details" in <a href="http://127.0.0.1:8088/tablemodelview/add" rel="nofollow">http://127.0.0.1:8088/tablemodelview/add</a></li>
<li>Caused the error screenshot attached.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/60755/15269552/0c11b542-1a20-11e6-9303-31bbfbb561a0.png"><img width="1280" alt="screen shot 2016-05-14 at 10 04 46 pm" src="https://cloud.githubusercontent.com/assets/60755/15269552/0c11b542-1a20-11e6-9303-31bbfbb561a0.png" style="max-width: 100%;"></a></li>
</ol>
<p dir="auto"><code class="notranslate">2016-05-14 21:06:15,168:INFO:werkzeug:127.0.0.1 - - [14/May/2016 21:06:15] "GET /tablemodelview/add HTTP/1.1" 200 - 2016-05-14 21:06:19,730:ERROR:root:(raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (_mysql_exceptions.DataError) (1406, "Data too long for column 'type' at row 1") [SQL: u'INSERT INTO table_columns (created_on, changed_on, table_id, column_name, verbose_name, is_dttm, is_active, type, groupby, count_distinct, sum, max, min, filterable, expression, description, changed_by_fk, created_by_fk) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)'] [parameters: (datetime.datetime(2016, 5, 14, 21, 6, 19, 727486), datetime.datetime(2016, 5, 14, 21, 6, 19, 727498), 12L, 'comments', None, 0, 1, 'VARCHAR(255) COLLATE UTF8_UNICODE_CI', 1, 0, 0, 0, 0, 1, '', '', 1L, 1L)] Traceback (most recent call last): File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/caravel/views.py", line 259, in post_add table.fetch_metadata() File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/caravel/models.py", line 809, in fetch_metadata db.session.merge(self) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 157, in do return getattr(self.registry(), name)(*args, **kwargs) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1700, in merge self._autoflush() File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1303, in _autoflush util.raise_from_cause(e) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1293, in _autoflush self.flush() File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2019, in flush self._flush(objects) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2137, in _flush transaction.rollback(_capture_exception=True) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2101, in _flush flush_context.execute() File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute rec.execute(self) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute uow File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj mapper, table, insert) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 800, in _emit_insert_statements execute(statement, params) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute return meth(self, multiparams, params) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement compiled_sql, distilled_params File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context context) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception exc_info File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute cursor.execute(statement, parameters) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/MySQLdb/cursors.py", line 226, in execute self.errorhandler(self, exc, value) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorvalue DataError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (_mysql_exceptions.DataError) (1406, "Data too long for column 'type' at row 1") [SQL: u'INSERT INTO table_columns (created_on, changed_on, table_id, column_name, verbose_name, is_dttm, is_active, type, groupby, count_distinct, sum, max, min, filterable, expression, description, changed_by_fk, created_by_fk) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)'] [parameters: (datetime.datetime(2016, 5, 14, 21, 6, 19, 727486), datetime.datetime(2016, 5, 14, 21, 6, 19, 727498), 12L, 'comments', None, 0, 1, 'VARCHAR(255) COLLATE UTF8_UNICODE_CI', 1, 0, 0, 0, 0, 1, '', '', 1L, 1L)] 2016-05-14 21:06:19,779:INFO:werkzeug:127.0.0.1 - - [14/May/2016 21:06:19] "POST /tablemodelview/add HTTP/1.1" 500 - Traceback (most recent call last): File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__ return self.wsgi_app(environ, start_response) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception reraise(exc_type, exc_value, tb) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask_appbuilder/security/decorators.py", line 26, in wraps return f(self, *args, **kwargs) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask_appbuilder/views.py", line 397, in add widget = self._add() File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/flask_appbuilder/baseviews.py", line 910, in _add self.post_add(item) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/caravel/views.py", line 264, in post_add "couldn't fetch metadata".format(table.table_name), File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 237, in __get__ return self.impl.get(instance_state(instance), dict_) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 578, in get value = state._load_expired(state, passive) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 474, in _load_expired self.manager.deferred_scalar_loader(self, toload) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/loading.py", line 664, in load_scalar_attributes only_load_props=attribute_names) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/loading.py", line 219, in load_on_ident return q.one() File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2693, in one ret = list(self) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2736, in __iter__ return self._execute_and_instances(context) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2749, in _execute_and_instances close_with_result=True) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2740, in _connection_from_session **kw) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 893, in connection execution_options=execution_options) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 898, in _connection_for_bind engine, execution_options) File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 313, in _connection_for_bind self._assert_active() File "/Users/shashanksingh/code/faasos/analytics/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 214, in _assert_active % self._rollback_exception InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (_mysql_exceptions.DataError) (1406, "Data too long for column 'type' at row 1") [SQL: u'INSERT INTO table_columns (created_on, changed_on, table_id, column_name, verbose_name, is_dttm, is_active, type, groupby, count_distinct, sum, max, min, filterable, expression, description, changed_by_fk, created_by_fk) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)'] [parameters: (datetime.datetime(2016, 5, 14, 21, 6, 19, 727486), datetime.datetime(2016, 5, 14, 21, 6, 19, 727498), 12L, 'comments', None, 0, 1, 'VARCHAR(255) COLLATE UTF8_UNICODE_CI', 1, 0, 0, 0, 0, 1, '', '', 1L, 1L)] 2016-05-14 21:06:19,869:INFO:werkzeug:127.0.0.1 - - [14/May/2016 21:06:19] "GET /tablemodelview/add?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 - 2016-05-14 21:06:19,871:INFO:werkzeug:127.0.0.1 - - [14/May/2016 21:06:19] "GET /tablemodelview/add?__debugger__=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 - 2016-05-14 21:06:19,873:INFO:werkzeug:127.0.0.1 - - [14/May/2016 21:06:19] "GET /tablemodelview/add?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 - 2016-05-14 21:06:19,978:INFO:werkzeug:127.0.0.1 - - [14/May/2016 21:06:19] "GET /tablemodelview/add?__debugger__=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 - 2016-05-14 21:06:20,009:INFO:werkzeug:127.0.0.1 - - [14/May/2016 21:06:20] "GET /tablemodelview/add?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 - 2016-05-14 21:06:20,186:INFO:werkzeug:127.0.0.1 - - [14/May/2016 21:06:20] "GET /tablemodelview/add?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 - 2016-05-14 21:12:47,074:INFO:werkzeug:127.0.0.1 - - [14/May/2016 21:12:47] "GET /tablemodelview/list/ HTTP/1.1" 200 - 2016-05-14 21:12:49,661:INFO:werkzeug:127.0.0.1 - - [14/May/2016 21:12:49] "GET /tablemodelview/add HTTP/1.1" 200 - 2016-05-14 21:13:12,449:WARNING:flask_appbuilder.models.sqla.interface:Add record integrity error: (_mysql_exceptions.IntegrityError) (1062, "Duplicate entry 'daily_inventory_details' for key 'table_name'") [SQL: u'INSERT INTO</code>tables<code class="notranslate">(created_on, changed_on, table_name, main_dttm_col, description, default_endpoint, database_id, is_featured, user_id, offset, cache_timeout,</code>schema<code class="notranslate">, changed_by_fk, created_by_fk) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)'] [parameters: (datetime.datetime(2016, 5, 14, 21, 13, 12, 445517), datetime.datetime(2016, 5, 14, 21, 13, 12, 445528), 'daily_inventory_details', None, None, '', 2L, 0, None, 0, 10, '', 1L, 1L)]</code></p> | <p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong><br>
I'd like to duplicate the following code in Seaborn, where I can plot a histogram-like density plot, without the histogram bar.<br>
x = np.random.randn(100)<br>
ax = sns.distplot(x, hist=False, kde = True)</p>
<p dir="auto"><strong>Describe the solution you'd like</strong><br>
Something like this, group by a level.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14266357/132608911-f95872fe-2341-4b50-857f-0b4bcfabef71.png"><img width="975" alt="Screen Shot 2021-09-08 at 9 50 53 PM" src="https://user-images.githubusercontent.com/14266357/132608911-f95872fe-2341-4b50-857f-0b4bcfabef71.png" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Describe alternatives you've considered</strong><br>
A clear and concise description of any alternative solutions or features you've considered.</p>
<p dir="auto"><strong>Additional context</strong><br>
Add any other context or screenshots about the feature request here.</p> | 0 |
<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">core</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="devel
ansible 2.0.0 (detached HEAD b2cb3153f1) last updated 2015/09/03 230737 (GMT +200)
lib/ansible/modules/core (detached HEAD bbcfb1092a) last updated 2015/09/03 230739 (GMT +200)
lib/ansible/modules/extras (detached HEAD b8803306d1) last updated 2015/09/03 230739 (GMT +200)
config file =
configured module search path = /root/ansible/library"><pre class="notranslate"><code class="notranslate">devel
ansible 2.0.0 (detached HEAD b2cb3153f1) last updated 2015/09/03 230737 (GMT +200)
lib/ansible/modules/core (detached HEAD bbcfb1092a) last updated 2015/09/03 230739 (GMT +200)
lib/ansible/modules/extras (detached HEAD b8803306d1) last updated 2015/09/03 230739 (GMT +200)
config file =
configured module search path = /root/ansible/library
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">none</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Debian 7</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Hi, unfortunately version 2.0 seems slow down.<br>
With a real playbook: v2 run within 32 secs, v2, stable-1.9 19 secs.<br>
Same conditions (target machine, control machine), no network congestions (local net), no network downloads.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">time ansible-playbook -i hosts simplespeedtest.yml > /dev/null</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
# simplespeedtest.yml
- hosts: localhost
tasks:
- command: echo 1
- command: echo 2
# and so on
- command: echo 30"><pre class="notranslate"><code class="notranslate">---
# simplespeedtest.yml
- hosts: localhost
tasks:
- command: echo 1
- command: echo 2
# and so on
- command: echo 30
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">ansible stable-1.9<br>
ansible 1.9.3 (detached HEAD <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/066b7079effbb97f34510a2b4d84b4b6dda56794/hovercard" href="https://github.com/ansible/ansible/commit/066b7079effbb97f34510a2b4d84b4b6dda56794"><tt>066b707</tt></a>) last updated 2015/09/03 23:19:28 (GMT +200)<br>
lib/ansible/modules/core: (detached HEAD dccef8f89a) last updated 2015/09/03 23:17:15 (GMT +200)<br>
lib/ansible/modules/extras: (detached HEAD 25595b4ecc) last updated 2015/09/03 23:17:15 (GMT +200)<br>
configured module search path = /root/ansible/library<br>
real 0m2.608s<br>
user 0m1.776s<br>
sys 0m0.464s<br>
real 0m2.476s<br>
user 0m1.656s<br>
sys 0m0.468s<br>
real 0m2.497s<br>
user 0m1.688s<br>
sys 0m0.444s</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">real 0m3.848s<br>
user 0m2.484s<br>
sys 0m0.496s<br>
real 0m3.524s<br>
user 0m2.208s<br>
sys 0m0.376s<br>
real 0m3.926s<br>
user 0m2.396s<br>
sys 0m0.544s</p> | <h5 dir="auto">Issue Type:</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 2.0.1.0<br>
config file =<br>
configured module search path = Default w/o overrides</p>
<h5 dir="auto">Ansible Configuration:</h5>
<p dir="auto">default</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Default role variable is overwritten by other role declaration in <code class="notranslate">meta/main.yml</code> file. See <code class="notranslate">ert</code> variable in example. This bug was introduced in 2 version. Version 1.9.4 hasn't this issue.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">test.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
- name: Test
hosts: localhost
roles:
- rover"><pre class="notranslate"><code class="notranslate">
---
- name: Test
hosts: localhost
roles:
- rover
</code></pre></div>
<p dir="auto">host:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="127.0.0.1 ansible_connection=local"><pre class="notranslate"><code class="notranslate">127.0.0.1 ansible_connection=local
</code></pre></div>
<p dir="auto">roles/rover/meta/main.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
dependencies:
- role: roter
bar: test_bar1
ert: test_ert1
- role: roter
bar: test_bar2"><pre class="notranslate"><code class="notranslate">
---
dependencies:
- role: roter
bar: test_bar1
ert: test_ert1
- role: roter
bar: test_bar2
</code></pre></div>
<p dir="auto">roles/roter/defaults/main.yml</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
bar: default_bar
ert: default_ert"><pre class="notranslate"><code class="notranslate">
---
bar: default_bar
ert: default_ert
</code></pre></div>
<p dir="auto">roles/roter/tasks/main.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
- debug: var=bar
- debug: var=ert"><pre class="notranslate"><code class="notranslate">
---
- debug: var=bar
- debug: var=ert
</code></pre></div>
<p dir="auto">Run ansible:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook -i host test.yml"><pre class="notranslate"><code class="notranslate">ansible-playbook -i host test.yml
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [Test] ********************************************************************
TASK [setup] *******************************************************************
ok: [127.0.0.1]
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"bar": "test_bar1"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"ert": "test_ert1"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"bar": "test_bar2"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"ert": "default_ert"
}
PLAY RECAP *********************************************************************
127.0.0.1 : ok=5 changed=0 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">PLAY [Test] ********************************************************************
TASK [setup] *******************************************************************
ok: [127.0.0.1]
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"bar": "test_bar1"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"ert": "test_ert1"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"bar": "test_bar2"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"ert": "default_ert"
}
PLAY RECAP *********************************************************************
127.0.0.1 : ok=5 changed=0 unreachable=0 failed=0
</code></pre></div>
<h5 dir="auto">Actual Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [Test] ********************************************************************
TASK [setup] *******************************************************************
ok: [127.0.0.1]
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"bar": "test_bar1"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"ert": "test_ert1"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"bar": "test_bar2"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"ert": "test_ert1"
}
PLAY RECAP *********************************************************************
127.0.0.1 : ok=5 changed=0 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">PLAY [Test] ********************************************************************
TASK [setup] *******************************************************************
ok: [127.0.0.1]
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"bar": "test_bar1"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"ert": "test_ert1"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"bar": "test_bar2"
}
TASK [roter : debug] ***********************************************************
ok: [127.0.0.1] => {
"ert": "test_ert1"
}
PLAY RECAP *********************************************************************
127.0.0.1 : ok=5 changed=0 unreachable=0 failed=0
</code></pre></div> | 0 |
<h3 dir="auto">Description</h3>
<p dir="auto">The current <code class="notranslate">className</code> prop on any JSX element takes only a string, that is supposed to be the class name to add to the corresponding element. This prop expects a string which makes it very easy to attach a single class name to the element.</p>
<p dir="auto">For example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<div className="my-css-class-name"></div>"><pre class="notranslate"><code class="notranslate"><div className="my-css-class-name"></div>
</code></pre></div>
<h3 dir="auto">Problem</h3>
<p dir="auto">The limitation I ran into while using className, is when I wanted to attach a couple classes to the same element, I naturally tried to do something like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<div className={"my-css-class-name", "my-other-css-class-name"}></div>"><pre class="notranslate"><code class="notranslate"><div className={"my-css-class-name", "my-other-css-class-name"}></div>
</code></pre></div>
<p dir="auto">But unfortunately it didn't work, <a href="https://reactjs.org/docs/faq-styling.html#how-do-i-add-css-classes-to-components" rel="nofollow">I then realized that it's not possible with the current JSX specification</a>.</p>
<p dir="auto">The proposed solution in the FAQ link I shared above suggests manually attaching the strings and add a space, or use another package called <a href="https://www.npmjs.com/package/classnames#usage-with-reactjs" rel="nofollow">"Classnames"</a>.</p>
<h3 dir="auto">Feature Proposal</h3>
<p dir="auto">I as a react user, expected naturally that I could provide multiple classes with JSX, so I think it can be useful for other developers, if the prop <code class="notranslate">className</code> can take an array of strings (classes) and does a simple <code class="notranslate">Array.join(" ")</code> in this case. So that developers won't have to join them manually or use the other package "Classnames". I believe this could be beneficial for the simple use case, and also for a more advanced use case like mine (using Material UI's <code class="notranslate">makeStyles</code>).</p>
<p dir="auto">I would appreciate your thoughts on this suggestion. Furthermore, if discussion concludes that you agree to adopt such change, I would be more than happy to contribute it, as by chance I was looking at the beginner-friendly issues for contributors a couple days ago and couldn't find something (they're all assigned).</p> | <p dir="auto">I often use components that both have an internal <code class="notranslate">className</code> as well as an optional <code class="notranslate">className</code> passed in as a prop. The way I've been implementing this is either through (A) a local array that I construct and serialize into the <code class="notranslate">className</code> prop, or (B) through using <code class="notranslate">React.addons.classSet</code>.</p>
<p dir="auto">A:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var classNames = ['my-component'];
if (this.props.className) {
classNames.push(this.props.className);
}
return <MyComponent className={classNames.join(' ')} />;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">classNames</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">'my-component'</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">className</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">classNames</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">className</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-c1"><</span><span class="pl-ent">MyComponent</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">classNames</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s">' '</span><span class="pl-kos">)</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">;</span></pre></div>
<p dir="auto">B:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var classes = {
'my-component': true
};
if (this.props.className) {
classes[this.props.className] = true;
}
return <MyComponent className={React.addons.classSet(classes)} />;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">classes</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-s">'my-component'</span>: <span class="pl-c1">true</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">className</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">classes</span><span class="pl-kos">[</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">className</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-c1"><</span><span class="pl-ent">MyComponent</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">addons</span><span class="pl-kos">.</span><span class="pl-en">classSet</span><span class="pl-kos">(</span><span class="pl-s1">classes</span><span class="pl-kos">)</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">;</span></pre></div>
<p dir="auto">A is slightly less verbose, but harder to use if you have modifier classes as well (e.g. <code class="notranslate">my-component--is-selected</code>).</p>
<p dir="auto">I'm suggesting allowing the className to be a string <em>or</em> an array. And if it is an array, React internals would compact and serialize the className array into a className string.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="return <MyComponent className={['my-component', this.props.className]} />;"><pre class="notranslate"><span class="pl-k">return</span> <span class="pl-c1"><</span><span class="pl-ent">MyComponent</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">[</span><span class="pl-s">'my-component'</span><span class="pl-kos">,</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">className</span><span class="pl-kos">]</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">;</span></pre></div>
<p dir="auto">If this is a good idea, I could make an attempt at a PR.</p> | 1 |
<p dir="auto">Prior to the update I had completed all waypoints, bonfires and ziplines up until TicTacToe.<br>
After completing challenges in section 4. "Gear Up For Success" I noticed that a large amount of waypoints and bonfires had become "incomplete"(I've attached a screenshot below to show what I mean. ) and the solutions did not show up on my profile however I still had the points from those challenges (I'm currently at 305 after re-doing a challenge that became incomplete to try and re-create the bug).</p>
<p dir="auto">I haven't been able to recreate the bug however I believe it's related to the new challenges being completed and overwriting previously completed challenges somehow.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/506160/10336734/b720e886-6d46-11e5-9c88-da9c33eda1b9.png"><img src="https://cloud.githubusercontent.com/assets/506160/10336734/b720e886-6d46-11e5-9c88-da9c33eda1b9.png" alt="screen shot 2015-10-07 at 10 53 22 pm" style="max-width: 100%;"></a></p> | <p dir="auto">In html under Change the Color of Text<br>
im change the color of h2 to blue and I did it but it not letting me run test I'm using a Galaxy S4 Mini</p> | 0 |
<p dir="auto">Here is the code I have tested on windows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package main
import (
"net"
"fmt"
)
func main() {
inets, _ := net.Interfaces()
for _, i := range inets {
if mac := i.HardwareAddr.String(); mac != "" {
fmt.Println("MAC:",mac)
fmt.Println("Name",i.Name)
addrs, _ := i.Addrs()
for _, addr := range addrs {
if addr := addr.String(); addr != "" {
fmt.Println("Addr:",addr)
}
}
}
}
}"><pre class="notranslate"><code class="notranslate">package main
import (
"net"
"fmt"
)
func main() {
inets, _ := net.Interfaces()
for _, i := range inets {
if mac := i.HardwareAddr.String(); mac != "" {
fmt.Println("MAC:",mac)
fmt.Println("Name",i.Name)
addrs, _ := i.Addrs()
for _, addr := range addrs {
if addr := addr.String(); addr != "" {
fmt.Println("Addr:",addr)
}
}
}
}
}
</code></pre></div>
<p dir="auto">Run this code on different version:</p>
<p dir="auto">On 1.4.3 get the result:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MAC: 08:00:27:0a:af:0c
Name {558CA760-9D61-47CC-AF7D-4E8635DDD283}
Addr: 10.0.2.15"><pre class="notranslate"><code class="notranslate">MAC: 08:00:27:0a:af:0c
Name {558CA760-9D61-47CC-AF7D-4E8635DDD283}
Addr: 10.0.2.15
</code></pre></div>
<p dir="auto">On 1.5.1 get the result:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MAC: 08:00:27:0a:af:0c:00:00
Name Local Area Connection
Addr: 10.0.2.15/16"><pre class="notranslate"><code class="notranslate">MAC: 08:00:27:0a:af:0c:00:00
Name Local Area Connection
Addr: 10.0.2.15/16
</code></pre></div>
<p dir="auto">On 1.5.2 get the result:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MAC: 08:00:27:0a:af:0c:00:00
Name Local Area Connection
Addr: 10.0.2.15/16
MAC: 00:00:00:00:00:00:00:00
Name MS TCP Loopback interface
Addr: 127.0.0.1/1"><pre class="notranslate"><code class="notranslate">MAC: 08:00:27:0a:af:0c:00:00
Name Local Area Connection
Addr: 10.0.2.15/16
MAC: 00:00:00:00:00:00:00:00
Name MS TCP Loopback interface
Addr: 127.0.0.1/1
</code></pre></div>
<p dir="auto">The old version MAC use the standard <a href="https://en.wikipedia.org/wiki/IEEE_802" rel="nofollow">IEEE 802</a> format MAC-48. but the new version use the EUI-64.</p>
<p dir="auto">If my program is relied on the MAC as the uuid. then upgrade Go will cause big problem. Is there any config to get MAC-48 not EUI-64?</p> | <p dir="auto">I'd written a program in go 1.4 to retrieve mac addresses on windows and used to get the correct mac address.<br>
With 1.5.1 however, I'm seeing a :00:00 appended to all the mac addresses on Windows (specifically Windows 7 Professional).</p>
<p dir="auto">Is there a reason for this (or is it simply an error on my side)?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" ifs, _ := net.Interfaces()
for _, v := range ifs {
h := v.HardwareAddr.String()
if len(h) == 0 {
continue
}
si.Macs = append(si.Macs, h)
}"><pre class="notranslate"><code class="notranslate"> ifs, _ := net.Interfaces()
for _, v := range ifs {
h := v.HardwareAddr.String()
if len(h) == 0 {
continue
}
si.Macs = append(si.Macs, h)
}
</code></pre></div>
<p dir="auto">Bjorn Graf in <a href="https://groups.google.com/forum/#!topic/golang-nuts/M-FqXQsOe_Q" rel="nofollow">this</a> thread reports: "on my Windows 10 Go 1.5,x (amd64 and 386) seems to find only the loopback pseudo-Interface with an all-00 mac while go1.4.2 lists the real interface."</p> | 1 |
<p dir="auto">When I open any file in my ES6 Javascript project, every single line is underlined in red, with errors like:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/79215/11252725/88d3c130-8dec-11e5-9b18-3f5bc4337bfe.png"><img src="https://cloud.githubusercontent.com/assets/79215/11252725/88d3c130-8dec-11e5-9b18-3f5bc4337bfe.png" alt="screen shot 2015-11-18 at 12 03 09 pm" style="max-width: 100%;"></a></p>
<p dir="auto">In my project's root, I have a <code class="notranslate">jsconfig.json</code> file with the following contents:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"target": "ES6",
"module": "commonjs"
},
"files": [
"app/"
]
}"><pre class="notranslate"><code class="notranslate">{
"compilerOptions": {
"target": "ES6",
"module": "commonjs"
},
"files": [
"app/"
]
}
</code></pre></div>
<p dir="auto">The file in question lives inside the <code class="notranslate">app</code> folder.</p> | <p dir="auto">I am incorrectly getting the following error, <strong>"This can only be used with ES6. Make sure to have a jsconfig.json-file which sets the target to ES6"</strong>.</p>
<p dir="auto">Furthermore, I think I may have stumbled upon a weird case where if the start of the file name is "temp" as in "temp.js", "temporary.js", or "temp123.js" it will cause this error.</p>
<p dir="auto">To reproduce:<br>
Create a file called temp.js with some ES6 code, such as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let x = 10"><pre class="notranslate"><code class="notranslate">let x = 10
</code></pre></div>
<p dir="auto">The above error is now showing. To fix it, create the jsconfig.json file which sets the target to ES6:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"target": "ES6"
}
}"><pre class="notranslate"><code class="notranslate">{
"compilerOptions": {
"target": "ES6"
}
}
</code></pre></div>
<p dir="auto">The error is still showing, now incorrectly.</p>
<p dir="auto">If I rename "temp.js" to "test.js" (or anything that doesn't start with 'temp') the error goes away. Or, if I create a files array in jsconfig.json which lists "temp.js", the error goes away:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"target": "ES6"
},
"files": [
"temp.js"
]
}"><pre class="notranslate"><code class="notranslate">{
"compilerOptions": {
"target": "ES6"
},
"files": [
"temp.js"
]
}
</code></pre></div>
<p dir="auto">I don't want to have to do this for every file in my project.</p>
<p dir="auto">I'm running on Windows 7, 64-bit.</p>
<p dir="auto">Thanks</p> | 1 |
<p dir="auto">Hello,</p>
<p dir="auto">I am using the preferred_choices option for the first time and i am seeing that preferred choices are not duplicated in the main list.</p>
<p dir="auto">I think it can cause trouble with users witch not pay attention that there are a preferred list or when default value witch is not in the preferred list is already selected (User will search alphabetically and maybe will not look to the top of the list).</p>
<p dir="auto">Is there a way to repeat preferred values in main list ?<br>
Maybe it should be the default symfony behavior ?</p> | <p dir="auto">I've done several Symfony projects beyond version 2.7.* in which I've used the <code class="notranslate">ChoiceType</code> form element by setting the <code class="notranslate">choices</code> option to an array using the convention <code class="notranslate">value => label</code>.</p>
<p dir="auto">However, I just noticed the convention has changed to <code class="notranslate">label => value</code>, via <a href="http://symfony.com/blog/new-in-symfony-2-7-choice-form-type-refactorization" rel="nofollow">http://symfony.com/blog/new-in-symfony-2-7-choice-form-type-refactorization</a> and <a href="http://symfony.com/doc/current/reference/forms/types/choice.html#choices" rel="nofollow">http://symfony.com/doc/current/reference/forms/types/choice.html#choices</a>.</p>
<p dir="auto">This change doesn't make sense to me. The convention has always been <code class="notranslate">value => label</code> anytime I've worked with a form APIs. This convention is intuitive with the uniqueness of array keys. It also mimics the <code class="notranslate"><select></code> element.</p>
<p dir="auto">Flipping the convention, I see at least three issues:</p>
<ul dir="auto">
<li>potential to have duplicate values in a form selection (I can't think of a reason this is useful)</li>
<li>potential to lose a selection if two labels are equal (eg. a User selection where their names are labels)</li>
<li>everyone has to change their code and way of thinking to move forward with Symfony</li>
</ul>
<p dir="auto">Can someone elaborate as to why this drastic of a change needed to happen? If the <code class="notranslate">choices</code> <strong>really</strong> needed to be backwards, that could have been done internally without affecting convention.</p> | 0 |
<p dir="auto">Our Analyze API accepts a <code class="notranslate">token_filters</code> parameter as the official way of adding token filters to the chain (we also support <code class="notranslate">filter</code> which is depracated):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GET _analyze
{
"text": "An apple",
"tokenizer": "whitespace",
"token_filters": [
"lowercase", "stop"
]
}"><pre class="notranslate"><code class="notranslate">GET _analyze
{
"text": "An apple",
"tokenizer": "whitespace",
"token_filters": [
"lowercase", "stop"
]
}
</code></pre></div>
<p dir="auto">However, creating an analyzer using indexing setting only accept <code class="notranslate">filter</code> (no S) which is confusing. I think the following should be accepted (if not the only default):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PUT index
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "whitespace",
"token_filters": [ <--- broken (expects "filter")
"lowercase",
"stop"
]
}
}
}
}
}"><pre class="notranslate"><code class="notranslate">PUT index
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "whitespace",
"token_filters": [ <--- broken (expects "filter")
"lowercase",
"stop"
]
}
}
}
}
}
</code></pre></div>
<p dir="auto">It's very easy to change the code to accept both <code class="notranslate">filter</code>, <code class="notranslate">filters</code> and <code class="notranslate">token_filters</code> but I tend to think that we should go strict here and say we only accept <code class="notranslate">token_filters</code> and automatically upgrade existing setting when we recover. This will require (some) more work as that infra is not there yet.</p> | <p dir="auto">I took 2 snapshots for read-only indices with curator and some indices were snapshotted again even though they didn't have any changes.</p>
<p dir="auto">Look at the first backup (50 oldest indices):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="51G s3://backups-es-statistics/indices/statistics-20131004/
27G s3://backups-es-statistics/indices/statistics-20131005/
24G s3://backups-es-statistics/indices/statistics-20131006/
39G s3://backups-es-statistics/indices/statistics-20131007/
25G s3://backups-es-statistics/indices/statistics-20131008/
30G s3://backups-es-statistics/indices/statistics-20131009/
37G s3://backups-es-statistics/indices/statistics-20131010/
28G s3://backups-es-statistics/indices/statistics-20131011/
27G s3://backups-es-statistics/indices/statistics-20131012/
28G s3://backups-es-statistics/indices/statistics-20131013/
32G s3://backups-es-statistics/indices/statistics-20131014/
41G s3://backups-es-statistics/indices/statistics-20131015/
42G s3://backups-es-statistics/indices/statistics-20131016/
33G s3://backups-es-statistics/indices/statistics-20131017/
29G s3://backups-es-statistics/indices/statistics-20131018/
29G s3://backups-es-statistics/indices/statistics-20131019/
30G s3://backups-es-statistics/indices/statistics-20131020/
32G s3://backups-es-statistics/indices/statistics-20131021/
33G s3://backups-es-statistics/indices/statistics-20131022/
29G s3://backups-es-statistics/indices/statistics-20131023/
36G s3://backups-es-statistics/indices/statistics-20131024/
32G s3://backups-es-statistics/indices/statistics-20131025/
32G s3://backups-es-statistics/indices/statistics-20131026/
34G s3://backups-es-statistics/indices/statistics-20131027/
31G s3://backups-es-statistics/indices/statistics-20131028/
40G s3://backups-es-statistics/indices/statistics-20131029/
29G s3://backups-es-statistics/indices/statistics-20131030/
35G s3://backups-es-statistics/indices/statistics-20131031/
7G s3://backups-es-statistics/indices/statistics-20131101/
6G s3://backups-es-statistics/indices/statistics-20131102/
7G s3://backups-es-statistics/indices/statistics-20131103/
7G s3://backups-es-statistics/indices/statistics-20131104/
7G s3://backups-es-statistics/indices/statistics-20131105/
7G s3://backups-es-statistics/indices/statistics-20131106/
7G s3://backups-es-statistics/indices/statistics-20131107/
7G s3://backups-es-statistics/indices/statistics-20131108/
7G s3://backups-es-statistics/indices/statistics-20131109/
7G s3://backups-es-statistics/indices/statistics-20131110/
7G s3://backups-es-statistics/indices/statistics-20131111/
7G s3://backups-es-statistics/indices/statistics-20131112/"><pre class="notranslate"><code class="notranslate">51G s3://backups-es-statistics/indices/statistics-20131004/
27G s3://backups-es-statistics/indices/statistics-20131005/
24G s3://backups-es-statistics/indices/statistics-20131006/
39G s3://backups-es-statistics/indices/statistics-20131007/
25G s3://backups-es-statistics/indices/statistics-20131008/
30G s3://backups-es-statistics/indices/statistics-20131009/
37G s3://backups-es-statistics/indices/statistics-20131010/
28G s3://backups-es-statistics/indices/statistics-20131011/
27G s3://backups-es-statistics/indices/statistics-20131012/
28G s3://backups-es-statistics/indices/statistics-20131013/
32G s3://backups-es-statistics/indices/statistics-20131014/
41G s3://backups-es-statistics/indices/statistics-20131015/
42G s3://backups-es-statistics/indices/statistics-20131016/
33G s3://backups-es-statistics/indices/statistics-20131017/
29G s3://backups-es-statistics/indices/statistics-20131018/
29G s3://backups-es-statistics/indices/statistics-20131019/
30G s3://backups-es-statistics/indices/statistics-20131020/
32G s3://backups-es-statistics/indices/statistics-20131021/
33G s3://backups-es-statistics/indices/statistics-20131022/
29G s3://backups-es-statistics/indices/statistics-20131023/
36G s3://backups-es-statistics/indices/statistics-20131024/
32G s3://backups-es-statistics/indices/statistics-20131025/
32G s3://backups-es-statistics/indices/statistics-20131026/
34G s3://backups-es-statistics/indices/statistics-20131027/
31G s3://backups-es-statistics/indices/statistics-20131028/
40G s3://backups-es-statistics/indices/statistics-20131029/
29G s3://backups-es-statistics/indices/statistics-20131030/
35G s3://backups-es-statistics/indices/statistics-20131031/
7G s3://backups-es-statistics/indices/statistics-20131101/
6G s3://backups-es-statistics/indices/statistics-20131102/
7G s3://backups-es-statistics/indices/statistics-20131103/
7G s3://backups-es-statistics/indices/statistics-20131104/
7G s3://backups-es-statistics/indices/statistics-20131105/
7G s3://backups-es-statistics/indices/statistics-20131106/
7G s3://backups-es-statistics/indices/statistics-20131107/
7G s3://backups-es-statistics/indices/statistics-20131108/
7G s3://backups-es-statistics/indices/statistics-20131109/
7G s3://backups-es-statistics/indices/statistics-20131110/
7G s3://backups-es-statistics/indices/statistics-20131111/
7G s3://backups-es-statistics/indices/statistics-20131112/
</code></pre></div>
<p dir="auto">And the subsequent backup, same indices:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="57G s3://backups-es-statistics/indices/statistics-20131004/
30G s3://backups-es-statistics/indices/statistics-20131005/
27G s3://backups-es-statistics/indices/statistics-20131006/
44G s3://backups-es-statistics/indices/statistics-20131007/
28G s3://backups-es-statistics/indices/statistics-20131008/
33G s3://backups-es-statistics/indices/statistics-20131009/
41G s3://backups-es-statistics/indices/statistics-20131010/
31G s3://backups-es-statistics/indices/statistics-20131011/
30G s3://backups-es-statistics/indices/statistics-20131012/
31G s3://backups-es-statistics/indices/statistics-20131013/
35G s3://backups-es-statistics/indices/statistics-20131014/
46G s3://backups-es-statistics/indices/statistics-20131015/
47G s3://backups-es-statistics/indices/statistics-20131016/
37G s3://backups-es-statistics/indices/statistics-20131017/
33G s3://backups-es-statistics/indices/statistics-20131018/
33G s3://backups-es-statistics/indices/statistics-20131019/
34G s3://backups-es-statistics/indices/statistics-20131020/
36G s3://backups-es-statistics/indices/statistics-20131021/
37G s3://backups-es-statistics/indices/statistics-20131022/
32G s3://backups-es-statistics/indices/statistics-20131023/
40G s3://backups-es-statistics/indices/statistics-20131024/
36G s3://backups-es-statistics/indices/statistics-20131025/
36G s3://backups-es-statistics/indices/statistics-20131026/
38G s3://backups-es-statistics/indices/statistics-20131027/
34G s3://backups-es-statistics/indices/statistics-20131028/
45G s3://backups-es-statistics/indices/statistics-20131029/
33G s3://backups-es-statistics/indices/statistics-20131030/
39G s3://backups-es-statistics/indices/statistics-20131031/
7G s3://backups-es-statistics/indices/statistics-20131101/
6G s3://backups-es-statistics/indices/statistics-20131102/
7G s3://backups-es-statistics/indices/statistics-20131103/
7G s3://backups-es-statistics/indices/statistics-20131104/
7G s3://backups-es-statistics/indices/statistics-20131105/
7G s3://backups-es-statistics/indices/statistics-20131106/
7G s3://backups-es-statistics/indices/statistics-20131107/
7G s3://backups-es-statistics/indices/statistics-20131108/
7G s3://backups-es-statistics/indices/statistics-20131109/
7G s3://backups-es-statistics/indices/statistics-20131110/
7G s3://backups-es-statistics/indices/statistics-20131111/
7G s3://backups-es-statistics/indices/statistics-20131112/"><pre class="notranslate"><code class="notranslate">57G s3://backups-es-statistics/indices/statistics-20131004/
30G s3://backups-es-statistics/indices/statistics-20131005/
27G s3://backups-es-statistics/indices/statistics-20131006/
44G s3://backups-es-statistics/indices/statistics-20131007/
28G s3://backups-es-statistics/indices/statistics-20131008/
33G s3://backups-es-statistics/indices/statistics-20131009/
41G s3://backups-es-statistics/indices/statistics-20131010/
31G s3://backups-es-statistics/indices/statistics-20131011/
30G s3://backups-es-statistics/indices/statistics-20131012/
31G s3://backups-es-statistics/indices/statistics-20131013/
35G s3://backups-es-statistics/indices/statistics-20131014/
46G s3://backups-es-statistics/indices/statistics-20131015/
47G s3://backups-es-statistics/indices/statistics-20131016/
37G s3://backups-es-statistics/indices/statistics-20131017/
33G s3://backups-es-statistics/indices/statistics-20131018/
33G s3://backups-es-statistics/indices/statistics-20131019/
34G s3://backups-es-statistics/indices/statistics-20131020/
36G s3://backups-es-statistics/indices/statistics-20131021/
37G s3://backups-es-statistics/indices/statistics-20131022/
32G s3://backups-es-statistics/indices/statistics-20131023/
40G s3://backups-es-statistics/indices/statistics-20131024/
36G s3://backups-es-statistics/indices/statistics-20131025/
36G s3://backups-es-statistics/indices/statistics-20131026/
38G s3://backups-es-statistics/indices/statistics-20131027/
34G s3://backups-es-statistics/indices/statistics-20131028/
45G s3://backups-es-statistics/indices/statistics-20131029/
33G s3://backups-es-statistics/indices/statistics-20131030/
39G s3://backups-es-statistics/indices/statistics-20131031/
7G s3://backups-es-statistics/indices/statistics-20131101/
6G s3://backups-es-statistics/indices/statistics-20131102/
7G s3://backups-es-statistics/indices/statistics-20131103/
7G s3://backups-es-statistics/indices/statistics-20131104/
7G s3://backups-es-statistics/indices/statistics-20131105/
7G s3://backups-es-statistics/indices/statistics-20131106/
7G s3://backups-es-statistics/indices/statistics-20131107/
7G s3://backups-es-statistics/indices/statistics-20131108/
7G s3://backups-es-statistics/indices/statistics-20131109/
7G s3://backups-es-statistics/indices/statistics-20131110/
7G s3://backups-es-statistics/indices/statistics-20131111/
7G s3://backups-es-statistics/indices/statistics-20131112/
</code></pre></div>
<p dir="auto">Segments are here:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="statistics-20131004 0 p 4.6
statistics-20131004 0 r 4.6
statistics-20131005 0 p 4.4
statistics-20131005 0 p 4.9
statistics-20131005 0 r 4.4
statistics-20131005 0 r 4.9
statistics-20131006 0 p 4.4
statistics-20131006 0 p 4.9
statistics-20131006 0 r 4.4
statistics-20131006 0 r 4.9
statistics-20131007 0 p 4.4
statistics-20131007 0 p 4.9
statistics-20131007 0 r 4.4
statistics-20131007 0 r 4.9
statistics-20131008 0 p 4.4
statistics-20131008 0 p 4.9
statistics-20131008 0 r 4.4
statistics-20131008 0 r 4.9
statistics-20131009 0 p 4.4
statistics-20131009 0 p 4.9
statistics-20131009 0 r 4.4
statistics-20131009 0 r 4.9
statistics-20131010 0 p 4.4
statistics-20131010 0 p 4.9
statistics-20131010 0 r 4.4
statistics-20131010 0 r 4.9
statistics-20131011 0 p 4.4
statistics-20131011 0 p 4.9
statistics-20131011 0 r 4.4
statistics-20131011 0 r 4.9
statistics-20131012 0 p 4.4
statistics-20131012 0 p 4.9
statistics-20131012 0 r 4.4
statistics-20131012 0 r 4.9
statistics-20131013 0 p 4.4
statistics-20131013 0 p 4.9
statistics-20131013 0 r 4.4
statistics-20131013 0 r 4.9
statistics-20131014 0 p 4.4
statistics-20131014 0 p 4.9
statistics-20131014 0 r 4.4
statistics-20131014 0 r 4.9
statistics-20131015 0 p 4.4
statistics-20131015 0 p 4.9
statistics-20131015 0 r 4.4
statistics-20131015 0 r 4.9
statistics-20131016 0 p 4.4
statistics-20131016 0 p 4.9
statistics-20131016 0 r 4.4
statistics-20131016 0 r 4.9
statistics-20131017 0 p 4.4
statistics-20131017 0 p 4.9
statistics-20131017 0 r 4.4
statistics-20131017 0 r 4.9
statistics-20131018 0 p 4.4
statistics-20131018 0 p 4.9
statistics-20131018 0 r 4.4
statistics-20131018 0 r 4.9
statistics-20131019 0 p 4.4
statistics-20131019 0 p 4.9
statistics-20131019 0 r 4.4
statistics-20131019 0 r 4.9
statistics-20131020 0 p 4.4
statistics-20131020 0 p 4.9
statistics-20131020 0 r 4.4
statistics-20131020 0 r 4.9
statistics-20131021 0 p 4.4
statistics-20131021 0 p 4.9
statistics-20131021 0 r 4.4
statistics-20131021 0 r 4.9
statistics-20131022 0 p 4.4
statistics-20131022 0 p 4.9
statistics-20131022 0 r 4.4
statistics-20131022 0 r 4.9
statistics-20131023 0 p 4.4
statistics-20131023 0 p 4.9
statistics-20131023 0 r 4.4
statistics-20131023 0 r 4.9
statistics-20131024 0 p 4.4
statistics-20131024 0 p 4.9
statistics-20131024 0 r 4.4
statistics-20131024 0 r 4.9
statistics-20131025 0 p 4.4
statistics-20131025 0 p 4.9
statistics-20131025 0 r 4.4
statistics-20131025 0 r 4.9
statistics-20131026 0 p 4.4
statistics-20131026 0 p 4.9
statistics-20131026 0 r 4.4
statistics-20131026 0 r 4.9
statistics-20131027 0 p 4.4
statistics-20131027 0 p 4.9
statistics-20131027 0 r 4.4
statistics-20131027 0 r 4.9
statistics-20131028 0 p 4.4
statistics-20131028 0 p 4.9
statistics-20131028 0 r 4.4
statistics-20131028 0 r 4.9
statistics-20131029 0 p 4.4
statistics-20131029 0 p 4.9
statistics-20131029 0 r 4.4
statistics-20131029 0 r 4.9
statistics-20131030 0 p 4.4
statistics-20131030 0 p 4.9
statistics-20131030 0 r 4.4
statistics-20131030 0 r 4.9
statistics-20131031 0 p 4.4
statistics-20131031 0 p 4.9
statistics-20131031 0 r 4.4
statistics-20131031 0 r 4.9
statistics-20131101 0 p 4.4
statistics-20131101 0 p 4.9
statistics-20131101 0 r 4.4
statistics-20131101 0 r 4.9
statistics-20131101 1 p 4.4
statistics-20131101 1 p 4.9
statistics-20131101 1 r 4.4
statistics-20131101 1 r 4.9
statistics-20131101 2 p 4.4
statistics-20131101 2 p 4.9
statistics-20131101 2 r 4.4
statistics-20131101 2 r 4.9
statistics-20131101 3 p 4.4
statistics-20131101 3 p 4.9
statistics-20131101 3 r 4.4
statistics-20131101 3 r 4.9
statistics-20131101 4 p 4.4
statistics-20131101 4 p 4.9
statistics-20131101 4 r 4.4
statistics-20131101 4 r 4.9
statistics-20131102 0 p 4.4
statistics-20131102 0 p 4.9
statistics-20131102 0 r 4.4
statistics-20131102 0 r 4.9
statistics-20131102 1 p 4.4
statistics-20131102 1 p 4.9
statistics-20131102 1 r 4.4
statistics-20131102 1 r 4.9
statistics-20131102 2 p 4.4
statistics-20131102 2 p 4.9
statistics-20131102 2 r 4.4
statistics-20131102 2 r 4.9
statistics-20131102 3 p 4.4
statistics-20131102 3 p 4.9
statistics-20131102 3 r 4.4
statistics-20131102 3 r 4.9
statistics-20131102 4 p 4.4
statistics-20131102 4 p 4.9
statistics-20131102 4 r 4.4
statistics-20131102 4 r 4.9
statistics-20131103 0 p 4.4
statistics-20131103 0 p 4.9
statistics-20131103 0 r 4.4
statistics-20131103 0 r 4.9
statistics-20131103 1 p 4.4
statistics-20131103 1 p 4.9
statistics-20131103 1 r 4.4
statistics-20131103 1 r 4.9
statistics-20131103 2 p 4.4
statistics-20131103 2 p 4.9
statistics-20131103 2 r 4.4
statistics-20131103 2 r 4.9
statistics-20131103 3 p 4.4
statistics-20131103 3 p 4.9
statistics-20131103 3 r 4.4
statistics-20131103 3 r 4.9
statistics-20131103 4 p 4.4
statistics-20131103 4 p 4.9
statistics-20131103 4 r 4.4
statistics-20131103 4 r 4.9
statistics-20131104 0 p 4.4
statistics-20131104 0 p 4.9
statistics-20131104 0 r 4.4
statistics-20131104 0 r 4.9
statistics-20131104 1 p 4.4
statistics-20131104 1 p 4.9
statistics-20131104 1 r 4.4
statistics-20131104 1 r 4.9
statistics-20131104 2 p 4.4
statistics-20131104 2 p 4.9
statistics-20131104 2 r 4.4
statistics-20131104 2 r 4.9
statistics-20131104 3 p 4.4
statistics-20131104 3 p 4.9
statistics-20131104 3 r 4.4
statistics-20131104 3 r 4.9
statistics-20131104 4 p 4.4
statistics-20131104 4 p 4.9
statistics-20131104 4 r 4.4
statistics-20131104 4 r 4.9
statistics-20131105 0 p 4.4
statistics-20131105 0 p 4.9
statistics-20131105 0 r 4.4
statistics-20131105 0 r 4.9
statistics-20131105 1 p 4.4
statistics-20131105 1 p 4.9
statistics-20131105 1 r 4.4
statistics-20131105 1 r 4.9
statistics-20131105 2 p 4.4
statistics-20131105 2 p 4.9
statistics-20131105 2 r 4.4
statistics-20131105 2 r 4.9
statistics-20131105 3 p 4.4
statistics-20131105 3 p 4.9
statistics-20131105 3 r 4.4
statistics-20131105 3 r 4.9
statistics-20131105 4 p 4.4
statistics-20131105 4 p 4.9
statistics-20131105 4 r 4.4
statistics-20131105 4 r 4.9
statistics-20131106 0 p 4.4
statistics-20131106 0 p 4.9
statistics-20131106 0 r 4.4
statistics-20131106 0 r 4.9
statistics-20131106 1 p 4.4
statistics-20131106 1 p 4.9
statistics-20131106 1 r 4.4
statistics-20131106 1 r 4.9
statistics-20131106 2 p 4.4
statistics-20131106 2 p 4.9
statistics-20131106 2 r 4.4
statistics-20131106 2 r 4.9
statistics-20131106 3 p 4.4
statistics-20131106 3 p 4.9
statistics-20131106 3 r 4.4
statistics-20131106 3 r 4.9
statistics-20131106 4 p 4.4
statistics-20131106 4 p 4.9
statistics-20131106 4 r 4.4
statistics-20131106 4 r 4.9
statistics-20131107 0 p 4.4
statistics-20131107 0 p 4.9
statistics-20131107 0 r 4.4
statistics-20131107 0 r 4.9
statistics-20131107 1 p 4.4
statistics-20131107 1 p 4.9
statistics-20131107 1 r 4.4
statistics-20131107 1 r 4.9
statistics-20131107 2 p 4.4
statistics-20131107 2 p 4.9
statistics-20131107 2 r 4.4
statistics-20131107 2 r 4.9
statistics-20131107 3 p 4.4
statistics-20131107 3 p 4.9
statistics-20131107 3 r 4.4
statistics-20131107 3 r 4.9
statistics-20131107 4 p 4.4
statistics-20131107 4 p 4.9
statistics-20131107 4 r 4.4
statistics-20131107 4 r 4.9
statistics-20131108 0 p 4.4
statistics-20131108 0 p 4.9
statistics-20131108 0 r 4.4
statistics-20131108 0 r 4.9
statistics-20131108 1 p 4.4
statistics-20131108 1 p 4.9
statistics-20131108 1 r 4.4
statistics-20131108 1 r 4.9
statistics-20131108 2 p 4.4
statistics-20131108 2 p 4.9
statistics-20131108 2 r 4.4
statistics-20131108 2 r 4.9
statistics-20131108 3 p 4.4
statistics-20131108 3 p 4.9
statistics-20131108 3 r 4.4
statistics-20131108 3 r 4.9
statistics-20131108 4 p 4.4
statistics-20131108 4 p 4.9
statistics-20131108 4 r 4.4
statistics-20131108 4 r 4.9
statistics-20131109 0 p 4.4
statistics-20131109 0 p 4.9
statistics-20131109 0 r 4.4
statistics-20131109 0 r 4.9
statistics-20131109 1 p 4.4
statistics-20131109 1 p 4.9
statistics-20131109 1 r 4.4
statistics-20131109 1 r 4.9
statistics-20131109 2 p 4.4
statistics-20131109 2 p 4.9
statistics-20131109 2 r 4.4
statistics-20131109 2 r 4.9
statistics-20131109 3 p 4.4
statistics-20131109 3 p 4.9
statistics-20131109 3 r 4.4
statistics-20131109 3 r 4.9
statistics-20131109 4 p 4.4
statistics-20131109 4 p 4.9
statistics-20131109 4 r 4.4
statistics-20131109 4 r 4.9
statistics-20131110 0 p 4.4
statistics-20131110 0 p 4.9
statistics-20131110 0 r 4.4
statistics-20131110 0 r 4.9
statistics-20131110 1 p 4.4
statistics-20131110 1 p 4.9
statistics-20131110 1 r 4.4
statistics-20131110 1 r 4.9
statistics-20131110 2 p 4.4
statistics-20131110 2 p 4.9
statistics-20131110 2 r 4.4
statistics-20131110 2 r 4.9
statistics-20131110 3 p 4.4
statistics-20131110 3 p 4.9
statistics-20131110 3 r 4.4
statistics-20131110 3 r 4.9
statistics-20131110 4 p 4.4
statistics-20131110 4 p 4.9
statistics-20131110 4 r 4.4
statistics-20131110 4 r 4.9
statistics-20131111 0 p 4.4
statistics-20131111 0 p 4.9
statistics-20131111 0 r 4.4
statistics-20131111 0 r 4.9
statistics-20131111 1 p 4.4
statistics-20131111 1 p 4.9
statistics-20131111 1 r 4.4
statistics-20131111 1 r 4.9
statistics-20131111 2 p 4.4
statistics-20131111 2 p 4.9
statistics-20131111 2 r 4.4
statistics-20131111 2 r 4.9
statistics-20131111 3 p 4.4
statistics-20131111 3 p 4.9
statistics-20131111 3 r 4.4
statistics-20131111 3 r 4.9
statistics-20131111 4 p 4.4
statistics-20131111 4 p 4.9
statistics-20131111 4 r 4.4
statistics-20131111 4 r 4.9
statistics-20131112 0 p 4.4
statistics-20131112 0 p 4.9
statistics-20131112 0 r 4.4
statistics-20131112 0 r 4.9"><pre class="notranslate"><code class="notranslate">statistics-20131004 0 p 4.6
statistics-20131004 0 r 4.6
statistics-20131005 0 p 4.4
statistics-20131005 0 p 4.9
statistics-20131005 0 r 4.4
statistics-20131005 0 r 4.9
statistics-20131006 0 p 4.4
statistics-20131006 0 p 4.9
statistics-20131006 0 r 4.4
statistics-20131006 0 r 4.9
statistics-20131007 0 p 4.4
statistics-20131007 0 p 4.9
statistics-20131007 0 r 4.4
statistics-20131007 0 r 4.9
statistics-20131008 0 p 4.4
statistics-20131008 0 p 4.9
statistics-20131008 0 r 4.4
statistics-20131008 0 r 4.9
statistics-20131009 0 p 4.4
statistics-20131009 0 p 4.9
statistics-20131009 0 r 4.4
statistics-20131009 0 r 4.9
statistics-20131010 0 p 4.4
statistics-20131010 0 p 4.9
statistics-20131010 0 r 4.4
statistics-20131010 0 r 4.9
statistics-20131011 0 p 4.4
statistics-20131011 0 p 4.9
statistics-20131011 0 r 4.4
statistics-20131011 0 r 4.9
statistics-20131012 0 p 4.4
statistics-20131012 0 p 4.9
statistics-20131012 0 r 4.4
statistics-20131012 0 r 4.9
statistics-20131013 0 p 4.4
statistics-20131013 0 p 4.9
statistics-20131013 0 r 4.4
statistics-20131013 0 r 4.9
statistics-20131014 0 p 4.4
statistics-20131014 0 p 4.9
statistics-20131014 0 r 4.4
statistics-20131014 0 r 4.9
statistics-20131015 0 p 4.4
statistics-20131015 0 p 4.9
statistics-20131015 0 r 4.4
statistics-20131015 0 r 4.9
statistics-20131016 0 p 4.4
statistics-20131016 0 p 4.9
statistics-20131016 0 r 4.4
statistics-20131016 0 r 4.9
statistics-20131017 0 p 4.4
statistics-20131017 0 p 4.9
statistics-20131017 0 r 4.4
statistics-20131017 0 r 4.9
statistics-20131018 0 p 4.4
statistics-20131018 0 p 4.9
statistics-20131018 0 r 4.4
statistics-20131018 0 r 4.9
statistics-20131019 0 p 4.4
statistics-20131019 0 p 4.9
statistics-20131019 0 r 4.4
statistics-20131019 0 r 4.9
statistics-20131020 0 p 4.4
statistics-20131020 0 p 4.9
statistics-20131020 0 r 4.4
statistics-20131020 0 r 4.9
statistics-20131021 0 p 4.4
statistics-20131021 0 p 4.9
statistics-20131021 0 r 4.4
statistics-20131021 0 r 4.9
statistics-20131022 0 p 4.4
statistics-20131022 0 p 4.9
statistics-20131022 0 r 4.4
statistics-20131022 0 r 4.9
statistics-20131023 0 p 4.4
statistics-20131023 0 p 4.9
statistics-20131023 0 r 4.4
statistics-20131023 0 r 4.9
statistics-20131024 0 p 4.4
statistics-20131024 0 p 4.9
statistics-20131024 0 r 4.4
statistics-20131024 0 r 4.9
statistics-20131025 0 p 4.4
statistics-20131025 0 p 4.9
statistics-20131025 0 r 4.4
statistics-20131025 0 r 4.9
statistics-20131026 0 p 4.4
statistics-20131026 0 p 4.9
statistics-20131026 0 r 4.4
statistics-20131026 0 r 4.9
statistics-20131027 0 p 4.4
statistics-20131027 0 p 4.9
statistics-20131027 0 r 4.4
statistics-20131027 0 r 4.9
statistics-20131028 0 p 4.4
statistics-20131028 0 p 4.9
statistics-20131028 0 r 4.4
statistics-20131028 0 r 4.9
statistics-20131029 0 p 4.4
statistics-20131029 0 p 4.9
statistics-20131029 0 r 4.4
statistics-20131029 0 r 4.9
statistics-20131030 0 p 4.4
statistics-20131030 0 p 4.9
statistics-20131030 0 r 4.4
statistics-20131030 0 r 4.9
statistics-20131031 0 p 4.4
statistics-20131031 0 p 4.9
statistics-20131031 0 r 4.4
statistics-20131031 0 r 4.9
statistics-20131101 0 p 4.4
statistics-20131101 0 p 4.9
statistics-20131101 0 r 4.4
statistics-20131101 0 r 4.9
statistics-20131101 1 p 4.4
statistics-20131101 1 p 4.9
statistics-20131101 1 r 4.4
statistics-20131101 1 r 4.9
statistics-20131101 2 p 4.4
statistics-20131101 2 p 4.9
statistics-20131101 2 r 4.4
statistics-20131101 2 r 4.9
statistics-20131101 3 p 4.4
statistics-20131101 3 p 4.9
statistics-20131101 3 r 4.4
statistics-20131101 3 r 4.9
statistics-20131101 4 p 4.4
statistics-20131101 4 p 4.9
statistics-20131101 4 r 4.4
statistics-20131101 4 r 4.9
statistics-20131102 0 p 4.4
statistics-20131102 0 p 4.9
statistics-20131102 0 r 4.4
statistics-20131102 0 r 4.9
statistics-20131102 1 p 4.4
statistics-20131102 1 p 4.9
statistics-20131102 1 r 4.4
statistics-20131102 1 r 4.9
statistics-20131102 2 p 4.4
statistics-20131102 2 p 4.9
statistics-20131102 2 r 4.4
statistics-20131102 2 r 4.9
statistics-20131102 3 p 4.4
statistics-20131102 3 p 4.9
statistics-20131102 3 r 4.4
statistics-20131102 3 r 4.9
statistics-20131102 4 p 4.4
statistics-20131102 4 p 4.9
statistics-20131102 4 r 4.4
statistics-20131102 4 r 4.9
statistics-20131103 0 p 4.4
statistics-20131103 0 p 4.9
statistics-20131103 0 r 4.4
statistics-20131103 0 r 4.9
statistics-20131103 1 p 4.4
statistics-20131103 1 p 4.9
statistics-20131103 1 r 4.4
statistics-20131103 1 r 4.9
statistics-20131103 2 p 4.4
statistics-20131103 2 p 4.9
statistics-20131103 2 r 4.4
statistics-20131103 2 r 4.9
statistics-20131103 3 p 4.4
statistics-20131103 3 p 4.9
statistics-20131103 3 r 4.4
statistics-20131103 3 r 4.9
statistics-20131103 4 p 4.4
statistics-20131103 4 p 4.9
statistics-20131103 4 r 4.4
statistics-20131103 4 r 4.9
statistics-20131104 0 p 4.4
statistics-20131104 0 p 4.9
statistics-20131104 0 r 4.4
statistics-20131104 0 r 4.9
statistics-20131104 1 p 4.4
statistics-20131104 1 p 4.9
statistics-20131104 1 r 4.4
statistics-20131104 1 r 4.9
statistics-20131104 2 p 4.4
statistics-20131104 2 p 4.9
statistics-20131104 2 r 4.4
statistics-20131104 2 r 4.9
statistics-20131104 3 p 4.4
statistics-20131104 3 p 4.9
statistics-20131104 3 r 4.4
statistics-20131104 3 r 4.9
statistics-20131104 4 p 4.4
statistics-20131104 4 p 4.9
statistics-20131104 4 r 4.4
statistics-20131104 4 r 4.9
statistics-20131105 0 p 4.4
statistics-20131105 0 p 4.9
statistics-20131105 0 r 4.4
statistics-20131105 0 r 4.9
statistics-20131105 1 p 4.4
statistics-20131105 1 p 4.9
statistics-20131105 1 r 4.4
statistics-20131105 1 r 4.9
statistics-20131105 2 p 4.4
statistics-20131105 2 p 4.9
statistics-20131105 2 r 4.4
statistics-20131105 2 r 4.9
statistics-20131105 3 p 4.4
statistics-20131105 3 p 4.9
statistics-20131105 3 r 4.4
statistics-20131105 3 r 4.9
statistics-20131105 4 p 4.4
statistics-20131105 4 p 4.9
statistics-20131105 4 r 4.4
statistics-20131105 4 r 4.9
statistics-20131106 0 p 4.4
statistics-20131106 0 p 4.9
statistics-20131106 0 r 4.4
statistics-20131106 0 r 4.9
statistics-20131106 1 p 4.4
statistics-20131106 1 p 4.9
statistics-20131106 1 r 4.4
statistics-20131106 1 r 4.9
statistics-20131106 2 p 4.4
statistics-20131106 2 p 4.9
statistics-20131106 2 r 4.4
statistics-20131106 2 r 4.9
statistics-20131106 3 p 4.4
statistics-20131106 3 p 4.9
statistics-20131106 3 r 4.4
statistics-20131106 3 r 4.9
statistics-20131106 4 p 4.4
statistics-20131106 4 p 4.9
statistics-20131106 4 r 4.4
statistics-20131106 4 r 4.9
statistics-20131107 0 p 4.4
statistics-20131107 0 p 4.9
statistics-20131107 0 r 4.4
statistics-20131107 0 r 4.9
statistics-20131107 1 p 4.4
statistics-20131107 1 p 4.9
statistics-20131107 1 r 4.4
statistics-20131107 1 r 4.9
statistics-20131107 2 p 4.4
statistics-20131107 2 p 4.9
statistics-20131107 2 r 4.4
statistics-20131107 2 r 4.9
statistics-20131107 3 p 4.4
statistics-20131107 3 p 4.9
statistics-20131107 3 r 4.4
statistics-20131107 3 r 4.9
statistics-20131107 4 p 4.4
statistics-20131107 4 p 4.9
statistics-20131107 4 r 4.4
statistics-20131107 4 r 4.9
statistics-20131108 0 p 4.4
statistics-20131108 0 p 4.9
statistics-20131108 0 r 4.4
statistics-20131108 0 r 4.9
statistics-20131108 1 p 4.4
statistics-20131108 1 p 4.9
statistics-20131108 1 r 4.4
statistics-20131108 1 r 4.9
statistics-20131108 2 p 4.4
statistics-20131108 2 p 4.9
statistics-20131108 2 r 4.4
statistics-20131108 2 r 4.9
statistics-20131108 3 p 4.4
statistics-20131108 3 p 4.9
statistics-20131108 3 r 4.4
statistics-20131108 3 r 4.9
statistics-20131108 4 p 4.4
statistics-20131108 4 p 4.9
statistics-20131108 4 r 4.4
statistics-20131108 4 r 4.9
statistics-20131109 0 p 4.4
statistics-20131109 0 p 4.9
statistics-20131109 0 r 4.4
statistics-20131109 0 r 4.9
statistics-20131109 1 p 4.4
statistics-20131109 1 p 4.9
statistics-20131109 1 r 4.4
statistics-20131109 1 r 4.9
statistics-20131109 2 p 4.4
statistics-20131109 2 p 4.9
statistics-20131109 2 r 4.4
statistics-20131109 2 r 4.9
statistics-20131109 3 p 4.4
statistics-20131109 3 p 4.9
statistics-20131109 3 r 4.4
statistics-20131109 3 r 4.9
statistics-20131109 4 p 4.4
statistics-20131109 4 p 4.9
statistics-20131109 4 r 4.4
statistics-20131109 4 r 4.9
statistics-20131110 0 p 4.4
statistics-20131110 0 p 4.9
statistics-20131110 0 r 4.4
statistics-20131110 0 r 4.9
statistics-20131110 1 p 4.4
statistics-20131110 1 p 4.9
statistics-20131110 1 r 4.4
statistics-20131110 1 r 4.9
statistics-20131110 2 p 4.4
statistics-20131110 2 p 4.9
statistics-20131110 2 r 4.4
statistics-20131110 2 r 4.9
statistics-20131110 3 p 4.4
statistics-20131110 3 p 4.9
statistics-20131110 3 r 4.4
statistics-20131110 3 r 4.9
statistics-20131110 4 p 4.4
statistics-20131110 4 p 4.9
statistics-20131110 4 r 4.4
statistics-20131110 4 r 4.9
statistics-20131111 0 p 4.4
statistics-20131111 0 p 4.9
statistics-20131111 0 r 4.4
statistics-20131111 0 r 4.9
statistics-20131111 1 p 4.4
statistics-20131111 1 p 4.9
statistics-20131111 1 r 4.4
statistics-20131111 1 r 4.9
statistics-20131111 2 p 4.4
statistics-20131111 2 p 4.9
statistics-20131111 2 r 4.4
statistics-20131111 2 r 4.9
statistics-20131111 3 p 4.4
statistics-20131111 3 p 4.9
statistics-20131111 3 r 4.4
statistics-20131111 3 r 4.9
statistics-20131111 4 p 4.4
statistics-20131111 4 p 4.9
statistics-20131111 4 r 4.4
statistics-20131111 4 r 4.9
statistics-20131112 0 p 4.4
statistics-20131112 0 p 4.9
statistics-20131112 0 r 4.4
statistics-20131112 0 r 4.9
</code></pre></div>
<p dir="auto">Those indices should be roughly the same size in snapshot.</p>
<p dir="auto">I also took dir diff from subsequent backups:</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--- before.3.txt 2014-10-16 21:39:05.559338129 +0400
+++ after.3.txt 2014-10-16 21:56:46.272597922 +0400
@@ -152,6 +152,26 @@
2014-10-16 17:25 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3m.part0
2014-10-16 17:25 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3m.part1
2014-10-16 17:25 21M s3://backups-es-statistics/indices/statistics-20140108/3/__3m.part2
+2014-10-16 17:48 436 s3://backups-es-statistics/indices/statistics-20140108/3/__3n
+2014-10-16 17:48 179 s3://backups-es-statistics/indices/statistics-20140108/3/__3o
+2014-10-16 17:48 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3p.part0
+2014-10-16 17:49 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3p.part1
+2014-10-16 17:48 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3p.part2
+2014-10-16 17:49 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3p.part3
+2014-10-16 17:48 18M s3://backups-es-statistics/indices/statistics-20140108/3/__3p.part4
+2014-10-16 17:48 459k s3://backups-es-statistics/indices/statistics-20140108/3/__3q
+2014-10-16 17:48 7M s3://backups-es-statistics/indices/statistics-20140108/3/__3r
+2014-10-16 17:48 34 s3://backups-es-statistics/indices/statistics-20140108/3/__3s
+2014-10-16 17:48 2k s3://backups-es-statistics/indices/statistics-20140108/3/__3t
+2014-10-16 17:48 16M s3://backups-es-statistics/indices/statistics-20140108/3/__3u
+2014-10-16 17:49 81M s3://backups-es-statistics/indices/statistics-20140108/3/__3v
+2014-10-16 17:48 57 s3://backups-es-statistics/indices/statistics-20140108/3/__3w
+2014-10-16 17:48 2M s3://backups-es-statistics/indices/statistics-20140108/3/__3x
+2014-10-16 17:49 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3y.part0
+2014-10-16 17:49 87M s3://backups-es-statistics/indices/statistics-20140108/3/__3y.part1
+2014-10-16 17:49 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3z.part0
+2014-10-16 17:49 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3z.part1
+2014-10-16 17:49 21M s3://backups-es-statistics/indices/statistics-20140108/3/__3z.part2
2014-09-30 19:39 959k s3://backups-es-statistics/indices/statistics-20140108/3/__4
2014-09-30 19:39 53M s3://backups-es-statistics/indices/statistics-20140108/3/__5
2014-09-30 19:39 100M s3://backups-es-statistics/indices/statistics-20140108/3/__6.part0
@@ -205,3 +225,4 @@
2014-10-15 08:46 5k s3://backups-es-statistics/indices/statistics-20140108/3/snapshot-statistics-2014-10-14
2014-10-16 08:41 5k s3://backups-es-statistics/indices/statistics-20140108/3/snapshot-statistics-2014-10-15
2014-10-16 17:25 5k s3://backups-es-statistics/indices/statistics-20140108/3/snapshot-statistics-2014-10-16
+2014-10-16 17:49 5k s3://backups-es-statistics/indices/statistics-20140108/3/snapshot-statistics-2014-10-16-again"><pre class="notranslate"><span class="pl-md">--- before.3.txt 2014-10-16 21:39:05.559338129 +0400</span>
<span class="pl-mi1">+++ after.3.txt 2014-10-16 21:56:46.272597922 +0400</span>
<span class="pl-mdr">@@ -152,6 +152,26 @@</span>
2014-10-16 17:25 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3m.part0
2014-10-16 17:25 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3m.part1
2014-10-16 17:25 21M s3://backups-es-statistics/indices/statistics-20140108/3/__3m.part2
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 436 s3://backups-es-statistics/indices/statistics-20140108/3/__3n</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 179 s3://backups-es-statistics/indices/statistics-20140108/3/__3o</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3p.part0</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:49 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3p.part1</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3p.part2</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:49 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3p.part3</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 18M s3://backups-es-statistics/indices/statistics-20140108/3/__3p.part4</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 459k s3://backups-es-statistics/indices/statistics-20140108/3/__3q</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 7M s3://backups-es-statistics/indices/statistics-20140108/3/__3r</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 34 s3://backups-es-statistics/indices/statistics-20140108/3/__3s</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 2k s3://backups-es-statistics/indices/statistics-20140108/3/__3t</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 16M s3://backups-es-statistics/indices/statistics-20140108/3/__3u</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:49 81M s3://backups-es-statistics/indices/statistics-20140108/3/__3v</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 57 s3://backups-es-statistics/indices/statistics-20140108/3/__3w</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:48 2M s3://backups-es-statistics/indices/statistics-20140108/3/__3x</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:49 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3y.part0</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:49 87M s3://backups-es-statistics/indices/statistics-20140108/3/__3y.part1</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:49 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3z.part0</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:49 100M s3://backups-es-statistics/indices/statistics-20140108/3/__3z.part1</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:49 21M s3://backups-es-statistics/indices/statistics-20140108/3/__3z.part2</span>
2014-09-30 19:39 959k s3://backups-es-statistics/indices/statistics-20140108/3/__4
2014-09-30 19:39 53M s3://backups-es-statistics/indices/statistics-20140108/3/__5
2014-09-30 19:39 100M s3://backups-es-statistics/indices/statistics-20140108/3/__6.part0
<span class="pl-mdr">@@ -205,3 +225,4 @@</span>
2014-10-15 08:46 5k s3://backups-es-statistics/indices/statistics-20140108/3/snapshot-statistics-2014-10-14
2014-10-16 08:41 5k s3://backups-es-statistics/indices/statistics-20140108/3/snapshot-statistics-2014-10-15
2014-10-16 17:25 5k s3://backups-es-statistics/indices/statistics-20140108/3/snapshot-statistics-2014-10-16
<span class="pl-mi1"><span class="pl-mi1">+</span>2014-10-16 17:49 5k s3://backups-es-statistics/indices/statistics-20140108/3/snapshot-statistics-2014-10-16-again</span></pre></div>
<p dir="auto">Cluster consists of 5 nodes on 1.3.2.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/imotov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/imotov">@imotov</a></p> | 0 |
<p dir="auto">Open the example modal by clicking "Launch demo modal". Click "Save changes", then try to close. Fail.</p> | <p dir="auto">Hi,</p>
<p dir="auto">The code used on last Thursday worked fine. But after updated to latest code on Monday (GMT+8), the modal dialog when clicks to dismiss for seconds onward cannot be close.</p>
<p dir="auto">I am checking on source code line 932, if I commented out this line then it is working again.</p>
<p dir="auto">this.$element<br>
.removeClass('in')<br>
.attr('aria-hidden', true)<br>
//.off('click.dismiss.modal')</p>
<p dir="auto">Am I missing anything...?</p>
<p dir="auto">Sorry for the grammar. Thanks.</p> | 1 |
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.4.2</td>
</tr>
</tbody>
</table>
<p dir="auto">Got an exception</p>
<p dir="auto">When I run <code class="notranslate">php my-script.php</code>.<br>
Seems like a bug to me because no matter how I order the arguments the problem still occurs.</p>
<p dir="auto">Expected:</p>
<blockquote>
<p dir="auto">Not enough arguments (missing: "invoice-id, customer").</p>
</blockquote>
<p dir="auto">Actual:</p>
<blockquote>
<p dir="auto">Cannot add a required argument after an optional one.</p>
</blockquote>
<p dir="auto">Caused by <code class="notranslate">Symfony\Component\Console\Input\InputDefinition::addArgument</code>.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
namespace Mite\Console;
use Mite\Mite;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class PdfCommand extends Command {
protected static $defaultName = 'mite:pdf';
protected function configure() {
// $this->addOption( 'month', 'm', InputOption::VALUE_OPTIONAL, 'Month which shall be invoiced', date( 'm' ) );
$this->addArgument( 'invoice-id', InputArgument::REQUIRED, 'ID of the invoice' );
$this->addArgument( 'customer', InputArgument::REQUIRED, 'Name of the customer as stored in mite' );
$this->addOption( 'month', 'm', InputOption::VALUE_OPTIONAL, 'Month which shall be invoiced', date( 'm' ) );
}
protected function execute( InputInterface $input, OutputInterface $output ) {
}
}
"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-k">namespace</span> <span class="pl-v">Mite</span>\<span class="pl-v">Console</span>;
<span class="pl-k">use</span> <span class="pl-v">Mite</span>\<span class="pl-v">Mite</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Console</span>\<span class="pl-v">Command</span>\<span class="pl-v">Command</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Console</span>\<span class="pl-v">Input</span>\<span class="pl-v">InputArgument</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Console</span>\<span class="pl-v">Input</span>\<span class="pl-v">InputInterface</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Console</span>\<span class="pl-v">Input</span>\<span class="pl-v">InputOption</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Console</span>\<span class="pl-v">Output</span>\<span class="pl-v">OutputInterface</span>;
<span class="pl-k">class</span> <span class="pl-v">PdfCommand</span> <span class="pl-k">extends</span> <span class="pl-v">Command</span> {
<span class="pl-k">protected</span> <span class="pl-k">static</span> <span class="pl-c1"><span class="pl-c1">$</span>defaultName</span> = <span class="pl-s">'mite:pdf'</span>;
<span class="pl-k">protected</span> <span class="pl-k">function</span> <span class="pl-en">configure</span>() {
<span class="pl-c">// $this->addOption( 'month', 'm', InputOption::VALUE_OPTIONAL, 'Month which shall be invoiced', date( 'm' ) );</span>
<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-en">addArgument</span>( <span class="pl-s">'invoice-id'</span>, <span class="pl-v">InputArgument</span>::<span class="pl-c1">REQUIRED</span>, <span class="pl-s">'ID of the invoice'</span> );
<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-en">addArgument</span>( <span class="pl-s">'customer'</span>, <span class="pl-v">InputArgument</span>::<span class="pl-c1">REQUIRED</span>, <span class="pl-s">'Name of the customer as stored in mite'</span> );
<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-en">addOption</span>( <span class="pl-s">'month'</span>, <span class="pl-s">'m'</span>, <span class="pl-v">InputOption</span>::<span class="pl-c1">VALUE_OPTIONAL</span>, <span class="pl-s">'Month which shall be invoiced'</span>, date( <span class="pl-s">'m'</span> ) );
}
<span class="pl-k">protected</span> <span class="pl-k">function</span> <span class="pl-en">execute</span>( <span class="pl-smi"><span class="pl-smi">InputInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>input</span>, <span class="pl-smi"><span class="pl-smi">OutputInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>output</span> ) {
}
}</pre></div>
<p dir="auto">app.php</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
require_once __DIR__ . '/../vendor/autoload.php';
$app = new \Symfony\Component\Console\Application( 'mite-pdf' );
$app->addCommands( [
new \Mite\Console\PdfCommand(),
] );
$app->setDefaultCommand('mite:pdf');
$app->run();"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-k">require_once</span> __DIR__ . <span class="pl-s">'/../vendor/autoload.php'</span>;
<span class="pl-s1"><span class="pl-c1">$</span>app</span> = <span class="pl-k">new</span> \<span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Console</span>\<span class="pl-v">Application</span>( <span class="pl-s">'mite-pdf'</span> );
<span class="pl-s1"><span class="pl-c1">$</span>app</span>-><span class="pl-en">addCommands</span>( [
<span class="pl-k">new</span> \<span class="pl-v">Mite</span>\<span class="pl-v">Console</span>\<span class="pl-v">PdfCommand</span>(),
] );
<span class="pl-s1"><span class="pl-c1">$</span>app</span>-><span class="pl-en">setDefaultCommand</span>(<span class="pl-s">'mite:pdf'</span>);
<span class="pl-s1"><span class="pl-c1">$</span>app</span>-><span class="pl-en">run</span>();</pre></div> | <p dir="auto"><strong>Symfony version(s) affected</strong>: 4.2.x (but probably all <code class="notranslate">PHP<7.0</code> compatible versions too)</p>
<p dir="auto"><strong>Description</strong><br>
Using the <code class="notranslate">symfony/testpack</code>, <code class="notranslate">symfony/phpunit-bridge</code> and setting the <code class="notranslate">phpunit</code> version on <code class="notranslate">8.0</code>. When creating a test which extends <code class="notranslate">Symfony\Bundle\FrameworkBundle\Test\KernelTestCase</code> it will throw the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PHP Fatal error: Declaration of Symfony\Bundle\FrameworkBundle\Test\KernelTestCase::tearDown() must be compatible with PHPUnit\Framework\TestCase::tearDown(): void in /projects/phpunit-8/vendor/symfony/framework-bundle/Test/KernelTestCase.php on line 24"><pre class="notranslate"><code class="notranslate">PHP Fatal error: Declaration of Symfony\Bundle\FrameworkBundle\Test\KernelTestCase::tearDown() must be compatible with PHPUnit\Framework\TestCase::tearDown(): void in /projects/phpunit-8/vendor/symfony/framework-bundle/Test/KernelTestCase.php on line 24
</code></pre></div>
<p dir="auto"><strong>How to reproduce</strong></p>
<p dir="auto"><a href="https://github.com/evertharmeling/symfony-phpunit-8">https://github.com/evertharmeling/symfony-phpunit-8</a></p>
<p dir="auto">Using the 'reproducer' project:</p>
<ul dir="auto">
<li>Run <code class="notranslate">composer install</code> in project root.</li>
<li>Run <code class="notranslate">vendor/bin/simple-phpunit</code> in project root.</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>
<ul dir="auto">
<li>Restricting the <code class="notranslate">phpunit/phpunit</code> version to <code class="notranslate"><8.0</code></li>
</ul>
<p dir="auto"><strong>Additional context</strong></p>
<p dir="auto">Somewhat related <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="80190168" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/14736" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/14736/hovercard" href="https://github.com/symfony/symfony/issues/14736">#14736</a>. Because this could solve for support on <code class="notranslate">phpunit >=8.0</code></p> | 0 |
<h4 dir="auto">Description</h4>
<p dir="auto">Attempting to build scikit-learn <code class="notranslate">master</code> on macOS with the stock Xcode compiler fails due to the lack of OpenMP support.</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="git clone https://github.com/scikit-learn/scikit-learn
git checkout 2718d6212f92220d5f228bfaf7bff0e75ea14965
cd scikit-learn
python setup.py build_ext --inplace"><pre class="notranslate">git clone https://github.com/scikit-learn/scikit-learn
git checkout 2718d6212f92220d5f228bfaf7bff0e75ea14965
<span class="pl-c1">cd</span> scikit-learn
python setup.py build_ext --inplace</pre></div>
<h4 dir="auto">Expected Results</h4>
<p dir="auto">The build completes without errors.</p>
<h4 dir="auto">Actual Results</h4>
<p dir="auto">The short answer is we see the following error, <code class="notranslate">clang: error: unsupported option '-fopenmp'</code>. The full build log is included below to provide more detail.</p>
<details>
<summary>Build Log:</summary>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ python setup.py build_ext --inplace
Partial import of sklearn during the build process.
/Users/jkirkham/miniconda/envs/np/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/Users/jkirkham/miniconda/envs/np/lib']
NOT AVAILABLE
blis_info:
customize UnixCCompiler
customize UnixCCompiler
customize UnixCCompiler
customize UnixCCompiler
FOUND:
libraries = ['blas', 'cblas', 'lapack', 'blas', 'cblas', 'lapack']
library_dirs = ['/Users/jkirkham/miniconda/envs/np/lib']
define_macros = [('HAVE_CBLAS', None)]
include_dirs = ['/Users/jkirkham/miniconda/envs/np/include']
language = c
customize UnixCCompiler
customize UnixCCompiler
customize UnixCCompiler
FOUND:
libraries = ['blas', 'cblas', 'lapack', 'blas', 'cblas', 'lapack', 'blas', 'cblas', 'lapack']
library_dirs = ['/Users/jkirkham/miniconda/envs/np/lib']
define_macros = [('HAVE_CBLAS', None)]
include_dirs = ['/Users/jkirkham/miniconda/envs/np/include']
language = c
Compiling sklearn/__check_build/_check_build.pyx because it changed.
Compiling sklearn/preprocessing/_csr_polynomial_expansion.pyx because it changed.
Compiling sklearn/cluster/_dbscan_inner.pyx because it changed.
Compiling sklearn/cluster/_hierarchical.pyx because it changed.
Compiling sklearn/cluster/_k_means_elkan.pyx because it changed.
Compiling sklearn/cluster/_k_means.pyx because it changed.
Compiling sklearn/datasets/_svmlight_format.pyx because it changed.
Compiling sklearn/decomposition/_online_lda.pyx because it changed.
Compiling sklearn/decomposition/cdnmf_fast.pyx because it changed.
Compiling sklearn/ensemble/_gradient_boosting.pyx because it changed.
Compiling sklearn/feature_extraction/_hashing.pyx because it changed.
Compiling sklearn/manifold/_utils.pyx because it changed.
Compiling sklearn/manifold/_barnes_hut_tsne.pyx because it changed.
Compiling sklearn/metrics/cluster/expected_mutual_info_fast.pyx because it changed.
Compiling sklearn/metrics/pairwise_fast.pyx because it changed.
Compiling sklearn/neighbors/ball_tree.pyx because it changed.
Compiling sklearn/neighbors/kd_tree.pyx because it changed.
Compiling sklearn/neighbors/dist_metrics.pyx because it changed.
Compiling sklearn/neighbors/typedefs.pyx because it changed.
Compiling sklearn/neighbors/quad_tree.pyx because it changed.
Compiling sklearn/tree/_tree.pyx because it changed.
Compiling sklearn/tree/_splitter.pyx because it changed.
Compiling sklearn/tree/_criterion.pyx because it changed.
Compiling sklearn/tree/_utils.pyx because it changed.
Compiling sklearn/utils/sparsefuncs_fast.pyx because it changed.
Compiling sklearn/utils/_cython_blas.pyx because it changed.
Compiling sklearn/utils/arrayfuncs.pyx because it changed.
Compiling sklearn/utils/murmurhash.pyx because it changed.
Compiling sklearn/utils/lgamma.pyx because it changed.
Compiling sklearn/utils/graph_shortest_path.pyx because it changed.
Compiling sklearn/utils/fast_dict.pyx because it changed.
Compiling sklearn/utils/seq_dataset.pyx because it changed.
Compiling sklearn/utils/weight_vector.pyx because it changed.
Compiling sklearn/utils/_random.pyx because it changed.
Compiling sklearn/utils/_logistic_sigmoid.pyx because it changed.
Compiling sklearn/svm/libsvm.pyx because it changed.
Compiling sklearn/svm/liblinear.pyx because it changed.
Compiling sklearn/svm/libsvm_sparse.pyx because it changed.
Compiling sklearn/linear_model/cd_fast.pyx because it changed.
Compiling sklearn/linear_model/sgd_fast.pyx because it changed.
Compiling sklearn/linear_model/sag_fast.pyx because it changed.
Compiling sklearn/_isotonic.pyx because it changed.
[ 1/42] Cythonizing sklearn/__check_build/_check_build.pyx
[ 2/42] Cythonizing sklearn/_isotonic.pyx
[ 3/42] Cythonizing sklearn/cluster/_dbscan_inner.pyx
[ 4/42] Cythonizing sklearn/cluster/_hierarchical.pyx
[ 5/42] Cythonizing sklearn/cluster/_k_means.pyx
[ 6/42] Cythonizing sklearn/cluster/_k_means_elkan.pyx
[ 7/42] Cythonizing sklearn/datasets/_svmlight_format.pyx
[ 8/42] Cythonizing sklearn/decomposition/_online_lda.pyx
[ 9/42] Cythonizing sklearn/decomposition/cdnmf_fast.pyx
[10/42] Cythonizing sklearn/ensemble/_gradient_boosting.pyx
[11/42] Cythonizing sklearn/feature_extraction/_hashing.pyx
[12/42] Cythonizing sklearn/linear_model/cd_fast.pyx
[13/42] Cythonizing sklearn/linear_model/sag_fast.pyx
[14/42] Cythonizing sklearn/linear_model/sgd_fast.pyx
[15/42] Cythonizing sklearn/manifold/_barnes_hut_tsne.pyx
[16/42] Cythonizing sklearn/manifold/_utils.pyx
[17/42] Cythonizing sklearn/metrics/cluster/expected_mutual_info_fast.pyx
[18/42] Cythonizing sklearn/metrics/pairwise_fast.pyx
[19/42] Cythonizing sklearn/neighbors/ball_tree.pyx
[20/42] Cythonizing sklearn/neighbors/dist_metrics.pyx
[21/42] Cythonizing sklearn/neighbors/kd_tree.pyx
[22/42] Cythonizing sklearn/neighbors/quad_tree.pyx
[23/42] Cythonizing sklearn/neighbors/typedefs.pyx
[24/42] Cythonizing sklearn/preprocessing/_csr_polynomial_expansion.pyx
[25/42] Cythonizing sklearn/svm/liblinear.pyx
[26/42] Cythonizing sklearn/svm/libsvm.pyx
[27/42] Cythonizing sklearn/svm/libsvm_sparse.pyx
[28/42] Cythonizing sklearn/tree/_criterion.pyx
[29/42] Cythonizing sklearn/tree/_splitter.pyx
[30/42] Cythonizing sklearn/tree/_tree.pyx
[31/42] Cythonizing sklearn/tree/_utils.pyx
[32/42] Cythonizing sklearn/utils/_cython_blas.pyx
[33/42] Cythonizing sklearn/utils/_logistic_sigmoid.pyx
[34/42] Cythonizing sklearn/utils/_random.pyx
[35/42] Cythonizing sklearn/utils/arrayfuncs.pyx
[36/42] Cythonizing sklearn/utils/fast_dict.pyx
[37/42] Cythonizing sklearn/utils/graph_shortest_path.pyx
[38/42] Cythonizing sklearn/utils/lgamma.pyx
[39/42] Cythonizing sklearn/utils/murmurhash.pyx
[40/42] Cythonizing sklearn/utils/seq_dataset.pyx
/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /Users/jkirkham/Developer/scikit-learn/sklearn/utils/seq_dataset.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
[41/42] Cythonizing sklearn/utils/sparsefuncs_fast.pyx
[42/42] Cythonizing sklearn/utils/weight_vector.pyx
running build_ext
running build_src
build_src
building library "libsvm-skl" sources
building extension "sklearn.__check_build._check_build" sources
building extension "sklearn.preprocessing._csr_polynomial_expansion" sources
building extension "sklearn.cluster._dbscan_inner" sources
building extension "sklearn.cluster._hierarchical" sources
building extension "sklearn.cluster._k_means_elkan" sources
building extension "sklearn.cluster._k_means" sources
building extension "sklearn.datasets._svmlight_format" sources
building extension "sklearn.decomposition._online_lda" sources
building extension "sklearn.decomposition.cdnmf_fast" sources
building extension "sklearn.ensemble._gradient_boosting" sources
building extension "sklearn.feature_extraction._hashing" sources
building extension "sklearn.manifold._utils" sources
building extension "sklearn.manifold._barnes_hut_tsne" sources
building extension "sklearn.metrics.cluster.expected_mutual_info_fast" sources
building extension "sklearn.metrics.pairwise_fast" sources
building extension "sklearn.neighbors.ball_tree" sources
building extension "sklearn.neighbors.kd_tree" sources
building extension "sklearn.neighbors.dist_metrics" sources
building extension "sklearn.neighbors.typedefs" sources
building extension "sklearn.neighbors.quad_tree" sources
building extension "sklearn.tree._tree" sources
building extension "sklearn.tree._splitter" sources
building extension "sklearn.tree._criterion" sources
building extension "sklearn.tree._utils" sources
building extension "sklearn.utils.sparsefuncs_fast" sources
building extension "sklearn.utils._cython_blas" sources
building extension "sklearn.utils.arrayfuncs" sources
building extension "sklearn.utils.murmurhash" sources
building extension "sklearn.utils.lgamma" sources
building extension "sklearn.utils.graph_shortest_path" sources
building extension "sklearn.utils.fast_dict" sources
building extension "sklearn.utils.seq_dataset" sources
building extension "sklearn.utils.weight_vector" sources
building extension "sklearn.utils._random" sources
building extension "sklearn.utils._logistic_sigmoid" sources
building extension "sklearn.svm.libsvm" sources
building extension "sklearn.svm.liblinear" sources
building extension "sklearn.svm.libsvm_sparse" sources
building extension "sklearn.linear_model.cd_fast" sources
building extension "sklearn.linear_model.sgd_fast" sources
building extension "sklearn.linear_model.sag_fast" sources
building extension "sklearn._isotonic" sources
building data_files sources
build_src: building npy-pkg config files
customize UnixCCompiler
customize UnixCCompiler using build_clib
building 'libsvm-skl' library
compiling C++ sources
C compiler: g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64 -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64
creating build
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/sklearn
creating build/temp.macosx-10.9-x86_64-3.7/sklearn/svm
creating build/temp.macosx-10.9-x86_64-3.7/sklearn/svm/src
creating build/temp.macosx-10.9-x86_64-3.7/sklearn/svm/src/libsvm
compile options: '-I/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/numpy/core/include -I/Users/jkirkham/miniconda/envs/np/include/python3.7m -c'
g++: sklearn/svm/src/libsvm/libsvm_template.cpp
ar: adding 1 object files to build/temp.macosx-10.9-x86_64-3.7/liblibsvm-skl.a
ranlib:@ build/temp.macosx-10.9-x86_64-3.7/liblibsvm-skl.a
customize UnixCCompiler
customize UnixCCompiler using build_ext_subclass
customize UnixCCompiler
customize UnixCCompiler using build_ext_subclass
building 'sklearn.__check_build._check_build' extension
compiling C sources
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64 -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64
creating build/temp.macosx-10.9-x86_64-3.7/sklearn/__check_build
compile options: '-I/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/numpy/core/include -I/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/numpy/core/include -I/Users/jkirkham/miniconda/envs/np/include/python3.7m -c'
extra options: '-fopenmp'
gcc: sklearn/__check_build/_check_build.c
clang: error: unsupported option '-fopenmp'
error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64 -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64 -I/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/numpy/core/include -I/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/numpy/core/include -I/Users/jkirkham/miniconda/envs/np/include/python3.7m -c sklearn/__check_build/_check_build.c -o build/temp.macosx-10.9-x86_64-3.7/sklearn/__check_build/_check_build.o -MMD -MF build/temp.macosx-10.9-x86_64-3.7/sklearn/__check_build/_check_build.o.d -fopenmp" failed with exit status 1"><pre class="notranslate">$ python setup.py build_ext --inplace
Partial import of sklearn during the build process.
/Users/jkirkham/miniconda/envs/np/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: <span class="pl-s"><span class="pl-pds">'</span>install_requires<span class="pl-pds">'</span></span>
warnings.warn(msg)
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/Users/jkirkham/miniconda/envs/np/lib<span class="pl-pds">'</span></span>]
NOT AVAILABLE
blis_info:
customize UnixCCompiler
customize UnixCCompiler
customize UnixCCompiler
customize UnixCCompiler
FOUND:
libraries = [<span class="pl-s"><span class="pl-pds">'</span>blas<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>cblas<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>lapack<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>blas<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>cblas<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>lapack<span class="pl-pds">'</span></span>]
library_dirs = [<span class="pl-s"><span class="pl-pds">'</span>/Users/jkirkham/miniconda/envs/np/lib<span class="pl-pds">'</span></span>]
define_macros = [(<span class="pl-s"><span class="pl-pds">'</span>HAVE_CBLAS<span class="pl-pds">'</span></span>, None)]
include_dirs = [<span class="pl-s"><span class="pl-pds">'</span>/Users/jkirkham/miniconda/envs/np/include<span class="pl-pds">'</span></span>]
language = c
customize UnixCCompiler
customize UnixCCompiler
customize UnixCCompiler
FOUND:
libraries = [<span class="pl-s"><span class="pl-pds">'</span>blas<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>cblas<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>lapack<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>blas<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>cblas<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>lapack<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>blas<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>cblas<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>lapack<span class="pl-pds">'</span></span>]
library_dirs = [<span class="pl-s"><span class="pl-pds">'</span>/Users/jkirkham/miniconda/envs/np/lib<span class="pl-pds">'</span></span>]
define_macros = [(<span class="pl-s"><span class="pl-pds">'</span>HAVE_CBLAS<span class="pl-pds">'</span></span>, None)]
include_dirs = [<span class="pl-s"><span class="pl-pds">'</span>/Users/jkirkham/miniconda/envs/np/include<span class="pl-pds">'</span></span>]
language = c
Compiling sklearn/__check_build/_check_build.pyx because it changed.
Compiling sklearn/preprocessing/_csr_polynomial_expansion.pyx because it changed.
Compiling sklearn/cluster/_dbscan_inner.pyx because it changed.
Compiling sklearn/cluster/_hierarchical.pyx because it changed.
Compiling sklearn/cluster/_k_means_elkan.pyx because it changed.
Compiling sklearn/cluster/_k_means.pyx because it changed.
Compiling sklearn/datasets/_svmlight_format.pyx because it changed.
Compiling sklearn/decomposition/_online_lda.pyx because it changed.
Compiling sklearn/decomposition/cdnmf_fast.pyx because it changed.
Compiling sklearn/ensemble/_gradient_boosting.pyx because it changed.
Compiling sklearn/feature_extraction/_hashing.pyx because it changed.
Compiling sklearn/manifold/_utils.pyx because it changed.
Compiling sklearn/manifold/_barnes_hut_tsne.pyx because it changed.
Compiling sklearn/metrics/cluster/expected_mutual_info_fast.pyx because it changed.
Compiling sklearn/metrics/pairwise_fast.pyx because it changed.
Compiling sklearn/neighbors/ball_tree.pyx because it changed.
Compiling sklearn/neighbors/kd_tree.pyx because it changed.
Compiling sklearn/neighbors/dist_metrics.pyx because it changed.
Compiling sklearn/neighbors/typedefs.pyx because it changed.
Compiling sklearn/neighbors/quad_tree.pyx because it changed.
Compiling sklearn/tree/_tree.pyx because it changed.
Compiling sklearn/tree/_splitter.pyx because it changed.
Compiling sklearn/tree/_criterion.pyx because it changed.
Compiling sklearn/tree/_utils.pyx because it changed.
Compiling sklearn/utils/sparsefuncs_fast.pyx because it changed.
Compiling sklearn/utils/_cython_blas.pyx because it changed.
Compiling sklearn/utils/arrayfuncs.pyx because it changed.
Compiling sklearn/utils/murmurhash.pyx because it changed.
Compiling sklearn/utils/lgamma.pyx because it changed.
Compiling sklearn/utils/graph_shortest_path.pyx because it changed.
Compiling sklearn/utils/fast_dict.pyx because it changed.
Compiling sklearn/utils/seq_dataset.pyx because it changed.
Compiling sklearn/utils/weight_vector.pyx because it changed.
Compiling sklearn/utils/_random.pyx because it changed.
Compiling sklearn/utils/_logistic_sigmoid.pyx because it changed.
Compiling sklearn/svm/libsvm.pyx because it changed.
Compiling sklearn/svm/liblinear.pyx because it changed.
Compiling sklearn/svm/libsvm_sparse.pyx because it changed.
Compiling sklearn/linear_model/cd_fast.pyx because it changed.
Compiling sklearn/linear_model/sgd_fast.pyx because it changed.
Compiling sklearn/linear_model/sag_fast.pyx because it changed.
Compiling sklearn/_isotonic.pyx because it changed.
[ 1/42] Cythonizing sklearn/__check_build/_check_build.pyx
[ 2/42] Cythonizing sklearn/_isotonic.pyx
[ 3/42] Cythonizing sklearn/cluster/_dbscan_inner.pyx
[ 4/42] Cythonizing sklearn/cluster/_hierarchical.pyx
[ 5/42] Cythonizing sklearn/cluster/_k_means.pyx
[ 6/42] Cythonizing sklearn/cluster/_k_means_elkan.pyx
[ 7/42] Cythonizing sklearn/datasets/_svmlight_format.pyx
[ 8/42] Cythonizing sklearn/decomposition/_online_lda.pyx
[ 9/42] Cythonizing sklearn/decomposition/cdnmf_fast.pyx
[10/42] Cythonizing sklearn/ensemble/_gradient_boosting.pyx
[11/42] Cythonizing sklearn/feature_extraction/_hashing.pyx
[12/42] Cythonizing sklearn/linear_model/cd_fast.pyx
[13/42] Cythonizing sklearn/linear_model/sag_fast.pyx
[14/42] Cythonizing sklearn/linear_model/sgd_fast.pyx
[15/42] Cythonizing sklearn/manifold/_barnes_hut_tsne.pyx
[16/42] Cythonizing sklearn/manifold/_utils.pyx
[17/42] Cythonizing sklearn/metrics/cluster/expected_mutual_info_fast.pyx
[18/42] Cythonizing sklearn/metrics/pairwise_fast.pyx
[19/42] Cythonizing sklearn/neighbors/ball_tree.pyx
[20/42] Cythonizing sklearn/neighbors/dist_metrics.pyx
[21/42] Cythonizing sklearn/neighbors/kd_tree.pyx
[22/42] Cythonizing sklearn/neighbors/quad_tree.pyx
[23/42] Cythonizing sklearn/neighbors/typedefs.pyx
[24/42] Cythonizing sklearn/preprocessing/_csr_polynomial_expansion.pyx
[25/42] Cythonizing sklearn/svm/liblinear.pyx
[26/42] Cythonizing sklearn/svm/libsvm.pyx
[27/42] Cythonizing sklearn/svm/libsvm_sparse.pyx
[28/42] Cythonizing sklearn/tree/_criterion.pyx
[29/42] Cythonizing sklearn/tree/_splitter.pyx
[30/42] Cythonizing sklearn/tree/_tree.pyx
[31/42] Cythonizing sklearn/tree/_utils.pyx
[32/42] Cythonizing sklearn/utils/_cython_blas.pyx
[33/42] Cythonizing sklearn/utils/_logistic_sigmoid.pyx
[34/42] Cythonizing sklearn/utils/_random.pyx
[35/42] Cythonizing sklearn/utils/arrayfuncs.pyx
[36/42] Cythonizing sklearn/utils/fast_dict.pyx
[37/42] Cythonizing sklearn/utils/graph_shortest_path.pyx
[38/42] Cythonizing sklearn/utils/lgamma.pyx
[39/42] Cythonizing sklearn/utils/murmurhash.pyx
[40/42] Cythonizing sklearn/utils/seq_dataset.pyx
/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive <span class="pl-s"><span class="pl-pds">'</span>language_level<span class="pl-pds">'</span></span> not set, using 2 <span class="pl-k">for</span> <span class="pl-smi">now (Py2). This will change</span> <span class="pl-k">in</span> a later release<span class="pl-k">!</span> File: /Users/jkirkham/Developer/scikit-learn/sklearn/utils/seq_dataset.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
[41/42] Cythonizing sklearn/utils/sparsefuncs_fast.pyx
[42/42] Cythonizing sklearn/utils/weight_vector.pyx
running build_ext
running build_src
build_src
building library <span class="pl-s"><span class="pl-pds">"</span>libsvm-skl<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.__check_build._check_build<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.preprocessing._csr_polynomial_expansion<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.cluster._dbscan_inner<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.cluster._hierarchical<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.cluster._k_means_elkan<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.cluster._k_means<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.datasets._svmlight_format<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.decomposition._online_lda<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.decomposition.cdnmf_fast<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.ensemble._gradient_boosting<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.feature_extraction._hashing<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.manifold._utils<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.manifold._barnes_hut_tsne<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.metrics.cluster.expected_mutual_info_fast<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.metrics.pairwise_fast<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.neighbors.ball_tree<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.neighbors.kd_tree<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.neighbors.dist_metrics<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.neighbors.typedefs<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.neighbors.quad_tree<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.tree._tree<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.tree._splitter<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.tree._criterion<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.tree._utils<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils.sparsefuncs_fast<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils._cython_blas<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils.arrayfuncs<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils.murmurhash<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils.lgamma<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils.graph_shortest_path<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils.fast_dict<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils.seq_dataset<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils.weight_vector<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils._random<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.utils._logistic_sigmoid<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.svm.libsvm<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.svm.liblinear<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.svm.libsvm_sparse<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.linear_model.cd_fast<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.linear_model.sgd_fast<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn.linear_model.sag_fast<span class="pl-pds">"</span></span> sources
building extension <span class="pl-s"><span class="pl-pds">"</span>sklearn._isotonic<span class="pl-pds">"</span></span> sources
building data_files sources
build_src: building npy-pkg config files
customize UnixCCompiler
customize UnixCCompiler using build_clib
building <span class="pl-s"><span class="pl-pds">'</span>libsvm-skl<span class="pl-pds">'</span></span> library
compiling C++ sources
C compiler: g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64 -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64
creating build
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/sklearn
creating build/temp.macosx-10.9-x86_64-3.7/sklearn/svm
creating build/temp.macosx-10.9-x86_64-3.7/sklearn/svm/src
creating build/temp.macosx-10.9-x86_64-3.7/sklearn/svm/src/libsvm
compile options: <span class="pl-s"><span class="pl-pds">'</span>-I/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/numpy/core/include -I/Users/jkirkham/miniconda/envs/np/include/python3.7m -c<span class="pl-pds">'</span></span>
g++: sklearn/svm/src/libsvm/libsvm_template.cpp
ar: adding 1 object files to build/temp.macosx-10.9-x86_64-3.7/liblibsvm-skl.a
ranlib:@ build/temp.macosx-10.9-x86_64-3.7/liblibsvm-skl.a
customize UnixCCompiler
customize UnixCCompiler using build_ext_subclass
customize UnixCCompiler
customize UnixCCompiler using build_ext_subclass
building <span class="pl-s"><span class="pl-pds">'</span>sklearn.__check_build._check_build<span class="pl-pds">'</span></span> extension
compiling C sources
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64 -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64
creating build/temp.macosx-10.9-x86_64-3.7/sklearn/__check_build
compile options: <span class="pl-s"><span class="pl-pds">'</span>-I/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/numpy/core/include -I/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/numpy/core/include -I/Users/jkirkham/miniconda/envs/np/include/python3.7m -c<span class="pl-pds">'</span></span>
extra options: <span class="pl-s"><span class="pl-pds">'</span>-fopenmp<span class="pl-pds">'</span></span>
gcc: sklearn/__check_build/_check_build.c
clang: error: unsupported option <span class="pl-s"><span class="pl-pds">'</span>-fopenmp<span class="pl-pds">'</span></span>
error: Command <span class="pl-s"><span class="pl-pds">"</span>gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64 -I/Users/jkirkham/miniconda/envs/np/include -arch x86_64 -I/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/numpy/core/include -I/Users/jkirkham/miniconda/envs/np/lib/python3.7/site-packages/numpy/core/include -I/Users/jkirkham/miniconda/envs/np/include/python3.7m -c sklearn/__check_build/_check_build.c -o build/temp.macosx-10.9-x86_64-3.7/sklearn/__check_build/_check_build.o -MMD -MF build/temp.macosx-10.9-x86_64-3.7/sklearn/__check_build/_check_build.o.d -fopenmp<span class="pl-pds">"</span></span> failed with <span class="pl-c1">exit</span> status 1</pre></div>
</details>
<h4 dir="auto">Versions</h4>
<p dir="auto">Python 3.7.2 | packaged by conda-forge | (default, Mar 19 2019, 20:46:22)<br>
[Clang 4.0.1 (tags/RELEASE_401/final)]<br>
NumPy 1.16.2<br>
SciPy 1.2.1</p>
<p dir="auto">Used scikit-learn commit ( <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/scikit-learn/scikit-learn/commit/2718d6212f92220d5f228bfaf7bff0e75ea14965/hovercard" href="https://github.com/scikit-learn/scikit-learn/commit/2718d6212f92220d5f228bfaf7bff0e75ea14965"><tt>2718d62</tt></a> ) for the build.</p>
<p dir="auto">More details about the build environment are included below.</p>
<details>
<summary>Environment:</summary>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="channels:
- conda-forge
- defaults
dependencies:
- appnope=0.1.0=py37_1000
- backcall=0.1.0=py_0
- blas=2.4=openblas
- bzip2=1.0.6=h1de35cc_1002
- ca-certificates=2019.3.9=hecc5488_0
- certifi=2019.3.9=py37_0
- cython=0.29.6=py37h0a44026_0
- decorator=4.4.0=py_0
- ipython=7.4.0=py37h24bf2e0_0
- ipython_genutils=0.2.0=py_1
- jedi=0.13.3=py37_0
- libblas=3.8.0=4_openblas
- libcblas=3.8.0=4_openblas
- libcxx=4.0.1=h579ed51_0
- libcxxabi=4.0.1=hebd6815_0
- libffi=3.2.1=h6de7cb9_1006
- libgfortran=3.0.1=0
- liblapack=3.8.0=4_openblas
- liblapacke=3.8.0=4_openblas
- ncurses=6.1=h0a44026_1002
- numpy=1.16.2=py37hbb3c62a_1
- openblas=0.3.5=h436c29b_1001
- openssl=1.1.1b=h01d97ff_2
- parso=0.3.4=py_0
- pexpect=4.6.0=py37_1000
- pickleshare=0.7.5=py37_1000
- pip=19.0.3=py37_0
- prompt_toolkit=2.0.9=py_0
- ptyprocess=0.6.0=py37_1000
- pygments=2.3.1=py_0
- python=3.7.2=hbdd33cc_0
- readline=7.0=hcfe32e1_1001
- scipy=1.2.1=py37hbd7caa9_1
- setuptools=40.8.0=py37_0
- six=1.12.0=py37_1000
- sqlite=3.26.0=h1765d9f_1001
- tk=8.6.9=ha441bb4_1000
- traitlets=4.3.2=py37_1000
- wcwidth=0.1.7=py_1
- wheel=0.33.1=py37_0
- xz=5.2.4=h1de35cc_1001
- zlib=1.2.11=h1de35cc_1004"><pre class="notranslate"><span class="pl-ent">channels</span>:
- <span class="pl-s">conda-forge</span>
- <span class="pl-s">defaults</span>
<span class="pl-ent">dependencies</span>:
- <span class="pl-s">appnope=0.1.0=py37_1000</span>
- <span class="pl-s">backcall=0.1.0=py_0</span>
- <span class="pl-s">blas=2.4=openblas</span>
- <span class="pl-s">bzip2=1.0.6=h1de35cc_1002</span>
- <span class="pl-s">ca-certificates=2019.3.9=hecc5488_0</span>
- <span class="pl-s">certifi=2019.3.9=py37_0</span>
- <span class="pl-s">cython=0.29.6=py37h0a44026_0</span>
- <span class="pl-s">decorator=4.4.0=py_0</span>
- <span class="pl-s">ipython=7.4.0=py37h24bf2e0_0</span>
- <span class="pl-s">ipython_genutils=0.2.0=py_1</span>
- <span class="pl-s">jedi=0.13.3=py37_0</span>
- <span class="pl-s">libblas=3.8.0=4_openblas</span>
- <span class="pl-s">libcblas=3.8.0=4_openblas</span>
- <span class="pl-s">libcxx=4.0.1=h579ed51_0</span>
- <span class="pl-s">libcxxabi=4.0.1=hebd6815_0</span>
- <span class="pl-s">libffi=3.2.1=h6de7cb9_1006</span>
- <span class="pl-s">libgfortran=3.0.1=0</span>
- <span class="pl-s">liblapack=3.8.0=4_openblas</span>
- <span class="pl-s">liblapacke=3.8.0=4_openblas</span>
- <span class="pl-s">ncurses=6.1=h0a44026_1002</span>
- <span class="pl-s">numpy=1.16.2=py37hbb3c62a_1</span>
- <span class="pl-s">openblas=0.3.5=h436c29b_1001</span>
- <span class="pl-s">openssl=1.1.1b=h01d97ff_2</span>
- <span class="pl-s">parso=0.3.4=py_0</span>
- <span class="pl-s">pexpect=4.6.0=py37_1000</span>
- <span class="pl-s">pickleshare=0.7.5=py37_1000</span>
- <span class="pl-s">pip=19.0.3=py37_0</span>
- <span class="pl-s">prompt_toolkit=2.0.9=py_0</span>
- <span class="pl-s">ptyprocess=0.6.0=py37_1000</span>
- <span class="pl-s">pygments=2.3.1=py_0</span>
- <span class="pl-s">python=3.7.2=hbdd33cc_0</span>
- <span class="pl-s">readline=7.0=hcfe32e1_1001</span>
- <span class="pl-s">scipy=1.2.1=py37hbd7caa9_1</span>
- <span class="pl-s">setuptools=40.8.0=py37_0</span>
- <span class="pl-s">six=1.12.0=py37_1000</span>
- <span class="pl-s">sqlite=3.26.0=h1765d9f_1001</span>
- <span class="pl-s">tk=8.6.9=ha441bb4_1000</span>
- <span class="pl-s">traitlets=4.3.2=py37_1000</span>
- <span class="pl-s">wcwidth=0.1.7=py_1</span>
- <span class="pl-s">wheel=0.33.1=py37_0</span>
- <span class="pl-s">xz=5.2.4=h1de35cc_1001</span>
- <span class="pl-s">zlib=1.2.11=h1de35cc_1004</span></pre></div>
</details> | <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jnothman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jnothman">@jnothman</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/agramfort/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/agramfort">@agramfort</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/NicolasHug/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/NicolasHug">@NicolasHug</a> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="414152565" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/13252" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/13252/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/13252">#13252</a>)</p>
<h4 dir="auto">Description</h4>
<p dir="auto">Build on macOS succeeds at <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/scikit-learn/scikit-learn/commit/f652b95adad4a54b16d64884adc0d459d7d736b1/hovercard" href="https://github.com/scikit-learn/scikit-learn/commit/f652b95adad4a54b16d64884adc0d459d7d736b1"><tt>f652b95</tt></a>~1 but fails at <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/scikit-learn/scikit-learn/commit/f652b95adad4a54b16d64884adc0d459d7d736b1/hovercard" href="https://github.com/scikit-learn/scikit-learn/commit/f652b95adad4a54b16d64884adc0d459d7d736b1"><tt>f652b95</tt></a>.</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<p dir="auto"><code class="notranslate">git clone https://github.com/scikit-learn/scikit-learn.git</code><br>
<code class="notranslate">cd scikit-learn</code><br>
<code class="notranslate">pip3 install --user Cython</code><br>
<code class="notranslate">pip3 install --user numpy</code><br>
<code class="notranslate">pip3 install --user .</code></p>
<h4 dir="auto">Actual Results</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="creating build/temp.macosx-10.14-x86_64-3.7/sklearn/__check_build
compile options: '-I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
extra options: '-fopenmp'
clang: sklearn/__check_build/_check_build.c
clang: error: unsupported option '-fopenmp'
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c sklearn/__check_build/_check_build.c -o build/temp.macosx-10.14-x86_64-3.7/sklearn/__check_build/_check_build.o -MMD -MF build/temp.macosx-10.14-x86_64-3.7/sklearn/__check_build/_check_build.o.d -fopenmp" failed with exit status 1"><pre class="notranslate"><code class="notranslate">creating build/temp.macosx-10.14-x86_64-3.7/sklearn/__check_build
compile options: '-I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
extra options: '-fopenmp'
clang: sklearn/__check_build/_check_build.c
clang: error: unsupported option '-fopenmp'
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c sklearn/__check_build/_check_build.c -o build/temp.macosx-10.14-x86_64-3.7/sklearn/__check_build/_check_build.o -MMD -MF build/temp.macosx-10.14-x86_64-3.7/sklearn/__check_build/_check_build.o.d -fopenmp" failed with exit status 1
</code></pre></div> | 1 |
<p dir="auto">PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="448761931" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/20983" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/20983/hovercard" href="https://github.com/pytorch/pytorch/pull/20983">#20983</a> contains a port of CUDA Blas functions gemm and gemv to ATen native.</p>
<p dir="auto">There are several other Blas functions in <code class="notranslate">THCBlas.{h,cu}</code> that need to be ported.</p>
<p dir="auto">Also, the duplication of <code class="notranslate">adjustLdLevel2</code>, <code class="notranslate">adjustLdLevel3</code>, <code class="notranslate">convertTransToCublasOperation</code>, <code class="notranslate">THCublasCheck</code> needs to be resolved by deleting these once all <code class="notranslate">THCBlas.cu</code> functions use Blas functions from <code class="notranslate">at::cuda::blas</code>.</p> | <p dir="auto">Hi All,</p>
<p dir="auto">CTC as a loss function quite often used in sequence to sequence models isn't currently implemented and installing binding to warp-ctc is quite hacky (and warp-ctc isn't developed anymore). I'd like to add it natively to pytorch, probably based on the implementation of <a href="https://github.com/tmbdev/clstm">clstm</a>.</p>
<p dir="auto">My question is first of if that is even desired and second where to include the code? Is torch/lib/THNN/generic the right location?</p> | 0 |
<p dir="auto">Here's the error:</p>
<p dir="auto">C:\Users\Sebastian\Documents\rust>rustc helloworld.rs<br>
error: linking with gcc failed with code 1<br>
note: gcc arguments: -LC:/Program Files (x86)/Rust/bin/rustc/i686-pc-mingw32/bin<br>
-m32 -o ./helloworld ./helloworld.o -LC:/Program Files (x86)/Rust/bin/rustc/i68<br>
6-pc-mingw32/bin -lcore-14bd852465126fe7-0.1 -LC:/Program Files (x86)/Rust/bin/r<br>
ustc/i686-pc-mingw32/bin -lstd-79ca5fac56b63fde-0.1 -lm -lrustrt -lmorestack<br>
note: gcc: error: Files: No such file or directory<br>
gcc: error: (x86)/Rust/bin/rustc/i686-pc-mingw32/bin: No such file or directory<br>
gcc: error: Files: No such file or directory<br>
gcc: error: (x86)/Rust/bin/rustc/i686-pc-mingw32/bin: No such file or directory<br>
gcc: error: Files: No such file or directory<br>
gcc: error: (x86)/Rust/bin/rustc/i686-pc-mingw32/bin: No such file or directory</p>
<p dir="auto">error: aborting due to previous errors</p>
<p dir="auto">Looks like it needs some quotes around those paths to deal with spaces.</p> | <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/metajack/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/metajack">@metajack</a> pointed out that if we want to move away from using submodules, to using directives like <code class="notranslate">extern mod foo = http://whatever/a/b/c#xxxxxx</code>, where xxxxxx is a revision ID, the particular known-good revision being used has to appear in multiple locations in the code. That's suboptimal.</p>
<p dir="auto">For rustpkg, we should think about whether there's a way to store all of the "known-good versions" for a project's dependencies in one place.</p> | 0 |
<p dir="auto">Now I have a requirement for Bluetooth communication, so I should call the native api to complete the Bluetooth communication. I have to use the Android and IOS APIs to get the job done. But I am an Android developer</p> | <p dir="auto">Mobile platforms offer APIs to connect and communicate with Bluetooth.</p> | 1 |
<p dir="auto">According to documentation <a href="https://reactjs.org/docs/test-utils.html#renderintodocument" rel="nofollow">https://reactjs.org/docs/test-utils.html#renderintodocument</a>, should be:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const domContainer = document.createElement('div');
ReactDOM.createRoot(domContainer).render(element);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">domContainer</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-s">'div'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-v">ReactDOM</span><span class="pl-kos">.</span><span class="pl-en">createRoot</span><span class="pl-kos">(</span><span class="pl-s1">domContainer</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">element</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">but is ReactDOM.render<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/facebook/react/blob/2cf4352e1c81a5b8c3528519a128c20e8e65531d/packages/react-dom/src/test-utils/ReactTestUtils.js#L137">react/packages/react-dom/src/test-utils/ReactTestUtils.js</a>
</p>
<p class="mb-0 color-fg-muted">
Line 137
in
<a data-pjax="true" class="commit-tease-sha" href="/facebook/react/commit/2cf4352e1c81a5b8c3528519a128c20e8e65531d">2cf4352</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L137" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="137"></td>
<td id="LC137" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-v">ReactDOM</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">element</span><span class="pl-kos">,</span> <span class="pl-s1">div</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
</tbody></table>
</div>
</div>
<p></p> | <h3 dir="auto">Which website or app were you using when the bug happened?</h3>
<p dir="auto">Please provide a link to the URL of the website (if it is public), a CodeSandbox (<a href="https://codesandbox.io/s/new" rel="nofollow">https://codesandbox.io/s/new</a>) example that reproduces the bug, or a project on GitHub that we can checkout and run locally.</p>
<h3 dir="auto">What were you doing on the website or app when the bug happened?</h3>
<p dir="auto">If possible, please describe how to reproduce this bug on the website or app mentioned above:</p>
<ol dir="auto">
<li>
</li>
<li>
</li>
<li>
</li>
</ol>
<h3 dir="auto">Generated information</h3>
<p dir="auto">DevTools version: 4.13.1-93782cfed2</p>
<p dir="auto">Call stack:<br>
(none)</p>
<p dir="auto">Component stack:<br>
(none)</p>
<p dir="auto">GitHub URL search query:<br>
<a href="https://api.github.com/search/issues?q=Cannot%20add%20node%20%20because%20a%20node%20with%20that%20id%20is%20already%20in%20the%20Store.%20in%3Atitle%20is%3Aissue%20is%3Aopen%20is%3Apublic%20label%3A%22Component%3A%20Developer%20Tools%22%20repo%3Afacebook%2Freact">https://api.github.com/search/issues?q=Cannot%20add%20node%20%20because%20a%20node%20with%20that%20id%20is%20already%20in%20the%20Store.%20in%3Atitle%20is%3Aissue%20is%3Aopen%20is%3Apublic%20label%3A%22Component%3A%20Developer%20Tools%22%20repo%3Afacebook%2Freact</a></p> | 0 |
<p dir="auto">Disapointing <g-emoji class="g-emoji" alias="expressionless" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f611.png">๐</g-emoji> I was really looking forward to finally have something like this! Hope you can fix it quick</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="information_source" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png">โน</g-emoji> Computer information</h2>
<ul dir="auto">
<li>PowerToys version: v0.23.2</li>
<li>PowerToy Utility: FancyZone</li>
<li>Running PowerToys as Admin: Yes</li>
<li>Windows build number: 20231.1000</li>
</ul>
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">๐</g-emoji> Provide detailed reproduction steps (if any)</h2>
<ol dir="auto">
<li>Lauch FancyZones</li>
<li>Select a configuration in templates, or "Create new custom" in custom tab.</li>
<li>Click "Edit selected layout"</li>
</ol>
<h3 dir="auto">โ๏ธ Expected result</h3>
<p dir="auto">I assume a configuration editor, but it was my first try.. I the grey rectangle and a glimpse of a draggable separator.</p>
<h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">โ</g-emoji> Actual result</h3>
<p dir="auto">Crash and display error.<br>
<a href="https://github.com/microsoft/PowerToys/files/5376196/FZEditorCrashLog.txt">FZEditorCrashLog.txt</a></p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="camera" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png">๐ท</g-emoji> Screenshots</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12494787/95953958-eb8fff80-0dfa-11eb-8f04-cda93c7fc35d.png"><img src="https://user-images.githubusercontent.com/12494787/95953958-eb8fff80-0dfa-11eb-8f04-cda93c7fc35d.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12494787/95953996-f3e83a80-0dfa-11eb-8352-e9022d00cf9e.png"><img src="https://user-images.githubusercontent.com/12494787/95953996-f3e83a80-0dfa-11eb-8352-e9022d00cf9e.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">I got also an error. Trying to edit the custom FancyZones. FZEditorCrashLog.txt contains:</p>
<h2 dir="auto">Exception</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="System.ComponentModel.Win32Exception: Das System kann die angegebene Datei nicht finden
Source: MahApps.Metro
TargetAssembly: MahApps.Metro, Version=2.0.0.0, Culture=neutral, PublicKeyToken=51482d6f650b2b3f
TargetModule: MahApps.Metro.dll
TargetSite: System.String GetWindowText(System.Windows.Window)
bei MahApps.Metro.Controls.WinApiHelper.GetWindowText(Window window)
bei MahApps.Metro.Automation.Peers.MetroWindowAutomationPeer.GetNameCore()
bei System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
bei System.Windows.ContextLayoutManager.fireAutomationEvents()
bei System.Windows.ContextLayoutManager.UpdateLayout()
bei System.Windows.Interop.HwndSource.SetLayoutSize()
bei System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
bei System.Windows.Window.SetRootVisual()
bei System.Windows.Window.SetRootVisualAndUpdateSTC()
bei System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
bei System.Windows.Window.CreateSourceWindow(Boolean duringShow)
bei System.Windows.Window.ShowHelper(Object booleanBox)
bei FancyZonesEditor.MainWindow.EditLayout_Click(Object sender, RoutedEventArgs e)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.Controls.Primitives.ButtonBase.OnClick()
bei System.Windows.Controls.Button.OnClick()
bei System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
bei System.Windows.Input.InputManager.ProcessStagingArea()
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei System.Windows.Application.RunDispatcher(Object ignore)
bei System.Windows.Application.RunInternal(Window window)
bei FancyZonesEditor.App.Main()
"><pre class="notranslate"><code class="notranslate">System.ComponentModel.Win32Exception: Das System kann die angegebene Datei nicht finden
Source: MahApps.Metro
TargetAssembly: MahApps.Metro, Version=2.0.0.0, Culture=neutral, PublicKeyToken=51482d6f650b2b3f
TargetModule: MahApps.Metro.dll
TargetSite: System.String GetWindowText(System.Windows.Window)
bei MahApps.Metro.Controls.WinApiHelper.GetWindowText(Window window)
bei MahApps.Metro.Automation.Peers.MetroWindowAutomationPeer.GetNameCore()
bei System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
bei System.Windows.ContextLayoutManager.fireAutomationEvents()
bei System.Windows.ContextLayoutManager.UpdateLayout()
bei System.Windows.Interop.HwndSource.SetLayoutSize()
bei System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
bei System.Windows.Window.SetRootVisual()
bei System.Windows.Window.SetRootVisualAndUpdateSTC()
bei System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
bei System.Windows.Window.CreateSourceWindow(Boolean duringShow)
bei System.Windows.Window.ShowHelper(Object booleanBox)
bei FancyZonesEditor.MainWindow.EditLayout_Click(Object sender, RoutedEventArgs e)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.Controls.Primitives.ButtonBase.OnClick()
bei System.Windows.Controls.Button.OnClick()
bei System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
bei System.Windows.Input.InputManager.ProcessStagingArea()
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei System.Windows.Application.RunDispatcher(Object ignore)
bei System.Windows.Application.RunInternal(Window window)
bei FancyZonesEditor.App.Main()
</code></pre></div>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>Command Line: "C:\Program Files\PowerToys\modules\FancyZones\FancyZonesEditor.exe" 0_0_3840_1560 "15216"</li>
<li>Timestamp: 10/01/2020 07:26:54</li>
<li>OS Version: Microsoft Windows NT 6.2.9200.0</li>
<li>IntPtr Length: 8</li>
<li>x64: True</li>
<li>CLR Version: 4.0.30319.42000</li>
</ul>
<h2 dir="auto">Assemblies - FancyZonesEditor.exe</h2>
<ul dir="auto">
<li>FancyZonesEditor, Version=0.23.0.0, Culture=neutral, PublicKeyToken=null (C:\Program Files\PowerToys\modules\FancyZones\FancyZonesEditor.exe)</li>
<li>System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\Program Files\PowerToys\modules\FancyZones\System.Text.Json.dll)</li>
<li>System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\Program Files\PowerToys\modules\FancyZones\System.Memory.dll)</li>
<li>System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\Program Files\PowerToys\modules\FancyZones\System.Runtime.CompilerServices.Unsafe.dll)</li>
<li>System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\Program Files\PowerToys\modules\FancyZones\System.Buffers.dll)</li>
<li>System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\Program Files\PowerToys\modules\FancyZones\System.Numerics.Vectors.dll)</li>
<li>System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\Program Files\PowerToys\modules\FancyZones\System.ValueTuple.dll)</li>
<li>MahApps.Metro, Version=2.0.0.0, Culture=neutral, PublicKeyToken=51482d6f650b2b3f (C:\Program Files\PowerToys\modules\FancyZones\MahApps.Metro.dll)</li>
<li>ControlzEx, Version=4.0.0.0, Culture=neutral, PublicKeyToken=69f1c32f803d307e (C:\Program Files\PowerToys\modules\FancyZones\ControlzEx.dll)</li>
<li>ManagedCommon, Version=0.23.0.0, Culture=neutral, PublicKeyToken=null (C:\Program Files\PowerToys\modules\FancyZones\ManagedCommon.dll)</li>
<li>Telemetry, Version=0.23.0.0, Culture=neutral, PublicKeyToken=null (C:\Program Files\PowerToys\modules\FancyZones\Telemetry.dll)</li>
<li>Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\Program Files\PowerToys\modules\FancyZones\Microsoft.Xaml.Behaviors.dll)</li>
<li>mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll)</li>
<li>System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll)</li>
<li>System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll)</li>
<li>PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll)</li>
<li>WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll)</li>
<li>PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:\WINDOWS\Microsoft.Net\assembly\GAC_64\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll)</li>
<li>System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll)</li>
<li>System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll)</li>
<li>System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll)</li>
<li>PresentationFramework.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero2\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero2.dll)</li>
<li>PresentationFramework-SystemXml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXml\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXml.dll)</li>
<li>System.Windows.Controls.Ribbon, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Controls.Ribbon\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Controls.Ribbon.dll)</li>
<li>netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\netstandard\v4.0_2.0.0.0__cc7b13ffcd2ddd51\netstandard.dll)</li>
<li>mscorlib.resources, Version=4.0.0.0, Culture=de, PublicKeyToken=b77a5c561934e089 (C:\WINDO</li>
</ul>
<p dir="auto"><em>Originally posted by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rgisler/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rgisler">@rgisler</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="710468604" data-permission-text="Title is private" data-url="https://github.com/microsoft/PowerToys/issues/6877" data-hovercard-type="issue" data-hovercard-url="/microsoft/PowerToys/issues/6877/hovercard?comment_id=701895391&comment_type=issue_comment" href="https://github.com/microsoft/PowerToys/issues/6877#issuecomment-701895391">#6877 (comment)</a></em></p> | 1 |
<p dir="auto">Just wanted to raise something that Iโve noticed using the beta.</p>
<p dir="auto">During server-side rendering (using the custom routing and <code class="notranslate">renderToHTML</code>), there are some server-side dependencies I want to make available (for example, a means of injecting requests directly into my Hapi app so that the server-side data fetching doesnโt go through a network interface). In some cases I also have data to seed an initial Redux store based on the request.</p>
<p dir="auto">Currently Iโm getting this data in by attaching custom properties to the Node <code class="notranslate">Request</code> object thatโs passed in to the context.</p>
<p dir="auto">This is fine, though a little awkward. I was raising this up in case you want to make it easier to add server-specific properties to the <code class="notranslate">getInitialProps</code> context.</p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Should serve the pages and watch for changes</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Going through the tutorial and setup its fine, I'm able to run <code class="notranslate">npm run dev</code> and it compiles successfully, I'm able to see "Hello Next.js" page loading, but after a few seconds the app fails.</p>
<p dir="auto">error message:</p>
<p dir="auto">`/Users/myname/Documents/hello-next/node_modules/next/dist/server/on-demand-entry-handler.js:323<br>
(0, _keys2.default)(entries).forEach(function (page) {<br>
^<br>
TypeError: lastAccessPages.includes is not a function<br>
at /Users/myname/Documents/hello-next/node_modules/next/dist/server/on-demand-entry-handler.js:336:25<br>
at Array.forEach (native)<br>
at disposeInactiveEntries (/Users/myname/Documents/hello-next/node_modules/next/dist/server/on-demand-entry-handler.js:323:32)<br>
at null._repeat (/Users/myname/Documents/hello-next/node_modules/next/dist/server/on-demand-entry-handler.js:171:5)<br>
at null.wrapper [as _onTimeout] (timers.js:275:11)<br>
at Timer.listOnTimeout (timers.js:92:15)<br>
npm ERR! code ELIFECYCLE<br>
npm ERR! errno 1<br>
npm ERR! [email protected] dev: next<br>
npm ERR! Exit status 1<br>
npm ERR!<br>
npm ERR! Failed at the [email protected] dev script.<br>
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.</p>
<p dir="auto">npm ERR! A complete log of this run can be found in:<br>
npm ERR! /Users/myname/.npm/_logs/2017-10-19T23_08_17_041Z-debug.log`</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Finish setup in Learnnextjs</li>
<li>run <code class="notranslate">npm run dev</code></li>
</ol>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>4.1.1</td>
</tr>
<tr>
<td>node</td>
<td>6.9.2</td>
</tr>
<tr>
<td>OS</td>
<td>macOs 10</td>
</tr>
<tr>
<td>browser</td>
<td>chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">I'm having trouble with .AppleDouble directories, which are picked up when I run commands from the command line. Symfony expects the wrong classes in the files "inside" the .AppeDouble directories. Of course Symfony2 should just ignore the .AppleDouble directory as there is only metadata in there.</p>
<p dir="auto">These issue already came up in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="923931" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/994" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/994/hovercard" href="https://github.com/symfony/symfony/pull/994">#994</a> and apparently was fixed in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/7ab3fdeb8325d5a72c44dc73214c97f366a11c4c/hovercard" href="https://github.com/symfony/symfony/commit/7ab3fdeb8325d5a72c44dc73214c97f366a11c4c"><tt>7ab3fde</tt></a>. This does not work for me however. I think the problem is that .AppleDouble is a directory, not a file. If I add .AppleDouble to the VCS patterns, it works and no files "inside" .AppleDouble are picked up.</p>
<p dir="auto">Of course, this does not seem to be the "right" way of doing this. My thinking would be to rename $vcsPatterns to $directoryPatterns. If that sounds good, I'm happy to make a pull request.</p> | <p dir="auto">I found a weird behavior with <code class="notranslate">ignoreDotFiles(true)</code>: the testsuite of the ExcludeDirectoryFilterIterator passes properly but folder starting with a dot are not ignored.</p>
<p dir="auto">I found it when using the PHP-CS-Fixer (which calls this method in its DefaultFinder).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mkdir .test
echo "foo " > .test/foo.php
php-cs-fixer fix . --dry-run"><pre class="notranslate"><code class="notranslate">mkdir .test
echo "foo " > .test/foo.php
php-cs-fixer fix . --dry-run
</code></pre></div>
<p dir="auto">Expected output: no change.<br>
Actual output: <code class="notranslate">.test/foo.php</code> is modified</p>
<p dir="auto">This is a bit annoying as it means that the fixer messes with the .idea folder holding the PHPStorm metadata.</p>
<p dir="auto">FYI, I found this bug on Windows. I don't know if it is a platform-specific bug or if it affects Unix environments as well.</p> | 1 |
<p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="116888714" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/5286" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/5286/hovercard" href="https://github.com/angular/angular/issues/5286">#5286</a></p>
<p dir="auto">When an item is selected using ng-link, it only adds the class 'ng-link-active' if there is no parameter within the ng-link directive. <code class="notranslate"><a ng-link="['About']">About</a></code></p>
<p dir="auto">The class 'ng-link-active' FAILS to be added for ng-link with a parameter.<br>
<code class="notranslate"><a ng-link="['About', **{id: 5}**]">About</a></code></p> | <p dir="auto">If I navigate to a route without any optional parameters, the router link for that route is displayed as active. If I navigate to that same route with optional route parameters, the router link is no longer marked as active.</p>
<p dir="auto">Example: <a href="http://plnkr.co/edit/LVYtuiQ8O2d52UrrxV2e?p=preview" rel="nofollow">http://plnkr.co/edit/LVYtuiQ8O2d52UrrxV2e?p=preview</a></p>
<p dir="auto">As long as I'm on the <code class="notranslate">Active</code> route, its router link should be marked as active even if there are optional parameters included.</p> | 1 |
<p dir="auto">Duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="976209179" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/22152" data-hovercard-type="issue" data-hovercard-url="/facebook/react/issues/22152/hovercard" href="https://github.com/facebook/react/issues/22152">#22152</a></p>
<p dir="auto"><em>Originally posted by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/eps1lon/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eps1lon">@eps1lon</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="981356869" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/22188" data-hovercard-type="issue" data-hovercard-url="/facebook/react/issues/22188/hovercard?comment_id=907351596&comment_type=issue_comment" href="https://github.com/facebook/react/issues/22188#issuecomment-907351596">#22188 (comment)</a></em></p> | <p dir="auto">This is sort of a feature request, mostly because I haven't been able to make the current react tooling do what I need it to do.</p>
<p dir="auto">I have a massively huge article up on <a href="https://pomax.github.io/bezierinfo" rel="nofollow">https://pomax.github.io/bezierinfo</a> that consists of a single page of React-managed content, of which the bulk is "passive" HTML content. Paragraphs, headings, that kind of stuff. However, there are also active components with JS interaction bindings, and so I was trying to figure out a way to turn this article into a "react-managed by the client" into a "thin ui managed by the client, react-built offline" solution.</p>
<p dir="auto">I had a look at ReactDOMServer.renderToStaticMarkup, but while this generates all the HTML nicely, it also loses any and all JS bindings that are necessary to keep the UI working. As this is an ~800kb article not counting static assets (there's some 1.6MB of images on top of that), the notion of first loading the plain markup content and then loading the react bundle on top of that, to hook into the preloaded markup would be a terrible experience for people in the slightly-less-wealthy parts of the world.</p>
<p dir="auto">Is there some way to, or would there be a sense in developing a way to render React content to HTML "as much as possible" while preserving React's management of interactive UI components? Essentially, a solution in between <code class="notranslate">renderToString</code> and <code class="notranslate">renderToStaticMarkup</code>, to prevent as much data duplication between the pregenerated HTML and the react application itself? It seems that the heavy payload (in bytes, but certainly in client-side processing as well) incurred by using a fully react-managed bundle could be relieved significantly if "content that is guaranteed passive, regular HTML" could be serialized out as HTML with React hooking back into that code only for elements that require active management.</p>
<p dir="auto">(I have no idea how much work that would be, but I'm pretty sure it would help bring down the average page size down again, which on a global scale would save quite a lot of time and money, while allowing content to be loaded by people for whom parts of the internet are currently inaccessible due to load time and byte cost)</p> | 0 |
<p dir="auto">Text editor for typescript 1.7.6.0 in visual studio 2015 can not response to keyboard inputs (numbers and words, but tab/enter still work).<br>
It just happened. I even have not notice when it happened. I have reset vs settings and also restart the computer. It's still dead. Please help to check. Thanks in advance.</p> | <p dir="auto">Found by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/malekpour/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/malekpour">@malekpour</a> on Gitter on <a href="https://gitter.im/Microsoft/TypeScript?at=568f41bc87cb99b53b87e0e6" rel="nofollow">January 7, 2016 11:57 PM</a></p>
<ol dir="auto">
<li>Create an empty file <code class="notranslate">foo.ts</code></li>
<li><code class="notranslate">tsc --init --module es6 foo.ts</code></li>
<li>Open <code class="notranslate">foo.ts</code> in Visual Studio.</li>
<li>Try typing a key other than Enter, Tab, or Spacebar.</li>
</ol>
<p dir="auto">Expected: The corresponding character is entered into the buffer.<br>
Actual: The buffer remains unchanged.</p>
<p dir="auto">I'm not sure if this is related to the language service being blocked on module dependencies, but in this example, <strong>there are no dependencies</strong>.</p> | 1 |
<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/leoasis/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/leoasis">@leoasis</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.5.1</li>
<li><strong>Node version:</strong> 4.2.0</li>
<li><strong>npm version:</strong> 3.7.2</li>
</ul>
<h3 dir="auto">Options</h3>
<p dir="auto">babelrc:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"presets": [
"babel-preset-es2015",
"babel-preset-stage-0",
"babel-preset-react"
],
"plugins": [
"babel-plugin-transform-react-constant-elements"
]
}"><pre class="notranslate"><code class="notranslate">{
"presets": [
"babel-preset-es2015",
"babel-preset-stage-0",
"babel-preset-react"
],
"plugins": [
"babel-plugin-transform-react-constant-elements"
]
}
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import React, { Component } from 'react';
export default class Test extends Component {
render() {
return (
<div>
<Static />
</div>
);
}
}
class Static extends Component {
render() {
return (
<div>static</div>
);
}
}"><pre class="notranslate"><code class="notranslate">import React, { Component } from 'react';
export default class Test extends Component {
render() {
return (
<div>
<Static />
</div>
);
}
}
class Static extends Component {
render() {
return (
<div>static</div>
);
}
}
</code></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">When running babel with the input code with the <code class="notranslate">babel-plugin-transform-react-constant-elements</code>, the hoisted element is incorrectly placed before the component is actually declared, see output and check where <code class="notranslate">Static</code> is declared and where the element is hoisted:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _ref = _react2.default.createElement(Static, null);
var Test = function (_Component) {
_inherits(Test, _Component);
function Test() {
_classCallCheck(this, Test);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Test).apply(this, arguments));
}
_createClass(Test, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
'div',
null,
_ref
);
}
}]);
return Test;
}(_react.Component);
exports.default = Test;
var Static = function (_Component2) {
_inherits(Static, _Component2);
function Static() {
_classCallCheck(this, Static);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Static).apply(this, arguments));
}
_createClass(Static, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
'div',
null,
'static'
);
}
}]);
return Static;
}(_react.Component);"><pre class="notranslate"><code class="notranslate">'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _ref = _react2.default.createElement(Static, null);
var Test = function (_Component) {
_inherits(Test, _Component);
function Test() {
_classCallCheck(this, Test);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Test).apply(this, arguments));
}
_createClass(Test, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
'div',
null,
_ref
);
}
}]);
return Test;
}(_react.Component);
exports.default = Test;
var Static = function (_Component2) {
_inherits(Static, _Component2);
function Static() {
_classCallCheck(this, Static);
return _possibleConstructorReturn(this, Object.getPrototypeOf(Static).apply(this, arguments));
}
_createClass(Static, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
'div',
null,
'static'
);
}
}]);
return Static;
}(_react.Component);
</code></pre></div> | <blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jesenko/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jesenko">@jesenko</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.3.13</li>
<li><strong>Node version:</strong> v4.1.2</li>
<li><strong>npm version:</strong> 3.3.8</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"presets": [
"react",
"es2015",
"stage-2"
],
"plugins": [
"transform-react-constant-elements"
]
}"><pre class="notranslate"><code class="notranslate">{
"presets": [
"react",
"es2015",
"stage-2"
],
"plugins": [
"transform-react-constant-elements"
]
}
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from 'react';
const Component = () => (<PrivateComponent />);
export default Component;
const PrivateComponent = () => (<div />);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-v">Component</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-ent">PrivateComponent</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-v">Component</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-v">PrivateComponent</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-ent">div</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">Ordering of constantized elements is such that <code class="notranslate">PrivateComponent</code> is not yet defined when referenced by <code class="notranslate">Component</code>, e.g.:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" // ...
// PrivateComponent not yet defined!!!
var _ref = _react2.default.createElement(PrivateComponent, null);
// ...
var PrivateComponent = function PrivateComponent() {
return _ref2;
};"><pre class="notranslate"> <span class="pl-c">// ... </span>
<span class="pl-c">// PrivateComponent not yet defined!!!</span>
<span class="pl-k">var</span> <span class="pl-s1">_ref</span> <span class="pl-c1">=</span> <span class="pl-s1">_react2</span><span class="pl-kos">.</span><span class="pl-c1">default</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-v">PrivateComponent</span><span class="pl-kos">,</span> <span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// ...</span>
<span class="pl-k">var</span> <span class="pl-v">PrivateComponent</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-v">PrivateComponent</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s1">_ref2</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">I guess that moving <em>all</em> constantized elements (i.e. <code class="notranslate">var _ref</code>, <code class="notranslate">var _ref2</code>...) AFTER all component definitions might already fix the issue</p> | 1 |
<p dir="auto">if you save a contourf in pdf format, you see the thin white line contours.<br>
This is well described in this question and I think the fix makes sense too.<br>
<a href="https://stackoverflow.com/a/32911283" rel="nofollow">https://stackoverflow.com/a/32911283</a></p>
<p dir="auto">is it possible to implement it with an extra argument in contourf?<br>
thanks!</p> | <p dir="auto">This is the underlying problem raised in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="6572843" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/1178" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/1178/hovercard" href="https://github.com/matplotlib/matplotlib/pull/1178">#1178</a>.<br>
It is illustrated by the test below; note that boundary anomalies are visible in all forms--agg on the screen, and pdf and svg displayed with a viewer--but in different places depending on the viewer and the size of the figure as rendered.<br>
Note that the colorbar is rendered using pcolormesh, which has its own renderer with agg but otherwise is handled by draw_path_collection.</p>
<pre class="notranslate">import numpy as np
import matplotlib.pyplot as plt
z = np.arange(150)
z.shape = (10,15)
fig, axs = plt.subplots(2,2)
ax = axs[0,0]
cs0 = ax.contourf(z, 20)
cbar0 = fig.colorbar(cs0, ax=ax)
ax = axs[0,1]
cs1 = ax.contourf(z, 20, alpha=0.3)
cbar1 = fig.colorbar(cs1, ax=ax)
ax = axs[1,0]
im2 = ax.imshow(z, interpolation='nearest')
cbar2 = fig.colorbar(im2, ax=ax)
ax = axs[1,1]
im3 = ax.imshow(z, interpolation='nearest', alpha=0.3)
cbar3 = fig.colorbar(im3, ax=ax)
plt.savefig("test1.pdf")
plt.savefig("test1.svg")
plt.show()
</pre> | 1 |
<h3 dir="auto">Problem description</h3>
<p dir="auto">I simply have this code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="handleExpandChange = (expanded) => {
this.setState({expanded: expanded});
};
handleToggle = () => {
this.setState({expanded: !this.state.expanded});
};
render() {
return (
<div>
<Card expanded={this.state.expanded} onExpandChange={this.handleExpandChange}>
<CardHeader
title="URL Avatar"
subtitle="Subtitle"
avatar="images/ok-128.jpg"
/>
<CardText expandable={true}>
<h4>zxczxc</h4>
</CardText>
<CardActions>
<FlatButton label="Expand" onTouchTap={this.handleToggle} />
<FlatButton label="Reduce" onTouchTap={this.handleToggle} />
</CardActions>
</Card>
</div>
);
}"><pre class="notranslate"><code class="notranslate">handleExpandChange = (expanded) => {
this.setState({expanded: expanded});
};
handleToggle = () => {
this.setState({expanded: !this.state.expanded});
};
render() {
return (
<div>
<Card expanded={this.state.expanded} onExpandChange={this.handleExpandChange}>
<CardHeader
title="URL Avatar"
subtitle="Subtitle"
avatar="images/ok-128.jpg"
/>
<CardText expandable={true}>
<h4>zxczxc</h4>
</CardText>
<CardActions>
<FlatButton label="Expand" onTouchTap={this.handleToggle} />
<FlatButton label="Reduce" onTouchTap={this.handleToggle} />
</CardActions>
</Card>
</div>
);
}
</code></pre></div>
<p dir="auto">I can't get the controlled card working like example. Is this anything issue with React 15,6.1?</p>
<p dir="auto">I read <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="235851909" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/7129" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/7129/hovercard" href="https://github.com/mui/material-ui/issues/7129">#7129</a> there is an issue with the touch event. Is this any impact with the card components?</p>
<p dir="auto">I've tried change FlatButton to use regular button and use onClick still not working.</p>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>Material-UI: 0.18.1</li>
<li>React: 15,6,1</li>
<li>Browser: Chrome</li>
</ul> | <p dir="auto">The onTouchTap from Buttons isn't working with React 15.6.0 <a href="https://facebook.github.io/react/warnings/unknown-prop.html" rel="nofollow">https://facebook.github.io/react/warnings/unknown-prop.html</a><br>
I think it's finally time to move to the standard onClick and remove tap event plugin</p> | 1 |
<p dir="auto">Given the fact device motion and rotation are two of the main user inputs in games, we should consider adding related APIs.</p>
<p dir="auto"><a href="http://developer.android.com/guide/topics/sensors/sensors_overview.html" rel="nofollow">http://developer.android.com/guide/topics/sensors/sensors_overview.html</a><br>
<a href="https://developer.apple.com/library/prerelease/ios/documentation/CoreMotion/Reference/CoreMotion_Reference/index.html" rel="nofollow">https://developer.apple.com/library/prerelease/ios/documentation/CoreMotion/Reference/CoreMotion_Reference/index.html</a></p> | <p dir="auto">Mobile devices have a range of common sensors:</p>
<ul dir="auto">
<li>accelerometer</li>
<li>gyroscope</li>
<li>magnetometer</li>
<li>barometer</li>
<li>GPS / wifi location</li>
</ul>
<p dir="auto">We need a package golang.org/x/mobile/sensor to give us access to this data.</p>
<p dir="auto">The challenging part here is, as always, designing an API that will work on both Android and iOS. This will require mapping the differences between sensor APIs on both platforms. There may be more than one Go package under the heading sensor.</p>
<p dir="auto">As an added challenge, some of these sensors (in particular location) require app permissions to use. The permission models are different on android/iOS. I suspect we can design an API that does both: if a binary imports a particular sensor package, it will ask for the permission at installation time (that is, it will be baked into a generated AndroidManifest.xml file). When the package is used at run time, we ask iOS for permission.</p> | 1 |
<p dir="auto">For most floating point types, <code class="notranslate">nextfloat(x, n)</code> and <code class="notranslate">prevfloat(x, n)</code> are defined to be the nth next or nth previous floating point value. BigFloats support neither.</p> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> p1 = Dates.Second(2) + (Dates.Millisecond(7) + Dates.Millisecond(1))
2 seconds, 8 milliseconds
julia> p2 = (Dates.Second(2) + Dates.Millisecond(7)) + Dates.Millisecond(1)
2 seconds, 7 milliseconds, 1 millisecond
julia> p2 == p1
false"><pre class="notranslate"><code class="notranslate">julia> p1 = Dates.Second(2) + (Dates.Millisecond(7) + Dates.Millisecond(1))
2 seconds, 8 milliseconds
julia> p2 = (Dates.Second(2) + Dates.Millisecond(7)) + Dates.Millisecond(1)
2 seconds, 7 milliseconds, 1 millisecond
julia> p2 == p1
false
</code></pre></div>
<p dir="auto">Seems like the problem could be fixed by making the <code class="notranslate">CompoundPeriod</code> constructor canonicalize its contents by combining periods of the same type.</p> | 0 |
<p dir="auto">I am using Electron 0.35.0 32 bit on Windows 10 and I am getting the following error when after and SSL request is made using the https node module.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/14017241/11718956/ca2b45e0-9f58-11e5-9f6e-465d79338f29.png"><img src="https://cloud.githubusercontent.com/assets/14017241/11718956/ca2b45e0-9f58-11e5-9f6e-465d79338f29.png" alt="setimmediate2" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/14017241/11718974/dfdda6bc-9f58-11e5-8d91-aee177dae031.png"><img src="https://cloud.githubusercontent.com/assets/14017241/11718974/dfdda6bc-9f58-11e5-8d91-aee177dae031.png" alt="setimmediate1" style="max-width: 100%;"></a></p>
<p dir="auto">Looks like it is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="107655166" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/2866" data-hovercard-type="pull_request" data-hovercard-url="/electron/electron/pull/2866/hovercard" href="https://github.com/electron/electron/pull/2866">#2866</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="108545655" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/2916" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/2916/hovercard" href="https://github.com/electron/electron/issues/2916">#2916</a> and solution would be similar: NativeModule.require('timers').setImmediate(destroySSL, this);</p> | <p dir="auto">Summary: When <code class="notranslate">node-integration</code> is set to false, <code class="notranslate">setImmediate</code> is <code class="notranslate">undefined</code> in the preload script.</p>
<p dir="auto">I am using a using:</p>
<ul dir="auto">
<li>a <code class="notranslate">preload</code> script</li>
<li><code class="notranslate">node-integration: false</code></li>
<li>At some point in the <code class="notranslate">preload</code> script I am making HTPP requests (using the <code class="notranslate">request</code> module).</li>
</ul>
<p dir="auto">Each time I perform such a request, I got an error because <code class="notranslate">setImmediate</code> is <code class="notranslate">undefined</code>. <code class="notranslate">setImmediate</code> is used in the file <code class="notranslate">_tls_wrap.js</code> <a href="https://github.com/nodejs/node/blob/master/lib/_tls_wrap.js#L340">see line 340</a>.</p>
<p dir="auto">In the <a href="https://github.com/atom/electron/blob/a6b7dd22e8f1fed48c16af307ff222114d7c8ba8/spec/webview-spec.coffee#L87">tests</a>, it is explicitly tested that <code class="notranslate">[typeof process, typeof setImmediate, typeof global].join(' ')</code> is evaluated to <code class="notranslate">'object undefined object'</code>.</p>
<p dir="auto">Why is <code class="notranslate">setImmediate</code> undefined in the preload script?<br>
What solution/workaround exists for this use case ?</p>
<p dir="auto">Thanks in advance.</p> | 1 |
<p dir="auto">My dataset is stored in binary format that is easily compressible (from 100 MB down to ~0.5 MB), but I currently cannot make use of this in TF, unless I write a TFRecords file, which is way more cumbersome and leads to a lot of duplication -- I need to work with those files in other programs as well, so the binary format is the easiest solution for me. It would be nice if tf.FixedLengthRecordReader would support on-the-fly decompression.</p> | <p dir="auto">mlds-ws2@mldsws2-ThinkStation-P500:~/tensorflow$ bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer<br>
.......<br>
INFO: Loading package:</p>
<hr>
<p dir="auto">And stop. After 1~2 hours, doesn't work anything.<br>
I have 3 computer.<br>
1 is server. 2 CPU and TITAN X 3EA. -> This machine does work well.<br>
But 2, 3 are desktop. 1 CPU and TITAN X or GTX 980 1EA -> Stuck while build tensorflow.<br>
I did format and reinstall ubuntu and necessary program, 3 times. Results are same.<br>
Please help me.</p> | 0 |
<p dir="auto">Atom is open but then subsequent windows and instances cannot be opened from the terminal and receive this error.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Cannot locate Atom.app, it is usually located in /Applications. Set the ATOM_PATH environment variable to the directory containing Atom.app."><pre class="notranslate"><code class="notranslate">Cannot locate Atom.app, it is usually located in /Applications. Set the ATOM_PATH environment variable to the directory containing Atom.app.
</code></pre></div>
<p dir="auto">Found instance of it in the Atom Script<br>
<a href="https://github.com/atom/atom/blob/master/atom.sh#L58">https://github.com/atom/atom/blob/master/atom.sh#L58</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" # Exit if Atom can't be found
if [ -z "$ATOM_PATH" ]; then
echo "Cannot locate Atom.app, it is usually located in /Applications. Set the ATOM_PATH environment variable to the directory containing Atom.app."
exit 1
fi"><pre class="notranslate"><code class="notranslate"> # Exit if Atom can't be found
if [ -z "$ATOM_PATH" ]; then
echo "Cannot locate Atom.app, it is usually located in /Applications. Set the ATOM_PATH environment variable to the directory containing Atom.app."
exit 1
fi
</code></pre></div>
<p dir="auto">Edit: On, OSX 10.9, ZSH, Atom .96</p> | <p dir="auto">Atom won't launch from the terminal in OSX 10.9.3. Here is the output:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/586656/2911417/597a5b00-d65b-11e3-84c7-16cd11aea96d.png"><img src="https://cloud.githubusercontent.com/assets/586656/2911417/597a5b00-d65b-11e3-84c7-16cd11aea96d.png" alt="image" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">Note the misaligned <code class="notranslate">^~~~~~~</code> below due to the <code class="notranslate">ๆฅๆฌ่ช</code> characters(their length is not computed properly?):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc -v main.rs
main.rs:3:38: 3:43 error: unresolved name `hello`
main.rs:3 println!("Hello in English: {}", hello());
^~~~~
note: in expansion of format_args!
<std macros>:2:42: 2:75 note: expansion site
<std macros>:1:1: 2:77 note: in expansion of println!
main.rs:3:5: 3:47 note: expansion site
main.rs:4:46: 4:53 error: unresolved name `goodbye`
main.rs:4 println!("Goodbye in Japanese(ๆฅๆฌ่ช): {}", goodbye());
^~~~~~~
note: in expansion of format_args!
<std macros>:2:42: 2:75 note: expansion site
<std macros>:1:1: 2:77 note: in expansion of println!
main.rs:4:5: 4:57 note: expansion site
error: aborting due to 2 previous errors"><pre class="notranslate"><code class="notranslate">$ rustc -v main.rs
main.rs:3:38: 3:43 error: unresolved name `hello`
main.rs:3 println!("Hello in English: {}", hello());
^~~~~
note: in expansion of format_args!
<std macros>:2:42: 2:75 note: expansion site
<std macros>:1:1: 2:77 note: in expansion of println!
main.rs:3:5: 3:47 note: expansion site
main.rs:4:46: 4:53 error: unresolved name `goodbye`
main.rs:4 println!("Goodbye in Japanese(ๆฅๆฌ่ช): {}", goodbye());
^~~~~~~
note: in expansion of format_args!
<std macros>:2:42: 2:75 note: expansion site
<std macros>:1:1: 2:77 note: in expansion of println!
main.rs:4:5: 4:57 note: expansion site
error: aborting due to 2 previous errors
</code></pre></div>
<p dir="auto">main.rs is this(compiled with <code class="notranslate">rustc -v main.rs</code>):</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
fn main() {
println!("Hello in English: {}", hello());
println!("Goodbye in Japanese(ๆฅๆฌ่ช): {}", goodbye());
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Hello in English: {}"</span>, hello<span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Goodbye in Japanese(ๆฅๆฌ่ช): {}"</span>, goodbye<span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc --version --verbose
rustc 1.0.0-dev (3bf41dafc 2015-01-20 06:45:02 +0000)
binary: rustc
commit-hash: 3bf41dafcfb6c979efb4e2438e047e1a54045eec
commit-date: 2015-01-20 06:45:02 +0000
host: x86_64-unknown-linux-gnu
release: 1.0.0-dev"><pre class="notranslate"><code class="notranslate">$ rustc --version --verbose
rustc 1.0.0-dev (3bf41dafc 2015-01-20 06:45:02 +0000)
binary: rustc
commit-hash: 3bf41dafcfb6c979efb4e2438e047e1a54045eec
commit-date: 2015-01-20 06:45:02 +0000
host: x86_64-unknown-linux-gnu
release: 1.0.0-dev
</code></pre></div>
<p dir="auto">tested in <code class="notranslate">urxvt</code> and <code class="notranslate">xfce4-terminal</code> (TERM is <code class="notranslate">rxvt-unicode-256color</code> respectively <code class="notranslate">xterm</code>)<br>
Linux 3.19.0-rc5-gec6f34e</p>
<p dir="auto">Thank you.</p> | <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::io;
fn main() {
let s = ~"ZอจAออฆอออคอฬLฬออGฬอจอฅฬฟอฬฝอOอฅออญ!ฬ"; while true { break; }
io::println(s);
}"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span>io<span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> s = ~"<span class="pl-v">ZอจAออฆอออคอฬLฬออGฬอจอฅฬฟอฬฝอOอฅออญ</span>!ฬ"<span class="pl-kos">;</span> <span class="pl-k">while</span> <span class="pl-c1">true</span> <span class="pl-kos">{</span> <span class="pl-k">break</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
io<span class="pl-kos">::</span><span class="pl-en">println</span><span class="pl-kos">(</span>s<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="main.rs:4:46: 4:67 warning: denote infinite loops with loop { ... }, #[warn(while_true)] on by default
main.rs:4 let s = ~"ZอจAออฆอออคฬLฬออฤอจอฅฬฟอฬฝอOอฅออญ!ฬ"; while true { break; }
^~~~~~~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">main.rs:4:46: 4:67 warning: denote infinite loops with loop { ... }, #[warn(while_true)] on by default
main.rs:4 let s = ~"ZอจAออฆอออคฬLฬออฤอจอฅฬฟอฬฝอOอฅออญ!ฬ"; while true { break; }
^~~~~~~~~~~~~~~~~~~~~
</code></pre></div>
<p dir="auto">The proper fix for this requires grapheme handling (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="15336577" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/7043" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/7043/hovercard" href="https://github.com/rust-lang/rust/issues/7043">#7043</a>), e.g. some graphemes are double width.</p> | 1 |
<ul dir="auto">
<li>Electron version: 1.2.2</li>
<li>Operating system: OSX 10.11.5</li>
</ul>
<p dir="auto">It's quite normal in Chrome or without webview. So, I guess maybe something wrong with it. Below is the example gif. <a href="https://github.com/KynoYang/ElectronSpellCheckerDemo">Here</a> is the example code.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2586026/16183331/2fe5b54c-36e3-11e6-8b91-fd9ac42a5ff5.gif"><img src="https://cloud.githubusercontent.com/assets/2586026/16183331/2fe5b54c-36e3-11e6-8b91-fd9ac42a5ff5.gif" alt="zoom_0" data-animated-image="" style="max-width: 100%;"></a></p> | <p dir="auto">I'm encountering a weird situation. When I was inputting characters in Chinese, the IME window would appear at top left of the app first, and then in a normal position for the consecutive letters. Please see the snapshot below.</p>
<p dir="auto">Maybe <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zcbenz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zcbenz">@zcbenz</a> you can view this issue.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7262715/13143194/3cb382de-d67d-11e5-9fbf-ca42a62db68a.png"><img src="https://cloud.githubusercontent.com/assets/7262715/13143194/3cb382de-d67d-11e5-9fbf-ca42a62db68a.png" alt="qq20160218-0 2x" style="max-width: 100%;"></a></p>
<ul dir="auto">
<li>Electron Version: v0.36.7</li>
<li>OS: Latest Mac OS X, 10.0.2 as far as I can recall</li>
</ul>
<p dir="auto">Issue reproduced every time on several machines.</p>
<p dir="auto">There is a webview tag in my app. Could this be the cause?</p> | 1 |
<p dir="auto">When there are multiple selections, pressing <code class="notranslate">"</code> doesn't wrap the selection. It replaces all selections with a single <code class="notranslate">"</code>.</p>
<p dir="auto">/via support/e43db338a09911e3978c0910ce06379d?page=1</p> | <p dir="auto">If i have a multi column selection going on. And hit a bracket, it replaces with what you typed instead of surrounding with the bracket.</p> | 1 |
<h3 dir="auto">NOTE: This feature is addition to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="450312125" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/1066" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/1066/hovercard" href="https://github.com/microsoft/terminal/issues/1066">#1066</a></h3>
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">Scrolling with (precision) touchpad is very convenient but only if application responds to scroll event instantly. This can be observed in Microsoft Edge, vscode, JetBrains IDEs (Smooth Scrolling option).</p>
<p dir="auto">I think that Windows Terminal should have option to enable scrolling not line by line but pixel by pixel.</p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">Some hardware terminals allowed smoothly scrolling in new lines. It should be possible to implement this kind of feature in a software terminal emulator as well.</p>
<p dir="auto">YouTube demonstration (VT525 smooth scrolling):<br>
<a href="https://www.youtube.com/watch?v=Iju_pOQM0a0" rel="nofollow">https://www.youtube.com/watch?v=Iju_pOQM0a0</a></p> | 1 |
<p dir="auto">maybe related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="413474603" data-permission-text="Title is private" data-url="https://github.com/google/jax/issues/432" data-hovercard-type="issue" data-hovercard-url="/google/jax/issues/432/hovercard" href="https://github.com/google/jax/issues/432">#432</a>.</p>
<h1 dir="auto">example code</h1>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax.numpy as np
N = 80
np.linalg.inv(np.eye(N))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-v">N</span> <span class="pl-c1">=</span> <span class="pl-c1">80</span>
<span class="pl-s1">np</span>.<span class="pl-s1">linalg</span>.<span class="pl-en">inv</span>(<span class="pl-s1">np</span>.<span class="pl-en">eye</span>(<span class="pl-v">N</span>))</pre></div>
<p dir="auto">output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/path/to/project/.venv/lib/python3.7/site-packages/jax/lib/xla_bridge.py:120: UserWarning: No GPU/TPU found, falling back to CPU.
warnings.warn('No GPU/TPU found, falling back to CPU.')
zsh: bus error python -m misc.jax"><pre class="notranslate"><code class="notranslate">/path/to/project/.venv/lib/python3.7/site-packages/jax/lib/xla_bridge.py:120: UserWarning: No GPU/TPU found, falling back to CPU.
warnings.warn('No GPU/TPU found, falling back to CPU.')
zsh: bus error python -m misc.jax
</code></pre></div>
<p dir="auto">If N is smaller than 80, it works correctly on my machine.</p>
<h1 dir="auto">my environment</h1>
<p dir="auto">macOS 10.14.6<br>
Python 3.7.0 (pyenv)</p>
<p dir="auto">jax 0.1.55<br>
jaxlib 0.1.37<br>
numpy 1.17.4<br>
scipy 1.3.3</p> | <p dir="auto">I'm not exactly sure <em>why</em> this happens, being unfamiliar with the internal architecture, but on MacOS with Python 3.6.8, the following code segfaults if scipy 1.2.1 is installed (the version that comes by default when you <code class="notranslate">pip install jax jaxlib</code>):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax.random as random
import jax.scipy.linalg as linalg
key = random.PRNGKey(42)
# For some reason, matrices smaller than (50, 50) or so do not trigger segfaults
X = random.normal(key, (500, 500))
A = X @ X.T # Drawn from standard Wishart distribution
linalg.cholesky(A)
print("Success!")"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span> <span class="pl-k">as</span> <span class="pl-s1">random</span>
<span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">scipy</span>.<span class="pl-s1">linalg</span> <span class="pl-k">as</span> <span class="pl-s1">linalg</span>
<span class="pl-s1">key</span> <span class="pl-c1">=</span> <span class="pl-s1">random</span>.<span class="pl-v">PRNGKey</span>(<span class="pl-c1">42</span>)
<span class="pl-c"># For some reason, matrices smaller than (50, 50) or so do not trigger segfaults</span>
<span class="pl-v">X</span> <span class="pl-c1">=</span> <span class="pl-s1">random</span>.<span class="pl-en">normal</span>(<span class="pl-s1">key</span>, (<span class="pl-c1">500</span>, <span class="pl-c1">500</span>))
<span class="pl-v">A</span> <span class="pl-c1">=</span> <span class="pl-v">X</span> @ <span class="pl-v">X</span>.<span class="pl-v">T</span> <span class="pl-c"># Drawn from standard Wishart distribution</span>
<span class="pl-s1">linalg</span>.<span class="pl-en">cholesky</span>(<span class="pl-v">A</span>)
<span class="pl-en">print</span>(<span class="pl-s">"Success!"</span>)</pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -W ignore test.py
zsh: bus error python -W ignore test.py"><pre class="notranslate"><code class="notranslate">$ python -W ignore test.py
zsh: bus error python -W ignore test.py
</code></pre></div>
<p dir="auto">If I roll back to Scipy 1.1.0, everything works:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -W ignore test.py
Success!"><pre class="notranslate"><code class="notranslate">$ python -W ignore test.py
Success!
</code></pre></div>
<p dir="auto">This is a great project by the way--thanks for working on it!</p>
<p dir="auto">Edit: after further digging, I found the following in the the Scipy 1.2 release notes:</p>
<blockquote>
<p dir="auto">scipy.linalg.lapack now exposes the LAPACK routines using the Rectangular Full Packed storage (RFP) for upper triangular, lower triangular, symmetric, or Hermitian matrices; the upper trapezoidal fat matrix RZ decomposition routines are now available as well.</p>
</blockquote>
<p dir="auto">Perhaps this has something to do with it?</p>
<p dir="auto">Even more edits: yet more digging has revealed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="406164520" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/9751" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/9751/hovercard" href="https://github.com/scipy/scipy/issues/9751">scipy/scipy#9751</a>, which hints that this might be caused by a specific (old) version of XCode. I will report back once XCode is upgraded.</p> | 1 |
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li>
<p dir="auto"><strong>Electron Version:</strong> 7.1.8</p>
</li>
<li>
<p dir="auto"><strong>Operating System:</strong> macOS 10.15.2/Windows 10</p>
</li>
<li>
<p dir="auto"><strong>Last Known Working Electron version:</strong> 4.1.4</p>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">with Site Isolation enabled in electron 7.x, When I execute</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="webFrame.setSpellCheckProvider("en-US", {
spellCheck(words, callback) {
setTimeout(() => {
const misspelled = words.filter((text) => checker.isMisspelled(text));
callback(misspelled);
}, 0);
}
});"><pre class="notranslate"><span class="pl-s1">webFrame</span><span class="pl-kos">.</span><span class="pl-en">setSpellCheckProvider</span><span class="pl-kos">(</span><span class="pl-s">"en-US"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-en">spellCheck</span><span class="pl-kos">(</span><span class="pl-s1">words</span><span class="pl-kos">,</span> <span class="pl-s1">callback</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">misspelled</span> <span class="pl-c1">=</span> <span class="pl-s1">words</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">text</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-s1">checker</span><span class="pl-kos">.</span><span class="pl-en">isMisspelled</span><span class="pl-kos">(</span><span class="pl-s1">text</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">callback</span><span class="pl-kos">(</span><span class="pl-s1">misspelled</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Spellchecker is not working inside the iframes but works in the top webview.</p>
<p dir="auto">Provided, it works if I disable site isolation trials using<br>
<code class="notranslate">app.commandLine.appendSwitch('disable-site-isolation-trials', 'true');</code></p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Irrespective of site isolation feature setting, We should be able to set spellchecker for the entire webview including the iframes.<br>
Thanks.</p>
<h3 dir="auto">To Reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone https://github.com/Syed-Umair/electron-quick-start.git
git checkout spellcheck-issue
npm i
npm run start"><pre class="notranslate"><code class="notranslate">git clone https://github.com/Syed-Umair/electron-quick-start.git
git checkout spellcheck-issue
npm i
npm run start
</code></pre></div>
<p dir="auto">You can checkout the recording of the issue in the following link:</p>
<p dir="auto"><a href="https://mega.nz/#!1M0lUY4Z!j1snymVCCsNZMafzF5RKLR84PcpoLzdeqc4NVOwOwLk" rel="nofollow">https://mega.nz/#!1M0lUY4Z!j1snymVCCsNZMafzF5RKLR84PcpoLzdeqc4NVOwOwLk</a></p> | <h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong><br>
6.1.4 (but happen also on 5.x.x and 6.x.x has a workaround for 4.x.x)</li>
<li><strong>Operating System:</strong><br>
Windows 10</li>
<li><strong>Last Known Working Electron version:</strong><br>
4.2.1</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">webFrame.setSpellCheckProvider API should work for dynamically created iframes.</p>
<p dir="auto">For example:<br>
When creating an iframe with a source of <a href="http://www.mydummywebsite.com/index.html" rel="nofollow">http://www.mydummywebsite.com/index.html</a> (this doesn't really exist)<br>
The text fields in index.html should invoke the spellCheck function (below) when there is a spelling mistake.</p>
<p dir="auto">This API should work (example from docomentation)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="webFrame.setSpellCheckProvider('en-US', {
spellCheck (words, callback) {
setTimeout(() => {
const spellchecker = require('spellchecker')
const misspelled = words.filter(x => spellchecker.isMisspelled(x))
callback(misspelled)
}, 0)
}
})"><pre class="notranslate"><code class="notranslate">webFrame.setSpellCheckProvider('en-US', {
spellCheck (words, callback) {
setTimeout(() => {
const spellchecker = require('spellchecker')
const misspelled = words.filter(x => spellchecker.isMisspelled(x))
callback(misspelled)
}, 0)
}
})
</code></pre></div>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">In Electron version, 4.x.x the webFrame.setSpellCheckProvider API also didnt work for dynamically created iframes. The workaround was to call webFrame.setSpellCheckProvider API again after each iframes creation.</p>
<p dir="auto">On electron versions >= 5.x.x (including 6.x.x) this workaround dosnt work anymore.</p>
<p dir="auto">The spellcheck API only works for local HTML files build in the local nodejs project.</p>
<h3 dir="auto">To Reproduce</h3>
<ol dir="auto">
<li>Create a project that uses the electron NPM module.</li>
<li>Create an iframe that its source is a local HTML file with text fields. the spell check API will be invoked for them</li>
<li>create another iframe with a source fo a website (or localhost website) that contains text fields. The spellCheck API will not work for them. If you call webFrame.setSpellCheckProvide after the iframe is created it still don't work.</li>
</ol>
<p dir="auto">I did see this issue which was not resolved at the end:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="337114946" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/13514" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/13514/hovercard" href="https://github.com/electron/electron/issues/13514">#13514</a></p>
<p dir="auto">Does this happen to anyone else? Will the be solved in future releases of Electron?</p>
<p dir="auto">Thanks!</p> | 1 |
<p dir="auto">Circular dependencies are a huge issue when working with third party tooling (graphing dependencies, integrating into other build systems etc).</p>
<p dir="auto">I think the correct solution here would be to put @types/react in the bundleDependencies (<a href="https://docs.npmjs.com/files/package.json#bundleddependencies" rel="nofollow">https://docs.npmjs.com/files/package.json#bundleddependencies</a>) attribute in package.json to make the circular dependency invisible to consumers of this package.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/xxxx</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.
<ul dir="auto">
<li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DovydasNavickas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DovydasNavickas">@DovydasNavickas</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ferdaber/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ferdaber">@ferdaber</a></li>
</ul>
</li>
</ul> | <p dir="auto">Possible duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="408150561" data-permission-text="Title is private" data-url="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/32899" data-hovercard-type="issue" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/issues/32899/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/32899">#32899</a></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/xxxx</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.
<ul dir="auto">
<li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tkqubo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tkqubo">@tkqubo</a> @kenzierocks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/clayne11/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/clayne11">@clayne11</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tansongyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tansongyang">@tansongyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/NicholasBoll/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/NicholasBoll">@NicholasBoll</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mDibyo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mDibyo">@mDibyo</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pdeva/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pdeva">@pdeva</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Kallikrein/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Kallikrein">@Kallikrein</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jrakotoharisoa/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jrakotoharisoa">@jrakotoharisoa</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/apapirovski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/apapirovski">@apapirovski</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/surgeboris/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/surgeboris">@surgeboris</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/soerenbf/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/soerenbf">@soerenbf</a></li>
</ul>
</li>
</ul>
<p dir="auto"><strong>bug</strong><br>
<code class="notranslate">connect</code> has inaccurate type checking. Consider the following example:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface IProps {
a: Ta;
b: Tb;
c: Tc;
}
const mapStateToProps: (state: IState) => Pick<IProps, "a"> = ...
const mapDispatchToProps: (dispatch: Dispatch) => Pick<IProps, "b"> = ...
const MyComponent: (props: IProps) => JSX.Element = ...
export default connect(mapStateToProps, mapDispatchToProps)(MyComponent);"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">IProps</span> <span class="pl-kos">{</span>
<span class="pl-c1">a</span>: <span class="pl-smi">Ta</span><span class="pl-kos">;</span>
<span class="pl-c1">b</span>: <span class="pl-smi">Tb</span><span class="pl-kos">;</span>
<span class="pl-c1">c</span>: <span class="pl-smi">Tc</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-s1">mapStateToProps</span>: <span class="pl-kos">(</span><span class="pl-s1">state</span>: <span class="pl-smi">IState</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi">Pick</span><span class="pl-kos"><</span><span class="pl-smi">IProps</span><span class="pl-kos">,</span> <span class="pl-s">"a"</span><span class="pl-kos">></span> <span class="pl-c1">=</span> ...
<span class="pl-k">const</span> <span class="pl-s1">mapDispatchToProps</span>: <span class="pl-kos">(</span><span class="pl-s1">dispatch</span>: <span class="pl-smi">Dispatch</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi">Pick</span><span class="pl-kos"><</span><span class="pl-smi">IProps</span><span class="pl-kos">,</span> <span class="pl-s">"b"</span><span class="pl-kos">></span> <span class="pl-c1">=</span> ...
<span class="pl-k">const</span> <span class="pl-smi">MyComponent</span>: <span class="pl-kos">(</span><span class="pl-s1">props</span>: <span class="pl-smi">IProps</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi">JSX</span><span class="pl-kos">.</span><span class="pl-smi">Element</span> <span class="pl-c1">=</span> ...
<span class="pl-k">export</span> <span class="pl-s1">default</span> <span class="pl-en">connect</span><span class="pl-kos">(</span><span class="pl-s1">mapStateToProps</span><span class="pl-kos">,</span> <span class="pl-s1">mapDispatchToProps</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-smi">MyComponent</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>What is the current behavior?</strong><br>
There is no TypeScript compilation error, so the type system becomes inaccurate.</p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
The last line should throw a typescript compilation error, because <code class="notranslate">Pick<IProps, "a"> & Pick<IProps, "b"></code> is incompatible with <code class="notranslate">IProps</code>, as it is missing property <code class="notranslate">c</code>.</p>
<p dir="auto"><strong>Which versions of React, ReactDOM/React Native, Redux, and React Redux are you using? Which browser and OS are affected by this issue? Did this work in previous versions of React Redux?</strong><br>
<code class="notranslate">@types/[email protected]</code><br>
<code class="notranslate">[email protected]</code></p> | 0 |
<p dir="auto">This is really annoying.</p>
<p dir="auto">To reproduce: Set the screen to full screen, do an update. Click on the full screen button to remove the full screen and this happens.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2564654/3953606/937ce0ba-26ed-11e4-9f7d-579010ad765e.png"><img src="https://cloud.githubusercontent.com/assets/2564654/3953606/937ce0ba-26ed-11e4-9f7d-579010ad765e.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">You cant move the screen.. soo annoying.</p>
<p dir="auto">Version: Current (0.123) and every other version before it</p> | <p dir="auto">If you call <code class="notranslate">BrowserPosition::setPosition</code> with <code class="notranslate">0, 0</code> as the arguments, it moves window's title bar offscreen.</p>
<p dir="auto">I think this behavior has changed from previous versions.</p>
<h3 dir="auto">Expected</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/671378/3940288/4b377316-24da-11e4-824e-111e4eb9e4be.png"><img src="https://cloud.githubusercontent.com/assets/671378/3940288/4b377316-24da-11e4-824e-111e4eb9e4be.png" alt="screen shot 2014-08-15 at 5 14 14 pm" style="max-width: 100%;"></a></p>
<h3 dir="auto">Actual</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/671378/3940283/2a53274e-24da-11e4-8552-78c9bbba01d4.png"><img src="https://cloud.githubusercontent.com/assets/671378/3940283/2a53274e-24da-11e4-8552-78c9bbba01d4.png" alt="screen shot 2014-08-15 at 5 13 10 pm" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">Would it be possible to have a dependency against requests (Apache 2 licensed) in Scrapy?</p>
<p dir="auto">I noticed that it has superior proxy env handling, where urllib fails to parse IPs or CIDR in a <code class="notranslate">$no_proxy</code> variable. This has led to failing testcases for me and I'd like to fix it.</p>
<p dir="auto">Also, requests provides a nice <a href="https://github.com/kennethreitz/requests/blob/383b20b02324e5c5d1970dd3ab0ba29bd991d2b2/requests/compat.py#L35-L62"><code class="notranslate">compat</code> module</a>, wrapping urllib/2 for PY2 and PY3 differences.<br>
If not a dependency, could scrapy do this stuff similarly?<br>
Pulling in urllib/urllib2/urlparse from a local wrapper seems cleaner than throwing <code class="notranslate">six.moves.</code> and <code class="notranslate">try...except</code> statements everywhere we use them. And we have plenty of those imports.</p> | <p dir="auto">scrapy version: 1.1.2<br>
python version: 2.7.12<br>
platform: Mac OS X 10.11.6</p>
<p dir="auto"><strong>The issue:</strong></p>
<p dir="auto">For the url given in the following minimum working example, the HTML text in the response from scrapy is different from the one obtained with <code class="notranslate">requests.get</code>. The latter seems to be the correct one. It seems scrapy somehow duplicates part of the response html. This does not happen for all sites.</p>
<p dir="auto">See the attached file for the two different html files. Or you may run the following code to generate them.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import scrapy
from scrapy.crawler import CrawlerRunner
from twisted.internet import reactor
import requests
url = 'http://training.sac.net.cn/cms/flkcalone.htm?myId=4028d0ee57ec28180157f55059b87209'
headers = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate, sdch',
'Accept-Language': 'en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4,zh-TW;q=0.2',
'Cache-Control': 'max-age=0',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36',
}
class Test(scrapy.Spider):
name = 'test'
def start_requests(self):
request = scrapy.Request(url=url, callback=self.parse, headers=headers)
yield request
def parse(self, response):
with open('response_with_scrapy.html', 'w') as f:
f.write(response.text.encode('utf-8'))
if __name__ == '__main__':
with open('response_with_requests.html', 'w') as f:
f.write(requests.get(url, headers=headers).text.encode('utf-8'))
runner = CrawlerRunner()
runner.crawl(Test)
d = runner.join()
d.addBoth(lambda _: reactor.stop())
reactor.run()"><pre class="notranslate"><code class="notranslate">import scrapy
from scrapy.crawler import CrawlerRunner
from twisted.internet import reactor
import requests
url = 'http://training.sac.net.cn/cms/flkcalone.htm?myId=4028d0ee57ec28180157f55059b87209'
headers = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate, sdch',
'Accept-Language': 'en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4,zh-TW;q=0.2',
'Cache-Control': 'max-age=0',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36',
}
class Test(scrapy.Spider):
name = 'test'
def start_requests(self):
request = scrapy.Request(url=url, callback=self.parse, headers=headers)
yield request
def parse(self, response):
with open('response_with_scrapy.html', 'w') as f:
f.write(response.text.encode('utf-8'))
if __name__ == '__main__':
with open('response_with_requests.html', 'w') as f:
f.write(requests.get(url, headers=headers).text.encode('utf-8'))
runner = CrawlerRunner()
runner.crawl(Test)
d = runner.join()
d.addBoth(lambda _: reactor.stop())
reactor.run()
</code></pre></div>
<p dir="auto"><a href="https://github.com/scrapy/scrapy/files/639455/two_responses.zip">two_responses.zip</a></p> | 0 |
<p dir="auto">Is it too late to change the import statement around? (I know it probably is).<br>
If it was</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from 'x' import { y }"><pre class="notranslate"><span class="pl-s1">from</span> <span class="pl-s">'x'</span> <span class="pl-s1">import</span> <span class="pl-kos">{</span> <span class="pl-s1">y</span> <span class="pl-kos">}</span></pre></div>
<p dir="auto">Tooling could provide very handy intelli-sense about what could be imported.</p> | <p dir="auto">Consider the following import statement:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { int, float } from '../lang';"><pre class="notranslate"><code class="notranslate">import { int, float } from '../lang';
</code></pre></div>
<p dir="auto">With auto-suggest I need to start this by typing:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import {} from '../lang';"><pre class="notranslate"><code class="notranslate">import {} from '../lang';
</code></pre></div>
<p dir="auto">Then I can go back inside the {} and get auto-suggestions.</p>
<p dir="auto">It would be very nice if TypeScript supported an alternate syntax for the same expression that was more conducive to auto-complete features.<br>
For example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import from '../lang' { int, float };"><pre class="notranslate"><code class="notranslate">import from '../lang' { int, float };
</code></pre></div>
<p dir="auto">This doesn't introduce any confusion or ambiguity about the meaning of the expression, either to the transpiler or the human reader, yet it provides a time-saving experience to the author when taking advantage of auto-complete features. I can now simply type the expression naturally from left to right, and get auto-suggestions/completions for both the <strong>from '...'</strong> and <strong>{}</strong>.</p>
<p dir="auto">There are other cases where an alternate syntax would be beneficial. I will update this issue as I compile a list. Hopefully others will comment with suggestions as well.</p> | 1 |
<h3 dir="auto">Proposed new feature or change:</h3>
<p dir="auto">All single-argument <code class="notranslate">np.FUNC</code> functions can be implemented as <code class="notranslate">np.ndarray.FUNC</code>.</p>
<p dir="auto"><strong>Example usage:</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Currently invalid. :(
x.ceil()"><pre class="notranslate"><span class="pl-c"># Currently invalid. :(</span>
<span class="pl-s1">x</span>.<span class="pl-en">ceil</span>()</pre></div>
<p dir="auto"><strong>Rationale:</strong></p>
<ul dir="auto">
<li><a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" rel="nofollow"><code class="notranslate">np.ndarray</code></a> already implements some methods:</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="all
any
argmax
argmin
argpartition
argsort
astype
byteswap
choose
clip
compress
conj
conjugate
copy
cumprod
cumsum
diagonal
dump
dumps
fill
flatten
getfield
item
itemset
max
mean
min
newbyteorder
nonzero
partition
prod
ptp
put
ravel
repeat
reshape
resize
round
searchsorted
setfield
setflags
sort
squeeze
std
sum
swapaxes
take
tobytes
tofile
tolist
tostring
trace
transpose
var
view"><pre class="notranslate"><span class="pl-s1">all</span>
<span class="pl-s1">any</span>
<span class="pl-s1">argmax</span>
<span class="pl-s1">argmin</span>
<span class="pl-s1">argpartition</span>
<span class="pl-s1">argsort</span>
<span class="pl-s1">astype</span>
<span class="pl-s1">byteswap</span>
<span class="pl-s1">choose</span>
<span class="pl-s1">clip</span>
<span class="pl-s1">compress</span>
<span class="pl-s1">conj</span>
<span class="pl-s1">conjugate</span>
<span class="pl-s1">copy</span>
<span class="pl-s1">cumprod</span>
<span class="pl-s1">cumsum</span>
<span class="pl-s1">diagonal</span>
<span class="pl-s1">dump</span>
<span class="pl-s1">dumps</span>
<span class="pl-s1">fill</span>
<span class="pl-s1">flatten</span>
<span class="pl-s1">getfield</span>
<span class="pl-s1">item</span>
<span class="pl-s1">itemset</span>
<span class="pl-s1">max</span>
<span class="pl-s1">mean</span>
<span class="pl-s1">min</span>
<span class="pl-s1">newbyteorder</span>
<span class="pl-s1">nonzero</span>
<span class="pl-s1">partition</span>
<span class="pl-s1">prod</span>
<span class="pl-s1">ptp</span>
<span class="pl-s1">put</span>
<span class="pl-s1">ravel</span>
<span class="pl-s1">repeat</span>
<span class="pl-s1">reshape</span>
<span class="pl-s1">resize</span>
<span class="pl-s1">round</span>
<span class="pl-s1">searchsorted</span>
<span class="pl-s1">setfield</span>
<span class="pl-s1">setflags</span>
<span class="pl-s1">sort</span>
<span class="pl-s1">squeeze</span>
<span class="pl-s1">std</span>
<span class="pl-s1">sum</span>
<span class="pl-s1">swapaxes</span>
<span class="pl-s1">take</span>
<span class="pl-s1">tobytes</span>
<span class="pl-s1">tofile</span>
<span class="pl-s1">tolist</span>
<span class="pl-s1">tostring</span>
<span class="pl-s1">trace</span>
<span class="pl-s1">transpose</span>
<span class="pl-s1">var</span>
<span class="pl-s1">view</span></pre></div>
<ul dir="auto">
<li>
<p dir="auto">It is unclear to a user which ones have been implemented and which ones haven't unless they try one and see if their code works/fails. (Or google the docs for each one they want to use.) For instance, <code class="notranslate">np.ndarray.ceil</code> does not exist, but <code class="notranslate">np.ndarray.round</code> does.</p>
</li>
<li>
<p dir="auto">Fully implementing this API style improves interchangeability with libraries such as PyTorch. With this change, there is less need to implement different methods (e.g. <code class="notranslate">torch.sin</code> or <code class="notranslate">np.sin</code>) for functions that just want to think about numerical computations on tensors of any type (<code class="notranslate">np.ndarray</code> or <code class="notranslate">torch.Tensor</code>), e.g.:</p>
</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def sin2(x: np.ndarray | torch.Tensor):
return (x ** 2).sin()"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">sin2</span>(<span class="pl-s1">x</span>: <span class="pl-s1">np</span>.<span class="pl-s1">ndarray</span> <span class="pl-c1">|</span> <span class="pl-s1">torch</span>.<span class="pl-v">Tensor</span>):
<span class="pl-k">return</span> (<span class="pl-s1">x</span> <span class="pl-c1">**</span> <span class="pl-c1">2</span>).<span class="pl-en">sin</span>()</pre></div>
<p dir="auto">Instead of:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def sin2(x: np.ndarray | torch.Tensor):
if isinstance(x, np.ndarray):
return np.sin(x ** 2)
else:
return (x ** 2).sin()"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">sin2</span>(<span class="pl-s1">x</span>: <span class="pl-s1">np</span>.<span class="pl-s1">ndarray</span> <span class="pl-c1">|</span> <span class="pl-s1">torch</span>.<span class="pl-v">Tensor</span>):
<span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">x</span>, <span class="pl-s1">np</span>.<span class="pl-s1">ndarray</span>):
<span class="pl-k">return</span> <span class="pl-s1">np</span>.<span class="pl-en">sin</span>(<span class="pl-s1">x</span> <span class="pl-c1">**</span> <span class="pl-c1">2</span>)
<span class="pl-k">else</span>:
<span class="pl-k">return</span> (<span class="pl-s1">x</span> <span class="pl-c1">**</span> <span class="pl-c1">2</span>).<span class="pl-en">sin</span>()</pre></div>
<ul dir="auto">
<li>Fluent API styles are very natural for chained computations.</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="((x ** 2).mean(axis=-1).sqrt() > x.mean(axis=-1).sqrt()).nonzero()"><pre class="notranslate">((<span class="pl-s1">x</span> <span class="pl-c1">**</span> <span class="pl-c1">2</span>).<span class="pl-en">mean</span>(<span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>).<span class="pl-en">sqrt</span>() <span class="pl-c1">></span> <span class="pl-s1">x</span>.<span class="pl-en">mean</span>(<span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>).<span class="pl-en">sqrt</span>()).<span class="pl-en">nonzero</span>()</pre></div>
<p dir="auto">versus:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="np.nonzero(np.sqrt(np.mean(x ** 2, axis=-1)) > np.sqrt(np.mean(x, axis=1)))"><pre class="notranslate"><span class="pl-s1">np</span>.<span class="pl-en">nonzero</span>(<span class="pl-s1">np</span>.<span class="pl-en">sqrt</span>(<span class="pl-s1">np</span>.<span class="pl-en">mean</span>(<span class="pl-s1">x</span> <span class="pl-c1">**</span> <span class="pl-c1">2</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>)) <span class="pl-c1">></span> <span class="pl-s1">np</span>.<span class="pl-en">sqrt</span>(<span class="pl-s1">np</span>.<span class="pl-en">mean</span>(<span class="pl-s1">x</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)))</pre></div>
<ul dir="auto">
<li>More consistent API for numpy-based libraries (e.g. <code class="notranslate">pandas</code>) that frequently use chained methods in other parts of their API.</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df.groupby("column").agg(...)
df["column"].ceil() # looks much more natural with pandas than np.ceil(df["column"])"><pre class="notranslate"><span class="pl-s1">df</span>.<span class="pl-en">groupby</span>(<span class="pl-s">"column"</span>).<span class="pl-en">agg</span>(...)
<span class="pl-s1">df</span>[<span class="pl-s">"column"</span>].<span class="pl-en">ceil</span>() <span class="pl-c"># looks much more natural with pandas than np.ceil(df["column"])</span></pre></div>
<hr>
<p dir="auto">A (not necessarily exhaustive) list of possible single-argument FUNCs:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="negative
positive
absolute
fabs
rint
sign
conj
conjugate
exp
exp2
log
log2
log10
expm1
log1p
sqrt
square
cbrt
reciprocal
sin
cos
tan
arcsin
arccos
arctan
sinh
cosh
tanh
arcsinh
arccosh
arctanh
degrees
radians
deg2rad
rad2deg
invert
logical_not
isfinite
isinf
isnan
isnat
fabs
signbit
spacing
modf
frexp
floor
ceil
trunc"><pre class="notranslate"><span class="pl-s1">negative</span>
<span class="pl-s1">positive</span>
<span class="pl-s1">absolute</span>
<span class="pl-s1">fabs</span>
<span class="pl-s1">rint</span>
<span class="pl-s1">sign</span>
<span class="pl-s1">conj</span>
<span class="pl-s1">conjugate</span>
<span class="pl-s1">exp</span>
<span class="pl-s1">exp2</span>
<span class="pl-s1">log</span>
<span class="pl-s1">log2</span>
<span class="pl-s1">log10</span>
<span class="pl-s1">expm1</span>
<span class="pl-s1">log1p</span>
<span class="pl-s1">sqrt</span>
<span class="pl-s1">square</span>
<span class="pl-s1">cbrt</span>
<span class="pl-s1">reciprocal</span>
<span class="pl-s1">sin</span>
<span class="pl-s1">cos</span>
<span class="pl-s1">tan</span>
<span class="pl-s1">arcsin</span>
<span class="pl-s1">arccos</span>
<span class="pl-s1">arctan</span>
<span class="pl-s1">sinh</span>
<span class="pl-s1">cosh</span>
<span class="pl-s1">tanh</span>
<span class="pl-s1">arcsinh</span>
<span class="pl-s1">arccosh</span>
<span class="pl-s1">arctanh</span>
<span class="pl-s1">degrees</span>
<span class="pl-s1">radians</span>
<span class="pl-s1">deg2rad</span>
<span class="pl-s1">rad2deg</span>
<span class="pl-s1">invert</span>
<span class="pl-s1">logical_not</span>
<span class="pl-s1">isfinite</span>
<span class="pl-s1">isinf</span>
<span class="pl-s1">isnan</span>
<span class="pl-s1">isnat</span>
<span class="pl-s1">fabs</span>
<span class="pl-s1">signbit</span>
<span class="pl-s1">spacing</span>
<span class="pl-s1">modf</span>
<span class="pl-s1">frexp</span>
<span class="pl-s1">floor</span>
<span class="pl-s1">ceil</span>
<span class="pl-s1">trunc</span></pre></div> | <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> src = np.ma.masked_where([0, 1, 0], [1, 1337, 1])
>>> dst = np.ma.masked_where([1, 0, 0, 0, 0], np.zeros(5))
>>> dst_view = dst.transpose()
# check the views look ok
>>> dst
masked_array(data = [-- 0 0 0 0],
mask = [ True False False False False],
fill_value = 999999)
>>> dst_view
masked_array(data = [-- 0 0 0 0],
mask = [ True False False False False],
fill_value = 999999)
# now write a slice of the view
>>> dst_view[2:5] = src
>>> dst_view
masked_array(data = [-- 0 1 -- 1],
mask = [ True False False True False],
fill_value = 999999)
# but looking back at the original, the data was updated but the mask was not!
>>> dst
masked_array(data = [-- 0 1 1337 1],
mask = [ True False False False False],
fill_value = 999999)"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">src</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">ma</span>.<span class="pl-en">masked_where</span>([<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">1337</span>, <span class="pl-c1">1</span>])
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">dst</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">ma</span>.<span class="pl-en">masked_where</span>([<span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>], <span class="pl-s1">np</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">5</span>))
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">dst_view</span> <span class="pl-c1">=</span> <span class="pl-s1">dst</span>.<span class="pl-en">transpose</span>()
<span class="pl-c"># check the views look ok</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">dst</span>
<span class="pl-en">masked_array</span>(<span class="pl-s1">data</span> <span class="pl-c1">=</span> [<span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-c1">0</span> <span class="pl-c1">0</span> <span class="pl-c1">0</span> <span class="pl-c1">0</span>],
<span class="pl-s1">mask</span> <span class="pl-c1">=</span> [ <span class="pl-c1">True</span> <span class="pl-v">False</span> <span class="pl-c1">False</span> <span class="pl-v">False</span> <span class="pl-c1">False</span>],
<span class="pl-s1">fill_value</span> <span class="pl-c1">=</span> <span class="pl-c1">999999</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">dst_view</span>
<span class="pl-en">masked_array</span>(<span class="pl-s1">data</span> <span class="pl-c1">=</span> [<span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-c1">0</span> <span class="pl-c1">0</span> <span class="pl-c1">0</span> <span class="pl-c1">0</span>],
<span class="pl-s1">mask</span> <span class="pl-c1">=</span> [ <span class="pl-c1">True</span> <span class="pl-v">False</span> <span class="pl-c1">False</span> <span class="pl-v">False</span> <span class="pl-c1">False</span>],
<span class="pl-s1">fill_value</span> <span class="pl-c1">=</span> <span class="pl-c1">999999</span>)
<span class="pl-c"># now write a slice of the view</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">dst_view</span>[<span class="pl-c1">2</span>:<span class="pl-c1">5</span>] <span class="pl-c1">=</span> <span class="pl-s1">src</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">dst_view</span>
<span class="pl-en">masked_array</span>(<span class="pl-s1">data</span> <span class="pl-c1">=</span> [<span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-c1">1</span>],
<span class="pl-s1">mask</span> <span class="pl-c1">=</span> [ <span class="pl-c1">True</span> <span class="pl-v">False</span> <span class="pl-c1">False</span> <span class="pl-v">True</span> <span class="pl-c1">False</span>],
<span class="pl-s1">fill_value</span> <span class="pl-c1">=</span> <span class="pl-c1">999999</span>)
<span class="pl-c"># but looking back at the original, the data was updated but the mask was not!</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">dst</span>
<span class="pl-en">masked_array</span>(<span class="pl-s1">data</span> <span class="pl-c1">=</span> [<span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-c1">1337</span> <span class="pl-c1">1</span>],
<span class="pl-s1">mask</span> <span class="pl-c1">=</span> [ <span class="pl-c1">True</span> <span class="pl-v">False</span> <span class="pl-c1">False</span> <span class="pl-v">False</span> <span class="pl-c1">False</span>],
<span class="pl-s1">fill_value</span> <span class="pl-c1">=</span> <span class="pl-c1">999999</span>)</pre></div> | 0 |
<p dir="auto">Please consider adding block-selection like VS proper; shift-alt-cursor manages selection.<br>
Certain kinds of edits are very repetitive or tedious without it.</p> | <p dir="auto">Please Implement Column Mode selection/editing.</p>
<p dir="auto">Previously requested here<br>
<a href="https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7761618-implement-column-mode-selection-editing" rel="nofollow">https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7761618-implement-column-mode-selection-editing</a></p>
<p dir="auto">On Mac preferred shortcut is cmd+option(alt) like Sublime Text does.</p> | 1 |
<p dir="auto">I'm seeing an excessive loss of precision far beyond what is typically acceptable for 64-bit calculations:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax.config import config; config.update("jax_enable_x64", True)
import jax
import jax.numpy as np
import numpy as anp
from jax.test_util import check_grads
import unittest
class PeriodicTorsion():
def __init__(self,
torsion_idxs,
param_idxs):
"""
This implements a periodic torsional potential expanded out into three terms:
V(a) = k0*(1+cos(1 * a - t0)) + k1*(1+cos(2 * a - t1)) + k2*(1+cos(3 * a - t2))
Parameters:
-----------
torsion_idxs: [num_torsions, 4] np.array
each element (a, b, c, d) is a torsion of four atoms, defined as
as the angle of the plane defined by the three bond vectors a-b, b-c, c-d.
param_idxs: [num_torsions, 6] np.array
each element (k, phase, periodicity) maps into params for angle constants and ideal angles
"""
self.torsion_idxs = torsion_idxs
self.param_idxs = param_idxs
@staticmethod
def get_signed_angle(ci, cj, ck, cl):
"""
The torsion angle between two planes should be periodic but not
necessarily symmetric. We use an identical but numerically stable arctan2
implementation as opposed to the OpenMM energy function to avoid a
singularity when the angle is zero. This is different from the CHARMM convention
of symmetric torsions.
"""
# Taken from the wikipedia arctan2 implementation:
# https://en.wikipedia.org/wiki/Dihedral_angle
rij = ci - cj
rkj = ck - cj
rkl = ck - cl
n1 = np.cross(rij, rkj)
n2 = np.cross(rkj, rkl)
lhs = np.linalg.norm(n1, axis=-1)
rhs = np.linalg.norm(n2, axis=-1)
bot = lhs * rhs
y = np.sum(np.multiply(np.cross(n1, n2), rkj/np.linalg.norm(rkj, axis=-1, keepdims=True)), axis=-1)
x = np.sum(np.multiply(n1, n2), -1)
return np.arctan2(y, x)
def angles(self, conf):
ci = conf[self.torsion_idxs[:, 0]]
cj = conf[self.torsion_idxs[:, 1]]
ck = conf[self.torsion_idxs[:, 2]]
cl = conf[self.torsion_idxs[:, 3]]
angle = self.get_signed_angle(ci, cj, ck, cl)
return angle
def energy(self, conf, params):
"""
Compute the torsional energy.
"""
ci = conf[self.torsion_idxs[:, 0]]
cj = conf[self.torsion_idxs[:, 1]]
ck = conf[self.torsion_idxs[:, 2]]
cl = conf[self.torsion_idxs[:, 3]]
ks = params[self.param_idxs[:, 0]]
phase = params[self.param_idxs[:, 1]]
period = params[self.param_idxs[:, 2]]
angle = self.get_signed_angle(ci, cj, ck, cl)
nrg = ks*(1+np.cos(period * angle - phase))
return np.sum(nrg, axis=-1)
class TestPeriodicTorsion(unittest.TestCase):
def setUp(self):
self.conformers = anp.array([
[[-0.6000563454193615, 0.376172954382274 ,-0.2487295756125901],
[ 0.561317027011325 , 0.2066950040043141, 0.3670430960815993],
[-1.187055522272264 ,-0.3415864358441354, 0.0871382207830652],
[ 0.9399773448903637,-0.6888774474110431, 0.2104211949995816]],
[[-0.6000563454193615, 0.376172954382274 ,-0.2487295756125901],
[ 0.5613170270113252, 0.2066950040043142, 0.3670430960815993],
[-1.187055522272264 ,-0.3415864358441354, 0.0871382207830652],
[ 1.283345455745044 ,-0.0356257425880843,-0.2573923896494185]],
[[-0.6000563454193615, 0.376172954382274 ,-0.2487295756125901],
[ 0.561317027011325 , 0.2066950040043142, 0.3670430960815992],
[-1.187055522272264 ,-0.3415864358441354, 0.0871382207830652],
[ 1.263820400176392 , 0.7964992122869241, 0.0084568741589791]],
[[-0.6000563454193615, 0.376172954382274 ,-0.2487295756125901],
[ 0.5613170270113252, 0.2066950040043142, 0.3670430960815992],
[-1.187055522272264 ,-0.3415864358441354, 0.0871382207830652],
[ 0.8993534242298198, 1.042445571242743 , 0.7635483993060286]],
[[-0.6000563454193615, 0.376172954382274 ,-0.2487295756125901],
[ 0.5613170270113255, 0.2066950040043142, 0.3670430960815993],
[-1.187055522272264 ,-0.3415864358441354, 0.0871382207830652],
[ 0.5250337847650304, 0.476091386095139 , 1.3136545198545133]],
[[-0.6000563454193615, 0.376172954382274 ,-0.2487295756125901],
[ 0.5613170270113255, 0.2066950040043141, 0.3670430960815993],
[-1.187055522272264 ,-0.3415864358441354, 0.0871382207830652],
[ 0.485009232042489 ,-0.3818599172073237, 1.1530102055165103]],
], dtype=anp.float64)
self.nan_conformers = anp.array([
[[-0.6000563454193615, 0.376172954382274 ,-0.2487295756125901],
[ 0.5613170270113252, 0.2066950040043142, 0.3670430960815993],
[-1.187055522272264 ,-0.3415864358441354, 0.0871382207830652],
[ 1.2278668040866427, 0.8805184219394547, 0.099391329616366 ]],
[[-0.6000563454193615, 0.376172954382274 ,-0.2487295756125901],
[ 0.561317027011325 , 0.206695004004314 , 0.3670430960815994],
[-1.187055522272264 ,-0.3415864358441354, 0.0871382207830652],
[ 0.5494071252089705,-0.5626592973923106, 0.9817919758125693]],
], dtype=anp.float64)
def test_gpu_torsions(self):
"""
Test agreement of torsions with OpenMM's implementation of torsion terms.
"""
torsion_idxs = anp.array([
[0, 1, 2, 3],
# [0, 1, 2, 3],
# [0, 1, 2, 3],
], dtype=anp.int32)
params_np = anp.array([
2.3, # k0
5.4, # k1
9.0, # k2
0.0, # t0
3.0, # t1
5.8, # t2
1.0, # n0
2.0, # n1
3.0 # n2
], dtype=anp.float64)
param_idxs = anp.array([
# [0, 3, 6], # works
[1, 4, 7], # fails
# [2, 5, 8] # fails
], dtype=anp.int32)
ref_nrg = PeriodicTorsion(
param_idxs=param_idxs,
torsion_idxs=torsion_idxs
)
for conf_idx, conf in enumerate(self.conformers):
nrg = ref_nrg.energy(conf, params_np)
angles = ref_nrg.angles(conf)
print(nrg, angles)
# first order derivatives pass
check_grads(ref_nrg.angles, (conf,), order=1) # passes
check_grads(ref_nrg.energy, (conf, params_np), order=1) # passes
# second order derivatives fail miserably, both of these should pass in 64bit
check_grads(ref_nrg.angles, (conf,), order=2) # fails
check_grads(ref_nrg.energy, (conf, params_np), order=2) # fails
if __name__ == "__main__":
unittest.main()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">jax</span>.<span class="pl-s1">config</span> <span class="pl-k">import</span> <span class="pl-s1">config</span>; <span class="pl-s1">config</span>.<span class="pl-en">update</span>(<span class="pl-s">"jax_enable_x64"</span>, <span class="pl-c1">True</span>)
<span class="pl-k">import</span> <span class="pl-s1">jax</span>
<span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">anp</span>
<span class="pl-k">from</span> <span class="pl-s1">jax</span>.<span class="pl-s1">test_util</span> <span class="pl-k">import</span> <span class="pl-s1">check_grads</span>
<span class="pl-k">import</span> <span class="pl-s1">unittest</span>
<span class="pl-k">class</span> <span class="pl-v">PeriodicTorsion</span>():
<span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>,
<span class="pl-s1">torsion_idxs</span>,
<span class="pl-s1">param_idxs</span>):
<span class="pl-s">"""</span>
<span class="pl-s"> This implements a periodic torsional potential expanded out into three terms:</span>
<span class="pl-s"></span>
<span class="pl-s"> V(a) = k0*(1+cos(1 * a - t0)) + k1*(1+cos(2 * a - t1)) + k2*(1+cos(3 * a - t2))</span>
<span class="pl-s"></span>
<span class="pl-s"> Parameters:</span>
<span class="pl-s"> -----------</span>
<span class="pl-s"> torsion_idxs: [num_torsions, 4] np.array</span>
<span class="pl-s"> each element (a, b, c, d) is a torsion of four atoms, defined as</span>
<span class="pl-s"> as the angle of the plane defined by the three bond vectors a-b, b-c, c-d. </span>
<span class="pl-s"></span>
<span class="pl-s"> param_idxs: [num_torsions, 6] np.array</span>
<span class="pl-s"> each element (k, phase, periodicity) maps into params for angle constants and ideal angles</span>
<span class="pl-s"></span>
<span class="pl-s"> """</span>
<span class="pl-s1">self</span>.<span class="pl-s1">torsion_idxs</span> <span class="pl-c1">=</span> <span class="pl-s1">torsion_idxs</span>
<span class="pl-s1">self</span>.<span class="pl-s1">param_idxs</span> <span class="pl-c1">=</span> <span class="pl-s1">param_idxs</span>
<span class="pl-en">@<span class="pl-s1">staticmethod</span></span>
<span class="pl-k">def</span> <span class="pl-en">get_signed_angle</span>(<span class="pl-s1">ci</span>, <span class="pl-s1">cj</span>, <span class="pl-s1">ck</span>, <span class="pl-s1">cl</span>):
<span class="pl-s">"""</span>
<span class="pl-s"> The torsion angle between two planes should be periodic but not</span>
<span class="pl-s"> necessarily symmetric. We use an identical but numerically stable arctan2</span>
<span class="pl-s"> implementation as opposed to the OpenMM energy function to avoid a</span>
<span class="pl-s"> singularity when the angle is zero. This is different from the CHARMM convention</span>
<span class="pl-s"> of symmetric torsions.</span>
<span class="pl-s"> """</span>
<span class="pl-c"># Taken from the wikipedia arctan2 implementation:</span>
<span class="pl-c"># https://en.wikipedia.org/wiki/Dihedral_angle</span>
<span class="pl-s1">rij</span> <span class="pl-c1">=</span> <span class="pl-s1">ci</span> <span class="pl-c1">-</span> <span class="pl-s1">cj</span>
<span class="pl-s1">rkj</span> <span class="pl-c1">=</span> <span class="pl-s1">ck</span> <span class="pl-c1">-</span> <span class="pl-s1">cj</span>
<span class="pl-s1">rkl</span> <span class="pl-c1">=</span> <span class="pl-s1">ck</span> <span class="pl-c1">-</span> <span class="pl-s1">cl</span>
<span class="pl-s1">n1</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">cross</span>(<span class="pl-s1">rij</span>, <span class="pl-s1">rkj</span>)
<span class="pl-s1">n2</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">cross</span>(<span class="pl-s1">rkj</span>, <span class="pl-s1">rkl</span>)
<span class="pl-s1">lhs</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">linalg</span>.<span class="pl-en">norm</span>(<span class="pl-s1">n1</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>)
<span class="pl-s1">rhs</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">linalg</span>.<span class="pl-en">norm</span>(<span class="pl-s1">n2</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>)
<span class="pl-s1">bot</span> <span class="pl-c1">=</span> <span class="pl-s1">lhs</span> <span class="pl-c1">*</span> <span class="pl-s1">rhs</span>
<span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">sum</span>(<span class="pl-s1">np</span>.<span class="pl-en">multiply</span>(<span class="pl-s1">np</span>.<span class="pl-en">cross</span>(<span class="pl-s1">n1</span>, <span class="pl-s1">n2</span>), <span class="pl-s1">rkj</span><span class="pl-c1">/</span><span class="pl-s1">np</span>.<span class="pl-s1">linalg</span>.<span class="pl-en">norm</span>(<span class="pl-s1">rkj</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>, <span class="pl-s1">keepdims</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)), <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>)
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">sum</span>(<span class="pl-s1">np</span>.<span class="pl-en">multiply</span>(<span class="pl-s1">n1</span>, <span class="pl-s1">n2</span>), <span class="pl-c1">-</span><span class="pl-c1">1</span>)
<span class="pl-k">return</span> <span class="pl-s1">np</span>.<span class="pl-en">arctan2</span>(<span class="pl-s1">y</span>, <span class="pl-s1">x</span>)
<span class="pl-k">def</span> <span class="pl-en">angles</span>(<span class="pl-s1">self</span>, <span class="pl-s1">conf</span>):
<span class="pl-s1">ci</span> <span class="pl-c1">=</span> <span class="pl-s1">conf</span>[<span class="pl-s1">self</span>.<span class="pl-s1">torsion_idxs</span>[:, <span class="pl-c1">0</span>]]
<span class="pl-s1">cj</span> <span class="pl-c1">=</span> <span class="pl-s1">conf</span>[<span class="pl-s1">self</span>.<span class="pl-s1">torsion_idxs</span>[:, <span class="pl-c1">1</span>]]
<span class="pl-s1">ck</span> <span class="pl-c1">=</span> <span class="pl-s1">conf</span>[<span class="pl-s1">self</span>.<span class="pl-s1">torsion_idxs</span>[:, <span class="pl-c1">2</span>]]
<span class="pl-s1">cl</span> <span class="pl-c1">=</span> <span class="pl-s1">conf</span>[<span class="pl-s1">self</span>.<span class="pl-s1">torsion_idxs</span>[:, <span class="pl-c1">3</span>]]
<span class="pl-s1">angle</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">get_signed_angle</span>(<span class="pl-s1">ci</span>, <span class="pl-s1">cj</span>, <span class="pl-s1">ck</span>, <span class="pl-s1">cl</span>)
<span class="pl-k">return</span> <span class="pl-s1">angle</span>
<span class="pl-k">def</span> <span class="pl-en">energy</span>(<span class="pl-s1">self</span>, <span class="pl-s1">conf</span>, <span class="pl-s1">params</span>):
<span class="pl-s">"""</span>
<span class="pl-s"> Compute the torsional energy.</span>
<span class="pl-s"> """</span>
<span class="pl-s1">ci</span> <span class="pl-c1">=</span> <span class="pl-s1">conf</span>[<span class="pl-s1">self</span>.<span class="pl-s1">torsion_idxs</span>[:, <span class="pl-c1">0</span>]]
<span class="pl-s1">cj</span> <span class="pl-c1">=</span> <span class="pl-s1">conf</span>[<span class="pl-s1">self</span>.<span class="pl-s1">torsion_idxs</span>[:, <span class="pl-c1">1</span>]]
<span class="pl-s1">ck</span> <span class="pl-c1">=</span> <span class="pl-s1">conf</span>[<span class="pl-s1">self</span>.<span class="pl-s1">torsion_idxs</span>[:, <span class="pl-c1">2</span>]]
<span class="pl-s1">cl</span> <span class="pl-c1">=</span> <span class="pl-s1">conf</span>[<span class="pl-s1">self</span>.<span class="pl-s1">torsion_idxs</span>[:, <span class="pl-c1">3</span>]]
<span class="pl-s1">ks</span> <span class="pl-c1">=</span> <span class="pl-s1">params</span>[<span class="pl-s1">self</span>.<span class="pl-s1">param_idxs</span>[:, <span class="pl-c1">0</span>]]
<span class="pl-s1">phase</span> <span class="pl-c1">=</span> <span class="pl-s1">params</span>[<span class="pl-s1">self</span>.<span class="pl-s1">param_idxs</span>[:, <span class="pl-c1">1</span>]]
<span class="pl-s1">period</span> <span class="pl-c1">=</span> <span class="pl-s1">params</span>[<span class="pl-s1">self</span>.<span class="pl-s1">param_idxs</span>[:, <span class="pl-c1">2</span>]]
<span class="pl-s1">angle</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">get_signed_angle</span>(<span class="pl-s1">ci</span>, <span class="pl-s1">cj</span>, <span class="pl-s1">ck</span>, <span class="pl-s1">cl</span>)
<span class="pl-s1">nrg</span> <span class="pl-c1">=</span> <span class="pl-s1">ks</span><span class="pl-c1">*</span>(<span class="pl-c1">1</span><span class="pl-c1">+</span><span class="pl-s1">np</span>.<span class="pl-en">cos</span>(<span class="pl-s1">period</span> <span class="pl-c1">*</span> <span class="pl-s1">angle</span> <span class="pl-c1">-</span> <span class="pl-s1">phase</span>))
<span class="pl-k">return</span> <span class="pl-s1">np</span>.<span class="pl-en">sum</span>(<span class="pl-s1">nrg</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>)
<span class="pl-k">class</span> <span class="pl-v">TestPeriodicTorsion</span>(<span class="pl-s1">unittest</span>.<span class="pl-v">TestCase</span>):
<span class="pl-k">def</span> <span class="pl-en">setUp</span>(<span class="pl-s1">self</span>):
<span class="pl-s1">self</span>.<span class="pl-s1">conformers</span> <span class="pl-c1">=</span> <span class="pl-s1">anp</span>.<span class="pl-en">array</span>([
[[<span class="pl-c1">-</span><span class="pl-c1">0.6000563454193615</span>, <span class="pl-c1">0.376172954382274</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.2487295756125901</span>],
[ <span class="pl-c1">0.561317027011325</span> , <span class="pl-c1">0.2066950040043141</span>, <span class="pl-c1">0.3670430960815993</span>],
[<span class="pl-c1">-</span><span class="pl-c1">1.187055522272264</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.3415864358441354</span>, <span class="pl-c1">0.0871382207830652</span>],
[ <span class="pl-c1">0.9399773448903637</span>,<span class="pl-c1">-</span><span class="pl-c1">0.6888774474110431</span>, <span class="pl-c1">0.2104211949995816</span>]],
[[<span class="pl-c1">-</span><span class="pl-c1">0.6000563454193615</span>, <span class="pl-c1">0.376172954382274</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.2487295756125901</span>],
[ <span class="pl-c1">0.5613170270113252</span>, <span class="pl-c1">0.2066950040043142</span>, <span class="pl-c1">0.3670430960815993</span>],
[<span class="pl-c1">-</span><span class="pl-c1">1.187055522272264</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.3415864358441354</span>, <span class="pl-c1">0.0871382207830652</span>],
[ <span class="pl-c1">1.283345455745044</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.0356257425880843</span>,<span class="pl-c1">-</span><span class="pl-c1">0.2573923896494185</span>]],
[[<span class="pl-c1">-</span><span class="pl-c1">0.6000563454193615</span>, <span class="pl-c1">0.376172954382274</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.2487295756125901</span>],
[ <span class="pl-c1">0.561317027011325</span> , <span class="pl-c1">0.2066950040043142</span>, <span class="pl-c1">0.3670430960815992</span>],
[<span class="pl-c1">-</span><span class="pl-c1">1.187055522272264</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.3415864358441354</span>, <span class="pl-c1">0.0871382207830652</span>],
[ <span class="pl-c1">1.263820400176392</span> , <span class="pl-c1">0.7964992122869241</span>, <span class="pl-c1">0.0084568741589791</span>]],
[[<span class="pl-c1">-</span><span class="pl-c1">0.6000563454193615</span>, <span class="pl-c1">0.376172954382274</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.2487295756125901</span>],
[ <span class="pl-c1">0.5613170270113252</span>, <span class="pl-c1">0.2066950040043142</span>, <span class="pl-c1">0.3670430960815992</span>],
[<span class="pl-c1">-</span><span class="pl-c1">1.187055522272264</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.3415864358441354</span>, <span class="pl-c1">0.0871382207830652</span>],
[ <span class="pl-c1">0.8993534242298198</span>, <span class="pl-c1">1.042445571242743</span> , <span class="pl-c1">0.7635483993060286</span>]],
[[<span class="pl-c1">-</span><span class="pl-c1">0.6000563454193615</span>, <span class="pl-c1">0.376172954382274</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.2487295756125901</span>],
[ <span class="pl-c1">0.5613170270113255</span>, <span class="pl-c1">0.2066950040043142</span>, <span class="pl-c1">0.3670430960815993</span>],
[<span class="pl-c1">-</span><span class="pl-c1">1.187055522272264</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.3415864358441354</span>, <span class="pl-c1">0.0871382207830652</span>],
[ <span class="pl-c1">0.5250337847650304</span>, <span class="pl-c1">0.476091386095139</span> , <span class="pl-c1">1.3136545198545133</span>]],
[[<span class="pl-c1">-</span><span class="pl-c1">0.6000563454193615</span>, <span class="pl-c1">0.376172954382274</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.2487295756125901</span>],
[ <span class="pl-c1">0.5613170270113255</span>, <span class="pl-c1">0.2066950040043141</span>, <span class="pl-c1">0.3670430960815993</span>],
[<span class="pl-c1">-</span><span class="pl-c1">1.187055522272264</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.3415864358441354</span>, <span class="pl-c1">0.0871382207830652</span>],
[ <span class="pl-c1">0.485009232042489</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.3818599172073237</span>, <span class="pl-c1">1.1530102055165103</span>]],
], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">anp</span>.<span class="pl-s1">float64</span>)
<span class="pl-s1">self</span>.<span class="pl-s1">nan_conformers</span> <span class="pl-c1">=</span> <span class="pl-s1">anp</span>.<span class="pl-en">array</span>([
[[<span class="pl-c1">-</span><span class="pl-c1">0.6000563454193615</span>, <span class="pl-c1">0.376172954382274</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.2487295756125901</span>],
[ <span class="pl-c1">0.5613170270113252</span>, <span class="pl-c1">0.2066950040043142</span>, <span class="pl-c1">0.3670430960815993</span>],
[<span class="pl-c1">-</span><span class="pl-c1">1.187055522272264</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.3415864358441354</span>, <span class="pl-c1">0.0871382207830652</span>],
[ <span class="pl-c1">1.2278668040866427</span>, <span class="pl-c1">0.8805184219394547</span>, <span class="pl-c1">0.099391329616366</span> ]],
[[<span class="pl-c1">-</span><span class="pl-c1">0.6000563454193615</span>, <span class="pl-c1">0.376172954382274</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.2487295756125901</span>],
[ <span class="pl-c1">0.561317027011325</span> , <span class="pl-c1">0.206695004004314</span> , <span class="pl-c1">0.3670430960815994</span>],
[<span class="pl-c1">-</span><span class="pl-c1">1.187055522272264</span> ,<span class="pl-c1">-</span><span class="pl-c1">0.3415864358441354</span>, <span class="pl-c1">0.0871382207830652</span>],
[ <span class="pl-c1">0.5494071252089705</span>,<span class="pl-c1">-</span><span class="pl-c1">0.5626592973923106</span>, <span class="pl-c1">0.9817919758125693</span>]],
], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">anp</span>.<span class="pl-s1">float64</span>)
<span class="pl-k">def</span> <span class="pl-en">test_gpu_torsions</span>(<span class="pl-s1">self</span>):
<span class="pl-s">"""</span>
<span class="pl-s"> Test agreement of torsions with OpenMM's implementation of torsion terms.</span>
<span class="pl-s"> """</span>
<span class="pl-s1">torsion_idxs</span> <span class="pl-c1">=</span> <span class="pl-s1">anp</span>.<span class="pl-en">array</span>([
[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>],
<span class="pl-c"># [0, 1, 2, 3],</span>
<span class="pl-c"># [0, 1, 2, 3],</span>
], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">anp</span>.<span class="pl-s1">int32</span>)
<span class="pl-s1">params_np</span> <span class="pl-c1">=</span> <span class="pl-s1">anp</span>.<span class="pl-en">array</span>([
<span class="pl-c1">2.3</span>, <span class="pl-c"># k0</span>
<span class="pl-c1">5.4</span>, <span class="pl-c"># k1</span>
<span class="pl-c1">9.0</span>, <span class="pl-c"># k2</span>
<span class="pl-c1">0.0</span>, <span class="pl-c"># t0</span>
<span class="pl-c1">3.0</span>, <span class="pl-c"># t1</span>
<span class="pl-c1">5.8</span>, <span class="pl-c"># t2</span>
<span class="pl-c1">1.0</span>, <span class="pl-c"># n0</span>
<span class="pl-c1">2.0</span>, <span class="pl-c"># n1</span>
<span class="pl-c1">3.0</span> <span class="pl-c"># n2</span>
], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">anp</span>.<span class="pl-s1">float64</span>)
<span class="pl-s1">param_idxs</span> <span class="pl-c1">=</span> <span class="pl-s1">anp</span>.<span class="pl-en">array</span>([
<span class="pl-c"># [0, 3, 6], # works</span>
[<span class="pl-c1">1</span>, <span class="pl-c1">4</span>, <span class="pl-c1">7</span>], <span class="pl-c"># fails</span>
<span class="pl-c"># [2, 5, 8] # fails</span>
], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">anp</span>.<span class="pl-s1">int32</span>)
<span class="pl-s1">ref_nrg</span> <span class="pl-c1">=</span> <span class="pl-v">PeriodicTorsion</span>(
<span class="pl-s1">param_idxs</span><span class="pl-c1">=</span><span class="pl-s1">param_idxs</span>,
<span class="pl-s1">torsion_idxs</span><span class="pl-c1">=</span><span class="pl-s1">torsion_idxs</span>
)
<span class="pl-k">for</span> <span class="pl-s1">conf_idx</span>, <span class="pl-s1">conf</span> <span class="pl-c1">in</span> <span class="pl-en">enumerate</span>(<span class="pl-s1">self</span>.<span class="pl-s1">conformers</span>):
<span class="pl-s1">nrg</span> <span class="pl-c1">=</span> <span class="pl-s1">ref_nrg</span>.<span class="pl-en">energy</span>(<span class="pl-s1">conf</span>, <span class="pl-s1">params_np</span>)
<span class="pl-s1">angles</span> <span class="pl-c1">=</span> <span class="pl-s1">ref_nrg</span>.<span class="pl-en">angles</span>(<span class="pl-s1">conf</span>)
<span class="pl-en">print</span>(<span class="pl-s1">nrg</span>, <span class="pl-s1">angles</span>)
<span class="pl-c"># first order derivatives pass</span>
<span class="pl-en">check_grads</span>(<span class="pl-s1">ref_nrg</span>.<span class="pl-s1">angles</span>, (<span class="pl-s1">conf</span>,), <span class="pl-s1">order</span><span class="pl-c1">=</span><span class="pl-c1">1</span>) <span class="pl-c"># passes</span>
<span class="pl-en">check_grads</span>(<span class="pl-s1">ref_nrg</span>.<span class="pl-s1">energy</span>, (<span class="pl-s1">conf</span>, <span class="pl-s1">params_np</span>), <span class="pl-s1">order</span><span class="pl-c1">=</span><span class="pl-c1">1</span>) <span class="pl-c"># passes</span>
<span class="pl-c"># second order derivatives fail miserably, both of these should pass in 64bit</span>
<span class="pl-en">check_grads</span>(<span class="pl-s1">ref_nrg</span>.<span class="pl-s1">angles</span>, (<span class="pl-s1">conf</span>,), <span class="pl-s1">order</span><span class="pl-c1">=</span><span class="pl-c1">2</span>) <span class="pl-c"># fails</span>
<span class="pl-en">check_grads</span>(<span class="pl-s1">ref_nrg</span>.<span class="pl-s1">energy</span>, (<span class="pl-s1">conf</span>, <span class="pl-s1">params_np</span>), <span class="pl-s1">order</span><span class="pl-c1">=</span><span class="pl-c1">2</span>) <span class="pl-c"># fails</span>
<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>:
<span class="pl-s1">unittest</span>.<span class="pl-en">main</span>()</pre></div>
<p dir="auto">The failures look like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="======================================================================
FAIL: test_gpu_torsions (__main__.TestPeriodicTorsion)
----------------------------------------------------------------------
Traceback (most recent call last):
File "timemachine/jax_functionals/loss_of_precision_repro.py", line 175, in test_gpu_torsions
check_grads(ref_nrg.energy, (conf, params_np), order=2) # fails
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 153, in check_grads
check_grads(f_vjp, args, order - 1, atol=atol, rtol=rtol, eps=eps)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 160, in check_grads
check_vjp(f, partial(api.vjp, f), args, atol, rtol, eps)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 144, in check_vjp
check_close(ip, ip_expected, atol=atol, rtol=rtol)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 89, in check_close
assert tree_all(tree_multimap(close, xs, ys)), '\n{} != \n{}'.format(xs, ys)
AssertionError:
55.438952303284566 !=
55.43906353281106
======================================================================
FAIL: test_gpu_torsions (__main__.TestPeriodicTorsion)
----------------------------------------------------------------------
Traceback (most recent call last):
File "timemachine/jax_functionals/loss_of_precision_repro.py", line 174, in test_gpu_torsions
check_grads(ref_nrg.angles, (conf,), order=2) # fails
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 153, in check_grads
check_grads(f_vjp, args, order - 1, atol=atol, rtol=rtol, eps=eps)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 160, in check_grads
check_vjp(f, partial(api.vjp, f), args, atol, rtol, eps)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 144, in check_vjp
check_close(ip, ip_expected, atol=atol, rtol=rtol)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 89, in check_close
assert tree_all(tree_multimap(close, xs, ys)), '\n{} != \n{}'.format(xs, ys)
AssertionError:
0.381797537133656 !=
0.381794076418857"><pre class="notranslate"><code class="notranslate">======================================================================
FAIL: test_gpu_torsions (__main__.TestPeriodicTorsion)
----------------------------------------------------------------------
Traceback (most recent call last):
File "timemachine/jax_functionals/loss_of_precision_repro.py", line 175, in test_gpu_torsions
check_grads(ref_nrg.energy, (conf, params_np), order=2) # fails
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 153, in check_grads
check_grads(f_vjp, args, order - 1, atol=atol, rtol=rtol, eps=eps)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 160, in check_grads
check_vjp(f, partial(api.vjp, f), args, atol, rtol, eps)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 144, in check_vjp
check_close(ip, ip_expected, atol=atol, rtol=rtol)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 89, in check_close
assert tree_all(tree_multimap(close, xs, ys)), '\n{} != \n{}'.format(xs, ys)
AssertionError:
55.438952303284566 !=
55.43906353281106
======================================================================
FAIL: test_gpu_torsions (__main__.TestPeriodicTorsion)
----------------------------------------------------------------------
Traceback (most recent call last):
File "timemachine/jax_functionals/loss_of_precision_repro.py", line 174, in test_gpu_torsions
check_grads(ref_nrg.angles, (conf,), order=2) # fails
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 153, in check_grads
check_grads(f_vjp, args, order - 1, atol=atol, rtol=rtol, eps=eps)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 160, in check_grads
check_vjp(f, partial(api.vjp, f), args, atol, rtol, eps)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 144, in check_vjp
check_close(ip, ip_expected, atol=atol, rtol=rtol)
File "/Users/hessian/venv/lib/python3.6/site-packages/jax/test_util.py", line 89, in check_close
assert tree_all(tree_multimap(close, xs, ys)), '\n{} != \n{}'.format(xs, ys)
AssertionError:
0.381797537133656 !=
0.381794076418857
</code></pre></div> | <p dir="auto">Please:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check for duplicate issues.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> If applicable, include full error messages/tracebacks.</li>
</ul>
<p dir="auto">I am trying to optimize two parameters for linear regression. This is happening when a large number of points are involved.</p>
<p dir="auto">I made a loop, but it failed silently. When I tried to see the updated parameters, I saw two <code class="notranslate">nan</code>s.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax.numpy as jnp
import jax
import jaxlib
x_ = jnp.arange(2e7)
y_ = jnp.arange(2e7, 4e7)
theta = jnp.array([1., 1])
@jax.jit
def model(theta: jaxlib.xla_extension.DeviceArray, x: jaxlib.xla_extension.DeviceArray) -> jaxlib.xla_extension.DeviceArray:
w, b = theta
return w * x + b
@jax.jit
def loss_fn(theta: jaxlib.xla_extension.DeviceArray,
x: jaxlib.xla_extension.DeviceArray,
y: jaxlib.xla_extension.DeviceArray) -> jaxlib.xla_extension.DeviceArray:
'''
Calculates the MSE loss.
'''
prediction = model(theta, x) # y_hat
return jnp.mean((prediction - y) ** 2) # J
@jax.jit
def update(theta: jaxlib.xla_extension.DeviceArray,
x: jaxlib.xla_extension.DeviceArray,
y: jaxlib.xla_extension.DeviceArray,
lr: float = 0.1) -> jaxlib.xla_extension.DeviceArray:
'''
updates the parameters based on gradient descent
'''
return theta - lr * jax.grad(loss_fn)(theta, x, y)
for _ in range(1000):
theta = update(theta, x_, y_)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">jnp</span>
<span class="pl-k">import</span> <span class="pl-s1">jax</span>
<span class="pl-k">import</span> <span class="pl-s1">jaxlib</span>
<span class="pl-s1">x_</span> <span class="pl-c1">=</span> <span class="pl-s1">jnp</span>.<span class="pl-en">arange</span>(<span class="pl-c1">2e7</span>)
<span class="pl-s1">y_</span> <span class="pl-c1">=</span> <span class="pl-s1">jnp</span>.<span class="pl-en">arange</span>(<span class="pl-c1">2e7</span>, <span class="pl-c1">4e7</span>)
<span class="pl-s1">theta</span> <span class="pl-c1">=</span> <span class="pl-s1">jnp</span>.<span class="pl-en">array</span>([<span class="pl-c1">1.</span>, <span class="pl-c1">1</span>])
<span class="pl-en">@<span class="pl-s1">jax</span>.<span class="pl-s1">jit</span></span>
<span class="pl-k">def</span> <span class="pl-en">model</span>(<span class="pl-s1">theta</span>: <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>, <span class="pl-s1">x</span>: <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>) <span class="pl-c1">-></span> <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>:
<span class="pl-s1">w</span>, <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">theta</span>
<span class="pl-k">return</span> <span class="pl-s1">w</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-s1">b</span>
<span class="pl-en">@<span class="pl-s1">jax</span>.<span class="pl-s1">jit</span></span>
<span class="pl-k">def</span> <span class="pl-en">loss_fn</span>(<span class="pl-s1">theta</span>: <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>,
<span class="pl-s1">x</span>: <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>,
<span class="pl-s1">y</span>: <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>) <span class="pl-c1">-></span> <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>:
<span class="pl-s">'''</span>
<span class="pl-s"> Calculates the MSE loss.</span>
<span class="pl-s"> '''</span>
<span class="pl-s1">prediction</span> <span class="pl-c1">=</span> <span class="pl-en">model</span>(<span class="pl-s1">theta</span>, <span class="pl-s1">x</span>) <span class="pl-c"># y_hat</span>
<span class="pl-k">return</span> <span class="pl-s1">jnp</span>.<span class="pl-en">mean</span>((<span class="pl-s1">prediction</span> <span class="pl-c1">-</span> <span class="pl-s1">y</span>) <span class="pl-c1">**</span> <span class="pl-c1">2</span>) <span class="pl-c"># J</span>
<span class="pl-en">@<span class="pl-s1">jax</span>.<span class="pl-s1">jit</span></span>
<span class="pl-k">def</span> <span class="pl-en">update</span>(<span class="pl-s1">theta</span>: <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>,
<span class="pl-s1">x</span>: <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>,
<span class="pl-s1">y</span>: <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>,
<span class="pl-s1">lr</span>: <span class="pl-s1">float</span> <span class="pl-c1">=</span> <span class="pl-c1">0.1</span>) <span class="pl-c1">-></span> <span class="pl-s1">jaxlib</span>.<span class="pl-s1">xla_extension</span>.<span class="pl-v">DeviceArray</span>:
<span class="pl-s">'''</span>
<span class="pl-s"> updates the parameters based on gradient descent</span>
<span class="pl-s"> '''</span>
<span class="pl-k">return</span> <span class="pl-s1">theta</span> <span class="pl-c1">-</span> <span class="pl-s1">lr</span> <span class="pl-c1">*</span> <span class="pl-s1">jax</span>.<span class="pl-en">grad</span>(<span class="pl-s1">loss_fn</span>)(<span class="pl-s1">theta</span>, <span class="pl-s1">x</span>, <span class="pl-s1">y</span>)
<span class="pl-k">for</span> <span class="pl-s1">_</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">1000</span>):
<span class="pl-s1">theta</span> <span class="pl-c1">=</span> <span class="pl-en">update</span>(<span class="pl-s1">theta</span>, <span class="pl-s1">x_</span>, <span class="pl-s1">y_</span>)</pre></div>
<p dir="auto">This failed silently.</p>
<p dir="auto">Then I followed the docs and enables <code class="notranslate">nan</code>-parsing by-</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="!JAX_DEBUG_NANS=True"><pre lang="ipython" class="notranslate"><code class="notranslate">!JAX_DEBUG_NANS=True
</code></pre></div>
<p dir="auto">And then I did-</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax.config import config
config.update("jax_debug_nans", True)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">jax</span>.<span class="pl-s1">config</span> <span class="pl-k">import</span> <span class="pl-s1">config</span>
<span class="pl-s1">config</span>.<span class="pl-en">update</span>(<span class="pl-s">"jax_debug_nans"</span>, <span class="pl-c1">True</span>)</pre></div>
<p dir="auto">Which threw me a error.</p>
<p dir="auto">After the error was thrown, I inspected the <code class="notranslate">theta</code> variable, and saw that it had very small values, i.e. the values before they were going <code class="notranslate">nan</code>.</p>
<p dir="auto">It was this:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> theta
DeviceArray([-1.6214236e+37, -7.4782789e+35], dtype=float32)"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">theta</span>
<span class="pl-v">DeviceArray</span>([<span class="pl-c1">-</span><span class="pl-c1">1.6214236e+37</span>, <span class="pl-c1">-</span><span class="pl-c1">7.4782789e+35</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">float32</span>)</pre></div>
<p dir="auto">What is going wrong? Am I missing something?</p>
<p dir="auto">Note that I also tried initially with small values for the arrays. All values in array were temperature values, and the data is good (no outliers or wrong entry that might throw the parameters off).</p>
<p dir="auto">Full error message:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Invalid nan value encountered in the output of a C++-jit function. Calling the de-optimized version.
Invalid value encountered in the output of a jit function. Calling the de-optimized version.
Invalid value encountered in the output of a jit function. Calling the de-optimized version.
Invalid value encountered in the output of a jit function. Calling the de-optimized version.
Invalid value encountered in the output of a jit function. Calling the de-optimized version.
---------------------------------------------------------------------------
FloatingPointError Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/jax/_src/api.py in _nan_check_posthook(fun, args, kwargs, output)
120 da.device_buffer
--> 121 for da in tree_leaves(output)
122 if hasattr(da, "device_buffer")
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in check_special(name, bufs)
409 for buf in bufs:
--> 410 _check_special(name, buf.xla_shape(), buf)
411
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in _check_special(name, xla_shape, buf)
415 if config.jax_debug_nans and np.any(np.isnan(buf.to_py())):
--> 416 raise FloatingPointError(f"invalid value (nan) encountered in {name}")
417 if config.jax_debug_infs and np.any(np.isinf(buf.to_py())):
FloatingPointError: invalid value (nan) encountered in xla_call
During handling of the above exception, another exception occurred:
FloatingPointError Traceback (most recent call last)
[... skipping hidden 1 frame]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in _execute_compiled(compiled, avals, handlers, kept_var_idx, *args)
912 out_bufs = compiled.execute(input_bufs)
--> 913 check_special(xla_call_p.name, out_bufs)
914 return [handler(*bs) for handler, bs in zip(handlers, _partition_outputs(avals, out_bufs))]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in check_special(name, bufs)
409 for buf in bufs:
--> 410 _check_special(name, buf.xla_shape(), buf)
411
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in _check_special(name, xla_shape, buf)
415 if config.jax_debug_nans and np.any(np.isnan(buf.to_py())):
--> 416 raise FloatingPointError(f"invalid value (nan) encountered in {name}")
417 if config.jax_debug_infs and np.any(np.isinf(buf.to_py())):
FloatingPointError: invalid value (nan) encountered in xla_call
During handling of the above exception, another exception occurred:
FloatingPointError Traceback (most recent call last)
[... skipping hidden 1 frame]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in _execute_compiled(compiled, avals, handlers, kept_var_idx, *args)
912 out_bufs = compiled.execute(input_bufs)
--> 913 check_special(xla_call_p.name, out_bufs)
914 return [handler(*bs) for handler, bs in zip(handlers, _partition_outputs(avals, out_bufs))]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in check_special(name, bufs)
409 for buf in bufs:
--> 410 _check_special(name, buf.xla_shape(), buf)
411
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in _check_special(name, xla_shape, buf)
415 if config.jax_debug_nans and np.any(np.isnan(buf.to_py())):
--> 416 raise FloatingPointError(f"invalid value (nan) encountered in {name}")
417 if config.jax_debug_infs and np.any(np.isinf(buf.to_py())):
FloatingPointError: invalid value (nan) encountered in xla_call
During handling of the above exception, another exception occurred:
FloatingPointError Traceback (most recent call last)
[... skipping hidden 1 frame]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in _execute_compiled(compiled, avals, handlers, kept_var_idx, *args)
912 out_bufs = compiled.execute(input_bufs)
--> 913 check_special(xla_call_p.name, out_bufs)
914 return [handler(*bs) for handler, bs in zip(handlers, _partition_outputs(avals, out_bufs))]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in check_special(name, bufs)
409 for buf in bufs:
--> 410 _check_special(name, buf.xla_shape(), buf)
411
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in _check_special(name, xla_shape, buf)
415 if config.jax_debug_nans and np.any(np.isnan(buf.to_py())):
--> 416 raise FloatingPointError(f"invalid value (nan) encountered in {name}")
417 if config.jax_debug_infs and np.any(np.isinf(buf.to_py())):
FloatingPointError: invalid value (nan) encountered in xla_call
During handling of the above exception, another exception occurred:
FloatingPointError Traceback (most recent call last)
[... skipping hidden 1 frame]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in _execute_compiled(compiled, avals, handlers, kept_var_idx, *args)
912 out_bufs = compiled.execute(input_bufs)
--> 913 check_special(xla_call_p.name, out_bufs)
914 return [handler(*bs) for handler, bs in zip(handlers, _partition_outputs(avals, out_bufs))]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in check_special(name, bufs)
409 for buf in bufs:
--> 410 _check_special(name, buf.xla_shape(), buf)
411
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in _check_special(name, xla_shape, buf)
415 if config.jax_debug_nans and np.any(np.isnan(buf.to_py())):
--> 416 raise FloatingPointError(f"invalid value (nan) encountered in {name}")
417 if config.jax_debug_infs and np.any(np.isinf(buf.to_py())):
FloatingPointError: invalid value (nan) encountered in xla_call
During handling of the above exception, another exception occurred:
JaxStackTraceBeforeTransformation Traceback (most recent call last)
/opt/conda/lib/python3.7/runpy.py in _run_module_as_main(***failed resolving arguments***)
192 return _run_code(code, main_globals, None,
--> 193 "__main__", mod_spec)
194
/opt/conda/lib/python3.7/runpy.py in _run_code(***failed resolving arguments***)
84 __spec__ = mod_spec)
---> 85 exec(code, run_globals)
86 return run_globals
/opt/conda/lib/python3.7/site-packages/ipykernel_launcher.py in <module>
15 from ipykernel import kernelapp as app
---> 16 app.launch_new_instance()
/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py in launch_instance(***failed resolving arguments***)
844 app.initialize(argv)
--> 845 app.start()
846
/opt/conda/lib/python3.7/site-packages/ipykernel/kernelapp.py in start(***failed resolving arguments***)
666 try:
--> 667 self.io_loop.start()
668 except KeyboardInterrupt:
/opt/conda/lib/python3.7/site-packages/tornado/platform/asyncio.py in start(***failed resolving arguments***)
198 asyncio.set_event_loop(self.asyncio_loop)
--> 199 self.asyncio_loop.run_forever()
200 finally:
/opt/conda/lib/python3.7/asyncio/base_events.py in run_forever(***failed resolving arguments***)
540 while True:
--> 541 self._run_once()
542 if self._stopping:
/opt/conda/lib/python3.7/asyncio/base_events.py in _run_once(***failed resolving arguments***)
1785 else:
-> 1786 handle._run()
1787 handle = None # Needed to break cycles when an exception occurs.
/opt/conda/lib/python3.7/asyncio/events.py in _run(***failed resolving arguments***)
87 try:
---> 88 self._context.run(self._callback, *self._args)
89 except Exception as exc:
/opt/conda/lib/python3.7/site-packages/ipykernel/kernelbase.py in dispatch_queue(***failed resolving arguments***)
456 try:
--> 457 await self.process_one()
458 except Exception:
/opt/conda/lib/python3.7/site-packages/ipykernel/kernelbase.py in process_one(***failed resolving arguments***)
445 return None
--> 446 await dispatch(*args)
447
/opt/conda/lib/python3.7/site-packages/ipykernel/kernelbase.py in dispatch_shell(***failed resolving arguments***)
352 if inspect.isawaitable(result):
--> 353 await result
354 except Exception:
/opt/conda/lib/python3.7/site-packages/ipykernel/kernelbase.py in execute_request(***failed resolving arguments***)
647 if inspect.isawaitable(reply_content):
--> 648 reply_content = await reply_content
649
/opt/conda/lib/python3.7/site-packages/ipykernel/ipkernel.py in do_execute(***failed resolving arguments***)
344 # letting shell dispatch to loop runners
--> 345 res = shell.run_cell(code, store_history=store_history, silent=silent)
346 finally:
/opt/conda/lib/python3.7/site-packages/ipykernel/zmqshell.py in run_cell(***failed resolving arguments***)
531 self._last_traceback = None
--> 532 return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
533
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_cell(***failed resolving arguments***)
2898 result = self._run_cell(
-> 2899 raw_cell, store_history, silent, shell_futures)
2900 finally:
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py in _run_cell(***failed resolving arguments***)
2943 try:
-> 2944 return runner(coro)
2945 except BaseException as e:
/opt/conda/lib/python3.7/site-packages/IPython/core/async_helpers.py in _pseudo_sync_runner(***failed resolving arguments***)
67 try:
---> 68 coro.send(None)
69 except StopIteration as exc:
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_cell_async(***failed resolving arguments***)
3169 has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
-> 3170 interactivity=interactivity, compiler=compiler, result=result)
3171
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_ast_nodes(***failed resolving arguments***)
3360 asy = compare(code)
-> 3361 if (await self.run_code(code, result, async_=asy)):
3362 return True
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_code(***failed resolving arguments***)
3440 else:
-> 3441 exec(code_obj, self.user_global_ns, self.user_ns)
3442 finally:
/tmp/ipykernel_43/2138327653.py in <module>
1 for _ in range(1000):
----> 2 theta = update(theta, x_train, y_train)
3
/tmp/ipykernel_43/1444374627.py in update(***failed resolving arguments***)
8 '''
----> 9 return theta - lr * jax.grad(loss_fn)(theta, x, y)
/tmp/ipykernel_43/3487162561.py in loss_fn(***failed resolving arguments***)
7 '''
----> 8 prediction = model(theta, x) # y_hat
9 return jnp.mean((prediction - y) ** 2) # J
/tmp/ipykernel_43/3906416787.py in model(***failed resolving arguments***)
3 w, b = theta
----> 4 return w * x + b
/opt/conda/lib/python3.7/site-packages/jax/_src/numpy/lax_numpy.py in deferring_binary_op(***failed resolving arguments***)
5923 return NotImplemented
-> 5924 return binary_op(self, other)
5925 return deferring_binary_op
/opt/conda/lib/python3.7/site-packages/jax/_src/numpy/lax_numpy.py in fn(***failed resolving arguments***)
435 x1, x2 = _promote_args(numpy_fn.__name__, x1, x2)
--> 436 return lax_fn(x1, x2) if x1.dtype != bool_ else bool_lax_fn(x1, x2)
437 fn = jit(fn, inline=True)
JaxStackTraceBeforeTransformation: FloatingPointError: invalid value (nan) encountered in reduce_sum
The preceding stack trace is the source of the JAX operation that, once transformed by JAX, triggered the following exception.
--------------------
The above exception was the direct cause of the following exception:
FloatingPointError Traceback (most recent call last)
/tmp/ipykernel_43/2138327653.py in <module>
1 for _ in range(1000):
----> 2 theta = update(theta, x_train, y_train)
3
4 plt.scatter(x_train, y_train)
5 plt.plot(x_train, model(theta, x_train), 'r')
/opt/conda/lib/python3.7/site-packages/jax/_src/api.py in _nan_check_posthook(fun, args, kwargs, output)
127 print("Invalid nan value encountered in the output of a C++-jit "
128 "function. Calling the de-optimized version.")
--> 129 fun._cache_miss(*args, **kwargs)[0] # probably won't return
130
131 def _update_debug_special_global(_):
[... skipping hidden 8 frame]
/tmp/ipykernel_43/1444374627.py in update(theta, x, y, lr)
7 updates the parameters based on gradient descent
8 '''
----> 9 return theta - lr * jax.grad(loss_fn)(theta, x, y)
[... skipping hidden 39 frame]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py in _check_special(name, xla_shape, buf)
414 if dtypes.issubdtype(xla_shape.element_type(), np.inexact):
415 if config.jax_debug_nans and np.any(np.isnan(buf.to_py())):
--> 416 raise FloatingPointError(f"invalid value (nan) encountered in {name}")
417 if config.jax_debug_infs and np.any(np.isinf(buf.to_py())):
418 raise FloatingPointError(f"invalid value (inf) encountered in {name}")
FloatingPointError: invalid value (nan) encountered in reduce_sum"><pre class="notranslate">Invalid nan value encountered <span class="pl-k">in</span> the output of a C++-jit function. Calling the de-optimized version.
Invalid value encountered <span class="pl-k">in</span> the output of a jit function. Calling the de-optimized version.
Invalid value encountered <span class="pl-k">in</span> the output of a jit function. Calling the de-optimized version.
Invalid value encountered <span class="pl-k">in</span> the output of a jit function. Calling the de-optimized version.
Invalid value encountered <span class="pl-k">in</span> the output of a jit function. Calling the de-optimized version.
---------------------------------------------------------------------------
FloatingPointError Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/jax/_src/api.py <span class="pl-k">in</span> _nan_check_posthook(fun, args, kwargs, output)
120 da.device_buffer
--<span class="pl-k">></span> 121 <span class="pl-k">for</span> <span class="pl-smi">da</span> <span class="pl-k">in</span> tree_leaves(output)
122 <span class="pl-k">if</span> hasattr(da, <span class="pl-s"><span class="pl-pds">"</span>device_buffer<span class="pl-pds">"</span></span>)
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> check_special(name, bufs)
409 <span class="pl-k">for</span> <span class="pl-smi">buf</span> <span class="pl-k">in</span> bufs:
--<span class="pl-k">></span> 410 _check_special(name, <span class="pl-en">buf.xla_shape</span>(), buf)
411
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> _check_special(name, xla_shape, buf)
415 <span class="pl-k">if</span> config.jax_debug_nans and <span class="pl-en">np.any(np.isnan(buf.to_py</span>())):
--<span class="pl-k">></span> 416 raise FloatingPointError(f<span class="pl-s"><span class="pl-pds">"</span>invalid value (nan) encountered in {name}<span class="pl-pds">"</span></span>)
417 <span class="pl-k">if</span> config.jax_debug_infs and <span class="pl-en">np.any(np.isinf(buf.to_py</span>())):
FloatingPointError: invalid value (nan) encountered <span class="pl-k">in</span> xla_call
During handling of the above exception, another exception occurred:
FloatingPointError Traceback (most recent call last)
[... skipping hidden 1 frame]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> _execute_compiled(compiled, avals, handlers, kept_var_idx, <span class="pl-k">*</span>args)
912 out_bufs = compiled.execute(input_bufs)
--<span class="pl-k">></span> 913 check_special(xla_call_p.name, out_bufs)
914 <span class="pl-k">return</span> [handler(<span class="pl-k">*</span>bs) <span class="pl-k">for</span> <span class="pl-smi">handler, bs</span> <span class="pl-k">in</span> zip(handlers, _partition_outputs(avals, out_bufs))]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> check_special(name, bufs)
409 <span class="pl-k">for</span> <span class="pl-smi">buf</span> <span class="pl-k">in</span> bufs:
--<span class="pl-k">></span> 410 _check_special(name, <span class="pl-en">buf.xla_shape</span>(), buf)
411
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> _check_special(name, xla_shape, buf)
415 <span class="pl-k">if</span> config.jax_debug_nans and <span class="pl-en">np.any(np.isnan(buf.to_py</span>())):
--<span class="pl-k">></span> 416 raise FloatingPointError(f<span class="pl-s"><span class="pl-pds">"</span>invalid value (nan) encountered in {name}<span class="pl-pds">"</span></span>)
417 <span class="pl-k">if</span> config.jax_debug_infs and <span class="pl-en">np.any(np.isinf(buf.to_py</span>())):
FloatingPointError: invalid value (nan) encountered <span class="pl-k">in</span> xla_call
During handling of the above exception, another exception occurred:
FloatingPointError Traceback (most recent call last)
[... skipping hidden 1 frame]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> _execute_compiled(compiled, avals, handlers, kept_var_idx, <span class="pl-k">*</span>args)
912 out_bufs = compiled.execute(input_bufs)
--<span class="pl-k">></span> 913 check_special(xla_call_p.name, out_bufs)
914 <span class="pl-k">return</span> [handler(<span class="pl-k">*</span>bs) <span class="pl-k">for</span> <span class="pl-smi">handler, bs</span> <span class="pl-k">in</span> zip(handlers, _partition_outputs(avals, out_bufs))]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> check_special(name, bufs)
409 <span class="pl-k">for</span> <span class="pl-smi">buf</span> <span class="pl-k">in</span> bufs:
--<span class="pl-k">></span> 410 _check_special(name, <span class="pl-en">buf.xla_shape</span>(), buf)
411
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> _check_special(name, xla_shape, buf)
415 <span class="pl-k">if</span> config.jax_debug_nans and <span class="pl-en">np.any(np.isnan(buf.to_py</span>())):
--<span class="pl-k">></span> 416 raise FloatingPointError(f<span class="pl-s"><span class="pl-pds">"</span>invalid value (nan) encountered in {name}<span class="pl-pds">"</span></span>)
417 <span class="pl-k">if</span> config.jax_debug_infs and <span class="pl-en">np.any(np.isinf(buf.to_py</span>())):
FloatingPointError: invalid value (nan) encountered <span class="pl-k">in</span> xla_call
During handling of the above exception, another exception occurred:
FloatingPointError Traceback (most recent call last)
[... skipping hidden 1 frame]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> _execute_compiled(compiled, avals, handlers, kept_var_idx, <span class="pl-k">*</span>args)
912 out_bufs = compiled.execute(input_bufs)
--<span class="pl-k">></span> 913 check_special(xla_call_p.name, out_bufs)
914 <span class="pl-k">return</span> [handler(<span class="pl-k">*</span>bs) <span class="pl-k">for</span> <span class="pl-smi">handler, bs</span> <span class="pl-k">in</span> zip(handlers, _partition_outputs(avals, out_bufs))]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> check_special(name, bufs)
409 <span class="pl-k">for</span> <span class="pl-smi">buf</span> <span class="pl-k">in</span> bufs:
--<span class="pl-k">></span> 410 _check_special(name, <span class="pl-en">buf.xla_shape</span>(), buf)
411
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> _check_special(name, xla_shape, buf)
415 <span class="pl-k">if</span> config.jax_debug_nans and <span class="pl-en">np.any(np.isnan(buf.to_py</span>())):
--<span class="pl-k">></span> 416 raise FloatingPointError(f<span class="pl-s"><span class="pl-pds">"</span>invalid value (nan) encountered in {name}<span class="pl-pds">"</span></span>)
417 <span class="pl-k">if</span> config.jax_debug_infs and <span class="pl-en">np.any(np.isinf(buf.to_py</span>())):
FloatingPointError: invalid value (nan) encountered <span class="pl-k">in</span> xla_call
During handling of the above exception, another exception occurred:
FloatingPointError Traceback (most recent call last)
[... skipping hidden 1 frame]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> _execute_compiled(compiled, avals, handlers, kept_var_idx, <span class="pl-k">*</span>args)
912 out_bufs = compiled.execute(input_bufs)
--<span class="pl-k">></span> 913 check_special(xla_call_p.name, out_bufs)
914 <span class="pl-k">return</span> [handler(<span class="pl-k">*</span>bs) <span class="pl-k">for</span> <span class="pl-smi">handler, bs</span> <span class="pl-k">in</span> zip(handlers, _partition_outputs(avals, out_bufs))]
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> check_special(name, bufs)
409 <span class="pl-k">for</span> <span class="pl-smi">buf</span> <span class="pl-k">in</span> bufs:
--<span class="pl-k">></span> 410 _check_special(name, <span class="pl-en">buf.xla_shape</span>(), buf)
411
/opt/conda/lib/python3.7/site-packages/jax/interpreters/xla.py <span class="pl-k">in</span> _check_special(name, xla_shape, buf)
415 <span class="pl-k">if</span> config.jax_debug_nans and <span class="pl-en">np.any(np.isnan(buf.to_py</span>())):
--<span class="pl-k">></span> 416 raise FloatingPointError(f<span class="pl-s"><span class="pl-pds">"</span>invalid value (nan) encountered in {name}<span class="pl-pds">"</span></span>)
417 <span class="pl-k">if</span> config.jax_debug_infs and <span class="pl-en">np.any(np.isinf(buf.to_py</span>())):
FloatingPointError: invalid value (nan) encountered <span class="pl-k">in</span> xla_call
During handling of the above exception, another exception occurred:
JaxStackTraceBeforeTransformation Traceback (most recent call last)
/opt/conda/lib/python3.7/runpy.py <span class="pl-k">in</span> _run_module_as_main(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
192 <span class="pl-k">return</span> _run_code(code, main_globals, None,
--<span class="pl-k">></span> 193 <span class="pl-s"><span class="pl-pds">"</span>__main__<span class="pl-pds">"</span></span>, mod_spec)
194
/opt/conda/lib/python3.7/runpy.py <span class="pl-k">in</span> _run_code(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
84 __spec__ = mod_spec)
---<span class="pl-k">></span> 85 exec(code, run_globals)
86 <span class="pl-k">return</span> run_globals
/opt/conda/lib/python3.7/site-packages/ipykernel_launcher.py <span class="pl-k">in</span> <span class="pl-k"><</span>module<span class="pl-k">></span>
15 from ipykernel import kernelapp as app
---<span class="pl-k">></span> 16 <span class="pl-en">app.launch_new_instance</span>()
/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py <span class="pl-k">in</span> launch_instance(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
844 app.initialize(argv)
--<span class="pl-k">></span> 845 <span class="pl-en">app.start</span>()
846
/opt/conda/lib/python3.7/site-packages/ipykernel/kernelapp.py <span class="pl-k">in</span> start(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
666 try:
--<span class="pl-k">></span> 667 <span class="pl-en">self.io_loop.start</span>()
668 except KeyboardInterrupt:
/opt/conda/lib/python3.7/site-packages/tornado/platform/asyncio.py <span class="pl-k">in</span> start(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
198 asyncio.set_event_loop(self.asyncio_loop)
--<span class="pl-k">></span> 199 <span class="pl-en">self.asyncio_loop.run_forever</span>()
200 finally:
/opt/conda/lib/python3.7/asyncio/base_events.py <span class="pl-k">in</span> run_forever(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
540 <span class="pl-k">while</span> True:
--<span class="pl-k">></span> 541 <span class="pl-en">self._run_once</span>()
542 <span class="pl-k">if</span> self._stopping:
/opt/conda/lib/python3.7/asyncio/base_events.py <span class="pl-k">in</span> _run_once(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
1785 else:
-<span class="pl-k">></span> 1786 <span class="pl-en">handle._run</span>()
1787 handle = None <span class="pl-c"><span class="pl-c">#</span> Needed to break cycles when an exception occurs.</span>
/opt/conda/lib/python3.7/asyncio/events.py <span class="pl-k">in</span> _run(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
87 try:
---<span class="pl-k">></span> 88 self._context.run(self._callback, <span class="pl-k">*</span>self._args)
89 except Exception as exc:
/opt/conda/lib/python3.7/site-packages/ipykernel/kernelbase.py <span class="pl-k">in</span> dispatch_queue(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
456 try:
--<span class="pl-k">></span> 457 await <span class="pl-en">self.process_one</span>()
458 except Exception:
/opt/conda/lib/python3.7/site-packages/ipykernel/kernelbase.py <span class="pl-k">in</span> process_one(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
445 <span class="pl-k">return</span> None
--<span class="pl-k">></span> 446 await dispatch(<span class="pl-k">*</span>args)
447
/opt/conda/lib/python3.7/site-packages/ipykernel/kernelbase.py <span class="pl-k">in</span> dispatch_shell(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
352 <span class="pl-k">if</span> inspect.isawaitable(result):
--<span class="pl-k">></span> 353 await result
354 except Exception:
/opt/conda/lib/python3.7/site-packages/ipykernel/kernelbase.py <span class="pl-k">in</span> execute_request(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
647 <span class="pl-k">if</span> inspect.isawaitable(reply_content):
--<span class="pl-k">></span> 648 reply_content = await reply_content
649
/opt/conda/lib/python3.7/site-packages/ipykernel/ipkernel.py <span class="pl-k">in</span> do_execute(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
344 <span class="pl-c"><span class="pl-c">#</span> letting shell dispatch to loop runners</span>
--<span class="pl-k">></span> 345 res = shell.run_cell(code, store_history=store_history, silent=silent)
346 finally:
/opt/conda/lib/python3.7/site-packages/ipykernel/zmqshell.py <span class="pl-k">in</span> run_cell(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
531 self._last_traceback = None
--<span class="pl-k">></span> 532 <span class="pl-k">return</span> super(ZMQInteractiveShell, self).run_cell(<span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
533
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py <span class="pl-k">in</span> run_cell(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
2898 result = self._run_cell(
-<span class="pl-k">></span> 2899 raw_cell, store_history, silent, shell_futures)
2900 finally:
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py <span class="pl-k">in</span> _run_cell(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
2943 try:
-<span class="pl-k">></span> 2944 <span class="pl-k">return</span> runner(coro)
2945 except BaseException as e:
/opt/conda/lib/python3.7/site-packages/IPython/core/async_helpers.py <span class="pl-k">in</span> _pseudo_sync_runner(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
67 try:
---<span class="pl-k">></span> 68 coro.send(None)
69 except StopIteration as exc:
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py <span class="pl-k">in</span> run_cell_async(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
3169 has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
-<span class="pl-k">></span> 3170 interactivity=interactivity, compiler=compiler, result=result)
3171
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py <span class="pl-k">in</span> run_ast_nodes(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
3360 asy = compare(code)
-<span class="pl-k">></span> 3361 <span class="pl-k">if</span> (await self.run_code(code, result, async_=asy)):
3362 <span class="pl-k">return</span> True
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py <span class="pl-k">in</span> run_code(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
3440 else:
-<span class="pl-k">></span> 3441 exec(code_obj, self.user_global_ns, self.user_ns)
3442 finally:
/tmp/ipykernel_43/2138327653.py <span class="pl-k">in</span> <span class="pl-k"><</span>module<span class="pl-k">></span>
1 <span class="pl-k">for</span> <span class="pl-smi">_</span> <span class="pl-k">in</span> range(1000):
----<span class="pl-k">></span> 2 theta = update(theta, x_train, y_train)
3
/tmp/ipykernel_43/1444374627.py <span class="pl-k">in</span> update(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)
8 <span class="pl-s"><span class="pl-pds">'</span><span class="pl-pds">'</span><span class="pl-pds">'</span></span>
<span class="pl-s">----> 9 return theta - lr * jax.grad(loss_fn)(theta, x, y)</span>
<span class="pl-s"></span>
<span class="pl-s">/tmp/ipykernel_43/3487162561.py in loss_fn(***failed resolving arguments***)</span>
<span class="pl-s"> 7 <span class="pl-pds">'</span><span class="pl-pds">'</span><span class="pl-pds">'</span></span>
----<span class="pl-k">></span> 8 prediction = model(theta, x) <span class="pl-c"><span class="pl-c">#</span> y_hat</span>
9 <span class="pl-k">return</span> jnp.mean<span class="pl-s"><span class="pl-pds">((</span>prediction <span class="pl-k">-</span> y) <span class="pl-k">**</span> <span class="pl-c1">2</span>) # J</span>
<span class="pl-s"></span>
<span class="pl-s"><span class="pl-k">/</span>tmp<span class="pl-k">/</span>ipykernel_<span class="pl-c1">43</span><span class="pl-k">/</span><span class="pl-c1">3906416787</span>.py in model(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)</span>
<span class="pl-s"> <span class="pl-c1">3</span> w, b = theta</span>
<span class="pl-s"><span class="pl-k">----></span> <span class="pl-c1">4</span> return w <span class="pl-k">*</span> x <span class="pl-k">+</span> b</span>
<span class="pl-s"></span>
<span class="pl-s"><span class="pl-k">/</span>opt<span class="pl-k">/</span>conda<span class="pl-k">/</span>lib<span class="pl-k">/</span>python<span class="pl-c1">3</span>.<span class="pl-c1">7</span><span class="pl-k">/</span>site<span class="pl-k">-</span>packages<span class="pl-k">/</span>jax<span class="pl-k">/</span>_src<span class="pl-k">/</span>numpy<span class="pl-k">/</span>lax_numpy.py in deferring_binary_op(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)</span>
<span class="pl-s"> <span class="pl-c1">5923</span> return NotImplemented</span>
<span class="pl-s"><span class="pl-k">-></span> <span class="pl-c1">5924</span> return binary_op(self<span class="pl-k">,</span> other)</span>
<span class="pl-s"> <span class="pl-c1">5925</span> return deferring_binary_op</span>
<span class="pl-s"></span>
<span class="pl-s"><span class="pl-k">/</span>opt<span class="pl-k">/</span>conda<span class="pl-k">/</span>lib<span class="pl-k">/</span>python<span class="pl-c1">3</span>.<span class="pl-c1">7</span><span class="pl-k">/</span>site<span class="pl-k">-</span>packages<span class="pl-k">/</span>jax<span class="pl-k">/</span>_src<span class="pl-k">/</span>numpy<span class="pl-k">/</span>lax_numpy.py in fn(<span class="pl-k">***</span>failed resolving arguments<span class="pl-k">***</span>)</span>
<span class="pl-s"> <span class="pl-c1">435</span> x<span class="pl-c1">1</span>, x<span class="pl-c1">2</span> = _promote_args(numpy_fn.__name__, x<span class="pl-c1">1</span>, x<span class="pl-c1">2</span>)</span>
<span class="pl-s"><span class="pl-k">--></span> <span class="pl-c1">436</span> return lax_fn(x<span class="pl-c1">1</span><span class="pl-k">,</span> x<span class="pl-c1">2</span>) if x<span class="pl-c1">1</span>.dtype <span class="pl-k">!=</span> bool_ else bool_lax_fn(x<span class="pl-c1">1</span><span class="pl-k">,</span> x<span class="pl-c1">2</span>)</span>
<span class="pl-s"> <span class="pl-c1">437</span> fn = jit(fn, inline=True)</span>
<span class="pl-s"></span>
<span class="pl-s">JaxStackTraceBeforeTransformation: FloatingPointError: invalid value (nan) encountered in reduce_sum</span>
<span class="pl-s"></span>
<span class="pl-s">The preceding stack trace is the source of the JAX operation that, once transformed by JAX, triggered the following exception.</span>
<span class="pl-s"></span>
<span class="pl-s"><span class="pl-k">--------------------</span></span>
<span class="pl-s"></span>
<span class="pl-s">The above exception was the direct cause of the following exception:</span>
<span class="pl-s"></span>
<span class="pl-s">FloatingPointError Traceback (most recent call last)</span>
<span class="pl-s"><span class="pl-k">/</span>tmp<span class="pl-k">/</span>ipykernel_<span class="pl-c1">43</span><span class="pl-k">/</span><span class="pl-c1">2138327653</span>.py in <span class="pl-k"><</span>module<span class="pl-k">></span></span>
<span class="pl-s"> <span class="pl-c1">1</span> for _ in range(<span class="pl-c1">1000</span>):</span>
<span class="pl-s"><span class="pl-k">----></span> <span class="pl-c1">2</span> theta <span class="pl-k">=</span> update(theta<span class="pl-k">,</span> x_train<span class="pl-k">,</span> y_train)</span>
<span class="pl-s"> <span class="pl-c1">3</span> </span>
<span class="pl-s"> <span class="pl-c1">4</span> plt.scatter(x_train, y_train)</span>
<span class="pl-s"> <span class="pl-c1">5</span> plt.plot(x_train, model(theta, x_train), 'r')</span>
<span class="pl-s"></span>
<span class="pl-s"><span class="pl-k">/</span>opt<span class="pl-k">/</span>conda<span class="pl-k">/</span>lib<span class="pl-k">/</span>python<span class="pl-c1">3</span>.<span class="pl-c1">7</span><span class="pl-k">/</span>site<span class="pl-k">-</span>packages<span class="pl-k">/</span>jax<span class="pl-k">/</span>_src<span class="pl-k">/</span>api.py in _nan_check_posthook(fun<span class="pl-k">,</span> args<span class="pl-k">,</span> kwargs<span class="pl-k">,</span> output)</span>
<span class="pl-s"> <span class="pl-c1">127</span> print("Invalid nan value encountered in the output of a C++-jit "</span>
<span class="pl-s"> <span class="pl-c1">128</span> "function. Calling the de-optimized version.")</span>
<span class="pl-s"><span class="pl-k">--></span> <span class="pl-c1">129</span> fun._cache_miss(<span class="pl-k">*</span>args<span class="pl-k">,</span> <span class="pl-k">**</span>kwargs)[<span class="pl-c1">0</span>] # probably won't return</span>
<span class="pl-s"> <span class="pl-c1">130</span> </span>
<span class="pl-s"> <span class="pl-c1">131</span> def _update_debug_special_global(_):</span>
<span class="pl-s"></span>
<span class="pl-s"> [... skipping hidden <span class="pl-c1">8</span> frame]</span>
<span class="pl-s"></span>
<span class="pl-s"><span class="pl-k">/</span>tmp<span class="pl-k">/</span>ipykernel_<span class="pl-c1">43</span><span class="pl-k">/</span><span class="pl-c1">1444374627</span>.py in update(theta<span class="pl-k">,</span> x<span class="pl-k">,</span> y<span class="pl-k">,</span> lr)</span>
<span class="pl-s"> <span class="pl-c1">7</span> updates the parameters based on gradient descent</span>
<span class="pl-s"> <span class="pl-c1">8</span> '''</span>
<span class="pl-s"><span class="pl-k">----></span> <span class="pl-c1">9</span> return theta <span class="pl-k">-</span> lr <span class="pl-k">*</span> jax.grad(loss_fn)(theta<span class="pl-k">,</span> x<span class="pl-k">,</span> y)</span>
<span class="pl-s"></span>
<span class="pl-s"> [... skipping hidden <span class="pl-c1">39</span> frame]</span>
<span class="pl-s"></span>
<span class="pl-s"><span class="pl-k">/</span>opt<span class="pl-k">/</span>conda<span class="pl-k">/</span>lib<span class="pl-k">/</span>python<span class="pl-c1">3</span>.<span class="pl-c1">7</span><span class="pl-k">/</span>site<span class="pl-k">-</span>packages<span class="pl-k">/</span>jax<span class="pl-k">/</span>interpreters<span class="pl-k">/</span>xla.py in _check_special(name<span class="pl-k">,</span> xla_shape<span class="pl-k">,</span> buf)</span>
<span class="pl-s"> <span class="pl-c1">414</span> if dtypes.issubdtype(xla_shape.element_type(), np.inexact):</span>
<span class="pl-s"> <span class="pl-c1">415</span> if config.jax_debug_nans and np.any(np.isnan(buf.to_py(<span class="pl-pds">))</span></span>):
--<span class="pl-k">></span> 416 raise FloatingPointError(f<span class="pl-s"><span class="pl-pds">"</span>invalid value (nan) encountered in {name}<span class="pl-pds">"</span></span>)
417 <span class="pl-k">if</span> config.jax_debug_infs and <span class="pl-en">np.any(np.isinf(buf.to_py</span>())):
418 raise FloatingPointError(f<span class="pl-s"><span class="pl-pds">"</span>invalid value (inf) encountered in {name}<span class="pl-pds">"</span></span>)
FloatingPointError: invalid value (nan) encountered <span class="pl-k">in</span> reduce_sum</pre></div> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=sbrannen" rel="nofollow">Sam Brannen</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6050?redirect=false" rel="nofollow">SPR-6050</a></strong> and commented</p>
<p dir="auto">In the Spring TestContext Framework (i.e., specifically in AbstractGenericContextLoader), annotation-driven autowiring is automatically enabled. In other words, all ApplicationContexts created by subclasses of AbstractGenericContextLoader (e.g., GenericXmlContextLoader) are automatically configured to process annotations.</p>
<p dir="auto">If you explicitly wish that annotation processing not be enabled for the configuration files you specify -- for example, if some of the beans are annotated with <code class="notranslate">@Autowired</code>, etc. but you do not want those beans to be autowired -- you are at a loss: there is currently no way to disable this.</p>
<p dir="auto">As indirectly suggested in the forum, it would be nice if Spring provided a mechanism for disabling automatic annotation-driven autowiring in tests.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.6</p>
<p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?t=74298" rel="nofollow">http://forum.springsource.org/showthread.php?t=74298</a></p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398086790" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9309" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9309/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9309">#9309</a> Load dedicated child ApplicationContext for test instance in the TestContext framework</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398151000" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14113" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14113/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14113">#14113</a> Test instances should not be proxied in the TestContext framework</li>
</ul>
<p dir="auto">2 votes, 2 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=costin" rel="nofollow">Costin Leau</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4924?redirect=false" rel="nofollow">SPR-4924</a></strong> and commented</p>
<p dir="auto">Probably the error is caused by the usage of a WeakHashMap..</p>
<p dir="auto">Below is the stacktrace:</p>
<p dir="auto">java.lang.NullPointerException<br>
at org.springframework.core.enums.AbstractCachingLabeledEnumResolver.get<br>
LabeledEnumByLabel(AbstractCachingLabeledEnumResolver.java:105)<br>
at org.springframework.osgi.config.AbstractReferenceDefinitionParser.pro<br>
cessCardinalityString(AbstractReferenceDefinitionParser.java:300)<br>
at org.springframework.osgi.config.AbstractReferenceDefinitionParser.det<br>
ermineCardinality(AbstractReferenceDefinitionParser.java:288)<br>
at org.springframework.osgi.config.AbstractReferenceDefinitionParser.app<br>
lyDefaultCardinality(AbstractReferenceDefinitionParser.java:311)<br>
at org.springframework.osgi.config.AbstractReferenceDefinitionParser.doP<br>
arse(AbstractReferenceDefinitionParser.java:223)<br>
at org.springframework.osgi.config.AbstractReferenceDefinitionParser.par<br>
seInternal(AbstractReferenceDefinitionParser.java:181)<br>
at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.pa<br>
rse(AbstractBeanDefinitionParser.java:56)<br>
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(N<br>
amespaceHandlerSupport.java:69)</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.4</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398089172" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9598" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9598/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9598">#9598</a> NPE in AbstractCachingLabeledEnumResolver during namespace parsing (<em><strong>"duplicates"</strong></em>)</li>
</ul> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=sgoyal" rel="nofollow">sumit goyal</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7926?redirect=false" rel="nofollow">SPR-7926</a></strong> and commented</p>
<p dir="auto">Greetings, We have a spring app, which listens to messages from a weblogic JMS. we are using weblogic client library 10.0.1, and Spring 3.0.3-Release. We use transaction'ed JMS sessions.</p>
<p dir="auto">It could possibly be a dup of <a href="https://jira.springframework.org/browse/SPR-7366" rel="nofollow">https://jira.springframework.org/browse/SPR-7366</a></p>
<p dir="auto">Can someone pls have a look at the stack trace of JMS Listener threads and comment? Your help will be much appreciated.</p>
<p dir="auto">Also adding my spring configuration below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<bean id="messageListener"
class="org.springframework.jms.listener.adapter.MessageListenerAdapter">
<constructor-arg>
<bean class="com.eharmony.matching.mnssender.jms.DefaultDtoDelegate" />
</constructor-arg>
<property name="defaultListenerMethod" value="receive" />
<property name="messageConverter">
<bean class="com.eharmony.matching.mnssender.jms.Converter" />
</property>
</bean>
<bean id="jmsListenerContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="concurrentConsumers" value="${MNSClient.jms.concurrent.consumers}" />
<property name="connectionFactory" ref="jmsQueueConnectionFactory" />
<property name="destination" ref="queue" />
<property name="sessionTransacted" value="true" />
<property name="messageListener" ref="messageListener" />
</bean>
<bean id="jmsQueueConnectionFactory"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
<property name="targetConnectionFactory">
<ref bean="internalJmsQueueConnectionFactory" />
</property>
<property name="username">
<value>${MNSClient.receive.jms.user}</value>
</property>
<property name="password">
<value>${MNSClient.receive.jms.password}</value>
</property>
</bean>
<bean id="internalJmsQueueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="jndiTemplate" />
</property>
<property name="jndiName">
<value>${MNSClient.receive.jms.connectionFactoryName}</value>
</property>
</bean>
<!-- RECEIVING JMS MESSAGE -->
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">${MNSClient.receive.jms.initialFactoryName}</prop>
<prop key="java.naming.provider.url">${MNSClient.receive.jms.providerUrl}</prop>
</props>
</property>
</bean>
<bean id="queue" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="jndiTemplate" />
</property>
<property name="jndiName">
<value>${MNSClient.receive.jms.queueName}</value>
</property>
</bean>"><pre class="notranslate"><code class="notranslate"><bean id="messageListener"
class="org.springframework.jms.listener.adapter.MessageListenerAdapter">
<constructor-arg>
<bean class="com.eharmony.matching.mnssender.jms.DefaultDtoDelegate" />
</constructor-arg>
<property name="defaultListenerMethod" value="receive" />
<property name="messageConverter">
<bean class="com.eharmony.matching.mnssender.jms.Converter" />
</property>
</bean>
<bean id="jmsListenerContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="concurrentConsumers" value="${MNSClient.jms.concurrent.consumers}" />
<property name="connectionFactory" ref="jmsQueueConnectionFactory" />
<property name="destination" ref="queue" />
<property name="sessionTransacted" value="true" />
<property name="messageListener" ref="messageListener" />
</bean>
<bean id="jmsQueueConnectionFactory"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
<property name="targetConnectionFactory">
<ref bean="internalJmsQueueConnectionFactory" />
</property>
<property name="username">
<value>${MNSClient.receive.jms.user}</value>
</property>
<property name="password">
<value>${MNSClient.receive.jms.password}</value>
</property>
</bean>
<bean id="internalJmsQueueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="jndiTemplate" />
</property>
<property name="jndiName">
<value>${MNSClient.receive.jms.connectionFactoryName}</value>
</property>
</bean>
<!-- RECEIVING JMS MESSAGE -->
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">${MNSClient.receive.jms.initialFactoryName}</prop>
<prop key="java.naming.provider.url">${MNSClient.receive.jms.providerUrl}</prop>
</props>
</property>
</bean>
<bean id="queue" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="jndiTemplate" />
</property>
<property name="jndiName">
<value>${MNSClient.receive.jms.queueName}</value>
</property>
</bean>
</code></pre></div>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.3</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/17558/threadDump.txt" rel="nofollow">threadDump.txt</a> (<em>161.63 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398106175" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12024" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12024/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12024">#12024</a> DefaultMessageListenerContainer transacted session race condition if no messages for a while when using shared/cached sessions (<em><strong>"duplicates"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=gregthoen" rel="nofollow">Greg Thoenen</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7366?redirect=false" rel="nofollow">SPR-7366</a></strong> and commented</p>
<p dir="auto">When using a DefaultMessageListenerContainer with transacted sessions, such as that created by the following spring integration bean definition:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<jms:message-driven-channel-adapter id="inboundChannelAdapter"
destination-resolver="jmsDestinationResolver" destination-name="jms/myqueue"
connection-factory="jmsQueueConnectionFactory"
concurrent-consumers="4" max-concurrent-consumers="4" max-messages-per-task="1"
channel="importProcessChannel" acknowledge="transacted"
/>"><pre class="notranslate"><code class="notranslate"><jms:message-driven-channel-adapter id="inboundChannelAdapter"
destination-resolver="jmsDestinationResolver" destination-name="jms/myqueue"
connection-factory="jmsQueueConnectionFactory"
concurrent-consumers="4" max-concurrent-consumers="4" max-messages-per-task="1"
channel="importProcessChannel" acknowledge="transacted"
/>
</code></pre></div>
<p dir="auto">If you receive no messages on the queue for whatever you have your transaction timeout set for your QueueConnectionFactory (it's one hour by default in Weblogic 10.3), you will see messages like this in the logs (as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398078727" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8267" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8267/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8267">#8267</a> also seemed to be talking about):</p>
<p dir="auto">2010-07-01 15:49:21,304 INFO [tid=2242,tgn=Pooled Threads] [org.springframework.jms.listener.DefaultMessageListenerContainer.handleListenerSetupFailure():747] Setup of JMS message listener invoker failed for destination 'jms/myqueue' - trying to recover. Cause: Attempt to resume an inactive transaction: BEA1-000598DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000598DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)<br>
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:61)<br>
at weblogic.jms.client.JMSSession.receiveMessage(JMSSession.java:870)<br>
at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:644)<br>
at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:523)<br>
at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:405)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)<br>
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)<br>
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:881)<br>
at java.lang.Thread.run(Thread.java:619)<br>
Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000598DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.dispatcher.Request.handleThrowable(Request.java:87)<br>
at weblogic.jms.dispatcher.Request.getResult(Request.java:52)<br>
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:1124)<br>
at weblogic.messaging.dispatcher.DispatcherImpl.syncRequest(DispatcherImpl.java:184)<br>
at weblogic.messaging.dispatcher.DispatcherImpl.dispatchSyncNoTran(DispatcherImpl.java:287)<br>
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:59)<br>
... 10 more<br>
Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000598DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.frontend.FESession.transactedException(FESession.java:2062)<br>
at weblogic.jms.frontend.FESession.throwTransactedException(FESession.java:2077)<br>
at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2178)<br>
at weblogic.jms.frontend.FEConsumer.receive(FEConsumer.java:553)<br>
at weblogic.jms.frontend.FEConsumer.invoke(FEConsumer.java:805)<br>
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:961)<br>
... 13 more<br>
Caused by: javax.transaction.InvalidTransactionException: Attempt to resume an inactive transaction: BEA1-000598DE4AF4FDE2FECA<br>
at weblogic.transaction.internal.TransactionManagerImpl.resume(TransactionManagerImpl.java:360)<br>
at weblogic.transaction.internal.ServerTransactionManagerImpl.resume(ServerTransactionManagerImpl.java:376)<br>
at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2123)<br>
... 16 more<br>
2010-07-01 15:49:21,351 INFO [tid=2242,tgn=Pooled Threads] [org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful():791] Successfully refreshed JMS Connection<br>
2010-07-01 15:49:21,367 DEBUG [tid=2243,tgn=Pooled Threads] [springframework.jms.support.destination.JndiDestinationResolver.lookup():111] Located object with JNDI name [jms/myqueue]</p>
<p dir="auto">This will repeat every hour on the hour (or whatever you have your QueueConnectionFactory's transaction timeout set to) if you have no messages on the queue to receive for that hour, which is annoying, but not a big deal. The main problem is that if you happen to receive a message right before the transaction timeout would occur - say, at 59 minutes and 50 seconds - and it takes more than 10 seconds to process the message, the JMS transaction will timeout so the message gets redelivered to another consumer while the first consumer still successfully processes it -- and because XA transactions are not being used, the db work from the first delivery commits before it tries to commit the JMS session [which throws an exception], and the 2nd delivery also succeeds so that you end up successfully processing the message twice. Here's some output demonstrating this, where, for ease of reproducing, I set my QueueConnectionFactory transaction timeout to 5 minutes then purposely put a message on the queue a few seconds before I expected to have an "inactive transaction" message like above. The receiver of the message is just sleeping for a random time b/w 2 and 3 minutes (so, it should be within the transaction timeout of 5 minutes, but the problem is that it gets picked up a few minutes into the transaction [i.e. since the last session commit/rollback]. Note that the "tid=" part in the log lines is the thread id, for help in showing what thread is doing what.</p>
<p dir="auto">2010-07-01 15:53:33,839 DEBUG [tid=3719,tgn=Pooled Threads] [org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute():311] Received message of type [class weblogic.jms.common.ObjectMessageImpl] from consumer [weblogic.jms.client.WLConsumerImpl@23fea4a] of session [weblogic.jms.client.WLSessionImpl@23fe6da]<br>
2010-07-01 15:53:34,198 INFO [tid=3719,tgn=Pooled Threads] [mycompany.Test.receiveFromQueue():132] message received from queue: testmessage1<br>
2010-07-01 15:53:34,198 INFO [tid=3719,tgn=Pooled Threads] [mycompany.Test.receiveFromQueue():137] sleeping<br>
2010-07-01 15:54:32,074 INFO [tid=3798,tgn=Pooled Threads] [org.springframework.jms.listener.DefaultMessageListenerContainer.handleListenerSetupFailure():747] Setup of JMS message listener invoker failed for destination 'jms/myqueue' - trying to recover. Cause: Attempt to resume an inactive transaction: BEA1-000B98DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000B98DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)<br>
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:61)<br>
at weblogic.jms.client.JMSSession.receiveMessage(JMSSession.java:870)<br>
at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:644)<br>
at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:523)<br>
at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:405)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)<br>
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)<br>
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:881)<br>
at java.lang.Thread.run(Thread.java:619)<br>
Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000B98DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.dispatcher.Request.handleThrowable(Request.java:87)<br>
at weblogic.jms.dispatcher.Request.getResult(Request.java:52)<br>
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:1124)<br>
at weblogic.messaging.dispatcher.DispatcherImpl.syncRequest(DispatcherImpl.java:184)<br>
at weblogic.messaging.dispatcher.DispatcherImpl.dispatchSyncNoTran(DispatcherImpl.java:287)<br>
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:59)<br>
... 10 more<br>
Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000B98DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.frontend.FESession.transactedException(FESession.java:2062)<br>
at weblogic.jms.frontend.FESession.throwTransactedException(FESession.java:2077)<br>
at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2178)<br>
at weblogic.jms.frontend.FEConsumer.receive(FEConsumer.java:553)<br>
at weblogic.jms.frontend.FEConsumer.invoke(FEConsumer.java:805)<br>
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:961)<br>
... 13 more<br>
Caused by: javax.transaction.InvalidTransactionException: Attempt to resume an inactive transaction: BEA1-000B98DE4AF4FDE2FECA<br>
at weblogic.transaction.internal.TransactionManagerImpl.resume(TransactionManagerImpl.java:360)<br>
at weblogic.transaction.internal.ServerTransactionManagerImpl.resume(ServerTransactionManagerImpl.java:376)<br>
at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2123)<br>
... 16 more<br>
2010-07-01 15:54:32,074 INFO [tid=3798,tgn=Pooled Threads] [org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful():791] Successfully refreshed JMS Connection<br>
2010-07-01 15:54:32,074 DEBUG [tid=3804,tgn=Pooled Threads] [springframework.jms.support.destination.JndiDestinationResolver.lookup():111] Located object with JNDI name [jms/myqueue]<br>
2010-07-01 15:54:47,855 DEBUG [tid=3802,tgn=Pooled Threads] [org.springframework.jms.listener.DefaultMessageListenerContainer.handleListenerSetupFailure():739] Setup of JMS message listener invoker failed - already recovered by other invoker<br>
weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000898DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)<br>
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:61)<br>
at weblogic.jms.client.JMSSession.receiveMessage(JMSSession.java:870)<br>
at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:644)<br>
at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:523)<br>
at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:405)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)<br>
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)<br>
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:881)<br>
at java.lang.Thread.run(Thread.java:619)<br>
Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000898DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.dispatcher.Request.handleThrowable(Request.java:87)<br>
at weblogic.jms.dispatcher.Request.getResult(Request.java:52)<br>
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:1124)<br>
at weblogic.messaging.dispatcher.DispatcherImpl.syncRequest(DispatcherImpl.java:184)<br>
at weblogic.messaging.dispatcher.DispatcherImpl.dispatchSyncNoTran(DispatcherImpl.java:287)<br>
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:59)<br>
... 10 more<br>
Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000898DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.frontend.FESession.transactedException(FESession.java:2062)<br>
at weblogic.jms.frontend.FESession.throwTransactedException(FESession.java:2077)<br>
at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2178)<br>
at weblogic.jms.frontend.FEConsumer.receive(FEConsumer.java:553)<br>
at weblogic.jms.frontend.FEConsumer.invoke(FEConsumer.java:805)<br>
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:961)<br>
... 13 more<br>
Caused by: javax.transaction.InvalidTransactionException: Attempt to resume an inactive transaction: BEA1-000898DE4AF4FDE2FECA<br>
at weblogic.transaction.internal.TransactionManagerImpl.resume(TransactionManagerImpl.java:360)<br>
at weblogic.transaction.internal.ServerTransactionManagerImpl.resume(ServerTransactionManagerImpl.java:376)<br>
at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2123)<br>
... 16 more<br>
2010-07-01 15:54:47,871 DEBUG [tid=3805,tgn=Pooled Threads] [springframework.jms.support.destination.JndiDestinationResolver.lookup():111] Located object with JNDI name [jms/myqueue]<br>
2010-07-01 15:54:47,887 DEBUG [tid=3806,tgn=Pooled Threads] [springframework.jms.support.destination.JndiDestinationResolver.lookup():111] Located object with JNDI name [jms/myqueue]<br>
2010-07-01 15:54:47,949 DEBUG [tid=3806,tgn=Pooled Threads] [org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute():311] Received message of type [class weblogic.jms.common.ObjectMessageImpl] from consumer [weblogic.jms.client.WLConsumerImpl@38bae4a] of session [weblogic.jms.client.WLSessionImpl@370ffce]<br>
2010-07-01 15:54:47,965 INFO [tid=3806,tgn=Pooled Threads] [mycompany.Test.receiveFromQueue():132] message received from queue: testmessage1<br>
2010-07-01 15:54:47,965 INFO [tid=3806,tgn=Pooled Threads] [mycompany.Test.receiveFromQueue():137] sleeping<br>
2010-07-01 15:56:52,529 INFO [tid=3719,tgn=Pooled Threads] [mycompany.Test.receiveFromQueue():161] Done processing testmessage1<br>
2010-07-01 15:57:16,763 INFO [tid=3806,tgn=Pooled Threads] [mycompany.Test.receiveFromQueue():161] Done processing testmessage1<br>
2010-07-01 15:57:24,139 WARN [tid=3719,tgn=Pooled Threads] [org.springframework.jms.listener.DefaultMessageListenerContainer.handleListenerException():646] Execution of JMS message listener failed<br>
weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000998DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)<br>
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:61)<br>
at weblogic.jms.client.JMSSession.commit(JMSSession.java:1200)<br>
at weblogic.jms.client.JMSSession.commit(JMSSession.java:1174)<br>
at weblogic.jms.client.WLSessionImpl.commit(WLSessionImpl.java:108)<br>
at org.springframework.jms.support.JmsUtils.commitIfNecessary(JmsUtils.java:217)<br>
at org.springframework.jms.listener.AbstractMessageListenerContainer.commitIfNecessary(AbstractMessageListenerContainer.java:558)<br>
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:465)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)<br>
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)<br>
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:881)<br>
at java.lang.Thread.run(Thread.java:619)<br>
Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000998DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.dispatcher.Request.handleThrowable(Request.java:87)<br>
at weblogic.jms.dispatcher.Request.getResult(Request.java:52)<br>
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:1124)<br>
at weblogic.messaging.dispatcher.DispatcherImpl.syncRequest(DispatcherImpl.java:184)<br>
at weblogic.messaging.dispatcher.DispatcherImpl.dispatchSyncNoTran(DispatcherImpl.java:287)<br>
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:59)<br>
... 11 more<br>
Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000998DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.frontend.FESession.transactedException(FESession.java:2062)<br>
at weblogic.jms.frontend.FESession.throwTransactedException(FESession.java:2077)<br>
at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2178)<br>
at weblogic.jms.frontend.FESession.acknowledge(FESession.java:1846)<br>
at weblogic.jms.frontend.FESession.invoke(FESession.java:2923)<br>
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:961)<br>
... 14 more<br>
Caused by: javax.transaction.InvalidTransactionException: Attempt to resume an inactive transaction: BEA1-000998DE4AF4FDE2FECA<br>
at weblogic.transaction.internal.TransactionManagerImpl.resume(TransactionManagerImpl.java:360)<br>
at weblogic.transaction.internal.ServerTransactionManagerImpl.resume(ServerTransactionManagerImpl.java:376)<br>
at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2123)<br>
... 17 more<br>
2010-07-01 15:57:24,139 DEBUG [tid=3719,tgn=Pooled Threads] [org.springframework.jms.listener.DefaultMessageListenerContainer.handleListenerSetupFailure():739] Setup of JMS message listener invoker failed - already recovered by other invoker<br>
weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000998DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)<br>
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:61)<br>
at weblogic.jms.client.JMSSession.commit(JMSSession.java:1200)<br>
at weblogic.jms.client.JMSSession.commit(JMSSession.java:1174)<br>
at weblogic.jms.client.WLSessionImpl.commit(WLSessionImpl.java:108)<br>
at org.springframework.jms.support.JmsUtils.commitIfNecessary(JmsUtils.java:217)<br>
at org.springframework.jms.listener.AbstractMessageListenerContainer.commitIfNecessary(AbstractMessageListenerContainer.java:558)<br>
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:465)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)<br>
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)<br>
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)<br>
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:881)<br>
at java.lang.Thread.run(Thread.java:619)<br>
Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000998DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.dispatcher.Request.handleThrowable(Request.java:87)<br>
at weblogic.jms.dispatcher.Request.getResult(Request.java:52)<br>
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:1124)<br>
at weblogic.messaging.dispatcher.DispatcherImpl.syncRequest(DispatcherImpl.java:184)<br>
at weblogic.messaging.dispatcher.DispatcherImpl.dispatchSyncNoTran(DispatcherImpl.java:287)<br>
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:59)<br>
... 11 more<br>
Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-000998DE4AF4FDE2FECA:error resuming transacted session's internal transaction<br>
at weblogic.jms.frontend.FESession.transactedException(FESession.java:2062)<br>
at weblogic.jms.frontend.FESession.throwTransactedException(FESession.java:2077)<br>
at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2178)<br>
at weblogic.jms.frontend.FESession.acknowledge(FESession.java:1846)<br>
at weblogic.jms.frontend.FESession.invoke(FESession.java:2923)<br>
at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:961)<br>
... 14 more<br>
Caused by: javax.transaction.InvalidTransactionException: Attempt to resume an inactive transaction: BEA1-000998DE4AF4FDE2FECA<br>
at weblogic.transaction.internal.TransactionManagerImpl.resume(TransactionManagerImpl.java:360)<br>
at weblogic.transaction.internal.ServerTransactionManagerImpl.resume(ServerTransactionManagerImpl.java:376)<br>
at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2123)<br>
... 17 more<br>
2010-07-01 15:57:24,154 DEBUG [tid=3937,tgn=Pooled Threads] [springframework.jms.support.destination.JndiDestinationResolver.lookup():111] Located object with JNDI name [jms/myqueue]</p>
<p dir="auto">I know that's a lot of detail, but the general idea is that thread id 3719 picked up the message and then slept. About a minute into its sleep, the JMS transactions have timed out and another thread (thread id 3806) creates a new JMS session and picks up the same message. Eventually, both threads get done sleeping and have successfully processed the message and committed to the db. Thread id 3719 then prints out the exception when it tries to then commit the JMS session b/c its transaction timed out.</p>
<p dir="auto">It appears the root of the problem is the use of the cached JMS session and the lack of periodic commit/rollback on it if no messages are received. According to the JMS spec, the transaction of a JMS session is started when you create the session, commit it, or roll it back. The problem is that if no messages are received, Spring JMS is never calling commit or rollback on the shared/cached session (it only does so after a message is processed, in AbstractMessageListenerContainer.doExecuteListener()). So, if you process a message, then commit/rollback the session, then keep polling to receive messages and keep receiving none, you are using up time in that transaction. When you do eventually get a message in the receive(), if you're close to being an hour [or whatever your timeout is set to] from when you last received a message with that session, you have very little time to process the message before you will timeout the transaction. Since XA is not being used, Spring is doing the logical thing of letting your work [and presumably your db transaction commit] before calling commit on the JMS session. So this consumer will think everything's fine and commit its work, only to find out afterwards that it timed out and someone else did the work too, even though it took well under the transaction timeout to complete its work.</p>
<p dir="auto">There seem to be a number of ways to fix this. It seems like calling commit or rollback on the shared/cached Session before using its consumer to receive a new message (perhaps in DefaultMessageListenerContainer.invokeListener()) is one way of fixing it, but I'm not sure what other side effects something like this may have (for instance, will calling rollback() on the session cause any client-side cached JMS messages to be returned to the JMS server so that message "pipelining" [as Weblogic calls it] can not be used).</p>
<p dir="auto">Hopefully this makes sense.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.6</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398109911" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12581" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12581/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12581">#12581</a> Spring Application getting into hung state while refreshing transacted JMS connection (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398106931" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12136" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12136/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12136">#12136</a> Setup of JMS message listener invoker failed for destination when upgrading from 3.0.2 to 3.0.4</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398107512" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12215" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12215/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12215">#12215</a> JMS integration with Tibco causes deadlock due to commitIfNecessary in AbstractPollingMessageListenerContainer</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/b456bc107b39ed52efb29fd6540033e9442be1f4/hovercard" href="https://github.com/spring-projects/spring-framework/commit/b456bc107b39ed52efb29fd6540033e9442be1f4"><tt>b456bc1</tt></a></p> | 1 |
<h1 dir="auto">Bug report</h1>
<p dir="auto">The intention is to import a CSS file from third party library that resides in a folder within node_modes. This CSS chunk is not bundled on initial page load (which is fine , I assume, because the client hasn't navigated to the page where the import happens - yet).<br>
But as soon as one tries to navigate to the page that has the import statement (via client-side routing), nothing seems to happen.</p>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>Next.js 7</li>
<li>Development mode</li>
<li>withCSS plugin registered via</li>
</ul>
<blockquote>
<p dir="auto">const withCSS = require('@zeit/next-css')<br>
module.exports = withCSS({/* my next config */})</p>
</blockquote>
<h2 dir="auto">Bug description</h2>
<p dir="auto">My intention is to lazy load CSS file from third party library that resides in a folder within node_modes.</p>
<p dir="auto">This is what I've done in /pages/pageThatUsesCssFromLibrary.js (see linked demo project below)</p>
<blockquote>
<p dir="auto">import 'rc-slider/dist/rc-slider.min.css';</p>
</blockquote>
<p dir="auto">That works fine when using server rendering, i.e. write <a href="http://localhost:3000/pageThatUsesCssFromLibrary" rel="nofollow">http://localhost:3000/pageThatUsesCssFromLibrary</a> into the browser's address bar and hit enter.</p>
<p dir="auto">However, it does not work if I'm navigating to that page through client-side navigation, i.e. navigate to <a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a> and clicking a Link that navigates to the page:</p>
Go to page
<p dir="auto">Clicking to the link does not appear to do anything (not even displaying an error message).</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto"><em>Working example</em></p>
<ol dir="auto">
<li>Build the linked demo project</li>
<li>Write <a href="http://localhost:3000/pageThatUsesCssFromLibrary" rel="nofollow">http://localhost:3000/pageThatUsesCssFromLibrary</a> into the address bar, hit Enter and see how the site is displayed (and the CSS is imported properly) when the page is rendered on the <em>server side</em></li>
</ol>
<p dir="auto"><em>Example that exposes the reported bug</em></p>
<ol dir="auto">
<li>Build the linked demo project</li>
<li>Write <a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a> and hit Enter</li>
<li>Follow the hyperlink</li>
<li>See nothing happens</li>
</ol>
<h2 dir="auto">Expected behaviour</h2>
<p dir="auto">The application should navigate to <a href="https://localhost:3000/pageThatUsesCssFromLibrary" rel="nofollow">https://localhost:3000/pageThatUsesCssFromLibrary</a> and display its content properly.</p>
<h2 dir="auto">Demo project that exhibits the phenomenon</h2>
<p dir="auto"><a href="https://doc-0g-7g-docs.googleusercontent.com/docs/securesc/t750r1ahgujh0pleo2f0qsr0gp3k3l5i/rbhhabhaoqpbmv50f5i2makv510bkai5/1537912800000/04958186454906229977/04958186454906229977/1ukNGvIzCwLXg-Gp_3sBdtHPVwZxiUMqq?e=download" rel="nofollow">Download demo project from Google Drive</a></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Mac OSX</li>
<li>Browser Chrome</li>
<li>Version of Next.js: 7.0.0</li>
</ul> | <h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">Next 7 - Router.push() does`t work.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">I have a search handler that should redirect to '/search' page from main page. But nothing happens.<br>
routeChangeError throws Route cancelled. But on Next 6.1.2. everything works fine.<br>
Also if I go to the link <a href="http://localhost:8080/search" rel="nofollow">http://localhost:8080/search</a> directly it works as expected, seems like a problem with client side routing. Using HOC withRouter gives the same results.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="handleSearch = (event, { suggestionValue }) => {
if (suggestionValue.address_string === undefined) {
return;
}
const newQueryParams = {
// New search should always start from 1st page
page: 1,
// If search value is empty, it should send default search request
address: isString(suggestionValue.address_string) ? suggestionValue.address_string : '',
};
Router.events.on('routeChangeError', (err) => {
console.log(err)
})
if (Router.router.pathname === '/search') {
Router.push({ pathname: '/search', query: { ...Router.router.query, ...newQueryParams } })
} else {
Router.push({ pathname: '/search', query: newQueryParams })
}
};"><pre class="notranslate"><span class="pl-en">handleSearch</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> suggestionValue <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">suggestionValue</span><span class="pl-kos">.</span><span class="pl-c1">address_string</span> <span class="pl-c1">===</span> <span class="pl-c1">undefined</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-s1">newQueryParams</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c">// New search should always start from 1st page</span>
<span class="pl-c1">page</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
<span class="pl-c">// If search value is empty, it should send default search request</span>
<span class="pl-c1">address</span>: <span class="pl-en">isString</span><span class="pl-kos">(</span><span class="pl-s1">suggestionValue</span><span class="pl-kos">.</span><span class="pl-c1">address_string</span><span class="pl-kos">)</span> ? <span class="pl-s1">suggestionValue</span><span class="pl-kos">.</span><span class="pl-c1">address_string</span> : <span class="pl-s">''</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-v">Router</span><span class="pl-kos">.</span><span class="pl-c1">events</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'routeChangeError'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-v">Router</span><span class="pl-kos">.</span><span class="pl-c1">router</span><span class="pl-kos">.</span><span class="pl-c1">pathname</span> <span class="pl-c1">===</span> <span class="pl-s">'/search'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-v">Router</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">pathname</span>: <span class="pl-s">'/search'</span><span class="pl-kos">,</span> <span class="pl-c1">query</span>: <span class="pl-kos">{</span> ...<span class="pl-v">Router</span><span class="pl-kos">.</span><span class="pl-c1">router</span><span class="pl-kos">.</span><span class="pl-c1">query</span><span class="pl-kos">,</span> ...<span class="pl-s1">newQueryParams</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
<span class="pl-v">Router</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">pathname</span>: <span class="pl-s">'/search'</span><span class="pl-kos">,</span> <span class="pl-c1">query</span>: <span class="pl-s1">newQueryParams</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Expected to work the same as in Next 6.1.2</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Ubuntu 18.04</li>
<li>Version of Next.js: 7.0.0</li>
</ul> | 1 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">win_reboot</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0.0"><pre class="notranslate"><code class="notranslate">ansible 2.1.0.0
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">retry_files_enabled = False</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">The win_reboot action incorrectly assumes that the WinRM connection transport is being utilized to speak to the machine, however if someone is running a custom ansible transport, win_reboot assumes that the transport has properties such as <code class="notranslate">_winrm_host</code>, <code class="notranslate">_winrm_port</code>, and <code class="notranslate">_reset()</code>.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Use a custom transport to talk to a Windows machine and use the win_reboot function (sadly, our transport is not open sourced yet. Coming soon!).</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/ansible/ansible/blob/6787fc70a643fb6e2bdd2c6a6202072d21db72ef/lib/ansible/plugins/action/win_reboot.py#L79-L80">ansible/lib/ansible/plugins/action/win_reboot.py</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 79 to 80
in
<a data-pjax="true" class="commit-tease-sha" href="/ansible/ansible/commit/6787fc70a643fb6e2bdd2c6a6202072d21db72ef">6787fc7</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L79" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="79"></td>
<td id="LC79" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">winrm_host</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_connection</span>.<span class="pl-s1">_winrm_host</span> </td>
</tr>
<tr class="border-0">
<td id="L80" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="80"></td>
<td id="LC80" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">winrm_port</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_connection</span>.<span class="pl-s1">_winrm_port</span> </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/ansible/ansible/blob/6787fc70a643fb6e2bdd2c6a6202072d21db72ef/lib/ansible/plugins/action/win_reboot.py#L115">ansible/lib/ansible/plugins/action/win_reboot.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 115
in
<a data-pjax="true" class="commit-tease-sha" href="/ansible/ansible/commit/6787fc70a643fb6e2bdd2c6a6202072d21db72ef">6787fc7</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L115" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="115"></td>
<td id="LC115" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">self</span>.<span class="pl-s1">_connection</span>.<span class="pl-en">_reset</span>() </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">I would hope we can make it so that an action doesn't implicitly depend on WinRM being the transport.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">It does implicitly depend on WinRM being the transport. :-)</p> | <p dir="auto">Ansible hangs on docker_image building when the image already exists. The whole playground is at <a href="https://github.com/nolar/vagrant-ansible-docker-sample/tree/docker_image_broken">https://github.com/nolar/vagrant-ansible-docker-sample/tree/docker_image_broken</a> branch (pretty simple).</p>
<p dir="auto">Specifically, this task causes the problem (playbook.xml, line 97):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" - name: Build or re-build an image.
sudo: yes
#FIXME: Hangs on recv() somewhere inside docker-py (if the image exists?).
docker_image: name=mycont path=Docker.dir state=build
#shell: docker build -t mycont ~{{ansible_ssh_user}}/Docker.dir"><pre class="notranslate"><code class="notranslate"> - name: Build or re-build an image.
sudo: yes
#FIXME: Hangs on recv() somewhere inside docker-py (if the image exists?).
docker_image: name=mycont path=Docker.dir state=build
#shell: docker build -t mycont ~{{ansible_ssh_user}}/Docker.dir
</code></pre></div>
<p dir="auto">To reproduce:</p>
<ol dir="auto">
<li>vagrant up โ it works fine for the first time (provision implied).</li>
<li>vagrant provision โ hangs on this task.</li>
</ol>
<p dir="auto">If you log into, remove the image (mycont), then provision it again, it works for the first time, and hangs for the second time. This is why my assumption is it hangs when the image already exists.</p>
<ol dir="auto">
<li>vagrant ssh</li>
<li>docker kill timer_from_image && docker rm timer_from_image</li>
<li>docker rmi mycont</li>
<li>exit</li>
<li>vagrant provision โ first time is ok</li>
<li>vagrant provision โ second time it hangs or shows an "unknown error"</li>
</ol>
<p dir="auto">If launched by hand from inside, and then interrupted with Ctrl+C (after it hangs), the stackdump is a follows:</p>
<ol dir="auto">
<li>ANSIBLE_KEEP_REMOTE_FILES=1 vagrant provision</li>
<li>Wait till it hags, Ctrl+C, copy-paste the last command.</li>
<li>vagrant ssh</li>
<li>/usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1403972347.56-120405055892302/docker_image</li>
<li>Wait 5-10 secs, Ctrl+C</li>
</ol>
<div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="vagrant@vagrant-ubuntu-trusty-64:~$ /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1403972347.56-120405055892302/docker_image
^CTraceback (most recent call last):
File "/home/vagrant/.ansible/tmp/ansible-tmp-1403972347.56-120405055892302/docker_image", line 1554, in <module>
main()
File "/home/vagrant/.ansible/tmp/ansible-tmp-1403972347.56-120405055892302/docker_image", line 234, in main
image_id = manager.build()
File "/home/vagrant/.ansible/tmp/ansible-tmp-1403972347.56-120405055892302/docker_image", line 144, in build
for chunk in stream:
File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 229, in _stream_helper
size_line = socket.readline()
KeyboardInterrupt"><pre class="notranslate">vagrant@vagrant-ubuntu-trusty-64:~$ /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1403972347.56-120405055892302/docker_image
^CTraceback (most recent call last):
File <span class="pl-s">"/home/vagrant/.ansible/tmp/ansible-tmp-1403972347.56-120405055892302/docker_image"</span>, line <span class="pl-c1">1554</span>, in <span class="pl-en"><module></span>
main()
File <span class="pl-s">"/home/vagrant/.ansible/tmp/ansible-tmp-1403972347.56-120405055892302/docker_image"</span>, line <span class="pl-c1">234</span>, in <span class="pl-en">main</span>
image_id <span class="pl-k">=</span> manager.build()
File <span class="pl-s">"/home/vagrant/.ansible/tmp/ansible-tmp-1403972347.56-120405055892302/docker_image"</span>, line <span class="pl-c1">144</span>, in <span class="pl-en">build</span>
<span class="pl-k">for</span> chunk <span class="pl-k">in</span> stream:
File <span class="pl-s">"/usr/local/lib/python2.7/dist-packages/docker/client.py"</span>, line <span class="pl-c1">229</span>, in <span class="pl-en">_stream_helper</span>
size_line <span class="pl-k">=</span> socket.readline()
KeyboardInterrupt</pre></div>
<p dir="auto">Command-line approach (i.e. not through docker-py) works fine.</p> | 0 |
<h4 dir="auto">Description</h4>
<p dir="auto">I got a DeprecationWarning with the imp module since i update my python version to python 3.7.<br>
Here is the message</p>
<blockquote>
<p dir="auto">XXX\site-packages\sklearn\externals\joblib\externals\cloudpickle\cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses</p>
</blockquote>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<p dir="auto"><code class="notranslate">import sklearn</code></p>
<h4 dir="auto">Possible corrections</h4>
<p dir="auto">modify cloudpickle.py file and replace following lines by following values</p>
<ul dir="auto">
<li>l.47: <code class="notranslate">import importlib</code></li>
<li>l.937: <code class="notranslate">mod = types.ModuleType(name)</code></li>
<li>l.1138: <code class="notranslate">file, path, description = importlib.util._find_spec(part, path)</code></li>
</ul>
<p dir="auto">I'm quite a newby on GitHub, I don't really know how to use pull request and evrything so i post my solution here as if it is a bit ugly...</p>
<h4 dir="auto">Versions</h4>
<p dir="auto">On Windows10 environment.<br>
Python 3.7.0<br>
sklean 0.20.0</p> | <h4 dir="auto">Description</h4>
<p dir="auto">I get this error after importing the module<br>
<code class="notranslate">/usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp</code></p>
<p dir="auto">Can I ignore it?<br>
How to solve it?</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<p dir="auto"><code class="notranslate">import sklearn</code></p>
<h4 dir="auto">Expected Results</h4>
<p dir="auto">NO ISSUE</p>
<h4 dir="auto">Actual Results</h4>
<p dir="auto"><code class="notranslate">/usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp</code></p>
<h4 dir="auto">Versions</h4>
<p dir="auto">PLATFORM=Linux-4.15.0-34-generic-x86_64-with-Ubuntu-18.04-bionic<br>
PYTHON=Python 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0]<br>
NUMPY=NumPy 1.15.2<br>
SCIPY= SciPy 1.1.0<br>
SKLEARN=Scikit-Learn 0.20rc1</p> | 1 |
<h2 dir="auto">Scenario</h2>
<p dir="auto"><code class="notranslate">Deno.test()</code> has basically two forms currently (<code class="notranslate">1.9.0</code>):</p>
<ol dir="auto">
<li><code class="notranslate">Deno.test(<name>, <test function>)</code> and</li>
<li><code class="notranslate">Deno.test(<options object>)</code></li>
</ol>
<p dir="auto">Personally, I tend to write all my tests on the first form for it is generally simpler to read and write.<br>
This leaves the second form to be used only when strictly necessary (i.e to use some of the available options).</p>
<h2 dir="auto">Issue</h2>
<p dir="auto">While writing my long list of tests I often feel the need to run <em>only</em> the test being currently worked on, to have a cleaner output and lower wait time.</p>
<p dir="auto">In order to quickly mark any tests as <code class="notranslate">only</code> or <code class="notranslate">ignore</code> I have to refactor the function considerably in order to add an options object, which will just be removed after the test code is finished.</p>
<p dir="auto">I suggest reading <a href="https://github.com/denoland/deno/issues/5197" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/5197/hovercard">this discussion</a> where the issue has been pointed out before.</p>
<h2 dir="auto">Suggestion</h2>
<p dir="auto">Among the existing suggestions, I'll just add two more.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.test('foobar is bahbaz', function(){
i.like.to('move it move it');
}, 'only') // I know..."><pre class="notranslate"><span class="pl-v">Deno</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'foobar is bahbaz'</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-s1">i</span><span class="pl-kos">.</span><span class="pl-c1">like</span><span class="pl-kos">.</span><span class="pl-en">to</span><span class="pl-kos">(</span><span class="pl-s">'move it move it'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">'only'</span><span class="pl-kos">)</span> <span class="pl-c">// I know...</span></pre></div>
<p dir="auto">Or even accept the options as the last argument too. (easier to add and remove)</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.test('foobar is bahbaz', function(){
i.like.to('move it move it');
}, { only: true });"><pre class="notranslate"><span class="pl-v">Deno</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'foobar is bahbaz'</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-s1">i</span><span class="pl-kos">.</span><span class="pl-c1">like</span><span class="pl-kos">.</span><span class="pl-en">to</span><span class="pl-kos">(</span><span class="pl-s">'move it move it'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">only</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | <p dir="auto">Currently <code class="notranslate">Deno.test</code> has two overloads:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function test(name: string, fn: () => void | Promise<void>): void;
function test(t: TestDefinition): void;
interface TestDefinition {
fn: () => void | Promise<void>;
name: string;
ignore?: boolean;
only?: boolean;
sanitizeOps?: boolean;
sanitizeResources?: boolean;
};"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-s1">test</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">fn</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-c1">|</span> <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">></span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-s1">test</span><span class="pl-kos">(</span><span class="pl-s1">t</span>: <span class="pl-smi">TestDefinition</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-k">interface</span> <span class="pl-smi">TestDefinition</span> <span class="pl-kos">{</span>
<span class="pl-c1">fn</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-c1">|</span> <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c1">ignore</span>?: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c1">only</span>?: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c1">sanitizeOps</span>?: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c1">sanitizeResources</span>?: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">The <code class="notranslate">name</code>/<code class="notranslate">fn</code> overload is nicer for simple tests, but if we ever want to temporarily use an option like <code class="notranslate">only: true</code> we have to completely rewrite to the <code class="notranslate">TestDefinition</code> overload. If the first overload was changed to...</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function test(
name: string,
fn: () => void | Promise<void>,
options?: TestOptions,
): void;
type TestOptions = Omit<TestDefinition, "name" | "fn">;"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-s1">test</span><span class="pl-kos">(</span>
<span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span>
<span class="pl-s1">fn</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-c1">|</span> <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">></span><span class="pl-kos">,</span>
<span class="pl-s1">options</span>?: <span class="pl-smi">TestOptions</span><span class="pl-kos">,</span>
<span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-k">type</span> <span class="pl-smi">TestOptions</span> <span class="pl-c1">=</span> <span class="pl-smi">Omit</span><span class="pl-kos"><</span><span class="pl-smi">TestDefinition</span><span class="pl-kos">,</span> <span class="pl-s">"name"</span> <span class="pl-c1">|</span> <span class="pl-s">"fn"</span><span class="pl-kos">></span><span class="pl-kos">;</span></pre></div>
<p dir="auto">...then we could easily switch between these two calls:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.test("my test", () => { assertSomething() });
Deno.test("my test", () => { assertSomething() }, { only: true });"><pre class="notranslate"><span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"my test"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> <span class="pl-en">assertSomething</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"my test"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> <span class="pl-en">assertSomething</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">only</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | 1 |
<p dir="auto">I have been playing around with the <strong>Firebase ML Vision</strong> <a href="https://pub.dartlang.org/packages/firebase_ml_vision" rel="nofollow">https://pub.dartlang.org/packages/firebase_ml_vision</a> and have so far integrated the Text recognition within my application. My issue here is that I have my UI which is a live camera feed and every time I call the Firebase ML vision, I see about 1-2 seconds lag/freeze which affects my UI. I managed to narrow this down to this line of code from the Firebase ML API</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" final results =
(() async => (await detector.detectInImage(visionImage) ?? <dynamic>[]));"><pre class="notranslate"><code class="notranslate"> final results =
(() async => (await detector.detectInImage(visionImage) ?? <dynamic>[]));
</code></pre></div>
<p dir="auto">I have since tried to implement the whole call to the API from sending the capture from the camera feed to the FirebaseVisionDetector object but no avail with errors along the lines to do with if I remember right, something like the routine has to be called from the main isolate. I can successfully implement a <strong>compute</strong> function without this API. I have a feeling is something to do with the fact that it is an external package.</p>
<p dir="auto">Any help will be appreciated as I am seeking a smooth UI interaction and transition within the App.</p> | <p dir="auto">I'm trying to create an expenses app to track my personal expenses. After adding new expenses, seems like there are something wrong with the listview. It shows duplicated card and the new expenses that I add is not there. But after I scroll to the bottom and go up, it is shown correctly.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12526574/44995530-f1894480-afd5-11e8-91ba-1f225e0175df.gif"><img src="https://user-images.githubusercontent.com/12526574/44995530-f1894480-afd5-11e8-91ba-1f225e0175df.gif" width="50%" height="50%" data-animated-image="" style="max-width: 100%;"></a></p>
<h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>At listing page, notice that I have test1 - test7 and other stuffs. Click Add button.</li>
<li>At the form page, put test8 and click Submit button. It will pop to the previous page.</li>
<li>Notice that the new test8 is not there at first. There are also duplicated cards e.g lunch RM7.80.</li>
<li>Scroll to the bottom and then go to the top.</li>
<li>Notice that the new test8 is there. The duplicated cards are also gone.</li>
</ol>
<h2 dir="auto">Sample source code</h2>
<p dir="auto">Source code for the listing page.<br>
<a href="https://github.com/flutter/flutter/files/2346175/expenses.txt">expenses.txt</a></p>
<h2 dir="auto">Logs</h2>
<p dir="auto">There's nothing in the log.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
flutter doctor -v
[โ] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.228], locale en-MY)
โข Flutter version 0.5.1 at C:\Users\Yousoff Effendy\Documents\Software\flutter_windows_v0.5.1-beta\flutter
โข Framework revision c7ea3ca377 (3 months ago), 2018-05-29 21:07:33 +0200
โข Engine revision 1ed25ca7b7
โข Dart version 2.0.0-dev.58.0.flutter-f981f09760
[โ] Android toolchain - develop for Android devices (Android SDK 27.0.3)
โข Android SDK at C:\Users\Yousoff Effendy\AppData\Local\Android\Sdk
โข Android NDK location not configured (optional; useful for native profiling support)
โข Platform android-27, build-tools 27.0.3
โข ANDROID_HOME = C:\Users\Yousoff Effendy\AppData\Local\Android\Sdk
โข Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
โข Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
โข All Android licenses accepted.
[โ] Android Studio (version 3.1)
โข Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
โข Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[!] VS Code, 64-bit edition (version 1.26.0)
โข VS Code at C:\Program Files\Microsoft VS Code
โข Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected devices
! No devices available"><pre class="notranslate"><code class="notranslate">
flutter doctor -v
[โ] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.228], locale en-MY)
โข Flutter version 0.5.1 at C:\Users\Yousoff Effendy\Documents\Software\flutter_windows_v0.5.1-beta\flutter
โข Framework revision c7ea3ca377 (3 months ago), 2018-05-29 21:07:33 +0200
โข Engine revision 1ed25ca7b7
โข Dart version 2.0.0-dev.58.0.flutter-f981f09760
[โ] Android toolchain - develop for Android devices (Android SDK 27.0.3)
โข Android SDK at C:\Users\Yousoff Effendy\AppData\Local\Android\Sdk
โข Android NDK location not configured (optional; useful for native profiling support)
โข Platform android-27, build-tools 27.0.3
โข ANDROID_HOME = C:\Users\Yousoff Effendy\AppData\Local\Android\Sdk
โข Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
โข Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
โข All Android licenses accepted.
[โ] Android Studio (version 3.1)
โข Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
โข Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[!] VS Code, 64-bit edition (version 1.26.0)
โข VS Code at C:\Program Files\Microsoft VS Code
โข Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected devices
! No devices available
</code></pre></div>
<p dir="auto">Tested on real android device (Lolipop). I'm not connected to the device when running the flutter doctor. Let me know if there's any other info needed</p> | 0 |
<hr>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>The following is output of tf_env_collect.sh</strong>:<br>
== cat /etc/issue ===============================================<br>
Linux ubuntu 4.4.0-31-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115996914" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/50" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/50/hovercard" href="https://github.com/tensorflow/tensorflow/issues/50">#50</a>~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux<br>
VERSION="14.04.5 LTS, Trusty Tahr"<br>
VERSION_ID="14.04"</li>
</ul>
<p dir="auto">== are we in docker =============================================<br>
No</p>
<p dir="auto">== compiler =====================================================<br>
c++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4<br>
Copyright (C) 2013 Free Software Foundation, Inc.<br>
This is free software; see the source for copying conditions. There is NO<br>
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
<p dir="auto">== uname -a =====================================================<br>
Linux ubuntu 4.4.0-31-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115996914" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/50" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/50/hovercard" href="https://github.com/tensorflow/tensorflow/issues/50">#50</a>~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</p>
<p dir="auto">== check pips ===================================================<br>
numpy (1.13.3)<br>
protobuf (3.4.0)<br>
tensorflow (1.4.0)<br>
tensorflow-tensorboard (0.4.0rc2)</p>
<p dir="auto">== check for virtualenv =========================================<br>
True</p>
<p dir="auto">== tensorflow import ============================================<br>
tf.VERSION = 1.4.0<br>
tf.GIT_VERSION = v1.4.0-rc1-11-g130a514<br>
tf.COMPILER_VERSION = v1.4.0-rc1-11-g130a514<br>
Sanity check: array([1], dtype=int32)</p>
<p dir="auto">== env ==========================================================<br>
LD_LIBRARY_PATH is unset<br>
DYLD_LIBRARY_PATH is unset</p>
<p dir="auto">== nvidia-smi ===================================================<br>
tensorflow/tools/tf_env_collect.sh: line 105: nvidia-smi: command not found</p>
<p dir="auto">== cuda libs ===================================================</p>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">The DecodeBmpOp class is the decoder of bmp file. The class is in<br>
tensorflow/core/kernels/decode_bmp_op.cc. When dealling with a bmp file, the decoder doesn't invalidate the meta info of bmp file, such as header_size, width, height. It causes a Out-of-Bound Read in DecodeBmpOp::Decode func or DecodeBmpOp ::Compute func. If given an evil bmp file, the program using this API will crash.</p>
<h3 dir="auto">Source code / logs</h3>
<ul dir="auto">
<li><strong>Here is the crash call stack of program</strong>:<br>
The bmp file in the attachment causes a crash.</li>
</ul>
<p dir="auto">Program received signal SIGSEGV, Segmentation fault.<br>
0x0000000004200bc0 in tensorflow::DecodeBmpOp::Decode (this=this@entry=0x602400032a40, input=input@entry=0x601c000214ce "33", output=0x7fffcefcf800 "", width=width@entry=2336, height=height@entry=61727, channels=channels@entry=3, top_down=top_down@entry=false) at tensorflow/core/kernels/decode_bmp_op.cc:122<br>
Program received signal SIGSEGV (fault address 0x601c19caaa10)<br>
pwndbg> bt<br>
#0 0x0000000004200bc0 in tensorflow::DecodeBmpOp::Decode (this=this@entry=0x602400032a40, input=input@entry=0x601c000214ce "33", output=0x7fffcefcf800 "", width=width@entry=2336, height=height@entry=61727, channels=channels@entry=3, top_down=top_down@entry=false) at tensorflow/core/kernels/decode_bmp_op.cc:122<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115886302" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/1" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/1/hovercard" href="https://github.com/tensorflow/tensorflow/issues/1">#1</a> 0x0000000004202d3b in tensorflow::DecodeBmpOp::Compute (this=0x602400032a40, context=) at tensorflow/core/kernels/decode_bmp_op.cc:88<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115894138" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/2" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/2/hovercard" href="https://github.com/tensorflow/tensorflow/issues/2">#2</a> 0x00007ffff3ed8880 in tensorflow::ThreadPoolDevice::Compute (this=, op_kernel=0x602400032a40, context=0x7fffffff8320) at tensorflow/core/common_runtime/threadpool_device.cc:59<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115896656" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/3" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/3/hovercard" href="https://github.com/tensorflow/tensorflow/issues/3">#3</a> 0x00007ffff3d47110 in tensorflow::(anonymous namespace)::ExecutorState::Process (this=, tagged_node=..., scheduled_usec=) at tensorflow/core/common_runtime/executor.cc:1652<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115898449" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/4" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/4/hovercard" href="https://github.com/tensorflow/tensorflow/issues/4">#4</a> 0x00007ffff3d4cc0c in operator() (__closure=) at tensorflow/core/common_runtime/executor.cc:2055<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115910900" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/5" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/5/hovercard" href="https://github.com/tensorflow/tensorflow/issues/5">#5</a> std::_Function_handler<void(), tensorflow::(anonymous namespace)::ExecutorState::ScheduleReady(const TaggedNodeSeq&, tensorflow::(anonymous namespace)::ExecutorState::TaggedNodeReadyQueue*)::__lambda3>::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/4.8/functional:2071<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115911735" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/6" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/6/hovercard" href="https://github.com/tensorflow/tensorflow/issues/6">#6</a> 0x00007ffff3db2351 in operator() (this=0x7fffffff8790) at /usr/include/c++/4.8/functional:2471<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115912111" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/7" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/7/hovercard" href="https://github.com/tensorflow/tensorflow/issues/7">#7</a> operator() (__closure=, c=...) at tensorflow/core/common_runtime/graph_runner.cc:146<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115914495" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/8" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/8/hovercard" href="https://github.com/tensorflow/tensorflow/issues/8">#8</a> std::_Function_handler<void(std::function<void()>), tensorflow::GraphRunner::Run(tensorflow::Graph*, tensorflow::FunctionLibraryRuntime*, const NamedTensorList&, const std::vector<std::basic_string >&, std::vectortensorflow::Tensor*)::__lambda2>::_M_invoke(const std::_Any_data &, std::function<void()>) (__functor=..., __args#0=...) at /usr/include/c++/4.8/functional:2071<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115914691" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/9" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/9/hovercard" href="https://github.com/tensorflow/tensorflow/issues/9">#9</a> 0x00007ffff3ce0258 in operator() (__args#0=..., this=) at /usr/include/c++/4.8/functional:2471<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115914766" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/10" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/10/hovercard" href="https://github.com/tensorflow/tensorflow/issues/10">#10</a> tensorflow::(anonymous namespace)::ExecutorState::ScheduleReady (this=0x6026000fd1a0, ready=..., inline_ready=0x0) at tensorflow/core/common_runtime/executor.cc:2055<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115914813" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/11" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/11/hovercard" href="https://github.com/tensorflow/tensorflow/issues/11">#11</a> 0x00007ffff3d00a0c in ScheduleReady (inline_ready=0x0, ready=..., this=) at tensorflow/core/common_runtime/executor.cc:2046<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115915395" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/12" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/12/hovercard" href="https://github.com/tensorflow/tensorflow/issues/12">#12</a> RunAsync (done=, this=) at tensorflow/core/common_runtime/executor.cc:1439<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115918299" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/13" data-hovercard-type="pull_request" data-hovercard-url="/tensorflow/tensorflow/pull/13/hovercard" href="https://github.com/tensorflow/tensorflow/pull/13">#13</a> tensorflow::(anonymous namespace)::ExecutorImpl::RunAsync (this=this@entry=0x602400032f40, args=..., done=...) at tensorflow/core/common_runtime/executor.cc:2564<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115918464" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/14" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/14/hovercard" href="https://github.com/tensorflow/tensorflow/issues/14">#14</a> 0x00007ffff3db999f in Run (args=..., this=0x602400032f40) at ./tensorflow/core/common_runtime/executor.h:117<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115922135" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/15" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/15/hovercard" href="https://github.com/tensorflow/tensorflow/issues/15">#15</a> tensorflow::GraphRunner::Run (this=this@entry=0x6004002d08f0, graph=graph@entry=0x603a00003140, function_library=function_library@entry=0x602400033800, inputs=std::vector of length 0, capacity 0, output_names=std::vector of length 1, capacity 1 = {...}, outputs=outputs@entry=0x7fffffffa810) at tensorflow/core/common_runtime/graph_runner.cc:174<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115925923" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/16" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/16/hovercard" href="https://github.com/tensorflow/tensorflow/issues/16">#16</a> 0x00007ffff3c4f36d in tensorflow::ConstantFold (opts=..., function_library=function_library@entry=0x602400033800, env=env@entry=0x60060000e140, partition_device=partition_device@entry=0x6024000395c0, graph=graph@entry=0x603a00003480, was_mutated=was_mutated@entry=0x7fffffffb260) at tensorflow/core/common_runtime/constant_folding.cc:603<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115925964" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/17" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/17/hovercard" href="https://github.com/tensorflow/tensorflow/issues/17">#17</a> 0x00007ffff3db02bd in tensorflow::GraphOptimizer::Optimize (this=this@entry=0x7fffffffbe90, runtime=runtime@entry=0x602400033800, env=0x60060000e140, device=0x6024000395c0, graph=graph@entry=0x60060038d2f0, shape_map=shape_map@entry=0x0) at tensorflow/core/common_runtime/graph_optimizer.cc:66<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115926208" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/18" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/18/hovercard" href="https://github.com/tensorflow/tensorflow/issues/18">#18</a> 0x000000000ad04984 in tensorflow::DirectSession::GetOrCreateExecutors (this=this@entry=0x604000007080, inputs=..., outputs=..., target_nodes=..., executors_and_keys=executors_and_keys@entry=0x7fffffffc4f0, run_state_args=run_state_args@entry=0x7fffffffc730) at tensorflow/core/common_runtime/direct_session.cc:1208<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115926362" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/19" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/19/hovercard" href="https://github.com/tensorflow/tensorflow/issues/19">#19</a> 0x000000000ad0d0f7 in tensorflow::DirectSession::Run (this=, run_options=..., inputs=std::vector of length 0, capacity 0, output_names=std::vector of length 1, capacity 1 = {...}, target_nodes=std::vector of length 0, capacity 0, outputs=0x0, run_metadata=0x0) at tensorflow/core/common_runtime/direct_session.cc:472<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115927762" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/20" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/20/hovercard" href="https://github.com/tensorflow/tensorflow/issues/20">#20</a> 0x000000000ad6fa95 in tensorflow::ClientSession::Run (this=this@entry=0x7fffffffdc30, run_options=..., inputs=std::unordered_map with 0 elements, fetch_outputs=std::vector of length 1, capacity 1 = {...}, run_outputs=std::vector of length 0, capacity 0, outputs=outputs@entry=0x0, run_metadata=run_metadata@entry=0x0) at tensorflow/cc/client/client_session.cc:127<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115927987" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/21" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/21/hovercard" href="https://github.com/tensorflow/tensorflow/issues/21">#21</a> 0x000000000ad74b6d in Run (outputs=0x0, run_outputs=std::vector of length 0, capacity 0, fetch_outputs=std::vector of length 1, capacity 1 = {...}, inputs=std::unordered_map with 0 elements, this=0x7fffffffdc30) at tensorflow/cc/client/client_session.cc:90<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115928097" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/22" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/22/hovercard" href="https://github.com/tensorflow/tensorflow/issues/22">#22</a> tensorflow::ClientSession::Run (this=this@entry=0x7fffffffdc30, fetch_outputs=std::vector of length 1, capacity 1 = {...}, outputs=outputs@entry=0x0) at tensorflow/cc/client/client_session.cc:76<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115928832" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/23" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/23/hovercard" href="https://github.com/tensorflow/tensorflow/issues/23">#23</a> 0x000000000048042a in main (argc=1, argc@entry=2, argv=argv@entry=0x7fffffffe2e8) at tensorflow/examples/decode_image/main.cc:99<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115932607" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/24" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/24/hovercard" href="https://github.com/tensorflow/tensorflow/issues/24">#24</a> 0x00007ffff03c1f45 in __libc_start_main (main=0x47e4b0 <main(int, char**)>, argc=2, argv=0x7fffffffe2e8, init=, fini=, rtld_fini=, stack_end=0x7fffffffe2d8) at libc-start.c:287<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115938248" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/25" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/25/hovercard" href="https://github.com/tensorflow/tensorflow/issues/25">#25</a> 0x0000000000737eca in _start ()</p>
<ul dir="auto">
<li><strong>source code of c++ program</strong>:<br>
#include <br>
#include <br>
#include </li>
</ul>
<p dir="auto">#include "tensorflow/cc/ops/const_op.h"<br>
#include "tensorflow/cc/ops/image_ops.h"<br>
#include "tensorflow/cc/ops/standard_ops.h"<br>
#include "tensorflow/core/framework/graph.pb.h"<br>
#include "tensorflow/core/framework/tensor.h"<br>
#include "tensorflow/core/graph/default_device.h"<br>
#include "tensorflow/core/graph/graph_def_builder.h"<br>
#include "tensorflow/core/lib/core/errors.h"<br>
#include "tensorflow/core/lib/core/stringpiece.h"<br>
#include "tensorflow/core/lib/core/threadpool.h"<br>
#include "tensorflow/core/lib/io/path.h"<br>
#include "tensorflow/core/lib/strings/stringprintf.h"<br>
#include "tensorflow/core/platform/env.h"<br>
#include "tensorflow/core/platform/init_main.h"<br>
#include "tensorflow/core/platform/logging.h"<br>
#include "tensorflow/core/platform/types.h"<br>
#include "tensorflow/core/public/session.h"<br>
#include "tensorflow/core/util/command_line_flags.h"<br>
#include "tensorflow/cc/client/client_session.h"</p>
<p dir="auto">// These are all common classes it's handy to reference with no namespace.<br>
using tensorflow::Flag;<br>
using tensorflow::Tensor;<br>
using tensorflow::Status;<br>
using tensorflow::string;<br>
using tensorflow::int32;</p>
<p dir="auto">int main(int argc, char* argv[]) {<br>
string image = "tensorflow/examples/label_image/data/grace_hopper.jpg";<br>
std::vector flag_list = {<br>
Flag("image", &image, "image to be processed"),<br>
};<br>
string usage = tensorflow::Flags::Usage(argv[0], flag_list);<br>
const bool parse_result = tensorflow::Flags::Parse(&argc, argv, flag_list);<br>
if (!parse_result) {<br>
LOG(ERROR) << usage;<br>
return -1;<br>
}</p>
<p dir="auto">// We need to call this to set up global state for TensorFlow.<br>
tensorflow::port::InitMain(argv[0], &argc, &argv);<br>
if (argc > 1) {<br>
LOG(ERROR) << "Unknown argument " << argv[1] << "\n" << usage;<br>
return -1;<br>
}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" using namespace ::tensorflow::ops;"><pre class="notranslate"><code class="notranslate"> using namespace ::tensorflow::ops;
</code></pre></div>
<p dir="auto">auto root = tensorflow::Scope::NewRootScope();<br>
tensorflow::Output file_reader = ReadFile(root.WithOpName("input_image"), image);<br>
tensorflow::Output gif_reader = DecodeGif(root.WithOpName("gif_reader"), file_reader);<br>
tensorflow::Output bmp_reader = DecodeBmp(root.WithOpName("bmp_reader"), file_reader);<br>
tensorflow::Output jpeg_reader = DecodeJpeg(root.WithOpName("jpeg_reader"), file_reader);<br>
tensorflow::Output png_reader = DecodePng(root.WithOpName("png_reader"), file_reader);</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" std::vector<tensorflow::Tensor> outputs;
tensorflow::ClientSession session(root);"><pre class="notranslate"><code class="notranslate"> std::vector<tensorflow::Tensor> outputs;
tensorflow::ClientSession session(root);
</code></pre></div>
<p dir="auto">session.Run({gif_reader}, nullptr);<br>
session.Run({bmp_reader}, nullptr);<br>
session.Run({jpeg_reader}, nullptr);<br>
session.Run({png_reader}, nullptr);</p>
<p dir="auto">return 0;<br>
}</p>
<ul dir="auto">
<li><strong>source code of python program</strong>:<br>
import argparse<br>
import tensorflow as tf</li>
</ul>
<p dir="auto">if <strong>name</strong> == "<strong>main</strong>":<br>
file_name = "tensorflow/examples/label_image/data/grace_hopper.jpg"<br>
parser = argparse.ArgumentParser()<br>
parser.add_argument("--image", help="image to be processed")<br>
args = parser.parse_args()<br>
if args.image:<br>
file_name = args.image<br>
file_reader = tf.read_file(file_name, "file_reader")<br>
image_reader = tf.image.decode_bmp(file_reader, name='bmp_reader')<br>
sess = tf.Session()<br>
sess.run(image_reader)</p>
<p dir="auto"><a href="https://github.com/tensorflow/tensorflow/files/1512398/evil.zip">evil.zip</a></p> | <p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="193922951" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/6134" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/6134/hovercard" href="https://github.com/tensorflow/tensorflow/issues/6134">#6134</a>. Right now, the users of the <code class="notranslate">tensorflow/python/tools</code> scripts have these options:</p>
<ul dir="auto">
<li>Download and save a copy of the individual <code class="notranslate">.py</code> file with whatever model/project they are working on, so that it is bundled with their code. This causes tons of code duplication across projects.</li>
<li>Import the tools programmatically and use them there. Being able to do this is extremely handy, but often the most convenient way to use the tool (and the way they are generally designed to be used) are as ad-hoc command-line calls.</li>
<li>Build a binary using Bazel. This is extremely inconvenient, and doesn't really solve the problem of code-reuse from above. I'd also argue that building a binary for what amounts to a Python script is overkill.</li>
<li>Create a custom CLI/module/alias that bundles these tools together (or allows for a single tool to be called from anywhere). This is convenient, but complicates setting up a development environment, and leads to divergent patterns across the user base.</li>
</ul>
<p dir="auto">I think having some sort of unified tool that is able to provide uniform access to the CLI of frequently used tools, such as <code class="notranslate">freeze_graph.py</code> and <code class="notranslate">saved_model_cli.py</code> would greatly improve UX, as well as make it much easier to explain how to use these tools. Additionally, it would help prevent version mismatches of tooling, as the correct version of the tool would already be at their fingertips (instead of fumbling through GitHub branches).</p>
<p dir="auto">I think having some sort of simple umbrella module, let's call it <code class="notranslate">tftools</code>, which provides access to the underlying python files would suffice. E.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ tftools freeze_graph --input_graph=... --output_graph=...
$ tftools saved_model_cli show --dir /tmp/saved_model_dir"><pre class="notranslate"><code class="notranslate">$ tftools freeze_graph --input_graph=... --output_graph=...
$ tftools saved_model_cli show --dir /tmp/saved_model_dir
</code></pre></div>
<p dir="auto">This would be a little bit of legwork, but I think the benefit-out to effort-in ratio is pretty large, at least from a user perspective. Not sure if the TensorFlow team would want to handle this or leave it to the community (if I can get company approval, I'd be happy to take a crack at it).</p> | 0 |
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Problem Description</h3>
<p dir="auto">For the native tray icons on windows, switching to dark mode will invert them. This is very similar to the behavior on macOS (though on macOS it seems to work for third party apps as well, including electron apps). As far as I can tell, there isn't a clear way for an electron app to do a tray icon on windows that automatically inverts when the light/dark mode setting switches.</p>
<p dir="auto">I think part of the issue is that the app mode vs the shell mode is two settings, and electron doesn't expose the shell mode: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="479993780" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/19729" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/19729/hovercard" href="https://github.com/electron/electron/issues/19729">#19729</a></p>
<h3 dir="auto">Proposed Solution</h3>
<p dir="auto">Perhaps electron could provide a tray api update that lets you specify alternative tray icons for light and dark mode on windows?</p>
<h3 dir="auto">Alternatives Considered</h3>
<p dir="auto">At the very least, an api that exposes which mode the shell is in, could be nice. Not sure how you'd auto update the tray icon without polling, though. is there a window message or some kind of event we could listen on for this?</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hacdias/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hacdias">@hacdias</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/deermichel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/deermichel">@deermichel</a></p> | <h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>master</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>win7 sp1 x64</li>
</ul>
</li>
</ul>
<ul dir="auto">
<li>projects generated by <code class="notranslate">gn gen out/Testing-x86 --ide=vs2019</code></li>
<li>opening <code class="notranslate">all.sln</code></li>
<li>error: <code class="notranslate">error : Cannot load project with duplicated project items: ../../../../electron/shell/common/api/constructor.h is included as 'None' and as 'None' item types. </code></li>
<li>removing the duplicate <code class="notranslate">constructor.h</code> entry in the project file resolves the problem</li>
</ul> | 0 |
<p dir="auto">Applying an emphasis class, such as text-primary, to a heading has no effect - the heading retains it's color. Is this expected? I'm hoping not.</p>
<p dir="auto">Best wishes<br>
Lee</p>
<p dir="auto">Edit: I've just noticed we're supposed to use a span. Couldn't the emphasis classes be made Important to over come this?</p> | <p dir="auto"><code class="notranslate">.jumbotron h1</code> sets color to inherit, i'm not really sure why it would need to do this but the problem is that if you try and set <code class="notranslate">text-success</code>, <code class="notranslate">text-warning</code>, <code class="notranslate">text-info</code>, etc on the h1 it fails to set the color because of this. I know i could probably simply wrap the h1 in a div with a text-* class but that's extra markup that i'm thinking we can avoid?!</p> | 1 |
<p dir="auto">Error message says:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'Foo'."><pre class="notranslate"><code class="notranslate">error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'Foo'.
</code></pre></div>
<p dir="auto">Given the exact same exported type, Typescript isn't able to deal with enums from multiple source locations. Here's an example with a Core project and a Bar project:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Core/
foo.ts
convertFooToString.ts
dist/
foo.js
foo.d.ts
convertFooToString.ts
convertFooToString.d.ts
Bar/
SomeComponent.tsx
dist/
SomeComponent.js
SomeComponent.d.ts"><pre class="notranslate"><code class="notranslate">Core/
foo.ts
convertFooToString.ts
dist/
foo.js
foo.d.ts
convertFooToString.ts
convertFooToString.d.ts
Bar/
SomeComponent.tsx
dist/
SomeComponent.js
SomeComponent.d.ts
</code></pre></div>
<p dir="auto">SomeComponent.tsx:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// some other imports
import {convertFooToString}
export default class SomeComponent extends React.Component<any, any> {
render() {
// Note, this.props.foo IS a Foo type
return (<div>{convertFooToString(this.props.foo)}</div>);
}
}"><pre class="notranslate"><span class="pl-c">// some other imports</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-s1">convertFooToString</span><span class="pl-kos">}</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">SomeComponent</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span><span class="pl-c1"><</span><span class="pl-s1">any</span><span class="pl-kos">,</span> <span class="pl-s1">any</span><span class="pl-c1">></span> <span class="pl-kos">{</span>
<span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// Note, this.props.foo IS a Foo type</span>
<span class="pl-k">return</span> <span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-ent">div</span><span class="pl-c1">></span><span class="pl-kos">{</span><span class="pl-en">convertFooToString</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">foo</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">foo.ts:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="enum Foo {
Yay = 0,
Nay = 1
};
export default Foo;"><pre class="notranslate"><span class="pl-s1">enum</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span>
<span class="pl-v">Yay</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">,</span>
<span class="pl-v">Nay</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-v">Foo</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">convertFooToString:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export function convertFooToString(foo: Foo): string {
switch (foo) {
case Foo.Yay:
return "YAYAYAYAYA";
default:
return "NANANANANA";
}
}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">convertFooToString</span><span class="pl-kos">(</span><span class="pl-s1">foo</span>: <span class="pl-v">Foo</span><span class="pl-kos">)</span>: <span class="pl-s1">string</span> <span class="pl-kos">{</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-s1">foo</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-v">Foo</span><span class="pl-kos">.</span><span class="pl-c1">Yay</span>:
<span class="pl-k">return</span> <span class="pl-s">"YAYAYAYAYA"</span><span class="pl-kos">;</span>
<span class="pl-k">default</span>:
<span class="pl-k">return</span> <span class="pl-s">"NANANANANA"</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | <p dir="auto">The error relates to enums, and exports using the new typescript node resolution (with the typings property in the package.json). I have tested this on typescript@next.</p>
<p dir="auto">The bug can be reproduced through the following scenario: (please go to <a href="https://github.com/christyharagan/typeScript-enum-export-bug">https://github.com/christyharagan/typeScript-enum-export-bug</a> to find this code):</p>
<p dir="auto">Three projects: <code class="notranslate">a</code>, <code class="notranslate">b</code>, <code class="notranslate">c</code>.</p>
<p dir="auto"><code class="notranslate">b</code> depends on <code class="notranslate">a</code><br>
<code class="notranslate">c</code> depends on <code class="notranslate">b</code></p>
<p dir="auto"><code class="notranslate">a</code> exports an enum through its index.ts:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export enum E{}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">enum</span> <span class="pl-smi">E</span><span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto"><code class="notranslate">b</code> then exports a function that returns <code class="notranslate">E</code> through its index.ts:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {E} from 'a'
export function f():E {
return null
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-smi">E</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'a'</span>
<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-kos">)</span>:<span class="pl-smi">E</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-c1">null</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><code class="notranslate">c</code> then consumes <code class="notranslate">f</code> through its index.ts:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {E} from 'a'
import {f} from 'b'
let e:E = f()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-smi">E</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'a'</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-s1">f</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'b'</span>
<span class="pl-k">let</span> <span class="pl-s1">e</span>:<span class="pl-smi">E</span> <span class="pl-c1">=</span> <span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">There is now an error for <code class="notranslate">e</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Type 'E' is not assignable to type 'E'."><pre class="notranslate"><code class="notranslate">Type 'E' is not assignable to type 'E'.
</code></pre></div>
<p dir="auto">All three packages have a package.json that looks like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"name": "b",
"version": "1",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"dependencies": {
"a": "1"
}
}"><pre class="notranslate"><code class="notranslate">{
"name": "b",
"version": "1",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"dependencies": {
"a": "1"
}
}
</code></pre></div>
<p dir="auto">And a tsconfig.json that looks like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"declaration": true,
"module": "commonjs",
"rootDir": "./src",
"target": "es5",
"outDir": "./lib"
},
"files": [
"src/index.ts"
]
}"><pre class="notranslate"><code class="notranslate">{
"compilerOptions": {
"declaration": true,
"module": "commonjs",
"rootDir": "./src",
"target": "es5",
"outDir": "./lib"
},
"files": [
"src/index.ts"
]
}
</code></pre></div>
<p dir="auto">Furthermore, this defect occurs if <code class="notranslate">f</code> were to export another symbol (e.g. an interface) which references an exported enum somewhere within it's structure or hierarchy.</p>
<p dir="auto">This only seems to affect enums, not other types.</p> | 1 |
<p dir="auto">this is standart superset time series bar chart:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/36520921/136579194-d97d2bbd-a971-44d9-bc02-fc982276b61b.png"><img src="https://user-images.githubusercontent.com/36520921/136579194-d97d2bbd-a971-44d9-bc02-fc982276b61b.png" alt="vivaldi_0MqYMCNKc7" style="max-width: 100%;"></a></p>
<p dir="auto">query:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day') AS __timestamp,
deal_size AS deal_size,
sum(sales) AS "(Sales)"
FROM "Vehicle Sales"
JOIN
(SELECT deal_size AS deal_size__,
sum(sales) AS mme_inner__
FROM "Vehicle Sales"
WHERE order_date >= '2003-01-01 00:00:00.000000'
AND order_date < '2005-06-01 00:00:00.000000'
GROUP BY deal_size
ORDER BY mme_inner__ DESC
LIMIT 100
OFFSET 0) AS anon_1 ON deal_size = deal_size__
WHERE order_date >= '2003-01-01 00:00:00.000000'
AND order_date < '2005-06-01 00:00:00.000000'
GROUP BY deal_size,
DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day')
ORDER BY "(Sales)" DESC
LIMIT 50000
OFFSET 0;"><pre class="notranslate"><code class="notranslate">SELECT DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day') AS __timestamp,
deal_size AS deal_size,
sum(sales) AS "(Sales)"
FROM "Vehicle Sales"
JOIN
(SELECT deal_size AS deal_size__,
sum(sales) AS mme_inner__
FROM "Vehicle Sales"
WHERE order_date >= '2003-01-01 00:00:00.000000'
AND order_date < '2005-06-01 00:00:00.000000'
GROUP BY deal_size
ORDER BY mme_inner__ DESC
LIMIT 100
OFFSET 0) AS anon_1 ON deal_size = deal_size__
WHERE order_date >= '2003-01-01 00:00:00.000000'
AND order_date < '2005-06-01 00:00:00.000000'
GROUP BY deal_size,
DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day')
ORDER BY "(Sales)" DESC
LIMIT 50000
OFFSET 0;
</code></pre></div>
<p dir="auto">request that should have been:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day') AS __timestamp,
deal_size AS deal_size,
sum(sales) AS "(Sales)"
FROM "Vehicle Sales"
WHERE order_date >= '2003-01-01 00:00:00.000000'
AND order_date < '2005-06-01 00:00:00.000000'
GROUP BY deal_size,
DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day')
ORDER BY "(Sales)" DESC
LIMIT 50000
OFFSET 0;"><pre class="notranslate"><code class="notranslate">SELECT DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day') AS __timestamp,
deal_size AS deal_size,
sum(sales) AS "(Sales)"
FROM "Vehicle Sales"
WHERE order_date >= '2003-01-01 00:00:00.000000'
AND order_date < '2005-06-01 00:00:00.000000'
GROUP BY deal_size,
DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day')
ORDER BY "(Sales)" DESC
LIMIT 50000
OFFSET 0;
</code></pre></div>
<p dir="auto">why does superset add this request?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="JOIN
(SELECT deal_size AS deal_size__,
sum(sales) AS mme_inner__
FROM "Vehicle Sales"
WHERE order_date >= '2003-01-01 00:00:00.000000'
AND order_date < '2005-06-01 00:00:00.000000'
GROUP BY deal_size
ORDER BY mme_inner__ DESC
LIMIT 100
OFFSET 0) AS anon_1 ON deal_size = deal_size__
"><pre class="notranslate"><code class="notranslate">JOIN
(SELECT deal_size AS deal_size__,
sum(sales) AS mme_inner__
FROM "Vehicle Sales"
WHERE order_date >= '2003-01-01 00:00:00.000000'
AND order_date < '2005-06-01 00:00:00.000000'
GROUP BY deal_size
ORDER BY mme_inner__ DESC
LIMIT 100
OFFSET 0) AS anon_1 ON deal_size = deal_size__
</code></pre></div>
<p dir="auto">This JOIN increases the data loading time<br>
Old superset works fine</p> | <p dir="auto">First of all I have setup Superset with the current docker image (<a href="https://superset.apache.org/docs/installation/installing-superset-using-docker-compose" rel="nofollow">https://superset.apache.org/docs/installation/installing-superset-using-docker-compose</a>) on an AWS EC2 instance. I've also installed superset on my local laptop (<a href="https://hub.docker.com/r/apache/superset" rel="nofollow">https://hub.docker.com/r/apache/superset</a>) but had the same thing.</p>
<p dir="auto">After registering the AWS Athena driver and an dataset, I have created a simple time series diagram with a "group by". The query is working and data is visualized. Please see screenshot.</p>
<p dir="auto">When I look at the sql query executed by Athena you can see this: --> ### Actual results</p>
<p dir="auto">There is a subquery included in the query which seems to be useless. The columns of the subquery are not used in the outer query. The join is useless.</p>
<p dir="auto">The disadvantage is, that the query takes much more time with this subquery - x*100% in comparision to the expected query.</p>
<h4 dir="auto">How to reproduce the bug</h4>
<p dir="auto">create a timeseries chart and group by an attribute.</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">SELECT date_trunc('day', CAST(date_parse(p_date, '%Y-%m-%d') AS TIMESTAMP)) AS "__timestamp",<br>
"c_jobid" AS "c_jobid",<br>
COUNT(*) AS "count"<br>
FROM "x"."y"<br>
WHERE "p_date" >= '2021-10-01'<br>
GROUP BY "c_jobid",<br>
date_trunc('day', CAST(date_parse(p_date, '%Y-%m-%d') AS TIMESTAMP))<br>
ORDER BY "count" DESC<br>
LIMIT 1000</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">SELECT date_trunc('day', CAST(date_parse(p_date, '%Y-%m-%d') AS TIMESTAMP)) AS "<strong>timestamp",<br>
"c_jobid" AS "c_jobid",<br>
COUNT(*) AS "count"<br>
FROM "x"."y"<br>
JOIN<br>
(SELECT "c_jobid" AS "c_jobid</strong>",<br>
COUNT(*) AS "mme_inner__"<br>
FROM "vehicle_cdc2_cca_qual_pre"."te_mgu"<br>
WHERE "p_date" >= '2021-10-01'<br>
GROUP BY "c_jobid"<br>
ORDER BY "mme_inner__" DESC<br>
LIMIT 100) AS "anon_1" ON "c_jobid" = "c_jobid__"<br>
WHERE "p_date" >= '2021-10-01'<br>
GROUP BY "c_jobid",<br>
date_trunc('day', CAST(date_parse(p_date, '%Y-%m-%d') AS TIMESTAMP))<br>
ORDER BY "count" DESC<br>
LIMIT 1000</p>
<h4 dir="auto">Screenshots</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/68276432/136579420-abbe922f-363d-41d6-86b6-51294f930c55.png"><img width="820" alt="grafik" src="https://user-images.githubusercontent.com/68276432/136579420-abbe922f-363d-41d6-86b6-51294f930c55.png" style="max-width: 100%;"></a></p>
<h3 dir="auto">Environment</h3>
<p dir="auto">(please complete the following information):</p>
<ul dir="auto">
<li>browser type and version: Firefox 88.0</li>
<li>superset version: Superset 0.0.0dev</li>
<li>python version: Python 3.8.12</li>
<li>node.js version: ? (docker exec -it superset node -v --> node not on path)</li>
<li>any feature flags active: no</li>
</ul>
<h3 dir="auto">Checklist</h3>
<p dir="auto">Make sure to follow these steps before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of superset.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li>
</ul>
<h3 dir="auto">Additional context</h3> | 1 |
<h3 dir="auto">Website or app</h3>
<p dir="auto"><a href="https://github.com/Contrick64/scryfall-random">https://github.com/Contrick64/scryfall-random</a></p>
<h3 dir="auto">Repro steps</h3>
<p dir="auto">This error reproduces on initial page load. I can't seem to find what caused it to start showing up, as it points to a part of my code that has existed since well before I first got the error.</p>
<h3 dir="auto">How often does this bug happen?</h3>
<p dir="auto">Every time</p>
<h3 dir="auto">DevTools package (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">DevTools version (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Error message (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Error call stack (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Error component stack (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">GitHub query string (automated)</h3>
<p dir="auto"><em>No response</em></p> | <p dir="auto">React version: V18.0.0<br>
React router DOM: V5.2.1</p>
<h2 dir="auto">Steps To Reproduce</h2>
<ol dir="auto">
<li>Going to profile page</li>
<li>Warning: Internal React error: Expected static flag was missing. Please notify the React team.</li>
</ol>
<p dir="auto">Link to code example:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/51002164/163707500-3ee1ca51-9695-4e2e-b3c4-3f5e8f7a98b3.png"><img src="https://user-images.githubusercontent.com/51002164/163707500-3ee1ca51-9695-4e2e-b3c4-3f5e8f7a98b3.png" alt="Screenshot 2022-04-17 124859" style="max-width: 100%;"></a><br>
DynamicFilter.js component<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/51002164/163707576-b8536b98-3b47-4c7e-84f3-abfa9f93dddf.png"><img src="https://user-images.githubusercontent.com/51002164/163707576-b8536b98-3b47-4c7e-84f3-abfa9f93dddf.png" alt="Screenshot 2022-04-17 125107" style="max-width: 100%;"></a></p>
<h2 dir="auto">The current behavior</h2>
<h2 dir="auto">The expected behavior</h2> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=j.betancourt" rel="nofollow">josef betancourt</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2506?redirect=false" rel="nofollow">SPR-2506</a></strong> and commented</p>
<p dir="auto">Some complex properties do not follow the get/set JavaBean spec. Thus, to wire these in with Spring is problematic. Whether Spring should support non-javabean accessors is of course a question. Anyway, there could be a way to explicitly specify these properties, for example:</p>
<p dir="auto"><property method="addValue" value=doh"/><br>
or<br>
<property method="addListener" ref=beanx"/></p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0 RC3</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398050219" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/4961" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/4961/hovercard" href="https://github.com/spring-projects/spring-framework/issues/4961">#4961</a> Please improve BeanFactory support for containers & collections (<em><strong>"duplicates"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=ben_hutchison" rel="nofollow">Ben Hutchison</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-230?redirect=false" rel="nofollow">SPR-230</a></strong>* and commented</p>
<p dir="auto">Objects that contain other objects (common examples include Swing Containers and the Collections classes) frequently cannot have their initial state specified through setting javabeans properties alone.</p>
<p dir="auto">This is a request for the spring core to include extensions to the syntax of the applicationContext.xml to allow such objects to be setup completely from XML. Some reasonably conveinient syntax is needed that allows methods like "add()" to be invoked on the bean at construction time. Ideally, I think the syntax should allow any arbritrary methods to be called on a bean during preparation.</p>
<p dir="auto">There is a clear precendent to be found in the design of the java.beans.XMLEncoder/Decoder classes, designed to support long term bean perisstence. Consider the extract below generated by XML-serializing a List:</p>
<p dir="auto"><?xml version="1.0" encoding="UTF-8" ?><br>
<java version="1.4.2_03" class="java.beans.XMLDecoder"><br>
<object class="java.util.ArrayList"><br>
<void method="add"><br>
<string>item</string><br>
</void><br>
</object><br>
</java></p>
<p dir="auto">Evidently, it was recognized as an important feature as its present from the first release of the peristence mechanism.</p>
<p dir="auto">Consider what is <strong>not</strong> readily doable from XML without this feature:</p>
<ul dir="auto">
<li>Cannot create any Swing component heirarchies.</li>
<li>Cannot initialize custom collections (ie anything not a vanilla set/map/list impl), unless it provides a copy-constructor.</li>
<li>Cannot init arbritrary state on objects which do not observe the get/setXXX convention (and legacy code is littered with them).</li>
</ul>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.0.2</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/15243/SPR-230.patch" rel="nofollow">SPR-230.patch</a> (<em>137.30 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398070077" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7195" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7195/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7195">#7195</a> Allow setting of properties without a javabean setter (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398070258" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7222" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7222/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7222">#7222</a> Support JavaBean Eventing methods in Spring (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398072522" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7488" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7488/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7488">#7488</a> "adder" injection in addition to "setter" (invoke addXX() instead of setXX()) (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398057408" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/5727" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/5727/hovercard" href="https://github.com/spring-projects/spring-framework/issues/5727">#5727</a> support "add"-style List injection (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">32 votes, 28 watchers</p> | 1 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 18363.836 (ver in PowerShell returned an error)
PowerToys version: 0.18.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: 18363.836 (ver in PowerShell returned an error)
PowerToys version: 0.18.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>maximize a window</li>
<li>press win+left/right arrow</li>
</ol>
<h1 dir="auto">Expected behaviour</h1>
<p dir="auto">Recently updated to v0.18.1 from ~v0.15ish. In previous versions, a maximised screen could snap to a zone simply by pressing win+left/right arrow.</p>
<h1 dir="auto">Actual behaviour</h1>
<p dir="auto">In v0.18.1 I first need to press win+down to minimise the screen and then position it with win+left/right.</p>
<h1 dir="auto">Questions</h1>
<p dir="auto">Not sure if this is an issue or just the new way it's working. Is this the desired behaviour?</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Version 10.0.19587.1000
PowerToys version: v0.16.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: Version 10.0.19587.1000
PowerToys version: v0.16.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>
<p dir="auto">Configure FancyZones to "Override Windows Snap hotkeys"</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1366654/78994553-aaafe900-7b40-11ea-9d49-6dc8386da26e.png"><img src="https://user-images.githubusercontent.com/1366654/78994553-aaafe900-7b40-11ea-9d49-6dc8386da26e.png" alt="grafik" style="max-width: 100%;"></a></p>
</li>
<li>
<p dir="auto">Choose "Grid" as Zone layout</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1366654/78994632-dc28b480-7b40-11ea-95e8-2e08a8b343fe.png"><img src="https://user-images.githubusercontent.com/1366654/78994632-dc28b480-7b40-11ea-95e8-2e08a8b343fe.png" alt="grafik" style="max-width: 100%;"></a></p>
</li>
<li>
<p dir="auto">Maximize a Window using <kbd>Win</kbd>+<kbd>Up</kbd>. Window is then maximized.</p>
</li>
<li>
<p dir="auto">Try to move the Window to the left zone using <kbd>Win</kbd>+<kbd>Left</kbd></p>
</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Window is moved to the left zone.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Nothing happens.</p>
<p dir="auto">This issue refs <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="494053852" data-permission-text="Title is private" data-url="https://github.com/microsoft/PowerToys/issues/387" data-hovercard-type="issue" data-hovercard-url="/microsoft/PowerToys/issues/387/hovercard" href="https://github.com/microsoft/PowerToys/issues/387">#387</a></p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto">(Any maximized window - so not attaching a screenshot)</p> | 1 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/972891/11668098/2e672f3e-9daa-11e5-8866-7c107b7ffe5f.png"><img src="https://cloud.githubusercontent.com/assets/972891/11668098/2e672f3e-9daa-11e5-8866-7c107b7ffe5f.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="119561425" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode-go/issues/131" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode-go/issues/131/hovercard" href="https://github.com/microsoft/vscode-go/issues/131">microsoft/vscode-go#131</a> appears to be unfixable with the current API, since lines aren't being automatically wrapped, there is no way to request them to be wrapped, and there is no apriori known length at which to proactively wrap that will look good in general.</p> | 1 |
<h2 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">๐</g-emoji> Feature</h2>
<p dir="auto">Add <code class="notranslate">nbytes</code> and <code class="notranslate">itemsize</code> methods to Tensor. It has the same semantics as <a href="https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ndarray.nbytes.html" rel="nofollow">https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ndarray.nbytes.html</a> and <a href="https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ndarray.itemsize.html" rel="nofollow">https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ndarray.itemsize.html</a> (though, in keeping with PyTorch style, it is a function call, not a property).</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">The primary motivation is that caffe2::Tensor has these two methods, it's used somewhat frequently in the Caffe2 codebase, and it seems like a generally useful thing to have around.</p>
<h2 dir="auto">Alternatives</h2>
<ul dir="auto">
<li>Don't add them, and make users do the computation themselves. This might be a little annoying to do, because if we don't have <code class="notranslate">itemsize()</code> the user has to compute it themselves from the dtype.</li>
</ul> | <p dir="auto">I am unable to use pytorch with CUDA despite having installed it.</p>
<p dir="auto">OS: Windows 10<br>
Pytorch Version: 1.1.0<br>
CUDA Version: 10.0</p>
<p dir="auto">I get the following error. Any help would be appreciated.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/31413869/58431540-f5ad4300-80cb-11e9-8f04-cc6fe98acb1e.png"><img src="https://user-images.githubusercontent.com/31413869/58431540-f5ad4300-80cb-11e9-8f04-cc6fe98acb1e.png" alt="image" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=nugs" rel="nofollow">Andrew Walters</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8992?redirect=false" rel="nofollow">SPR-8992</a></strong> and commented</p>
<p dir="auto">Given:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@RunWith(SpringJUnit4ClassRunner.class)
@ActiveProfiles(profiles = "test")
@ContextConfiguration(classes = MyClass.class)
@ImportResource("/appContext.xml")
public class MyClass {
@Autowired
private ProfileSpecificResource resource;
@Bean
public String aBean() {...}
@Test
public void aTest() {...}
}"><pre class="notranslate"><code class="notranslate">@RunWith(SpringJUnit4ClassRunner.class)
@ActiveProfiles(profiles = "test")
@ContextConfiguration(classes = MyClass.class)
@ImportResource("/appContext.xml")
public class MyClass {
@Autowired
private ProfileSpecificResource resource;
@Bean
public String aBean() {...}
@Test
public void aTest() {...}
}
</code></pre></div>
<p dir="auto">Spring is not cascading/passing through the active profile(s) down to the imported resource (where profile specific beans are defined).</p>
<p dir="auto">If the tests are invoked with the -Dspring.profiles.active=test argument, the tests run as expected.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1 GA</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398116795" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13685" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13685/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13685">#13685</a> <code class="notranslate">@ActiveProfiles</code> not taken into account for <code class="notranslate">@ImportResource-imported</code> XML context definitions from an <code class="notranslate">@Configuration</code> context definition (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398112653" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13040" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13040/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13040">#13040</a> AnnotatedBeanDefinitionReader's constructor should inherit Environment of supplied BeanDefinitionRegistry</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/ee36c80ca961a5b2af233cd26a5483d57939c0af/hovercard" href="https://github.com/spring-projects/spring-framework/commit/ee36c80ca961a5b2af233cd26a5483d57939c0af"><tt>ee36c80</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/b17d545bb71b51ae46689a88487898dac496544c/hovercard" href="https://github.com/spring-projects/spring-framework/commit/b17d545bb71b51ae46689a88487898dac496544c"><tt>b17d545</tt></a></p>
<p dir="auto">1 votes, 2 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=olivergierke" rel="nofollow">Oliver Drotbohm</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9254?redirect=false" rel="nofollow">SPR-9254</a></strong> and commented</p>
<p dir="auto">Imagine the following usage of the cache abstraction:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyComponent implements Component {
@Cacheable("myCache")
public Object myMethod(String key) {
}
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">MyComponent</span> <span class="pl-k">implements</span> <span class="pl-smi">Component</span> {
<span class="pl-c1">@</span><span class="pl-c1">Cacheable</span>(<span class="pl-s">"myCache"</span>)
<span class="pl-k">public</span> <span class="pl-smi">Object</span> <span class="pl-en">myMethod</span>(<span class="pl-smi">String</span> <span class="pl-s1">key</span>) {
}
}</pre></div>
<p dir="auto">Now assume the execution of <code class="notranslate">myMethod(...)</code> takes a huge amount of time (hence the caching in the first place). Now futher assume we access the method concurrently with two threads. With the current implementation of the cache interceptor works as follows:</p>
<ul dir="auto">
<li>thread 1 triggers the interceptor, we don't find a value for the key in the cache and thus invoke the method.</li>
<li>Now while the method invocation in thread 1 runs, thread 2 enters the interceptor with the same key, we don't find a value and <strong>re-trigger the method</strong> call</li>
</ul>
<p dir="auto">This is unfortunate as the second invocation is entirely obsolete as the second thread could just wait for the first invocation to succeed and use the value returned. Beyond that we might face this scenario in extended version as while the first thread calculates the value pretty much all threads invoking the method with the same key would re-trigger the calculation. So the longer the value calculation takes the more likely we will run into unnecessary duplicate invocations of the method.</p>
<p dir="auto">So what I am suggesting is that we should keep track of actual method invocations by key and block all concurrent accesses to that cache value until the first thread calculating it has finished and let the other threads use that value then. The <a href="http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/cache/CacheBuilder.html" rel="nofollow"><code class="notranslate">CacheBuilder</code> API</a> of the Google Guava project actually implements this out of the box.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1.1</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398118520" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13942" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13942/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13942">#13942</a> Provide some synchronization between <code class="notranslate">@Cacheable</code> and <code class="notranslate">@CacheEvict</code> annotated methods</li>
<li><a href="https://jira.spring.io/browse/DATAREDIS-443" rel="nofollow">DATAREDIS-443</a> Support of synchronized mode introduced in Spring 4.3</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398166405" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/16165" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/16165/hovercard" href="https://github.com/spring-projects/spring-framework/issues/16165">#16165</a> Support of ehcache's BlockingCache</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398188019" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/18383" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/18383/hovercard" href="https://github.com/spring-projects/spring-framework/issues/18383">#18383</a> Better synchronization in ConcurrentMapCache</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398192832" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/18804" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/18804/hovercard" href="https://github.com/spring-projects/spring-framework/issues/18804">#18804</a> Allow <code class="notranslate">@Cacheable</code> method to return java.util.Optional variant of cached value</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-data-redis/commit/1f97623a7ca52b9706488efa86e817983214c305/hovercard" href="https://github.com/spring-projects/spring-data-redis/commit/1f97623a7ca52b9706488efa86e817983214c305">spring-projects/spring-data-redis@<tt>1f97623</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-data-redis/commit/ceccafb6706a137713f376425a826c203a947814/hovercard" href="https://github.com/spring-projects/spring-data-redis/commit/ceccafb6706a137713f376425a826c203a947814">spring-projects/spring-data-redis@<tt>ceccafb</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-data-redis/commit/5cc5da919937625f21cb03141e92aa0ed3bbca50/hovercard" href="https://github.com/spring-projects/spring-data-redis/commit/5cc5da919937625f21cb03141e92aa0ed3bbca50">spring-projects/spring-data-redis@<tt>5cc5da9</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-data-redis/commit/a03c4442988b22a2d3a28196828e04a7daf9427d/hovercard" href="https://github.com/spring-projects/spring-data-redis/commit/a03c4442988b22a2d3a28196828e04a7daf9427d">spring-projects/spring-data-redis@<tt>a03c444</tt></a></p>
<p dir="auto">17 votes, 25 watchers</p> | 0 |
<p dir="auto">Additional information on Closed issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="149150776" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/8145" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/8145/hovercard" href="https://github.com/microsoft/TypeScript/issues/8145">#8145</a> (I don't think I have permission to re-open)</p>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.9</p>
<p dir="auto">Thanks for investigating.</p>
<p dir="auto">I noticed you are using <strong>tsc v1.8.10</strong> to try to reproduce.</p>
<p dir="auto">My globally-installed version is currently <strong>1.8.9</strong>.<br>
I think this version may have been installed with the recently-released VS Code 1.0.<br>
It is with VS Code that I first encountered the issue - but it also occurs at the command line (with <strong>tsc v 1.8.9</strong>)</p>
<p dir="auto">As an experiment, I used a local NPM install of <strong>tsc v.1.8.10</strong>.</p>
<p dir="auto">If i then invoke the compiler thus:</p>
<p dir="auto">.\node_modules.bin\tsc -p .</p>
<p dir="auto">the HelloWorld.js file is generated.</p>
<p dir="auto">So, for information:</p>
<ol dir="auto">
<li>Are you able to test this issue with <strong>tsc v1.8.9</strong>?<br>
and/or</li>
<li>Is there a VS2015 tools installer for <strong>tsc v1.8.10</strong> (which seems to resolve the problem) I can use?</li>
</ol>
<p dir="auto">I usually use this link to install the Typescript compiler and VS2015 tooling:<br>
<a href="https://www.microsoft.com/en-us/download/details.aspx?id=48593&751be11f-ede8-5a0c-058c-2ee190a24fa6=True" rel="nofollow">https://www.microsoft.com/en-us/download/details.aspx?id=48593&751be11f-ede8-5a0c-058c-2ee190a24fa6=True</a></p> | <p dir="auto">The issue is still there in v1.8.20160211.1-beta nightly. But works fine in node's 1.8 beta.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="where tsc
C:\Users\*\AppData\Roaming\npm\tsc
C:\Users\*\AppData\Roaming\npm\tsc.cmd"><pre class="notranslate"><code class="notranslate">where tsc
C:\Users\*\AppData\Roaming\npm\tsc
C:\Users\*\AppData\Roaming\npm\tsc.cmd
</code></pre></div>
<p dir="auto">Using node's tsc:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tsc
Files: 77
Lines: 53178
Nodes: 236600
Identifiers: 87604
Symbols: 3595694
Types: 13015
Memory used: 140666K
I/O read: 0.08s
I/O write: 0.01s
Parse time: 0.92s
Bind time: 0.68s
Check time: 1.88s
Emit time: 0.41s
Total time: 3.89s"><pre class="notranslate"><code class="notranslate">tsc
Files: 77
Lines: 53178
Nodes: 236600
Identifiers: 87604
Symbols: 3595694
Types: 13015
Memory used: 140666K
I/O read: 0.08s
I/O write: 0.01s
Parse time: 0.92s
Bind time: 0.68s
Check time: 1.88s
Emit time: 0.41s
Total time: 3.89s
</code></pre></div>
<p dir="auto">Using MSBuild tsc:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe"
Files: 1
Lines: 18651
Nodes: 81293
Identifiers: 31487
Symbols: 23122
Types: 4867
I/O read: 0.01s
I/O write: 0.00s
Parse time: 0.23s
Bind time: 0.12s
Check time: 0.49s
Emit time: 0.01s
Total time: 0.85s
"><pre class="notranslate"><code class="notranslate">"C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe"
Files: 1
Lines: 18651
Nodes: 81293
Identifiers: 31487
Symbols: 23122
Types: 4867
I/O read: 0.01s
I/O write: 0.00s
Parse time: 0.23s
Bind time: 0.12s
Check time: 0.49s
Emit time: 0.01s
Total time: 0.85s
</code></pre></div>
<p dir="auto">Sample tsconfig.json:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"diagnostics": true,
"inlineSourceMap": true,
"noResolve": false,
"outFile": "../output.es6",
"declaration": true,
"target": "es6",
"newLine": "CRLF"
}
}"><pre class="notranslate"><code class="notranslate">{
"compilerOptions": {
"diagnostics": true,
"inlineSourceMap": true,
"noResolve": false,
"outFile": "../output.es6",
"declaration": true,
"target": "es6",
"newLine": "CRLF"
}
}
</code></pre></div> | 1 |
<p dir="auto">This issue summarises the behaviour of julia when exposed to circular includes.<br>
The observed behaviour varies between julia versions from segfaults, irresponsive REPL or execution to rather intractable error messages.</p>
<p dir="auto">Even though circular includes are without a doubt a sign of bad code design, I'd find it desirable to see a more helpful error message and to avoid julia to run into a stack overflow or become irresponsive <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">๐</g-emoji>.</p>
<h2 dir="auto">To reproduce</h2>
<ul dir="auto">
<li>File <code class="notranslate">a.jl</code>:</li>
</ul>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="include("b.jl")"><pre class="notranslate"><span class="pl-c1">include</span>(<span class="pl-s"><span class="pl-pds">"</span>b.jl<span class="pl-pds">"</span></span>)</pre></div>
<ul dir="auto">
<li>File <code class="notranslate">b.jl</code>:</li>
</ul>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="include("a.jl")"><pre class="notranslate"><span class="pl-c1">include</span>(<span class="pl-s"><span class="pl-pds">"</span>a.jl<span class="pl-pds">"</span></span>)</pre></div>
<h2 dir="auto">Test cases</h2>
<ul dir="auto">
<li><strong>REPL</strong>: A plain <code class="notranslate">julia> include("a.jl")</code> was issued inside the REPL.</li>
<li><strong>script</strong>: I executed from a shell <code class="notranslate">julia a.jl</code>.</li>
</ul>
<h2 dir="auto">Result summary</h2>
<table role="table">
<thead>
<tr>
<th>julia version</th>
<th>REPL</th>
<th>script</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.1</td>
<td>segfault</td>
<td>lengthy StackOverflowError</td>
</tr>
<tr>
<td>1.2</td>
<td>lengthy StackOverflowError + irresponsive</td>
<td>irresponsive</td>
</tr>
<tr>
<td>1.3</td>
<td>lengthy StackOverflowError + irresponsive</td>
<td>irresponsive</td>
</tr>
</tbody>
</table>
<p dir="auto">The behaviour changes between 1.1 and 1.2. The 1.2+ REPL behaviour is to print the error message</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="LoadError: LoadError: LoadError: LoadError: LoadError: LoadError:
... (many more times and finally) ...
StackOverflowError:"><pre class="notranslate"><code class="notranslate">LoadError: LoadError: LoadError: LoadError: LoadError: LoadError:
... (many more times and finally) ...
StackOverflowError:
</code></pre></div>
<p dir="auto">followed by an irresponsive REPL. When run as a script on 1.2+ the only printed output is</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: "><pre class="notranslate"><code class="notranslate">ERROR:
</code></pre></div>
<p dir="auto">followed by an irresponsive julia process.</p>
<p dir="auto"><strong>Update:</strong> In fact "irresponsive" is not correct. The REPL/process just takes long (order of 2 minutes) to respond.</p> | <p dir="auto">This one is a bit tricky... (occurs on recent v0.5 builds from master, but not v0.4.6)</p>
<p dir="auto">If you have a specific sort of function containing a recursive call (like the one below), and <code class="notranslate">n</code> recursive calls leads to a Stack Overflow, then <em>sometimes</em> making <code class="notranslate">n-1</code> recursive calls leads to a Segmentation Fault.</p>
<p dir="auto">An example of such a function:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function f(x)
if x > 0
unshift!(f(x-1), 1)
else
[1]
end
end"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">f</span>(x)
<span class="pl-k">if</span> x <span class="pl-k">></span> <span class="pl-c1">0</span>
<span class="pl-c1">unshift!</span>(<span class="pl-c1">f</span>(x<span class="pl-k">-</span><span class="pl-c1">1</span>), <span class="pl-c1">1</span>)
<span class="pl-k">else</span>
[<span class="pl-c1">1</span>]
<span class="pl-k">end</span>
<span class="pl-k">end</span></pre></div>
<p dir="auto">I've also created a little test file that does a simple binary search of the number of iterations to trigger the bug: <a href="https://gist.github.com/jballanc/1734f3a735b62c89908b51bb375d6c3e">https://gist.github.com/jballanc/1734f3a735b62c89908b51bb375d6c3e</a></p>
<p dir="auto">There seems to be a dependance on how the above script is run that affects whether or not the crash is triggered. On my machine running in the Emacs terminal crashes, running in a normal terminal doesn't crash, but running it as <code class="notranslate">julia -e 'versioninfo(); include("crash.jl")'</code> does crash. Manually searching for the correct <code class="notranslate">n</code> in the REPL also crashes reliably.</p>
<p dir="auto">The stack trace at the point of the segfault is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(lldb) bt
* thread #3: tid = 0xa312d, 0x0000000100139c10 libjulia.0.5.0.dylib`libunwind::LocalAddressSpace::get64(this=0x00000001002f2958, addr=140734791204856) + 16 at AddressSpace.hpp:92, stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff5f3cbff8)
* frame #0: 0x0000000100139c10 libjulia.0.5.0.dylib`libunwind::LocalAddressSpace::get64(this=0x00000001002f2958, addr=140734791204856) + 16 at AddressSpace.hpp:92
frame #1: 0x000000010013e0fc libjulia.0.5.0.dylib`libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncodingRBPFrame(compactEncoding=16974177, functionStart=4295582032, addressSpace=0x00000001002f2958, registers=0x0000700000103768) + 812 at CompactUnwinder.hpp:618
frame #2: 0x000000010013dd58 libjulia.0.5.0.dylib`libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncoding(compactEncoding=16974177, functionStart=4295582032, addressSpace=0x00000001002f2958, registers=0x0000700000103768) + 120 at CompactUnwinder.hpp:545
frame #3: 0x000000010013dcd6 libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::stepWithCompactEncoding(this=0x0000700000103710, (null)=0x00007000001034e0) + 54 at UnwindCursor.hpp:339
frame #4: 0x000000010013b0ac libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::stepWithCompactEncoding(this=0x0000700000103710) + 60 at UnwindCursor.hpp:337
frame #5: 0x000000010013a4ea libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step(this=0x0000700000103710) + 90 at UnwindCursor.hpp:876
frame #6: 0x00000001001397fe libjulia.0.5.0.dylib`::unw_step(cursor=0x0000700000103710) + 30 at libuwind.cxx:288
frame #7: 0x0000000100090e19 libjulia.0.5.0.dylib`jl_unw_stepn [inlined] jl_unw_step(cursor=0x0000700000103710) + 441 at stackwalk.c:306 [opt]
frame #8: 0x0000000100090dd7 libjulia.0.5.0.dylib`jl_unw_stepn(cursor=0x0000700000103710, ip=0x0000000103cb9000, sp=<unavailable>, maxsize=80000) + 375 at stackwalk.c:46 [opt]
frame #9: 0x0000000100090ecf libjulia.0.5.0.dylib`rec_backtrace_ctx(data=0x0000000103cb9000, maxsize=80000, context=<unavailable>) + 63 at stackwalk.c:75 [opt]
frame #10: 0x00000001000815fd libjulia.0.5.0.dylib`jl_throw_in_thread(tid=<unavailable>, thread=1295, exception=0x0000000105c49b38) + 109 at signals-mach.c:131 [opt]
frame #11: 0x00000001000819b6 libjulia.0.5.0.dylib`catch_exception_raise(exception_port=<unavailable>, thread=1295, task=<unavailable>, exception=<unavailable>, code=<unavailable>, code_count=<unavailable>) + 822 at signals-mach.c:227 [opt]
frame #12: 0x00007fff8bfac440 libsystem_kernel.dylib`_Xexception_raise + 130
frame #13: 0x00007fff8bfac6fe libsystem_kernel.dylib`exc_server + 78
frame #14: 0x00007fff8bfbbce0 libsystem_kernel.dylib`mach_msg_server + 504
frame #15: 0x000000010008155d libjulia.0.5.0.dylib`mach_segv_listener(arg=<unavailable>) + 29 at signals-mach.c:73 [opt]
frame #16: 0x00007fff8d37199d libsystem_pthread.dylib`_pthread_body + 131
frame #17: 0x00007fff8d37191a libsystem_pthread.dylib`_pthread_start + 168
frame #18: 0x00007fff8d36f351 libsystem_pthread.dylib`thread_start + 13"><pre class="notranslate"><code class="notranslate">(lldb) bt
* thread #3: tid = 0xa312d, 0x0000000100139c10 libjulia.0.5.0.dylib`libunwind::LocalAddressSpace::get64(this=0x00000001002f2958, addr=140734791204856) + 16 at AddressSpace.hpp:92, stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff5f3cbff8)
* frame #0: 0x0000000100139c10 libjulia.0.5.0.dylib`libunwind::LocalAddressSpace::get64(this=0x00000001002f2958, addr=140734791204856) + 16 at AddressSpace.hpp:92
frame #1: 0x000000010013e0fc libjulia.0.5.0.dylib`libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncodingRBPFrame(compactEncoding=16974177, functionStart=4295582032, addressSpace=0x00000001002f2958, registers=0x0000700000103768) + 812 at CompactUnwinder.hpp:618
frame #2: 0x000000010013dd58 libjulia.0.5.0.dylib`libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncoding(compactEncoding=16974177, functionStart=4295582032, addressSpace=0x00000001002f2958, registers=0x0000700000103768) + 120 at CompactUnwinder.hpp:545
frame #3: 0x000000010013dcd6 libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::stepWithCompactEncoding(this=0x0000700000103710, (null)=0x00007000001034e0) + 54 at UnwindCursor.hpp:339
frame #4: 0x000000010013b0ac libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::stepWithCompactEncoding(this=0x0000700000103710) + 60 at UnwindCursor.hpp:337
frame #5: 0x000000010013a4ea libjulia.0.5.0.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step(this=0x0000700000103710) + 90 at UnwindCursor.hpp:876
frame #6: 0x00000001001397fe libjulia.0.5.0.dylib`::unw_step(cursor=0x0000700000103710) + 30 at libuwind.cxx:288
frame #7: 0x0000000100090e19 libjulia.0.5.0.dylib`jl_unw_stepn [inlined] jl_unw_step(cursor=0x0000700000103710) + 441 at stackwalk.c:306 [opt]
frame #8: 0x0000000100090dd7 libjulia.0.5.0.dylib`jl_unw_stepn(cursor=0x0000700000103710, ip=0x0000000103cb9000, sp=<unavailable>, maxsize=80000) + 375 at stackwalk.c:46 [opt]
frame #9: 0x0000000100090ecf libjulia.0.5.0.dylib`rec_backtrace_ctx(data=0x0000000103cb9000, maxsize=80000, context=<unavailable>) + 63 at stackwalk.c:75 [opt]
frame #10: 0x00000001000815fd libjulia.0.5.0.dylib`jl_throw_in_thread(tid=<unavailable>, thread=1295, exception=0x0000000105c49b38) + 109 at signals-mach.c:131 [opt]
frame #11: 0x00000001000819b6 libjulia.0.5.0.dylib`catch_exception_raise(exception_port=<unavailable>, thread=1295, task=<unavailable>, exception=<unavailable>, code=<unavailable>, code_count=<unavailable>) + 822 at signals-mach.c:227 [opt]
frame #12: 0x00007fff8bfac440 libsystem_kernel.dylib`_Xexception_raise + 130
frame #13: 0x00007fff8bfac6fe libsystem_kernel.dylib`exc_server + 78
frame #14: 0x00007fff8bfbbce0 libsystem_kernel.dylib`mach_msg_server + 504
frame #15: 0x000000010008155d libjulia.0.5.0.dylib`mach_segv_listener(arg=<unavailable>) + 29 at signals-mach.c:73 [opt]
frame #16: 0x00007fff8d37199d libsystem_pthread.dylib`_pthread_body + 131
frame #17: 0x00007fff8d37191a libsystem_pthread.dylib`_pthread_start + 168
frame #18: 0x00007fff8d36f351 libsystem_pthread.dylib`thread_start + 13
</code></pre></div> | 1 |
<p dir="auto">If a package is uninstalled while disabled, its entry in 'disabledPackages' is left behind. It should probably be deleted.</p>
<p dir="auto">Similarly, any config for the package being removed is also left in <code class="notranslate">config.cson</code>. There is possibly more of a reason to leave this behind (don't want to nuke the user's settings), but deletion of these should maybe also be considered.</p>
<p dir="auto">Not a huge deal, just something I noticed.</p> | <p dir="auto">In Atom, it's not possible to begin or end a selection at the midpoint of an indent, because the caret can't be jumped there. But as a text editor, I think it should be able to do anything a normal text editor can do, regardless of whether it's meaningful or not.</p>
<p dir="auto">My suggestion: leave the default "as is", but add an option to disable the "quick jump".</p> | 0 |
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System: Kubernetes/Ubuntu 14.04</p>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>start tensorflow server on kubernetes using yaml generated by <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/dist_test/scripts/k8s_tensorflow.py">the python code</a></li>
<li>Start tensorflow code:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python mnist_dnn.py --worker_grpc_url=grpc://180.101.191.78:30001 --worker_index=0 --workers=180.101.191.78:30001,180.101.191.78:30002,180.101.191.78:30003 --parameter_servers=tf-ps0:2222,tf-ps1:2222"><pre class="notranslate"><code class="notranslate">python mnist_dnn.py --worker_grpc_url=grpc://180.101.191.78:30001 --worker_index=0 --workers=180.101.191.78:30001,180.101.191.78:30002,180.101.191.78:30003 --parameter_servers=tf-ps0:2222,tf-ps1:2222
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python mnist_dnn.py --worker_grpc_url=grpc://180.101.191.78:30002 --worker_index=1 --workers=180.101.191.78:30001,180.101.191.78:30002,180.101.191.78:30003 --parameter_servers=tf-ps0:2222,tf-ps1:2222"><pre class="notranslate"><code class="notranslate">python mnist_dnn.py --worker_grpc_url=grpc://180.101.191.78:30002 --worker_index=1 --workers=180.101.191.78:30001,180.101.191.78:30002,180.101.191.78:30003 --parameter_servers=tf-ps0:2222,tf-ps1:2222
</code></pre></div>
<h3 dir="auto">What have you tried?</h3>
<ol dir="auto">
<li>The worker with index 0 (chief) can execute normally.</li>
<li>It was able to execute well (using the same yaml and code)</li>
<li>I tried to restart the servers, but it didn't work.</li>
<li>All other workers stuck at <code class="notranslate">prepare_or_wait_for_session</code>. However, it seems that logs suggest other workers are actually executing.</li>
</ol>
<p dir="auto">Log is <a href="https://github.com/tensorflow/tensorflow/files/332895/log.txt">here</a> and the code is here:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sys
import time
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import datetime
flags = tf.app.flags
flags.DEFINE_string("data_dir", "/tmp/data",
"Directory for storing mnist data")
flags.DEFINE_boolean("download_only", False,
"Only perform downloading of data; Do not proceed to "
"session preparation, model definition or training")
flags.DEFINE_integer("worker_index", 0,
"Worker task index, should be >= 0. worker_index=0 is "
"the master worker task the performs the variable "
"initialization ")
flags.DEFINE_string("workers", None,
"The worker url list, separated by comma (e.g. tf-worker1:2222,1.2.3.4:2222)")
flags.DEFINE_string("parameter_servers", None,
"The ps url list, separated by comma (e.g. tf-ps2:2222,1.2.3.5:2222)")
flags.DEFINE_integer("grpc_port", 2222,
"TensorFlow GRPC port")
flags.DEFINE_integer("train_steps", 200000,
"Number of (global) training steps to perform")
flags.DEFINE_string("worker_grpc_url", None,
"Worker GRPC URL (e.g., grpc://1.2.3.4:2222, or "
"grpc://tf-worker0:2222)")
FLAGS = flags.FLAGS
cur_time = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
def nn_layer(input_tensor, input_dim, output_dim, act=tf.nn.relu):
with tf.name_scope(cur_time):
weights = tf.Variable(tf.truncated_normal([input_dim, output_dim], stddev=0.1))
biases = tf.Variable(tf.constant(0.1, shape=[output_dim]))
activations = act(tf.matmul(input_tensor, weights) + biases)
return activations
def model(x, y_, global_step):
hidden_nodes = 500
hidden1 = nn_layer(x, 784, hidden_nodes)
y = nn_layer(hidden1, hidden_nodes, 10, act=tf.nn.softmax)
cross_entropy = -tf.reduce_mean(y_ * tf.log(tf.clip_by_value(y, 1e-10, 1.0)))
train_step = tf.train.AdamOptimizer(0.001).minimize(cross_entropy, global_step=global_step)
correct_prediction = tf.equal(tf.argmax(y, 1), tf.argmax(y_, 1))
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
return train_step, accuracy
print("Loading data from worker index = %d" % FLAGS.worker_index)
mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True)
print("Testing set size: %d" % len(mnist.test.images))
print("Training set size: %d" % len(mnist.train.images))
if FLAGS.download_only: sys.exit(0)
print("Worker GRPC URL: %s" % FLAGS.worker_grpc_url)
print("Workers = %s" % FLAGS.workers)
print("Using time = %s" % cur_time)
is_chief = (FLAGS.worker_index == 0)
cluster = tf.train.ClusterSpec({"ps": FLAGS.parameter_servers.split(","), "worker": FLAGS.workers.split(",")})
# Construct device setter object
device_setter = tf.train.replica_device_setter(cluster=cluster)
# The device setter will automatically place Variables ops on separate
# parameter servers (ps). The non-Variable ops will be placed on the workers.
with tf.device(device_setter):
with tf.name_scope(cur_time):
global_step = tf.Variable(0, trainable=False)
x = tf.placeholder(tf.float32, [None, 784])
y_ = tf.placeholder(tf.float32, [None, 10])
val_feed = {x: mnist.test.images, y_: mnist.test.labels}
train_step, accuracy = model(x, y_, global_step)
sv = tf.train.Supervisor(is_chief=is_chief,
logdir="/tmp/dist-mnist-log/train",
saver=tf.train.Saver(),
init_op=tf.initialize_all_variables(),
recovery_wait_secs=1,
global_step=global_step)
sess_config = tf.ConfigProto(allow_soft_placement=True, log_device_placement=True,
device_filters=["/job:ps", "/job:worker/task:%d" % FLAGS.worker_index])
# The chief worker (worker_index==0) session will prepare the session,
# while the remaining workers will wait for the preparation to complete.
if is_chief:
print("Worker %d: Initializing session..." % FLAGS.worker_index)
else:
print("Worker %d: Waiting for session to be initialized..." % FLAGS.worker_index)
with sv.prepare_or_wait_for_session(FLAGS.worker_grpc_url, config=sess_config) as sess:
print("Worker %d: Session initialization complete." % FLAGS.worker_index)
# Perform training
time_begin = time.time()
print("Training begins @ %f" % time_begin)
local_step = 0
while True:
# Training feed
batch_xs, batch_ys = mnist.train.next_batch(100)
train_feed = {x: batch_xs, y_: batch_ys}
_, step = sess.run([train_step, global_step], feed_dict=train_feed)
local_step += 1
if local_step % 100 == 0:
print("Worker %d: training step %d done (global step: %d); Accuracy: %g" %
(FLAGS.worker_index, local_step, step, sess.run(accuracy, feed_dict=val_feed)))
if step >= FLAGS.train_steps: break
time_end = time.time()
print("Training ends @ %f" % time_end)
training_time = time_end - time_begin
print("Training elapsed time: %f s" % training_time)
# Accuracy on test data
print("Final test accuracy = %g" % (sess.run(accuracy, feed_dict=val_feed)))"><pre class="notranslate"><code class="notranslate">import sys
import time
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import datetime
flags = tf.app.flags
flags.DEFINE_string("data_dir", "/tmp/data",
"Directory for storing mnist data")
flags.DEFINE_boolean("download_only", False,
"Only perform downloading of data; Do not proceed to "
"session preparation, model definition or training")
flags.DEFINE_integer("worker_index", 0,
"Worker task index, should be >= 0. worker_index=0 is "
"the master worker task the performs the variable "
"initialization ")
flags.DEFINE_string("workers", None,
"The worker url list, separated by comma (e.g. tf-worker1:2222,1.2.3.4:2222)")
flags.DEFINE_string("parameter_servers", None,
"The ps url list, separated by comma (e.g. tf-ps2:2222,1.2.3.5:2222)")
flags.DEFINE_integer("grpc_port", 2222,
"TensorFlow GRPC port")
flags.DEFINE_integer("train_steps", 200000,
"Number of (global) training steps to perform")
flags.DEFINE_string("worker_grpc_url", None,
"Worker GRPC URL (e.g., grpc://1.2.3.4:2222, or "
"grpc://tf-worker0:2222)")
FLAGS = flags.FLAGS
cur_time = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
def nn_layer(input_tensor, input_dim, output_dim, act=tf.nn.relu):
with tf.name_scope(cur_time):
weights = tf.Variable(tf.truncated_normal([input_dim, output_dim], stddev=0.1))
biases = tf.Variable(tf.constant(0.1, shape=[output_dim]))
activations = act(tf.matmul(input_tensor, weights) + biases)
return activations
def model(x, y_, global_step):
hidden_nodes = 500
hidden1 = nn_layer(x, 784, hidden_nodes)
y = nn_layer(hidden1, hidden_nodes, 10, act=tf.nn.softmax)
cross_entropy = -tf.reduce_mean(y_ * tf.log(tf.clip_by_value(y, 1e-10, 1.0)))
train_step = tf.train.AdamOptimizer(0.001).minimize(cross_entropy, global_step=global_step)
correct_prediction = tf.equal(tf.argmax(y, 1), tf.argmax(y_, 1))
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
return train_step, accuracy
print("Loading data from worker index = %d" % FLAGS.worker_index)
mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True)
print("Testing set size: %d" % len(mnist.test.images))
print("Training set size: %d" % len(mnist.train.images))
if FLAGS.download_only: sys.exit(0)
print("Worker GRPC URL: %s" % FLAGS.worker_grpc_url)
print("Workers = %s" % FLAGS.workers)
print("Using time = %s" % cur_time)
is_chief = (FLAGS.worker_index == 0)
cluster = tf.train.ClusterSpec({"ps": FLAGS.parameter_servers.split(","), "worker": FLAGS.workers.split(",")})
# Construct device setter object
device_setter = tf.train.replica_device_setter(cluster=cluster)
# The device setter will automatically place Variables ops on separate
# parameter servers (ps). The non-Variable ops will be placed on the workers.
with tf.device(device_setter):
with tf.name_scope(cur_time):
global_step = tf.Variable(0, trainable=False)
x = tf.placeholder(tf.float32, [None, 784])
y_ = tf.placeholder(tf.float32, [None, 10])
val_feed = {x: mnist.test.images, y_: mnist.test.labels}
train_step, accuracy = model(x, y_, global_step)
sv = tf.train.Supervisor(is_chief=is_chief,
logdir="/tmp/dist-mnist-log/train",
saver=tf.train.Saver(),
init_op=tf.initialize_all_variables(),
recovery_wait_secs=1,
global_step=global_step)
sess_config = tf.ConfigProto(allow_soft_placement=True, log_device_placement=True,
device_filters=["/job:ps", "/job:worker/task:%d" % FLAGS.worker_index])
# The chief worker (worker_index==0) session will prepare the session,
# while the remaining workers will wait for the preparation to complete.
if is_chief:
print("Worker %d: Initializing session..." % FLAGS.worker_index)
else:
print("Worker %d: Waiting for session to be initialized..." % FLAGS.worker_index)
with sv.prepare_or_wait_for_session(FLAGS.worker_grpc_url, config=sess_config) as sess:
print("Worker %d: Session initialization complete." % FLAGS.worker_index)
# Perform training
time_begin = time.time()
print("Training begins @ %f" % time_begin)
local_step = 0
while True:
# Training feed
batch_xs, batch_ys = mnist.train.next_batch(100)
train_feed = {x: batch_xs, y_: batch_ys}
_, step = sess.run([train_step, global_step], feed_dict=train_feed)
local_step += 1
if local_step % 100 == 0:
print("Worker %d: training step %d done (global step: %d); Accuracy: %g" %
(FLAGS.worker_index, local_step, step, sess.run(accuracy, feed_dict=val_feed)))
if step >= FLAGS.train_steps: break
time_end = time.time()
print("Training ends @ %f" % time_end)
training_time = time_end - time_begin
print("Training elapsed time: %f s" % training_time)
# Accuracy on test data
print("Final test accuracy = %g" % (sess.run(accuracy, feed_dict=val_feed)))
</code></pre></div> | <p dir="auto">I tried both Distributed <a href="https://www.tensorflow.org/versions/r0.8/how_tos/distributed/index.html" rel="nofollow">tensorflow</a> and <a href="https://github.com/tensorflow/tensorflow/files/271770/mnist_softmax.py.txt">minist_softmax.py.txt</a>. They both hang at the prepare_or_wait_for_session() function with non-chief worker tasks.</p>
<p dir="auto">task_index == 0(chief worker ) can run as expected.<br>
I can not find out the reasion why it behaves like this.<br>
Can anyone please give some advice?</p> | 1 |
<p dir="auto">I noticed <code class="notranslate">next build</code> started to take quite some time, so long in fact that it started to fail with an exit code 137 when I deploy to <code class="notranslate">now</code>. It turns out <code class="notranslate">__tests__</code> directories within <code class="notranslate">pages/</code> caused it. Once I deleted them, which includes Jest snapshot files, <code class="notranslate">next build</code> took about a minute and worked fine when deploying to <code class="notranslate">now</code>.</p>
<p dir="auto">My apologies if this has been discussed already, but I couldn't find anything on Github or in Slack. Is this a known issue? Do others have their test files within <code class="notranslate">pages/</code>?</p> | <p dir="auto">I'm trying to configure</p>
<blockquote>
<p dir="auto"><a href="https://github.com/VanquisherMe/with-nextjs-antd-app/blob/master/next.config.js#L28">https://github.com/VanquisherMe/with-nextjs-antd-app/blob/master/next.config.js#L28</a></p>
</blockquote>
<p dir="auto">I need to load it on demand ๏ผโlessโ mode</p>
<blockquote>
<p dir="auto"><a href="https://github.com/VanquisherMe/with-nextjs-antd-app/blob/master/.babelrc#L9">https://github.com/VanquisherMe/with-nextjs-antd-app/blob/master/.babelrc#L9</a></p>
</blockquote>
<p dir="auto">I tried many times but I didn't get it right<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4927398/45595135-a01b8500-b9d9-11e8-9471-4feaa9bc031f.png"><img src="https://user-images.githubusercontent.com/4927398/45595135-a01b8500-b9d9-11e8-9471-4feaa9bc031f.png" alt="fa86fbf0-8c5d-4fe5-8f7a-25f7b65a9ca3" style="max-width: 100%;"></a></p>
<p dir="auto">I have ever seen</p>
<blockquote>
<p dir="auto"><a href="https://github.com/zeit/next.js/tree/canary/examples/with-ant-design-less">https://github.com/zeit/next.js/tree/canary/examples/with-ant-design-less</a></p>
</blockquote>
<p dir="auto">But this is not for the project<br>
<strong>I need an example</strong></p> | 0 |
<p dir="auto">Hi,</p>
<p dir="auto">I find that optimizer enforces every parameter to be <code class="notranslate">requires_grad=True</code>. However, if I used such a network where the first layer was a pre-trained <code class="notranslate">AlexNet</code> with every parameter set to <code class="notranslate">requires_grad = False</code>, and rest layers were left <code class="notranslate">requires_grad = True</code>, pytorch would complain <code class="notranslate">optimizing a parameter that doesn't require gradients</code>. Because in <code class="notranslate">model.parameters()</code>, some parameters do not require gradients.</p>
<p dir="auto">Is there anything wrong with my method of freezing part of the model? or would it be better to enforce that not all parameters are set <code class="notranslate">requires_grad=False</code> .</p> | <h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">๐</g-emoji> Bug</h2>
<p dir="auto">Many projects use QT for UI, but when compiling such code a special keyword "slots" is defined, which conflicts with the 'slots' function defined in IValue. Since IValue.h ends up being included when including Torch headers, this prevents using Torch in any code that also does QT stuff.</p>
<p dir="auto">Even though this is not the fault of Torch, since QT is a popular cross-platform GUI library, it would probably be great for usability if that function is somehow renamed or some other smart trick is used.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<p dir="auto">Tested with current Torch master.</p>
<ol dir="auto">
<li>Include some Torch headers in a file that uses QT slots functionality.</li>
</ol> | 0 |
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
fig, (ax1, ax2) = plt.subplots(1, 2, True, False)
x1 = [1, 2, 3, 4, 5, 6, 7, 8, 9]
y1 = [x*x for x in x1]
ax1.plot(x1, y1)
x2=y2=[]
ax2.plot(x2, y2)
plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-s1">fig</span>, (<span class="pl-s1">ax1</span>, <span class="pl-s1">ax2</span>) <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>(<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">True</span>, <span class="pl-c1">False</span>)
<span class="pl-s1">x1</span> <span class="pl-c1">=</span> [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>, <span class="pl-c1">5</span>, <span class="pl-c1">6</span>, <span class="pl-c1">7</span>, <span class="pl-c1">8</span>, <span class="pl-c1">9</span>]
<span class="pl-s1">y1</span> <span class="pl-c1">=</span> [<span class="pl-s1">x</span><span class="pl-c1">*</span><span class="pl-s1">x</span> <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-s1">x1</span>]
<span class="pl-s1">ax1</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x1</span>, <span class="pl-s1">y1</span>)
<span class="pl-s1">x2</span><span class="pl-c1">=</span><span class="pl-s1">y2</span><span class="pl-c1">=</span>[]
<span class="pl-s1">ax2</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x2</span>, <span class="pl-s1">y2</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto">Now ax1.get_xlim() returns erroneous (-0.06, 0.06) because when bounding boxes of two plots are united, infinitely small bounding box of ax2 (Bbox('array([[ inf, inf],\n [-inf, -inf]])')) is considered infinitely large in transforms.BboxBase.union(). E. g. transforms.BboxBase.union([ax1.dataLim, ax2.dataLim]) returns Bbox('array([[-inf, -inf],\n [ inf, inf]])') which is incorrect.</p>
<p dir="auto">This bug prevents correct display of two plots with shared axis while one of them has empty data.</p> | <p dir="auto">Looks like I missed two points when reviewing <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tacaswell/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tacaswell">@tacaswell</a>'s parts of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="323037208" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/11246" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/11246/hovercard" href="https://github.com/matplotlib/matplotlib/pull/11246">#11246</a>: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="323037208" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/11246" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/11246/hovercard?comment_id=204527495&comment_type=review" href="https://github.com/matplotlib/matplotlib/pull/11246#pullrequestreview-204527495">#11246 (review)</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="323037208" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/11246" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/11246/hovercard?comment_id=204536283&comment_type=review" href="https://github.com/matplotlib/matplotlib/pull/11246#pullrequestreview-204536283">#11246 (review)</a>.</p> | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.