text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<p dir="auto">Ubuntu doesn't show up in the terminal. Its installed on my machine but the new terminal is recognizing it.</p> | <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.18362.295
Windows Terminal version (if applicable): 0.4.2382.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.295
Windows Terminal version (if applicable): 0.4.2382.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>In your profiles.json, create two profiles (we will call them A and B)</li>
<li>Give A the space background image and B the tree background image (attached at the bottom)</li>
<li>Open windows terminal with A as the default profile</li>
<li>Open B in a new tab</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">There should ideally be no delay in loading the background images.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">When we start with profile A, there will be no delay. However, when opening profile B we see the background is gray for small moment of time. Afterwards, the image loads normally. If we switch between tabs every 1.5 seconds(ish) when going from A to B the image has a delay loading. But if switch quickly there will be no delay. I will add a gif showing the result happening. I'll also add both of the background images I'm using.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/26442377/64492305-a933e080-d240-11e9-880b-9299dd703447.jpg"><img src="https://user-images.githubusercontent.com/26442377/64492305-a933e080-d240-11e9-880b-9299dd703447.jpg" alt="space" style="max-width: 100%;"></a><br>
This is image for profile A.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/26442377/64492317-bfda3780-d240-11e9-8d69-02d8b25ace3a.jpg"><img src="https://user-images.githubusercontent.com/26442377/64492317-bfda3780-d240-11e9-8d69-02d8b25ace3a.jpg" alt="sshspace2" style="max-width: 100%;"></a><br>
This is image for profile B.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/26442377/64492400-66263d00-d241-11e9-832e-1ef6dcc31891.gif"><img src="https://user-images.githubusercontent.com/26442377/64492400-66263d00-d241-11e9-832e-1ef6dcc31891.gif" alt="School2019-09-0813-45-54" data-animated-image="" style="max-width: 100%;"></a><br>
The issue in action.</p> | 0 |
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">In some circumstances, <code class="notranslate">next build</code> is failing in CI environment (CircleCI) with the exception `Callback was already called'.</p>
<p dir="auto">There is a random factor and it's not happening 100% of the time, but more than 50% at the moment.</p>
<p dir="auto">This is triggered from the <code class="notranslate">neo-async</code> package which is used by <code class="notranslate">webpack</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/home/circleci/project/node_modules/neo-async/async.js:14
throw new Error('Callback was already called.');
^
Error: Callback was already called.
at throwError (/home/circleci/project/node_modules/neo-async/async.js:14:11)
at /home/circleci/project/node_modules/neo-async/async.js:2805:7
at afterBuild (/home/circleci/project/node_modules/webpack/lib/Compilation.js:859:17)
at processTicksAndRejections (internal/process/next_tick.js:74:9)"><pre class="notranslate"><code class="notranslate">/home/circleci/project/node_modules/neo-async/async.js:14
throw new Error('Callback was already called.');
^
Error: Callback was already called.
at throwError (/home/circleci/project/node_modules/neo-async/async.js:14:11)
at /home/circleci/project/node_modules/neo-async/async.js:2805:7
at afterBuild (/home/circleci/project/node_modules/webpack/lib/Compilation.js:859:17)
at processTicksAndRejections (internal/process/next_tick.js:74:9)
</code></pre></div>
<h2 dir="auto">Example</h2>
<p dir="auto">See for example: <a href="https://circleci.com/gh/opencollective/opencollective-frontend/5926" rel="nofollow">https://circleci.com/gh/opencollective/opencollective-frontend/5926</a></p>
<h2 dir="auto">Version</h2>
<p dir="auto">This is a new issue after upgrading to next 8.0.x, we never had it with next 7.0.x.</p> | <p dir="auto">If you look into the next.js doc you'll see:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/15319886/31860423-b9ea81f4-b726-11e7-9c6f-fcb2651562f9.png"><img src="https://user-images.githubusercontent.com/15319886/31860423-b9ea81f4-b726-11e7-9c6f-fcb2651562f9.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">since I want to use this buildId to make a predefined service worker file(not using runtime caching), I wonder why buildId for app.js differs from other js files. you can see screenshot of this behaviour in my project:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/15319886/31860444-089c1ab0-b727-11e7-89da-34a386290da6.png"><img src="https://user-images.githubusercontent.com/15319886/31860444-089c1ab0-b727-11e7-89da-34a386290da6.png" alt="image" style="max-width: 100%;"></a></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">I think buildId should be a constant value between all files.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">buildId for app.js is different from all other next.js generated js files.</p> | 0 |
<h1 dir="auto">Bug report</h1>
<p dir="auto">I initially opened this as an issue in <code class="notranslate">karma-webpack</code>, but <a href="https://github.com/ryanclark/karma-webpack/issues/497#issuecomment-784434254" data-hovercard-type="issue" data-hovercard-url="/ryanclark/karma-webpack/issues/497/hovercard">found the code responsible to be in <code class="notranslate">[email protected]</code></a>.</p>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Uncaught TypeError: Cannot read property 'webpackChunk' of undefined
at C:/Users/%USERNAME%/AppData/Local/Temp/_karma_webpack_645953/runtime.js:100:64
TypeError: Cannot read property 'webpackChunk' of undefined
at C:/Users/%USERNAME%/AppData/Local/Temp/_karma_webpack_645953/runtime.js:100:64
at C:/Users/%USERNAME%/AppData/Local/Temp/_karma_webpack_645953/runtime.js:130:12
at C:/Users/%USERNAME%/AppData/Local/Temp/_karma_webpack_645953/runtime.js:137:12"><pre class="notranslate"><span class="pl-v">Uncaught</span> TypeError: <span class="pl-v">Cannot</span> <span class="pl-s1">read</span> <span class="pl-s1">property</span> <span class="pl-s">'webpackChunk'</span> <span class="pl-s1">of</span> <span class="pl-c1">undefined</span>
at <span class="pl-v">C</span>:<span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span></span><span class="pl-c1">%</span><span class="pl-c1">USERNAME</span><span class="pl-c1">%</span><span class="pl-pds"><span class="pl-c1">/</span>AppData<span class="pl-c1">/</span></span><span class="pl-v">Local</span><span class="pl-c1">/</span><span class="pl-v">Temp</span><span class="pl-c1">/</span><span class="pl-s1">_karma_webpack_645953</span><span class="pl-c1">/</span><span class="pl-s1">runtime</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">100</span>:<span class="pl-c1">64</span>
TypeError: <span class="pl-v">Cannot</span> <span class="pl-s1">read</span> <span class="pl-s1">property</span> <span class="pl-s">'webpackChunk'</span> <span class="pl-s1">of</span> <span class="pl-c1">undefined</span>
at <span class="pl-v">C</span>:<span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span></span><span class="pl-c1">%</span><span class="pl-c1">USERNAME</span><span class="pl-c1">%</span><span class="pl-pds"><span class="pl-c1">/</span>AppData<span class="pl-c1">/</span></span><span class="pl-v">Local</span><span class="pl-c1">/</span><span class="pl-v">Temp</span><span class="pl-c1">/</span><span class="pl-s1">_karma_webpack_645953</span><span class="pl-c1">/</span><span class="pl-s1">runtime</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">100</span>:<span class="pl-c1">64</span>
at <span class="pl-v">C</span>:<span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span></span><span class="pl-c1">%</span><span class="pl-c1">USERNAME</span><span class="pl-c1">%</span><span class="pl-pds"><span class="pl-c1">/</span>AppData<span class="pl-c1">/</span></span><span class="pl-v">Local</span><span class="pl-c1">/</span><span class="pl-v">Temp</span><span class="pl-c1">/</span><span class="pl-s1">_karma_webpack_645953</span><span class="pl-c1">/</span><span class="pl-s1">runtime</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">130</span>:<span class="pl-c1">12</span>
at <span class="pl-v">C</span>:<span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span></span><span class="pl-c1">%</span><span class="pl-c1">USERNAME</span><span class="pl-c1">%</span><span class="pl-pds"><span class="pl-c1">/</span>AppData<span class="pl-c1">/</span></span><span class="pl-v">Local</span><span class="pl-c1">/</span><span class="pl-v">Temp</span><span class="pl-c1">/</span><span class="pl-s1">_karma_webpack_645953</span><span class="pl-c1">/</span><span class="pl-s1">runtime</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">137</span>:<span class="pl-c1">12</span></pre></div>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<ol dir="auto">
<li>set <code class="notranslate">output.globalObject</code> to <code class="notranslate">"this"</code>
<ul dir="auto">
<li>setting <code class="notranslate">output.libraryTarget</code> to <code class="notranslate">"umd"</code> does not seem to change the end result</li>
</ul>
</li>
</ol>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">No errors to be thrown by Webpack's bootstrap code.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: <code class="notranslate">5.23.0</code><br>
Node.js version: <code class="notranslate">14.2.0</code><br>
Operating System: <code class="notranslate">Windows 10</code><br>
Additional tools:</p>
<ul dir="auto">
<li>NPM Version: <code class="notranslate">6.14.11</code> (yarn: <code class="notranslate">1.22.5</code>)</li>
<li>see <code class="notranslate">package.json</code> below for more tools (10 dependencies total, including webpack)</li>
</ul>
<details>
<summary>minimal <code class="notranslate">package.json</code></summary>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// ./package.json
{
"private": true,
"scripts": {
"test": "karma start"
},
"devDependencies": {
"@babel/core": "7.12.17",
"@babel/preset-env": "7.12.17",
"babel-loader": "8.2.2",
"core-js": "3.9.0",
"karma": "6.1.1",
"karma-chrome-launcher": "3.1.0",
"karma-ie-launcher": "1.0.0",
"karma-jasmine": "4.0.1",
"karma-webpack": "5.0.0",
"webpack": "5.23.0"
},
"browserslist": [
"last 1 chrome version",
"last 1 edge version",
"last 1 firefox version",
"last 1 safari version",
"ie 11"
]
}
"><pre class="notranslate"><span class="pl-c">// ./package.json</span>
<span class="pl-kos">{</span>
<span class="pl-s">"private"</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-s">"scripts"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"test"</span>: <span class="pl-s">"karma start"</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-s">"devDependencies"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"@babel/core"</span>: <span class="pl-s">"7.12.17"</span><span class="pl-kos">,</span>
<span class="pl-s">"@babel/preset-env"</span>: <span class="pl-s">"7.12.17"</span><span class="pl-kos">,</span>
<span class="pl-s">"babel-loader"</span>: <span class="pl-s">"8.2.2"</span><span class="pl-kos">,</span>
<span class="pl-s">"core-js"</span>: <span class="pl-s">"3.9.0"</span><span class="pl-kos">,</span>
<span class="pl-s">"karma"</span>: <span class="pl-s">"6.1.1"</span><span class="pl-kos">,</span>
<span class="pl-s">"karma-chrome-launcher"</span>: <span class="pl-s">"3.1.0"</span><span class="pl-kos">,</span>
<span class="pl-s">"karma-ie-launcher"</span>: <span class="pl-s">"1.0.0"</span><span class="pl-kos">,</span>
<span class="pl-s">"karma-jasmine"</span>: <span class="pl-s">"4.0.1"</span><span class="pl-kos">,</span>
<span class="pl-s">"karma-webpack"</span>: <span class="pl-s">"5.0.0"</span><span class="pl-kos">,</span>
<span class="pl-s">"webpack"</span>: <span class="pl-s">"5.23.0"</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-s">"browserslist"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"last 1 chrome version"</span><span class="pl-kos">,</span>
<span class="pl-s">"last 1 edge version"</span><span class="pl-kos">,</span>
<span class="pl-s">"last 1 firefox version"</span><span class="pl-kos">,</span>
<span class="pl-s">"last 1 safari version"</span><span class="pl-kos">,</span>
<span class="pl-s">"ie 11"</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
</details>
<details>
<summary>babel, webpack, and karma configurations</summary>
<p dir="auto">My original webpack configuration was a modified version of <code class="notranslate">react-scripts</code>, which also uses <code class="notranslate">output.globalObject: "this"</code>.</p>
<p dir="auto">While debugging the error, I stripped karma, webpack, and babel configurations to the minimum:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// ./karma.conf.js
process.env.BABEL_ENV = 'test'
process.env.NODE_ENV = 'test'
const path = require('path')
module.exports = function(config) {
config.set({
plugins: [
'karma-chrome-launcher',
'karma-ie-launcher',
'karma-jasmine',
'karma-webpack',
],
browsers: ['IE', 'Chrome'],
frameworks: ['jasmine', 'webpack'],
files: [{pattern: 'src/**/*.test.js', watched: false}],
preprocessors: {'src/**/*.test.js': ['webpack']},
reporters: ['progress'],
webpack: {
mode: 'development',
devtool: 'inline-source-map',
output: {
globalObject: 'this'
},
module: {
rules: [
{
test: /\.(js|mjs|jsx|ts|tsx|cjs)$/,
include: [path.resolve(__dirname, 'src')],
loader: 'babel-loader',
options: {
// babel-loader specific options
cacheDirectory: false,
cacheCompression: false,
// babel options
compact: false,
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'entry',
corejs: '3.9',
}
]
]
}
}
]
}
}
})
}
"><pre class="notranslate"><span class="pl-c">// ./karma.conf.js</span>
<span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">BABEL_ENV</span> <span class="pl-c1">=</span> <span class="pl-s">'test'</span>
<span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">NODE_ENV</span> <span class="pl-c1">=</span> <span class="pl-s">'test'</span>
<span class="pl-k">const</span> <span class="pl-s1">path</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'path'</span><span class="pl-kos">)</span>
<span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-en">exports</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">config</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">config</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">plugins</span>: <span class="pl-kos">[</span>
<span class="pl-s">'karma-chrome-launcher'</span><span class="pl-kos">,</span>
<span class="pl-s">'karma-ie-launcher'</span><span class="pl-kos">,</span>
<span class="pl-s">'karma-jasmine'</span><span class="pl-kos">,</span>
<span class="pl-s">'karma-webpack'</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">browsers</span>: <span class="pl-kos">[</span><span class="pl-s">'IE'</span><span class="pl-kos">,</span> <span class="pl-s">'Chrome'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">frameworks</span>: <span class="pl-kos">[</span><span class="pl-s">'jasmine'</span><span class="pl-kos">,</span> <span class="pl-s">'webpack'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">files</span>: <span class="pl-kos">[</span><span class="pl-kos">{</span><span class="pl-c1">pattern</span>: <span class="pl-s">'src/**/*.test.js'</span><span class="pl-kos">,</span> <span class="pl-c1">watched</span>: <span class="pl-c1">false</span><span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">preprocessors</span>: <span class="pl-kos">{</span><span class="pl-s">'src/**/*.test.js'</span>: <span class="pl-kos">[</span><span class="pl-s">'webpack'</span><span class="pl-kos">]</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">reporters</span>: <span class="pl-kos">[</span><span class="pl-s">'progress'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">webpack</span>: <span class="pl-kos">{</span>
<span class="pl-c1">mode</span>: <span class="pl-s">'development'</span><span class="pl-kos">,</span>
<span class="pl-c1">devtool</span>: <span class="pl-s">'inline-source-map'</span><span class="pl-kos">,</span>
<span class="pl-c1">output</span>: <span class="pl-kos">{</span>
<span class="pl-c1">globalObject</span>: <span class="pl-s">'this'</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">module</span>: <span class="pl-kos">{</span>
<span class="pl-c1">rules</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">test</span>: <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">\.</span><span class="pl-kos">(</span>js<span class="pl-c1">|</span>mjs<span class="pl-c1">|</span>jsx<span class="pl-c1">|</span>ts<span class="pl-c1">|</span>tsx<span class="pl-c1">|</span>cjs<span class="pl-kos">)</span><span class="pl-cce">$</span><span class="pl-c1">/</span></span><span class="pl-kos">,</span>
<span class="pl-c1">include</span>: <span class="pl-kos">[</span><span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">'src'</span><span class="pl-kos">)</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">loader</span>: <span class="pl-s">'babel-loader'</span><span class="pl-kos">,</span>
<span class="pl-c1">options</span>: <span class="pl-kos">{</span>
<span class="pl-c">// babel-loader specific options</span>
<span class="pl-c1">cacheDirectory</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c1">cacheCompression</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c">// babel options</span>
<span class="pl-c1">compact</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c1">presets</span>: <span class="pl-kos">[</span>
<span class="pl-kos">[</span>
<span class="pl-s">'@babel/preset-env'</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-c1">useBuiltIns</span>: <span class="pl-s">'entry'</span><span class="pl-kos">,</span>
<span class="pl-c1">corejs</span>: <span class="pl-s">'3.9'</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>
<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>
</details>
<details>
<summary>entry point code</summary>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// ./src/foo.test.js
it('should pass', () => {
expect(true).toBe(true)
})
"><pre class="notranslate"><span class="pl-c">// ./src/foo.test.js</span>
<span class="pl-en">it</span><span class="pl-kos">(</span><span class="pl-s">'should pass'</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">expect</span><span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBe</span><span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
</details>
<hr>
<p dir="auto">The cause of the problem seems to be the bootstrap code using strict mode without setting the execution context, so "this" results in <code class="notranslate">undefined</code> instead of a reference to the window object.</p> | <p dir="auto">I've recently run into a bit of a frustrating situation trying to provide ESM build of libraries along-side commonjs ones. Ideally the ESM code should always be used by webpack, and allow cherry picking modules (as to not have to rely solely on treeshaking).</p>
<p dir="auto">Currently, with the strictness of importing none mjs files into <code class="notranslate">.mjs</code> we can't compile the same codebase in a way that works as cjs or esm modules. take the following example:</p>
<p dir="auto">_<strong>MyComponent.mjs</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { polyfill } from 'react-lifecycle-compat';
// use polyfill(Component) etc."><pre class="notranslate"><code class="notranslate">import { polyfill } from 'react-lifecycle-compat';
// use polyfill(Component) etc.
</code></pre></div>
<p dir="auto"><code class="notranslate">react-lifecycle-compat</code> exposes both a esm build (<code class="notranslate">.js</code>) and a cjs file here (compiled esm -> cjs)</p>
<p dir="auto">What <strong>I want to do is compile MyComponent.mjs with babel to MyComponent.js</strong> and ship both files, relying on webpack to resolve the <code class="notranslate">.mjs</code> file before the <code class="notranslate">.js</code> one. <strong>However</strong> this won't work.</p>
<ul dir="auto">
<li><code class="notranslate">react-lifecycle-compat</code> is not <code class="notranslate">.mjs</code> so webpack considers it not an esm file and requires i write the import as: <code class="notranslate">import ReactLifeCycleCompat from 'react-lifecycle-compat';</code>,</li>
<li>Compiling this to cjs will also break, because of <code class="notranslate">react-lifecycle-compat</code>'s <code class="notranslate">__esmodule</code> flag, so I <strong>can't</strong> import that as a default because babel sees taht it's only named exports.</li>
</ul>
<h3 dir="auto">TL: DR;</h3>
<p dir="auto">Consuming compiled, <code class="notranslate">__esmodule</code> flagged, modules with name exports cannot be written in a way that satisfies both cjs and mjs consumers.</p>
<p dir="auto">I realize I can configure webpack to treat <code class="notranslate">mjs</code> as <code class="notranslate">javascript/auto</code> but that's not ideal, because I'm interested in providing libraries that can be consumed by webpack and node witthout requiring users to configure something, while also wanting to move towards future standards and take advantage of esm optimizations</p> | 0 |
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform :Linux Ubuntu 16.04</li>
<li>TensorFlow version: Release 1.14.0<br>
When I run the script ./tensorflow/lite/tools/make/download_dependencies.sh I am getting following error:</li>
</ul>
<p dir="auto">downloading <a href="http://mirror.tensorflow.org/bitbucket.org/eigen/eigen/get/a0d250e79c79.tar.gz" rel="nofollow">http://mirror.tensorflow.org/bitbucket.org/eigen/eigen/get/a0d250e79c79.tar.gz</a><br>
./tensorflow/lite/tools/make/download_dependencies.sh: line 64: curl: command not found</p>
<p dir="auto">gzip: stdin: unexpected end of file<br>
tar: Child returned status 1<br>
tar: Error is not recoverable: exiting now</p> | <p dir="auto">Please go to Stack Overflow for help and support:</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/tagged/tensorflow" rel="nofollow">https://stackoverflow.com/questions/tagged/tensorflow</a></p>
<p dir="auto">If you open a GitHub issue, here is our policy:</p>
<ol dir="auto">
<li>It must be a bug or a feature request.</li>
<li>The form below must be filled out.</li>
<li>It shouldn't be a TensorBoard issue. Those go <a href="https://github.com/tensorflow/tensorboard/issues">here</a>.</li>
</ol>
<p dir="auto"><strong>Here's why we have that policy</strong>: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.</p>
<hr>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: No</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Windows 10 X64 Enterprise Edition</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.3</li>
<li><strong>Python version</strong>: Anaconda 4.4.0 Python 3.6.2</li>
<li><strong>Bazel version (if compiling from source)</strong>: no</li>
<li><strong>CUDA/cuDNN version</strong>: No</li>
<li><strong>GPU model and memory</strong>: No</li>
<li><strong>Exact command to reproduce</strong>:<br>
(tensorflow13) C:\Users\James\Tensorflow\model-retrain\tensorflow-for-poets-2\scripts>python .\label_image.py --image c:\Users\James\Tensorflow\sample_img\Panda001.jpg --graph c:\Users\James\Tensorflow\model-retrain\tensorflow-for-poets-2\scripts\retrained_graph.pb --labels C:\Users\James\Tensorflow\model-retrain\tensorflow-for-poets-2\scripts\retrained_labels.txt</li>
</ul>
<p dir="auto">You can collect some of this information using our environment capture script:</p>
<p dir="auto"><a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh</a></p>
<p dir="auto">You can obtain the TensorFlow version with</p>
<p dir="auto">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</p>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.</p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">Error Log:<br>
2017-09-01 09:27:46.902115: I C:\tf_jenkins\home\workspace\nightly-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2<br>
Traceback (most recent call last):<br>
File ".\label_image.py", line 120, in <br>
input_operation = graph.get_operation_by_name(input_name);<br>
File "C:\Users\James\AppData\Local\conda\conda\envs\tensorflow13\lib\site-packages\tensorflow\python\framework\ops.py", line 3225, in get_operation_by_name<br>
return self.as_graph_element(name, allow_tensor=False, allow_operation=True)<br>
File "C:\Users\James\AppData\Local\conda\conda\envs\tensorflow13\lib\site-packages\tensorflow\python\framework\ops.py", line 3097, in as_graph_element<br>
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)<br>
File "C:\Users\James\AppData\Local\conda\conda\envs\tensorflow13\lib\site-packages\tensorflow\python\framework\ops.py", line 3157, in _as_graph_element_locked<br>
"graph." % repr(name))<br>
KeyError: "The name 'import/input' refers to an Operation not in the graph."</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>
<p dir="auto">2.3</p>
<h5 dir="auto">CONFIGURATION</h5>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Hello,<br>
i am getting this error:<br>
[WARNING]: Failure using method (v2_runner_on_ok) in callback plugin (</usr/lib/python2.7/site-packages/ooinstall/ansible_plugins/facts_callback.CallbackModule object at 0x229bf90>): cannot represent an object: common<br>
There was a problem fetching the required information. Please see /tmp/ansible.log for details.</p>
<p dir="auto">can someone assist ?</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<h5 dir="auto">EXPECTED RESULTS</h5>
<h5 dir="auto">ACTUAL RESULTS</h5> | <p dir="auto">Some folks would like roles to pull in content from other roles automatically.</p>
<p dir="auto">I am envisioning it like this:</p>
<p dir="auto">roles/foo/meta/main.yml</p>
<p dir="auto">And in there:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dependencies:
- { role: higher, x: 42, y: 12 }
- { role: component, y: 17, z: "blippy" }"><pre class="notranslate"><code class="notranslate">dependencies:
- { role: higher, x: 42, y: 12 }
- { role: component, y: 17, z: "blippy" }
</code></pre></div>
<p dir="auto">etc</p> | 0 |
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life" rel="nofollow">http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life</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/5223483/9372046/eaf742f6-468e-11e5-8a8e-d81179be61a4.png"><img src="https://cloud.githubusercontent.com/assets/5223483/9372046/eaf742f6-468e-11e5-8a8e-d81179be61a4.png" alt="screen shot 2015-08-19 at 4 24 33 pm" style="max-width: 100%;"></a></p> | <p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life" rel="nofollow">http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">after typing "$($", chrome crashes.</p> | 1 |
<h1 dir="auto">Feature request</h1>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto">When I include a Typescript file from another package, I get this error:</p>
<p dir="auto"><code class="notranslate">You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders</code></p>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">I would like to be able to import Typescript files from other packages.</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 for the phrase <code class="notranslate">renderError</code> and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Calling <code class="notranslate">app.renderError</code> should be straight-forward and render the default error page with the new code that I provide it. Full code is below (scroll down).</p>
<p dir="auto">I initially tried this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return app.renderError(403, req, res, "/progress", req.query);"><pre class="notranslate"><code class="notranslate">return app.renderError(403, req, res, "/progress", req.query);
</code></pre></div>
<p dir="auto">And then I realized that the first parameter is supposed to be an error object, so then I tried this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="res.statusCode = 403;
return app.renderError(null, req, res, "/progress", req.query);"><pre class="notranslate"><code class="notranslate">res.statusCode = 403;
return app.renderError(null, req, res, "/progress", req.query);
</code></pre></div>
<p dir="auto">This should simply render the default error page from Next.js with my error code and not bounce to another page on the next ping.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Instead, what happens is that I see a brief glimpse of the expected error page with my 403 code in it, but on the next ping, it redirects to the <code class="notranslate">/progress</code> page but without an <code class="notranslate">id</code> param being passed down (because there isn't). Ideally, you should never see the <code class="notranslate">/progress</code> page if there is no id in the URL.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">This is the code that I used:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const express = require("express");
const next = require("next");
const port = parseInt(process.env.PORT, 10) || 3000;
const dev = process.env.NODE_ENV !== "production";
const app = next({ dev });
const handle = app.getRequestHandler();
app.prepare().then(() => {
const server = express();
server.get("/progress/:id?", (req, res) => {
if (!req.params.id) {
console.log("no id submitted");
res.statusCode = 403;
return app.renderError(null, req, res, "/progress", req.query);
}
const queryParams = Object.assign(req.query, req.params);
return app.render(req, res, "/progress", queryParams);
});
server.get("*", (req, res) => handle(req, res));
server.listen(port, (err) => {
if (err) throw err;
console.log(`> Ready on http://localhost:${port}`);
});
});"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">express</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"express"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">next</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"next"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">port</span> <span class="pl-c1">=</span> <span class="pl-en">parseInt</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">PORT</span><span class="pl-kos">,</span> <span class="pl-c1">10</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-c1">3000</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">dev</span> <span class="pl-c1">=</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">NODE_ENV</span> <span class="pl-c1">!==</span> <span class="pl-s">"production"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">next</span><span class="pl-kos">(</span><span class="pl-kos">{</span> dev <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">handle</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">getRequestHandler</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">prepare</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</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">server</span> <span class="pl-c1">=</span> <span class="pl-s1">express</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"/progress/:id?"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</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-c1">!</span><span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">params</span><span class="pl-kos">.</span><span class="pl-c1">id</span><span class="pl-kos">)</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-s">"no id submitted"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">res</span><span class="pl-kos">.</span><span class="pl-c1">statusCode</span> <span class="pl-c1">=</span> <span class="pl-c1">403</span><span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">renderError</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">,</span> <span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">,</span> <span class="pl-s">"/progress"</span><span class="pl-kos">,</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">query</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-s1">queryParams</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">assign</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">query</span><span class="pl-kos">,</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">params</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">,</span> <span class="pl-s">"/progress"</span><span class="pl-kos">,</span> <span class="pl-s1">queryParams</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-s1">server</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"*"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-s1">handle</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">listen</span><span class="pl-kos">(</span><span class="pl-s1">port</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-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-k">throw</span> <span class="pl-s1">err</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-s">`> Ready on http://localhost:<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">port</span><span class="pl-kos">}</span></span>`</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><span class="pl-kos">;</span></pre></div>
<ol dir="auto">
<li>Use the above code in a file <code class="notranslate">server.js</code>.</li>
<li>Run in dev mode by running a script that says <code class="notranslate">node server.js</code>.</li>
<li>Run <code class="notranslate">localhost:3000/progress/</code> (with no id in the path).</li>
<li>Note that you get the correct error page, but on subsequent ping it redirects to the <code class="notranslate">/progress</code> page but with no ID passed down in its props.</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>3.0.6</td>
</tr>
<tr>
<td>node</td>
<td>8.4.0</td>
</tr>
</tbody>
</table> | 0 |
<ul dir="auto">
<li>Electron version: v1.6.2</li>
<li>Operating system: Ubuntu 16.04.2 LTS</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">BrowserWindow should be transparent and show only the content</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">BrowserWindow is rendered with a white background and graphics seem broken</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">$ git clone <a href="https://github.com/elvisvoer/electron-shadow-issue.git">https://github.com/elvisvoer/electron-shadow-issue.git</a><br>
$ npm install<br>
$ electron . || electron . --disable-gpu --enable-transparent-visuals</p> | <ul dir="auto">
<li>Electron version: 1.5.x</li>
<li>Operating system: mint 18.1</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Window transparency with --enable-transparent-visuals is supposed to produce see thru window</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Window produce black background with old frames not disposing</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Use 1.5.x version; <strong>works well with 1.4.x version</strong></p> | 1 |
<p dir="auto">Glide 3.8.0</p>
<p dir="auto">Is there a callback provided by <code class="notranslate">Glide</code> library when loading of all the images are completed for an <code class="notranslate">Activity</code> or <code class="notranslate">Fragment</code>? We want to take certain actions when that is done.</p>
<p dir="auto">If not, any pointers how to get that callback.</p>
<p dir="auto">I have seen <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="174330130" data-permission-text="Title is private" data-url="https://github.com/bumptech/glide/issues/1440" data-hovercard-type="issue" data-hovercard-url="/bumptech/glide/issues/1440/hovercard" href="https://github.com/bumptech/glide/issues/1440">#1440</a>, but I would like to completely avoid reflection since it will be part of shipped code within APK.</p> | <p dir="auto">glide 3.7.0</p>
<p dir="auto">Not sure if we already have way to know when image loading started and finished for all the request, even when it loads from cache.</p>
<p dir="auto">I would like to use using idling resource for android testing which make sure images are loaded and app is idle now.</p> | 1 |
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dpsthree/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dpsthree">@dpsthree</a> on April 12, 2016 15:52</em></p>
<p dir="auto">I have a folder that contains a Typescript Client and Typescript Node Server subfolder. There is a third top level directory, common, where we store our isomorphic Typescript code.</p>
<p dir="auto">In order for a rename to work across files a tsconfig.json file is needed that includes the top module of your project and all submodules must be imported properly.</p>
<p dir="auto">When attempting to perform a rename of a class defined in the common folder the action is only applied to one of the two typescript projects. Adding a top level tsconfig.json that points to the starting modules of both projects did not change this behavior.</p>
<p dir="auto">Ideally, a refactor would follow all tsconfig.json module trees as needed.</p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="147795086" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/5194" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/5194/hovercard" href="https://github.com/microsoft/vscode/issues/5194">microsoft/vscode#5194</a></em></p> | <p dir="auto">Global operations are currently only done on the first project for a file, namely:</p>
<ul dir="auto">
<li>rename</li>
<li>find all references</li>
<li>navigate to</li>
</ul>
<p dir="auto">For instance if you have three files (a.ts, b.ts, and c.ts) open in the editor, listed below, we create three projects, Project 1 (a.ts), Project 2 (a.ts, b.ts), Project 3 (a.ts, c.ts).</p>
<p dir="auto">a.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var x;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">x</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">b.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/// <reference path="a.ts" />
x ++;"><pre class="notranslate"><span class="pl-c">/// <reference path="a.ts" /></span>
<span class="pl-s1">x</span> <span class="pl-c1">++</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">c.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/// <reference path="a.ts" />
x = x + 2;"><pre class="notranslate"><span class="pl-c">/// <reference path="a.ts" /></span>
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-c1">2</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Calling rename on x, in a,ts will only rename it in a.ts and not in b.ts or c.ts as well. if renaming in b.ts it will not rename in c.ts, and vice versa.</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: 10.0.18950.1000
Windows Terminal version (if applicable): 0.3.2142.0 (from Microsoft Store)
Any other software?
Not a software, but I'm using GitHub authentication with Microsoft Account."><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18950.1000
Windows Terminal version (if applicable): 0.3.2142.0 (from Microsoft Store)
Any other software?
Not a software, but I'm using GitHub authentication with Microsoft Account.
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">I tried to use Azure CloudShell Connector, but the connector shows an error message like below.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/35712113/62438852-4a340500-b784-11e9-8ba3-954ae121b17e.png"><img width="737" alt="issue" src="https://user-images.githubusercontent.com/35712113/62438852-4a340500-b784-11e9-8ba3-954ae121b17e.png" style="max-width: 100%;"></a></p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">I think it should work normally.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">I captured traffic with Fiddler4. The OAUTH API returns 400 error code like below. The API says <code class="notranslate">AADSTS70016: Pending end-user authorization.</code>. I don't know what causes the error after authentication is complete, but authentication fails as shown in the attached screenshot.</p>
<p dir="auto">If there are any conditions or circumstances that prevent the device from logging in, it may be necessary to provide guidance on how to respond appropriately.</p>
<p dir="auto">Request</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="POST https://login.microsoftonline.com/common/oauth2/token HTTP/1.1
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded; charset=utf-8
User-Agent: cpprestsdk/2.10.13
Content-Length: 328
Host: login.microsoftonline.com
Cookie: stsservicecookie=ests; x-ms-gateway-slice=prod; fpc=...
grant_type=device_code&resource=https://management.core.windows.net/&client_id=...&code=..."><pre class="notranslate"><code class="notranslate">POST https://login.microsoftonline.com/common/oauth2/token HTTP/1.1
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded; charset=utf-8
User-Agent: cpprestsdk/2.10.13
Content-Length: 328
Host: login.microsoftonline.com
Cookie: stsservicecookie=ests; x-ms-gateway-slice=prod; fpc=...
grant_type=device_code&resource=https://management.core.windows.net/&client_id=...&code=...
</code></pre></div>
<p dir="auto">Response:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{"error":"authorization_pending","error_description":"AADSTS70016: Pending end-user authorization.\r\nTrace ID: 020679d0-f785-40be-b55c-b6dfa9029500\r\nCorrelation ID: 2de85d18-59f3-44b5-8e91-aa9ada0412b8\r\nTimestamp: 2019-08-05 04:19:27Z","error_codes":[70016],"timestamp":"2019-08-05 04:19:27Z","trace_id":"020679d0-f785-40be-b55c-b6dfa9029500","correlation_id":"2de85d18-59f3-44b5-8e91-aa9ada0412b8"}"><pre class="notranslate"><code class="notranslate">{"error":"authorization_pending","error_description":"AADSTS70016: Pending end-user authorization.\r\nTrace ID: 020679d0-f785-40be-b55c-b6dfa9029500\r\nCorrelation ID: 2de85d18-59f3-44b5-8e91-aa9ada0412b8\r\nTimestamp: 2019-08-05 04:19:27Z","error_codes":[70016],"timestamp":"2019-08-05 04:19:27Z","trace_id":"020679d0-f785-40be-b55c-b6dfa9029500","correlation_id":"2de85d18-59f3-44b5-8e91-aa9ada0412b8"}
</code></pre></div> | <h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto"><a href="https://vt100.net/docs/vt510-rm/HPA.html" rel="nofollow"><code class="notranslate">HPA</code></a> is an escape sequence for setting the horizontal cursor position.</p>
<p dir="auto">Technically there is a distinction between <code class="notranslate">HPA</code>, which sets the data position, and <a href="https://vt100.net/docs/vt510-rm/CHA.html" rel="nofollow"><code class="notranslate">CHA</code></a>, which sets the presentation position (at least according to ECMA-048). However, I believe that only applies to bidirectional environments, and from what I've seen, it looks like most terminal emulators just treat them as synonyms.</p>
<p dir="auto">Since we already support <code class="notranslate">CHA</code>, this doesn't really provide us with any new functionality, but it is one of the sequences tested by <a href="https://invisible-island.net/vttest/" rel="nofollow">Vttest</a>, so it would be nice to support, and it should be trivial to add.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<ol dir="auto">
<li>Add a new entry in the <a href="https://github.com/microsoft/terminal/blob/08464648f280624023d3572346a75dee7a428de8/src/terminal/parser/OutputStateMachineEngine.hpp#L85"><code class="notranslate">VTActionCodes</code></a> enum.</li>
<li>Update the <a href="https://github.com/microsoft/terminal/blob/a82d6b8c69f6e4b2fe946097da0e4c403cb42100/src/terminal/parser/OutputStateMachineEngine.cpp#L279"><code class="notranslate">OutputStateMachineEngine::ActionCsiDispatch</code></a> method to treat that new code as a synonym for the existing <code class="notranslate">CHA_CursorHorizontalAbsolute</code>.</li>
</ol>
<p dir="auto">If you care about tracking it as a separate telemetry entry, that would require a little more duplication of code, but it's still fairly trivial.</p> | 0 |
<p dir="auto">If you go to the sidebar, right click, and create a new file, or rename a file etc. The dialogue on the top will disappear if you switch to a different full screen app.</p>
<p dir="auto">Is this intentional?</p> | <p dir="auto">Halp reports:</p>
<ul dir="auto">
<li>support/a3fbafb2d0c011e3855fe03a98b207e5</li>
<li>support/4068a4a4d08f11e39bd83f5315db0b57</li>
</ul>
<p dir="auto">Related Issues</p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="28541217" data-permission-text="Title is private" data-url="https://github.com/atom-archive/feedback/issues/22" data-hovercard-type="issue" data-hovercard-url="/atom-archive/feedback/issues/22/hovercard" href="https://github.com/atom-archive/feedback/issues/22">atom-archive/feedback#22</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="33804038" data-permission-text="Title is private" data-url="https://github.com/atom/fuzzy-finder/issues/37" data-hovercard-type="issue" data-hovercard-url="/atom/fuzzy-finder/issues/37/hovercard" href="https://github.com/atom/fuzzy-finder/issues/37">atom/fuzzy-finder#37</a></li>
</ul>
<blockquote>
<p dir="auto">If you have opened up the Command Palette (Command-Shift-P) in Atom v.0.92.0, and then switch to another app, say the Mac OS X Terminal app to run something you've been working on, the Command Palette is gone when you switch back (this is also true of this "Send us feedback" drop-down pane). It would be preferable if, on switching back to the Atom app v.0.92.0, that the Command Palette were still open where you left it.</p>
</blockquote>
<p dir="auto">I've noticed this myself, but never fund it particularly annoying. Also, some other dialogs are affected by this as well, such as the fuzzy finder. Unsure if this is something that's handled on a per-package basis or in Atom core, so opened an issue here. <g-emoji class="g-emoji" alias="pizza" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f355.png">🍕</g-emoji></p>
<ul dir="auto">
<li>It seems that SublimeText doesn't have consistent behavior with these dialogs -- the command palette is closed similar to Atom, but the fuzzy finder is not (it stays open even after the app loses focus).</li>
</ul> | 1 |
<p dir="auto">To recreate, start with a freshly started cluster (1.5.2) with nothing stored in fielddata.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GET /_cat/fielddata?v
id host ip node total
oXbVJr3_QNqRhTSkKB1WSw Olivers-MacBook-Pro.local 10.4.1.106 Crown 0b "><pre class="notranslate"><code class="notranslate">GET /_cat/fielddata?v
id host ip node total
oXbVJr3_QNqRhTSkKB1WSw Olivers-MacBook-Pro.local 10.4.1.106 Crown 0b
</code></pre></div>
<p dir="auto">Now create a document that contains fields with the same name as the 'meta' fields that appear in the output to fielddata.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="POST /lul/wat/1
{
"id": "hah",
"host": "yeah",
"ip": 1,
"node": "lulwat",
"total": 5
}"><pre class="notranslate"><code class="notranslate">POST /lul/wat/1
{
"id": "hah",
"host": "yeah",
"ip": 1,
"node": "lulwat",
"total": 5
}
</code></pre></div>
<p dir="auto">Then search with aggregations against those fields, to load them into fielddata.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="POST /lul/wat/_search
{
"query": {
"match_all": {}
},
"aggs": {
"one": {
"terms": {
"field": "ip"
}
},
"two": {
"terms": {
"field": "node"
}
}
}
}"><pre class="notranslate"><code class="notranslate">POST /lul/wat/_search
{
"query": {
"match_all": {}
},
"aggs": {
"one": {
"terms": {
"field": "ip"
}
},
"two": {
"terms": {
"field": "node"
}
}
}
}
</code></pre></div>
<p dir="auto">Now check the _cat/fielddata endpoint again.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GET /_cat/fielddata?v
id host ip node total node ip
Bt6uoLNcS0mlVSdY1xGgSA Olivers-MacBook-Pro.local 10.4.1.106 Crown 8.9kb Crown 10.4.1.106"><pre class="notranslate"><code class="notranslate">GET /_cat/fielddata?v
id host ip node total node ip
Bt6uoLNcS0mlVSdY1xGgSA Olivers-MacBook-Pro.local 10.4.1.106 Crown 8.9kb Crown 10.4.1.106
</code></pre></div>
<p dir="auto">Note that <code class="notranslate">node</code> and <code class="notranslate">ip</code> are both repeated, but we can't actually see the usage for those fields - instead we get the metadata again. For the sake of completeness...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="POST /lul/wat/_search
{
"query": {
"match_all": {}
},
"aggs": {
"one": {
"terms": {
"field": "ip"
}
},
"two": {
"terms": {
"field": "node"
}
},
"three": {
"terms": {
"field": "host"
}
},
"four": {
"terms": {
"field": "id"
}
},
"five": {
"terms": {
"field": "total"
}
}
}
}"><pre class="notranslate"><code class="notranslate">POST /lul/wat/_search
{
"query": {
"match_all": {}
},
"aggs": {
"one": {
"terms": {
"field": "ip"
}
},
"two": {
"terms": {
"field": "node"
}
},
"three": {
"terms": {
"field": "host"
}
},
"four": {
"terms": {
"field": "id"
}
},
"five": {
"terms": {
"field": "total"
}
}
}
}
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GET /_cat/fielddata?v
id host ip node total node total ip host id
oXbVJr3_QNqRhTSkKB1WSw Olivers-MacBook-Pro.local 10.4.1.106 Crown 18.4kb Crown 18.4kb 10.4.1.106 Olivers-MacBook-Pro.local oXbVJr3_QNqRhTSkKB1WSw"><pre class="notranslate"><code class="notranslate">GET /_cat/fielddata?v
id host ip node total node total ip host id
oXbVJr3_QNqRhTSkKB1WSw Olivers-MacBook-Pro.local 10.4.1.106 Crown 18.4kb Crown 18.4kb 10.4.1.106 Olivers-MacBook-Pro.local oXbVJr3_QNqRhTSkKB1WSw
</code></pre></div>
<p dir="auto">Note that locally I can recreate the field duplication, but in our production environment (1.4.0) we see even stranger things:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" id host ip node total content.source name.raw delivery.id timestamp id _type sections _id created delivery.channel content.id campaign published content.sections content.topics ip referrer topics content.created source title.raw p property.type _parent property.id
NcxVMomeTC6TOTEVH9lt3Q [REDACTED] [REDACTED] prd-elastic-c 2.7gb 16mb 0b 805.9kb 172.3mb NcxVMomeTC6TOTEVH9lt3Q 32.8mb 9.9mb 52.2mb 34.4mb 491.3kb 116.7mb 82.5mb 3mb 113.5mb 1.5gb [REDACTED] 110.8mb 29.9mb 31mb 10.6mb 111kb 400.7mb 26.8mb 741.5mb 1.3mb
152.6kb [REDACTED] 0b prd-elastic-a 1.5gb 6.4mb 0b 645.1kb 86.7mb 152.6kb 17.8mb 4.7mb 36.1mb 24mb 458.4kb 79.1mb 48.3mb 1.9mb 75.1mb 859.9mb 0b 84.3mb 12.7mb 0b 4.4mb 836.9kb 197.5mb 11mb 493.9mb 861.5kb
CqC9hO3tT2O_j2gMPrc2Uw [REDACTED] [REDACTED] prd-elastic-f 3.1gb 23.1mb 0b 865.4kb 160.3mb CqC9hO3tT2O_j2gMPrc2Uw 18.1mb 8.5mb 49.3mb 35.2mb 559.1kb 135.2mb 80.2mb 3mb 128.7mb 1.9gb [REDACTED] 124.1mb 22.8mb 35.3mb 8.1mb 577.3kb 368.8mb 22.8mb 671.8mb 1.2mb
5.6kb [REDACTED] 0b prd-elastic-d 3gb 18.7mb 0b 1.2mb 159.9mb 5.6kb 12.5mb 9.2mb 51.3mb 38mb 769.9kb 134.1mb 82mb 3.6mb 132.4mb 1.7gb 0b 141mb 25.7mb 58.8mb 9.5mb 399.7kb 408.7mb 23mb 709.8mb 1.3mb
WkXcjwj8T6yQ1X2Pb_M2ow [REDACTED] [REDACTED] prd-elastic-b 1.9gb 15.8mb 0b 1.1mb 87.3mb WkXcjwj8T6yQ1X2Pb_M2ow 0b 5.1mb 34.5mb 35.9mb 593.9kb 86.5mb 60.7mb 1.9mb 79.1mb 1.1gb [REDACTED] 87.7mb 19.2mb 31mb 7.2mb 110.6kb 202.9mb 20.3mb 505.8mb 1.2mb
116.6kb [REDACTED] 38.2mb prd-elastic-e 3.5gb 25.9mb 21.6kb 1mb 204.5mb 116.6kb 0b 11.1mb 57.2mb 34mb 724.2kb 161.6mb 90.7mb 3.6mb 152.8mb 2.1gb 38.2mb 150mb 31.5mb 29.9mb 10.2mb 615.9kb 368.8mb 32.8mb 764.5mb 1.7mb "><pre class="notranslate"><code class="notranslate"> id host ip node total content.source name.raw delivery.id timestamp id _type sections _id created delivery.channel content.id campaign published content.sections content.topics ip referrer topics content.created source title.raw p property.type _parent property.id
NcxVMomeTC6TOTEVH9lt3Q [REDACTED] [REDACTED] prd-elastic-c 2.7gb 16mb 0b 805.9kb 172.3mb NcxVMomeTC6TOTEVH9lt3Q 32.8mb 9.9mb 52.2mb 34.4mb 491.3kb 116.7mb 82.5mb 3mb 113.5mb 1.5gb [REDACTED] 110.8mb 29.9mb 31mb 10.6mb 111kb 400.7mb 26.8mb 741.5mb 1.3mb
152.6kb [REDACTED] 0b prd-elastic-a 1.5gb 6.4mb 0b 645.1kb 86.7mb 152.6kb 17.8mb 4.7mb 36.1mb 24mb 458.4kb 79.1mb 48.3mb 1.9mb 75.1mb 859.9mb 0b 84.3mb 12.7mb 0b 4.4mb 836.9kb 197.5mb 11mb 493.9mb 861.5kb
CqC9hO3tT2O_j2gMPrc2Uw [REDACTED] [REDACTED] prd-elastic-f 3.1gb 23.1mb 0b 865.4kb 160.3mb CqC9hO3tT2O_j2gMPrc2Uw 18.1mb 8.5mb 49.3mb 35.2mb 559.1kb 135.2mb 80.2mb 3mb 128.7mb 1.9gb [REDACTED] 124.1mb 22.8mb 35.3mb 8.1mb 577.3kb 368.8mb 22.8mb 671.8mb 1.2mb
5.6kb [REDACTED] 0b prd-elastic-d 3gb 18.7mb 0b 1.2mb 159.9mb 5.6kb 12.5mb 9.2mb 51.3mb 38mb 769.9kb 134.1mb 82mb 3.6mb 132.4mb 1.7gb 0b 141mb 25.7mb 58.8mb 9.5mb 399.7kb 408.7mb 23mb 709.8mb 1.3mb
WkXcjwj8T6yQ1X2Pb_M2ow [REDACTED] [REDACTED] prd-elastic-b 1.9gb 15.8mb 0b 1.1mb 87.3mb WkXcjwj8T6yQ1X2Pb_M2ow 0b 5.1mb 34.5mb 35.9mb 593.9kb 86.5mb 60.7mb 1.9mb 79.1mb 1.1gb [REDACTED] 87.7mb 19.2mb 31mb 7.2mb 110.6kb 202.9mb 20.3mb 505.8mb 1.2mb
116.6kb [REDACTED] 38.2mb prd-elastic-e 3.5gb 25.9mb 21.6kb 1mb 204.5mb 116.6kb 0b 11.1mb 57.2mb 34mb 724.2kb 161.6mb 90.7mb 3.6mb 152.8mb 2.1gb 38.2mb 150mb 31.5mb 29.9mb 10.2mb 615.9kb 368.8mb 32.8mb 764.5mb 1.7mb
</code></pre></div>
<p dir="auto"><code class="notranslate">ip</code> and <code class="notranslate">id</code> are both repeated, but in the output from <em>some</em> nodes the id and ip fields display the fielddata size for the fields, and <em>some</em> of the nodes display the metadata as I guess they should. I haven't been able to reproduce this locally (it might have been fixed since 1.4.0?), nor have I haven't yet been able to find any pattern to which nodes display fielddata sizes and which display the metadata.</p>
<p dir="auto">Thanks!</p> | <p dir="auto">We should explore the idea of disabling the <code class="notranslate">_all</code> field by default. For<br>
background, the <code class="notranslate">_all</code> field contains the contents of each of a document's<br>
field. During indexing, these contents are copied to the <code class="notranslate">_all</code> field, analyzed<br>
with a specific analyzer, and then indexed. At query time, some queries such as<br>
the <code class="notranslate">query_string</code> and <code class="notranslate">simple_query_string</code> queries search the <code class="notranslate">_all</code> field if<br>
no fields are specified.</p>
<p dir="auto">There are a number of issues with the <code class="notranslate">_all</code> field:</p>
<ul dir="auto">
<li>It uses a fair amount of disk space, due to duplicating the values from all<br>
other fields to an additional field</li>
<li><code class="notranslate">_all</code> has its own analyzer, which is confusing when expecting to query<br>
text analyzed a certain way (or with synonyms, for example) and discovering<br>
that it does not match due to a analysis difference</li>
<li>Additional indexing overhead caused by data duplication</li>
<li>Since the <code class="notranslate">_all</code> field is not retrievable or part of <code class="notranslate">_source</code>, its contents<br>
cannot easily be inspected for debugging purposes, some users do not know it<br>
even exists, which causes confusion at query time</li>
<li>Better alternatives exist, such as the <code class="notranslate">copy_to</code> value on mappings which can<br>
be used to create custom <code class="notranslate">_all</code> fields</li>
</ul>
<p dir="auto">If we were to change the <code class="notranslate">_all</code> field to be disabled by default, some queries<br>
would have to be handled differently. The <code class="notranslate">query_string</code> and<br>
<code class="notranslate">simple_query_string</code> queries would have to know a default field or fields to<br>
query. Perhaps we would be able to change these queries to send a <code class="notranslate">"fields": ["*"]</code> parameter if no fields are specified in the JSON query, so that all field<br>
values can still be queried.</p> | 0 |
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">main</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://github.com/celery/celery/discussions">discussions forum</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have read the relevant section in the<br>
<a href="https://docs.celeryq.dev/en/main/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</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/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</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/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</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/celery/celery/commits/main">commit log</a><br>
to find out if the bug was already fixed in the main branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">main</code> branch of Celery.</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</p>
</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>:</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Celery Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<h1 dir="auto">Actual Behavior</h1> | <h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>:</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:5.0.1 (singularity) kombu:5.0.2 py:3.8.3
billiard:3.6.3.0 redis:3.5.3
platform -> system:Linux arch:64bit, ELF
kernel version:5.4.0-48-generic imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:disabled"><pre class="notranslate"><code class="notranslate">software -> celery:5.0.1 (singularity) kombu:5.0.2 py:3.8.3
billiard:3.6.3.0 redis:3.5.3
platform -> system:Linux arch:64bit, ELF
kernel version:5.4.0-48-generic imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:disabled
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Celery Version</strong>: 5.0.1</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ celery multi start normal low --app=service.celery:app --logfile=/tmp/celery/celery-%n%I.log --queues:normal=normal --queues:low=low --concurrency:normal=2 --concurrency:low=1 --pidfile=/tmp/celery/celeryd-%n.pid
celery multi v5.0.1 (singularity)
> Starting nodes...
> normal@dell: OK
> low@dell: OK"><pre class="notranslate">$ celery multi start normal low --app=service.celery:app --logfile=/tmp/celery/celery-%n%I.log --queues:normal=normal --queues:low=low --concurrency:normal=2 --concurrency:low=1 --pidfile=/tmp/celery/celeryd-%n.pid
celery multi v5.0.1 (singularity)
<span class="pl-k">></span> Starting nodes...
<span class="pl-k">></span> normal@dell: OK
<span class="pl-k">></span> low@dell: OK</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Celery 4.4.7 behavior</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ ls -l /tmp/celery
-rw-r--r-- 1 www-data www-data 6 Oct 19 14:39 celeryd-low.pid
-rw-r--r-- 1 www-data www-data 6 Oct 19 14:39 celeryd-normal.pid
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-low-1.log
-rw-rw-r-- 1 www-data www-data 316 Oct 19 14:39 celery-low.log
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-normal-1.log
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-normal-2.log
-rw-rw-r-- 1 www-data www-data 316 Oct 19 14:39 celery-normal.log"><pre class="notranslate">$ ls -l /tmp/celery
-rw-r--r-- 1 www-data www-data 6 Oct 19 14:39 celeryd-low.pid
-rw-r--r-- 1 www-data www-data 6 Oct 19 14:39 celeryd-normal.pid
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-low-1.log
-rw-rw-r-- 1 www-data www-data 316 Oct 19 14:39 celery-low.log
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-normal-1.log
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-normal-2.log
-rw-rw-r-- 1 www-data www-data 316 Oct 19 14:39 celery-normal.log</pre></div>
<h1 dir="auto">Actual Behavior</h1>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ ls -l /tmp/celery
-rw-r--r-- 1 www-data www-data 6 Oct 19 14:39 celeryd-low.pid
-rw-r--r-- 1 www-data www-data 6 Oct 19 14:39 celeryd-normal.pid
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-low-1.log
-rw-rw-r-- 1 www-data www-data 0 Oct 19 14:39 celery-low%I.log
-rw-rw-r-- 1 www-data www-data 316 Oct 19 14:39 celery-low.log
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-normal-1.log
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-normal-2.log
-rw-rw-r-- 1 www-data www-data 0 Oct 19 14:39 celery-normal%I.log
-rw-rw-r-- 1 www-data www-data 316 Oct 19 14:39 celery-normal.log"><pre class="notranslate">$ ls -l /tmp/celery
-rw-r--r-- 1 www-data www-data 6 Oct 19 14:39 celeryd-low.pid
-rw-r--r-- 1 www-data www-data 6 Oct 19 14:39 celeryd-normal.pid
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-low-1.log
-rw-rw-r-- 1 www-data www-data 0 Oct 19 14:39 celery-low%I.log
-rw-rw-r-- 1 www-data www-data 316 Oct 19 14:39 celery-low.log
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-normal-1.log
-rw-rw-r-- 1 www-data www-data 80 Oct 19 14:39 celery-normal-2.log
-rw-rw-r-- 1 www-data www-data 0 Oct 19 14:39 celery-normal%I.log
-rw-rw-r-- 1 www-data www-data 316 Oct 19 14:39 celery-normal.log</pre></div> | 0 |
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nonnull/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nonnull">@nonnull</a><br>
public final Registry setResourceDecoderBucketPriorityList(<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nonnull/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nonnull">@nonnull</a> List buckets) {<br>
List modifiedBuckets = new ArrayList<>(buckets);<br>
modifiedBuckets.add(0, BUCKET_PREPEND_ALL);<br>
modifiedBuckets.add(BUCKET_APPEND_ALL);<br>
decoderRegistry.setBucketPriorityList(modifiedBuckets);<br>
return this;<br>
}<br>
It may appear here<br>
java.lang.ClassCastException: int[] cannot be cast to java.lang.Object[]<br>
at java.util.Arrays$ArrayList.toArray(Arrays.java:120)<br>
at java.util.ArrayList.(ArrayList.java:97)<br>
at com.bumptech.glide.Registry.setResourceDecoderBucketPriorityList(Registry.java:268)<br>
Can you tell me what caused this?</p>
<p dir="auto">Discovered by tracking, The last sentence here</p>
<p dir="auto">public Registry() {<br>
this.modelLoaderRegistry = new ModelLoaderRegistry(throwableListPool);<br>
this.encoderRegistry = new EncoderRegistry();<br>
this.decoderRegistry = new ResourceDecoderRegistry();<br>
this.resourceEncoderRegistry = new ResourceEncoderRegistry();<br>
this.dataRewinderRegistry = new DataRewinderRegistry();<br>
this.transcoderRegistry = new TranscoderRegistry();<br>
this.imageHeaderParserRegistry = new ImageHeaderParserRegistry();<br>
setResourceDecoderBucketPriorityList(<br>
Arrays.asList(BUCKET_GIF, BUCKET_BITMAP, BUCKET_BITMAP_DRAWABLE));<br>
}<br>
public static final String BUCKET_GIF = "Gif";<br>
public static final String BUCKET_BITMAP = "Bitmap";<br>
public static final String BUCKET_BITMAP_DRAWABLE = "BitmapDrawable";</p>
<p dir="auto">Here is that this error should not occur</p> | <p dir="auto">Hi</p>
<p dir="auto">I'd like an option to invalidate a cache key where the url/signature is known.</p>
<p dir="auto">I've read through <a href="https://github.com/bumptech/glide/wiki/Caching-and-Cache-Invalidation">https://github.com/bumptech/glide/wiki/Caching-and-Cache-Invalidation</a>, and that makes sense. However, if I set my own signature (for example "personalavatar"), and I know that key has changed during a background service upload. It should be easy enough to invalidate that one key.</p>
<p dir="auto">There are other cases as well. For example in some situations when uploading new images we are very aware of where those images are being used and exactly which url is loaded. It would make sense in those scenarios to invalidate those cache keys, and wait for the next load to reload the image.</p> | 0 |
<p dir="auto">pandas version: 0.8.2.dev-742d7fb</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas
import pandas.util.testing as put
index = put.makeDateIndex(4)
index.isin(index) # returns array([False, False, False, False], dtype=bool)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span>
<span class="pl-k">import</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">util</span>.<span class="pl-s1">testing</span> <span class="pl-k">as</span> <span class="pl-s1">put</span>
<span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">put</span>.<span class="pl-en">makeDateIndex</span>(<span class="pl-c1">4</span>)
<span class="pl-s1">index</span>.<span class="pl-en">isin</span>(<span class="pl-s1">index</span>) <span class="pl-c"># returns array([False, False, False, False], dtype=bool)</span></pre></div>
<p dir="auto">It works fine with pandas 0.7.3, i.e. it returns an array of True instead. This works fine as well with a pandas.Int64Index. <code class="notranslate">index.isin(index)</code> just calls <code class="notranslate">pandas.lib.ismember(index._array_values(), set(index))</code> but I am afraid I lack the skills to understand what goes wrong in the cython code.</p>
<p dir="auto">Just for some background, the original problem I bumped into:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import pandas
ts = pandas.TimeSeries(data=[1,2,3], index=[ np.datetime64(x) for x in ['2000', '2000', '2002'] ])
ts.ix[ts.index] # returns an empty timeseries whereas ts[ts.index] works fine"><pre class="notranslate"><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-k">import</span> <span class="pl-s1">pandas</span>
<span class="pl-s1">ts</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-v">TimeSeries</span>(<span class="pl-s1">data</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-s1">index</span><span class="pl-c1">=</span>[ <span class="pl-s1">np</span>.<span class="pl-en">datetime64</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-s">'2000'</span>, <span class="pl-s">'2000'</span>, <span class="pl-s">'2002'</span>] ])
<span class="pl-s1">ts</span>.<span class="pl-s1">ix</span>[<span class="pl-s1">ts</span>.<span class="pl-s1">index</span>] <span class="pl-c"># returns an empty timeseries whereas ts[ts.index] works fine</span></pre></div>
<p dir="auto">I tracked it down to <code class="notranslate">ts.ix._get_item_iterable</code> which has a special case for when the index has duplicates which use pandas.TimeSeries.isin.</p>
<p dir="auto">As an aside it looks like pandas.core.common._asarray_tuplesafe(index) is wrong when using numpy 1.6 so that ts.ix[ts.index] still would return an empty array if this bug was fixed, but I guess that's a numpy 1.6 datetime64 bug which I have seen mentioned in a few other places.</p> | <p dir="auto">When assigning a <code class="notranslate">timedelta64</code> array to a subset of a new column of a <code class="notranslate">DataFrame</code>, missing data is not filled with <code class="notranslate">NaT</code> as expected; rather, the new column is cast to <code class="notranslate">float64</code> and <code class="notranslate">NaN</code> is used instead. This cast does not usually occur when all values are present, <em>except</em> when there are already <code class="notranslate">float64</code> columns but no <code class="notranslate">timedelta64</code> columns in the <code class="notranslate">DataFrame</code> <em>and</em> indexing is done through <code class="notranslate">.ix</code> or <code class="notranslate">.loc</code>.</p>
<p dir="auto">It's possible these should be two separate issues.</p>
<p dir="auto">There are a lot of issues involving <code class="notranslate">NaT</code> in the issue tracker; I'm not 100% sure that this isn't a duplicate. (Nor am I 100% sure this isn't intended behavior, but if it is I'd expect it to be documented more prominently.)</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
import numpy as np
import pandas as pd
one_hour = 60*60*10**9
temp = pd.DataFrame({}, index=pd.date_range('2014-1-1', periods=4))
temp['A'] = np.array([1*one_hour]*4, dtype='m8[ns]')
temp.loc[:,'B'] = np.array([2*one_hour]*4, dtype='m8[ns]')
temp.loc[:3,'C'] = np.array([3*one_hour]*3, dtype='m8[ns]')
temp.ix[:,'D'] = np.array([4*one_hour]*4, dtype='m8[ns]')
temp.ix[:3,'E'] = np.array([5*one_hour]*3, dtype='m8[ns]')
temp['F'] = np.timedelta64('NaT')
temp.ix[:-1,'F'] = np.array([6*one_hour]*3, dtype='m8[ns]')
temp
# A B C D E F
#2014-01-01 01:00:00 02:00:00 1.080000e+13 04:00:00 1.800000e+13 06:00:00
#2014-01-02 01:00:00 02:00:00 1.080000e+13 04:00:00 1.800000e+13 06:00:00
#2014-01-03 01:00:00 02:00:00 1.080000e+13 04:00:00 1.800000e+13 06:00:00
#2014-01-04 01:00:00 02:00:00 NaN 04:00:00 NaN NaT
#
# [4 rows x 6 columns]
temp = pd.DataFrame({}, index=pd.date_range('2014-1-1', periods=4))
# Partial assignment converts
temp.ix[:-1,'A'] = np.array([1*one_hour]*3, dtype='m8[ns]')
# DataFrame is all floats; converts
temp.ix[:,'B'] = np.array([2*one_hour]*4, dtype='m8[ns]')
# .ix and .loc behave the same
temp.loc[:,'C'] = np.array([3*one_hour]*4, dtype='m8[ns]')
# straight column assignment doesn't convert
temp['D'] = np.array([4*one_hour]*4, dtype='m8[ns]')
# Now there are timedeltas; doesn't convert
temp.ix[:,'E'] = np.array([5*one_hour]*4, dtype='m8[ns]')
# .ix and .loc still behave the same
temp.loc[:,'F'] = np.array([6*one_hour]*4, dtype='m8[ns]')
temp
# A B C D E \
#2014-01-01 3.600000e+12 7.200000e+12 1.080000e+13 04:00:00 05:00:00
#2014-01-02 3.600000e+12 7.200000e+12 1.080000e+13 04:00:00 05:00:00
#2014-01-03 3.600000e+12 7.200000e+12 1.080000e+13 04:00:00 05:00:00
#2014-01-04 NaN 7.200000e+12 1.080000e+13 04:00:00 05:00:00
#
# F
#2014-01-01 06:00:00
#2014-01-02 06:00:00
#2014-01-03 06:00:00
#2014-01-04 06:00:00
#
# [4 rows x 6 columns]
temp = pd.DataFrame({}, index=pd.date_range('2014-1-1', periods=4))
# No columns yet, no conversion
temp.ix[:,'A'] = np.array([2*one_hour]*4, dtype='m8[ns]')
# A
#2014-01-01 02:00:00
#2014-01-02 02:00:00
#2014-01-03 02:00:00
#2014-01-04 02:00:00
#
# [4 rows x 1 columns]
"><pre class="notranslate"><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-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-s1">one_hour</span> <span class="pl-c1">=</span> <span class="pl-c1">60</span><span class="pl-c1">*</span><span class="pl-c1">60</span><span class="pl-c1">*</span><span class="pl-c1">10</span><span class="pl-c1">**</span><span class="pl-c1">9</span>
<span class="pl-s1">temp</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({}, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2014-1-1'</span>, <span class="pl-s1">periods</span><span class="pl-c1">=</span><span class="pl-c1">4</span>))
<span class="pl-s1">temp</span>[<span class="pl-s">'A'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">4</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-s1">temp</span>.<span class="pl-s1">loc</span>[:,<span class="pl-s">'B'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">2</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">4</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-s1">temp</span>.<span class="pl-s1">loc</span>[:<span class="pl-c1">3</span>,<span class="pl-s">'C'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">3</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">3</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-s1">temp</span>.<span class="pl-s1">ix</span>[:,<span class="pl-s">'D'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">4</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">4</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-s1">temp</span>.<span class="pl-s1">ix</span>[:<span class="pl-c1">3</span>,<span class="pl-s">'E'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">5</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">3</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-s1">temp</span>[<span class="pl-s">'F'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">timedelta64</span>(<span class="pl-s">'NaT'</span>)
<span class="pl-s1">temp</span>.<span class="pl-s1">ix</span>[:<span class="pl-c1">-</span><span class="pl-c1">1</span>,<span class="pl-s">'F'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">6</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">3</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-s1">temp</span>
<span class="pl-c"># A B C D E F</span>
<span class="pl-c">#2014-01-01 01:00:00 02:00:00 1.080000e+13 04:00:00 1.800000e+13 06:00:00</span>
<span class="pl-c">#2014-01-02 01:00:00 02:00:00 1.080000e+13 04:00:00 1.800000e+13 06:00:00</span>
<span class="pl-c">#2014-01-03 01:00:00 02:00:00 1.080000e+13 04:00:00 1.800000e+13 06:00:00</span>
<span class="pl-c">#2014-01-04 01:00:00 02:00:00 NaN 04:00:00 NaN NaT</span>
<span class="pl-c"># </span>
<span class="pl-c"># [4 rows x 6 columns]</span>
<span class="pl-s1">temp</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({}, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2014-1-1'</span>, <span class="pl-s1">periods</span><span class="pl-c1">=</span><span class="pl-c1">4</span>))
<span class="pl-c"># Partial assignment converts</span>
<span class="pl-s1">temp</span>.<span class="pl-s1">ix</span>[:<span class="pl-c1">-</span><span class="pl-c1">1</span>,<span class="pl-s">'A'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">3</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-c"># DataFrame is all floats; converts</span>
<span class="pl-s1">temp</span>.<span class="pl-s1">ix</span>[:,<span class="pl-s">'B'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">2</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">4</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-c"># .ix and .loc behave the same</span>
<span class="pl-s1">temp</span>.<span class="pl-s1">loc</span>[:,<span class="pl-s">'C'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">3</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">4</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-c"># straight column assignment doesn't convert</span>
<span class="pl-s1">temp</span>[<span class="pl-s">'D'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">4</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">4</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-c"># Now there are timedeltas; doesn't convert</span>
<span class="pl-s1">temp</span>.<span class="pl-s1">ix</span>[:,<span class="pl-s">'E'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">5</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">4</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-c"># .ix and .loc still behave the same</span>
<span class="pl-s1">temp</span>.<span class="pl-s1">loc</span>[:,<span class="pl-s">'F'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">6</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">4</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-s1">temp</span>
<span class="pl-c"># A B C D E \</span>
<span class="pl-c">#2014-01-01 3.600000e+12 7.200000e+12 1.080000e+13 04:00:00 05:00:00 </span>
<span class="pl-c">#2014-01-02 3.600000e+12 7.200000e+12 1.080000e+13 04:00:00 05:00:00 </span>
<span class="pl-c">#2014-01-03 3.600000e+12 7.200000e+12 1.080000e+13 04:00:00 05:00:00 </span>
<span class="pl-c">#2014-01-04 NaN 7.200000e+12 1.080000e+13 04:00:00 05:00:00 </span>
<span class="pl-c"># </span>
<span class="pl-c"># F </span>
<span class="pl-c">#2014-01-01 06:00:00 </span>
<span class="pl-c">#2014-01-02 06:00:00 </span>
<span class="pl-c">#2014-01-03 06:00:00 </span>
<span class="pl-c">#2014-01-04 06:00:00 </span>
<span class="pl-c"># </span>
<span class="pl-c"># [4 rows x 6 columns]</span>
<span class="pl-s1">temp</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({}, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2014-1-1'</span>, <span class="pl-s1">periods</span><span class="pl-c1">=</span><span class="pl-c1">4</span>))
<span class="pl-c"># No columns yet, no conversion</span>
<span class="pl-s1">temp</span>.<span class="pl-s1">ix</span>[:,<span class="pl-s">'A'</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">2</span><span class="pl-c1">*</span><span class="pl-s1">one_hour</span>]<span class="pl-c1">*</span><span class="pl-c1">4</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'m8[ns]'</span>)
<span class="pl-c"># A</span>
<span class="pl-c">#2014-01-01 02:00:00</span>
<span class="pl-c">#2014-01-02 02:00:00</span>
<span class="pl-c">#2014-01-03 02:00:00</span>
<span class="pl-c">#2014-01-04 02:00:00</span>
<span class="pl-c"># </span>
<span class="pl-c"># [4 rows x 1 columns]</span></pre></div> | 0 |
<p dir="auto">This code will put the help text at the end of the appended text. Should wrap under the input. input-prepend does work however.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<div class="clearfix">
<label for="pet-weight">Initial Weight</label>
<div class="input">
<div class="input-append">
<input class="span5" id="pet-weight" name="pet[weight]" tabindex="6" type="text" value="">
<span class="add-on">lbs</span>
</div>
<span class="help-block">Some help text</span>
</div>
</div>"><pre class="notranslate"><code class="notranslate"><div class="clearfix">
<label for="pet-weight">Initial Weight</label>
<div class="input">
<div class="input-append">
<input class="span5" id="pet-weight" name="pet[weight]" tabindex="6" type="text" value="">
<span class="add-on">lbs</span>
</div>
<span class="help-block">Some help text</span>
</div>
</div>
</code></pre></div> | <p dir="auto">When using <code class="notranslate">.help-block</code> with <code class="notranslate">.input-append</code>, the help text appears after the input instead of under it.</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<div class="clearfix">
<label for="appendedInput">Appended text</label>
<div class="input">
<div class="input-append">
<input type="text" class="medium" id="appendedInput" name="appendedInput" size="16">
<span class="add-on">%</span>
</div>
<span class="help-block">Here's some help text</span>
</div>
</div>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">clearfix</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">label</span> <span class="pl-c1">for</span>="<span class="pl-s">appendedInput</span>"<span class="pl-kos">></span>Appended text<span class="pl-kos"></</span><span class="pl-ent">label</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">input</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">input-append</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">text</span>" <span class="pl-c1">class</span>="<span class="pl-s">medium</span>" <span class="pl-c1">id</span>="<span class="pl-s">appendedInput</span>" <span class="pl-c1">name</span>="<span class="pl-s">appendedInput</span>" <span class="pl-c1">size</span>="<span class="pl-s">16</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">span</span> <span class="pl-c1">class</span>="<span class="pl-s">add-on</span>"<span class="pl-kos">></span>%<span class="pl-kos"></</span><span class="pl-ent">span</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">span</span> <span class="pl-c1">class</span>="<span class="pl-s">help-block</span>"<span class="pl-kos">></span>Here's some help text<span class="pl-kos"></</span><span class="pl-ent">span</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div>
<p dir="auto"><em>P.S. I've only tested this with Bootstrap 1.0, please excuse me if it has already been fixed in 2.0.</em></p> | 1 |
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 3.3.1</li>
<li>Operating System / Platform => MacOS X EI Capitan 10.11.6</li>
<li>Compiler => g++ 4.2.1</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I download and unzip the source code of OpenCV-3.3.1 from github, make and install it.<br>
Copy opencv.pc to <code class="notranslate">/usr/local/lib/pkgconfig/opencv3.pc</code>.<br>
Finally, fix <code class="notranslate">~/.bash_profile</code> by adding</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export DYLD_LIBRARY_PATH=/Users/yan/opencv-src/opencv-3.3.1/build/lib:$DYLD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH"><pre class="notranslate"><code class="notranslate">export DYLD_LIBRARY_PATH=/Users/yan/opencv-src/opencv-3.3.1/build/lib:$DYLD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH
</code></pre></div>
<p dir="auto">The problem is when I execute <code class="notranslate">g++ -ggdb `pkg-config --cflags --libs opencv3` opencv_version.cpp -o /tmp/test && /tmp/test</code> one error comes out:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ld: library not found for -llibopencv_stitching.3.3.1.dylib
clang: error: linker command failed with exit code 1 (use -v to see invocation)"><pre class="notranslate"><code class="notranslate">ld: library not found for -llibopencv_stitching.3.3.1.dylib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
</code></pre></div>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">cmake:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/Users/yan/opencv-src/opencv-3.3.1/build \
-D OPENCV_EXTRA_MODULES_PATH=/Users/yan/opencv-src/opencv_contrib-3.3.1/modules \
-D PYTHON3_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin/libpython3.6.dylib \
-D PYTHON3_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/ \
-D PYTHON3_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 \
-D BUILD_opencv_python3=ON \
-D BUILD_opencv_python2=OFF \
-D WITH_CUDA=OFF \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=ON .."><pre class="notranslate"><code class="notranslate">cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/Users/yan/opencv-src/opencv-3.3.1/build \
-D OPENCV_EXTRA_MODULES_PATH=/Users/yan/opencv-src/opencv_contrib-3.3.1/modules \
-D PYTHON3_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin/libpython3.6.dylib \
-D PYTHON3_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/ \
-D PYTHON3_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 \
-D BUILD_opencv_python3=ON \
-D BUILD_opencv_python2=OFF \
-D WITH_CUDA=OFF \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=ON ..
</code></pre></div>
<p dir="auto">cmake log snippet:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-- General configuration for OpenCV 3.3.1 =====================================
-- Version control: unknown
--
-- Extra modules:
-- Location (extra): /Users/yan/opencv-src/opencv_contrib-3.3.1/modules
-- Version control (extra): unknown
--
-- Platform:
-- Timestamp: 2017-12-06T13:54:50Z
-- Host: Darwin 15.6.0 x86_64
-- CMake: 3.3.2
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: RELEASE
--
-- CPU/HW features:
-- Baseline: SSE SSE2 SSE3
-- requested: SSE3
-- Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
-- requested: SSE4_1 SSE4_2 AVX FP16 AVX2
-- SSE4_1 (3 files): + SSSE3 SSE4_1
-- SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
-- FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
-- AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
-- AVX2 (8 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ (ver 8.0.0.8000042)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- ccache: NO
-- Precompiled headers: NO
-- Extra dependencies:
-- 3rdparty dependencies:
--
-- OpenCV modules:
-- To be built: core flann hdf imgproc ml objdetect phase_unwrapping photo plot reg surface_matching video xphoto bgsegm dnn face fuzzy img_hash imgcodecs shape videoio xobjdetect highgui superres ts bioinspired dpm features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow sfm stitching python3
-- Disabled: js python2 world contrib_world
-- Disabled by dependency: -
-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java viz cnn_3dobj cvv dnn_modern freetype matlab
--
-- GUI:
-- QT: NO
-- Cocoa: YES
-- OpenGL support: NO
-- VTK support: NO
--
-- Media I/O:
-- ZLib: build (ver 1.2.8)
-- JPEG: build (ver 90)
-- WEBP: build (ver encoder: 0x020e)
-- PNG: build (ver 1.6.24)
-- TIFF: build (ver 42 - 4.0.2)
-- JPEG 2000: build (ver 1.900.1)
-- OpenEXR: build (ver 1.7.1)
-- GDAL: NO
-- GDCM: NO
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: NO
-- avcodec: NO
-- avformat: NO
-- avutil: NO
-- swscale: NO
-- avresample: NO
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- Aravis SDK: NO
-- AVFoundation: YES
-- V4L/V4L2: NO/NO
-- XIMEA: NO
-- Intel Media SDK: NO
-- gPhoto2: NO
--
-- Parallel framework: GCD
--
-- Trace: YES (with Intel ITT)
--
-- Other third-party libraries:
-- Use Intel IPP: 2017.0.3 [2017.0.3]
-- at: /Users/yan/opencv-src/opencv-3.3.1/build/3rdparty/ippicv/ippicv_mac
-- Use Intel IPP IW: sources (2017.0.3)
-- at: /Users/yan/opencv-src/opencv-3.3.1/build/3rdparty/ippicv/ippiw_mac
-- Use VA: NO
-- Use Intel VA-API/OpenCL: NO
-- Use Lapack: YES (/System/Library/Frameworks/Accelerate.framework /System/Library/Frameworks/Accelerate.framework)
-- Use Eigen: YES (ver 3.2.6)
-- Use Cuda: NO
-- Use OpenCL: YES
-- Use OpenVX: NO
-- Use custom HAL: NO
--
-- OpenCL: <Link with OpenCL library>
-- Link libraries: -framework OpenCL
-- Use AMDFFT: NO
-- Use AMDBLAS: NO
--
-- Python 2:
-- Interpreter: /usr/bin/python2.7 (ver 2.7.10)
--
-- Python 3:
-- Interpreter: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 (ver 3.6.3)
-- Libraries: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin/libpython3.6.dylib (ver 3.6.3)
-- numpy: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/include (ver 1.13.3)
-- packages path: lib/python3.6/site-packages
--
-- Python (for build): /usr/bin/python2.7
--
-- Java:
-- ant: NO
-- JNI: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/include /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/include/darwin /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/include
-- Java wrappers: NO
-- Java tests: NO
--
-- Matlab:
-- mex: /Applications/MATLAB_R2014b.app/bin/mex
-- Compiler/generator: Not working (bindings will not be generated)
--
-- Documentation:
-- Doxygen: NO
--
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: YES
--
-- Install path: /Users/yan/opencv-src/opencv-3.3.1/build
--
-- cvconfig.h is in: /Users/yan/opencv-src/opencv-3.3.1/build
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/yan/opencv-src/opencv-3.3.1/build"><pre class="notranslate"><code class="notranslate">-- General configuration for OpenCV 3.3.1 =====================================
-- Version control: unknown
--
-- Extra modules:
-- Location (extra): /Users/yan/opencv-src/opencv_contrib-3.3.1/modules
-- Version control (extra): unknown
--
-- Platform:
-- Timestamp: 2017-12-06T13:54:50Z
-- Host: Darwin 15.6.0 x86_64
-- CMake: 3.3.2
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: RELEASE
--
-- CPU/HW features:
-- Baseline: SSE SSE2 SSE3
-- requested: SSE3
-- Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
-- requested: SSE4_1 SSE4_2 AVX FP16 AVX2
-- SSE4_1 (3 files): + SSSE3 SSE4_1
-- SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
-- FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
-- AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
-- AVX2 (8 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ (ver 8.0.0.8000042)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- ccache: NO
-- Precompiled headers: NO
-- Extra dependencies:
-- 3rdparty dependencies:
--
-- OpenCV modules:
-- To be built: core flann hdf imgproc ml objdetect phase_unwrapping photo plot reg surface_matching video xphoto bgsegm dnn face fuzzy img_hash imgcodecs shape videoio xobjdetect highgui superres ts bioinspired dpm features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow sfm stitching python3
-- Disabled: js python2 world contrib_world
-- Disabled by dependency: -
-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java viz cnn_3dobj cvv dnn_modern freetype matlab
--
-- GUI:
-- QT: NO
-- Cocoa: YES
-- OpenGL support: NO
-- VTK support: NO
--
-- Media I/O:
-- ZLib: build (ver 1.2.8)
-- JPEG: build (ver 90)
-- WEBP: build (ver encoder: 0x020e)
-- PNG: build (ver 1.6.24)
-- TIFF: build (ver 42 - 4.0.2)
-- JPEG 2000: build (ver 1.900.1)
-- OpenEXR: build (ver 1.7.1)
-- GDAL: NO
-- GDCM: NO
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: NO
-- avcodec: NO
-- avformat: NO
-- avutil: NO
-- swscale: NO
-- avresample: NO
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- Aravis SDK: NO
-- AVFoundation: YES
-- V4L/V4L2: NO/NO
-- XIMEA: NO
-- Intel Media SDK: NO
-- gPhoto2: NO
--
-- Parallel framework: GCD
--
-- Trace: YES (with Intel ITT)
--
-- Other third-party libraries:
-- Use Intel IPP: 2017.0.3 [2017.0.3]
-- at: /Users/yan/opencv-src/opencv-3.3.1/build/3rdparty/ippicv/ippicv_mac
-- Use Intel IPP IW: sources (2017.0.3)
-- at: /Users/yan/opencv-src/opencv-3.3.1/build/3rdparty/ippicv/ippiw_mac
-- Use VA: NO
-- Use Intel VA-API/OpenCL: NO
-- Use Lapack: YES (/System/Library/Frameworks/Accelerate.framework /System/Library/Frameworks/Accelerate.framework)
-- Use Eigen: YES (ver 3.2.6)
-- Use Cuda: NO
-- Use OpenCL: YES
-- Use OpenVX: NO
-- Use custom HAL: NO
--
-- OpenCL: <Link with OpenCL library>
-- Link libraries: -framework OpenCL
-- Use AMDFFT: NO
-- Use AMDBLAS: NO
--
-- Python 2:
-- Interpreter: /usr/bin/python2.7 (ver 2.7.10)
--
-- Python 3:
-- Interpreter: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 (ver 3.6.3)
-- Libraries: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin/libpython3.6.dylib (ver 3.6.3)
-- numpy: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/include (ver 1.13.3)
-- packages path: lib/python3.6/site-packages
--
-- Python (for build): /usr/bin/python2.7
--
-- Java:
-- ant: NO
-- JNI: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/include /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/include/darwin /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/include
-- Java wrappers: NO
-- Java tests: NO
--
-- Matlab:
-- mex: /Applications/MATLAB_R2014b.app/bin/mex
-- Compiler/generator: Not working (bindings will not be generated)
--
-- Documentation:
-- Doxygen: NO
--
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: YES
--
-- Install path: /Users/yan/opencv-src/opencv-3.3.1/build
--
-- cvconfig.h is in: /Users/yan/opencv-src/opencv-3.3.1/build
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/yan/opencv-src/opencv-3.3.1/build
</code></pre></div>
<p dir="auto">opencv3.pc:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Package Information for pkg-config
prefix=/Users/yan/opencv-src/opencv-3.3.1/build
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir_old=${prefix}/include/opencv
includedir_new=${prefix}/include
Name: OpenCV
Description: Open Source Computer Vision Library
Version: 3.3.1
Libs: -L${exec_prefix}/lib -llibopencv_stitching.3.3.1.dylib -llibopencv_superres.3.3.1.dylib -llibopencv_videostab.3.3.1.dylib -llibopencv_photo.3.3.1.dylib -llibopencv_aruco.3.3.1.dylib -llibopencv_bgsegm.3.3.1.dylib -llibopencv_bioinspired.3.3.1.dylib -llibopencv_ccalib.3.3.1.dylib -llibopencv_dpm.3.3.1.dylib -llibopencv_face.3.3.1.dylib -llibopencv_fuzzy.3.3.1.dylib -llibopencv_hdf.3.3.1.dylib -llibopencv_img_hash.3.3.1.dylib -llibopencv_line_descriptor.3.3.1.dylib -llibopencv_optflow.3.3.1.dylib -llibopencv_reg.3.3.1.dylib -llibopencv_rgbd.3.3.1.dylib -llibopencv_saliency.3.3.1.dylib -llibopencv_sfm.3.3.1.dylib -llibopencv_stereo.3.3.1.dylib -llibopencv_structured_light.3.3.1.dylib -llibopencv_phase_unwrapping.3.3.1.dylib -llibopencv_surface_matching.3.3.1.dylib -llibopencv_tracking.3.3.1.dylib -llibopencv_datasets.3.3.1.dylib -llibopencv_text.3.3.1.dylib -llibopencv_dnn.3.3.1.dylib -llibopencv_plot.3.3.1.dylib -llibopencv_xfeatures2d.3.3.1.dylib -llibopencv_shape.3.3.1.dylib -llibopencv_video.3.3.1.dylib -llibopencv_ml.3.3.1.dylib -llibopencv_ximgproc.3.3.1.dylib -llibopencv_calib3d.3.3.1.dylib -llibopencv_features2d.3.3.1.dylib -llibopencv_highgui.3.3.1.dylib -llibopencv_videoio.3.3.1.dylib -llibopencv_flann.3.3.1.dylib -llibopencv_xobjdetect.3.3.1.dylib -llibopencv_imgcodecs.3.3.1.dylib -llibopencv_objdetect.3.3.1.dylib -llibopencv_xphoto.3.3.1.dylib -llibopencv_imgproc.3.3.1.dylib -llibopencv_core.3.3.1.dylib
Libs.private:
Cflags: -I${includedir_old} -I${includedir_new}"><pre class="notranslate"><code class="notranslate"># Package Information for pkg-config
prefix=/Users/yan/opencv-src/opencv-3.3.1/build
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir_old=${prefix}/include/opencv
includedir_new=${prefix}/include
Name: OpenCV
Description: Open Source Computer Vision Library
Version: 3.3.1
Libs: -L${exec_prefix}/lib -llibopencv_stitching.3.3.1.dylib -llibopencv_superres.3.3.1.dylib -llibopencv_videostab.3.3.1.dylib -llibopencv_photo.3.3.1.dylib -llibopencv_aruco.3.3.1.dylib -llibopencv_bgsegm.3.3.1.dylib -llibopencv_bioinspired.3.3.1.dylib -llibopencv_ccalib.3.3.1.dylib -llibopencv_dpm.3.3.1.dylib -llibopencv_face.3.3.1.dylib -llibopencv_fuzzy.3.3.1.dylib -llibopencv_hdf.3.3.1.dylib -llibopencv_img_hash.3.3.1.dylib -llibopencv_line_descriptor.3.3.1.dylib -llibopencv_optflow.3.3.1.dylib -llibopencv_reg.3.3.1.dylib -llibopencv_rgbd.3.3.1.dylib -llibopencv_saliency.3.3.1.dylib -llibopencv_sfm.3.3.1.dylib -llibopencv_stereo.3.3.1.dylib -llibopencv_structured_light.3.3.1.dylib -llibopencv_phase_unwrapping.3.3.1.dylib -llibopencv_surface_matching.3.3.1.dylib -llibopencv_tracking.3.3.1.dylib -llibopencv_datasets.3.3.1.dylib -llibopencv_text.3.3.1.dylib -llibopencv_dnn.3.3.1.dylib -llibopencv_plot.3.3.1.dylib -llibopencv_xfeatures2d.3.3.1.dylib -llibopencv_shape.3.3.1.dylib -llibopencv_video.3.3.1.dylib -llibopencv_ml.3.3.1.dylib -llibopencv_ximgproc.3.3.1.dylib -llibopencv_calib3d.3.3.1.dylib -llibopencv_features2d.3.3.1.dylib -llibopencv_highgui.3.3.1.dylib -llibopencv_videoio.3.3.1.dylib -llibopencv_flann.3.3.1.dylib -llibopencv_xobjdetect.3.3.1.dylib -llibopencv_imgcodecs.3.3.1.dylib -llibopencv_objdetect.3.3.1.dylib -llibopencv_xphoto.3.3.1.dylib -llibopencv_imgproc.3.3.1.dylib -llibopencv_core.3.3.1.dylib
Libs.private:
Cflags: -I${includedir_old} -I${includedir_new}
</code></pre></div> | <p dir="auto">File <code class="notranslate">/usr/local/lib/pkgconfig/opencv.pc</code> has all the linker flags wrong, and it makes pkg-config unusable for opencv.</p>
<p dir="auto">example:</p>
<p dir="auto">it is:<br>
<code class="notranslate">-llibopencv_stitching.3.3.1.dylib</code></p>
<p dir="auto">it should be:<br>
<code class="notranslate">-lopencv_stitching</code></p>
<p dir="auto">etc.</p>
<p dir="auto">Fresh install OSX 10.13 High Sierra.</p>
<p dir="auto"><code class="notranslate">$ brew config HOMEBREW_VERSION: 1.3.6 ORIGIN: https://github.com/Homebrew/brew HEAD: 270b752f5d9d218bfbed6fe85b6974fa653fb25f Last commit: 3 weeks ago Core tap ORIGIN: https://github.com/Homebrew/homebrew-core Core tap HEAD: ade735b9e95352f1731445bad505d920c9521969 Core tap last commit: 3 hours ago HOMEBREW_PREFIX: /usr/local HOMEBREW_REPOSITORY: /usr/local/Homebrew HOMEBREW_CELLAR: /usr/local/Cellar HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com CPU: quad-core 64-bit sandybridge Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 9.0 build 900 Git: 2.13.5 => /Library/Developer/CommandLineTools/usr/bin/git Perl: /usr/bin/perl Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/bin/python2.7 Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Java: N/A macOS: 10.13-x86_64 Xcode: 9.1 CLT: 9.0.1.0.1.1506734476 X11: 2.7.11 => /opt/X11</code></p>
<p dir="auto"><code class="notranslate">$ brew info opencv opencv: stable 3.3.1 (bottled) Open source computer vision library https://opencv.org/ /usr/local/Cellar/opencv/3.3.1_1 (519 files, 95.8MB) * Built from source on 2017-11-08 at 11:53:09 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/opencv.rb ==> Dependencies Build: cmake ✔, pkg-config ✔ Required: eigen ✔, ffmpeg ✔, jpeg ✔, libpng ✔, libtiff ✔, openexr ✔, numpy ✔, tbb ✔ ==> Requirements Required: python ✔, python3 ✔</code></p>
<p dir="auto">Also reported in Homebrew bug tracker: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="272162853" data-permission-text="Title is private" data-url="https://github.com/Homebrew/homebrew-core/issues/20406" data-hovercard-type="issue" data-hovercard-url="/Homebrew/homebrew-core/issues/20406/hovercard" href="https://github.com/Homebrew/homebrew-core/issues/20406">Homebrew/homebrew-core#20406</a></p> | 1 |
<ul dir="auto">
<li>Electron version: v1.6.9</li>
<li>Operating system: Arch Linux with Gnome as DE</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">NativeImage does not support SVG images :( I've to convert the images to png's and there's no easy way to doing so (use external libraries that almost every one of them requires PhantomJs...)</p>
<p dir="auto">Every Linux distro supports using SVG icons for Tray icons. And so should nativeImage on Linux desktop.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Doesn't work as SVG icons are not supported</p>
<h3 dir="auto">How to reproduce</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const nativeImage = require('electron').nativeImage
let image = nativeImage.createFromPath('/Users/somebody/images/icon.svg')
console.log(image)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">nativeImage</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">nativeImage</span>
<span class="pl-k">let</span> <span class="pl-s1">image</span> <span class="pl-c1">=</span> <span class="pl-s1">nativeImage</span><span class="pl-kos">.</span><span class="pl-en">createFromPath</span><span class="pl-kos">(</span><span class="pl-s">'/Users/somebody/images/icon.svg'</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">image</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">The reason why I need this is that I've created a simple package to look for an icon on current icon theme used by the user. This way, electron applications can look more native with tray icons that can be themed by any theme designer (without any hackish solution like extracting the user file...)<br>
And every icon theme on Linux is using SVG icons. I hope this convince you enough to make this happen👍</p> | <p dir="auto">When building the latest 0.27.3 the mac app bundle is about 142MB of which 136MB come from the Electron Framework.</p>
<p dir="auto">Is there any way to make this package smaller?</p> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=dirtyhenry" rel="nofollow">Mickaël Floc'hlay</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3372?redirect=false" rel="nofollow">SPR-3372</a></strong> and commented</p>
<p dir="auto">On page 30 of the 2.0.4 Reference Manual, the <beans> tag is :</p>
<p dir="auto"><beans xmlns="<a href="http://www.springframework.org/schema/beans" rel="nofollow">http://www.springframework.org/schema/beans</a>"<br>
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
xsi:schemaLocation="<a href="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd%22%3E" rel="nofollow">http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"></a></p>
<p dir="auto">Using this tag as is leads to an error (cf. thread in forum : <a href="http://forum.springframework.org/showthread.php?t=34417" rel="nofollow">http://forum.springframework.org/showthread.php?t=34417</a>)</p>
<p dir="auto">The correct <beans> tag should be :</p>
<p dir="auto"><beans xmlns="<a href="http://www.springframework.org/schema/beans" rel="nofollow">http://www.springframework.org/schema/beans</a>"<br>
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
xsi:schemaLocation="<a href="http://www.springframework.org/schema/beans" rel="nofollow">http://www.springframework.org/schema/beans</a> <a href="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd%22%3E" rel="nofollow">http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"></a></p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.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="398077445" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8094" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8094/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8094">#8094</a> Problems with definition of bean namespace in several examples (<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="398077625" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8114" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8114/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8114">#8114</a> XML shown in section 3.2.1.1 of documentation missing attribute text (<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="398077436" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8093" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8093/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8093">#8093</a> XML shown in section 3.2.1.1 of documentation missing attribute text (<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="398078308" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8207" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8207/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8207">#8207</a> Doc: Still problems with definition of bean namespace in several examples</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=xhchen111" rel="nofollow">chen xiaohu</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2109?redirect=false" rel="nofollow">SPR-2109</a></strong> and commented</p>
<p dir="auto">when user jpetstore sample of m5 in resin3.0.14.<br>
I think the error is can not use xsi:schemaLocation="<br>
<a href="http://www.springframework.org/schema/beans" rel="nofollow">http://www.springframework.org/schema/beans</a> <a href="http://www.springframework.org/schema/beans/spring-beans.xsd" rel="nofollow">http://www.springframework.org/schema/beans/spring-beans.xsd</a>"<br>
in applicationContext.xml in resin.<br>
error :</p>
<hr>
<p dir="auto">[12:21:00.640] Caused by: java.lang.IllegalArgumentException: Bean name must not be empty<br>
[12:21:00.640] at org.springframework.util.Assert.hasText(Assert.java:169)<br>
[12:21:00.640] at org.springframework.beans.factory.config.RuntimeBeanReference.<init>RuntimeBeanReference.java:56)<br>
[12:21:00.640] at org.springframework.beans.factory.config.RuntimeBeanReference.<init>RuntimeBeanReference.java:44)<br>
[12:21:00.640] at org.springframework.beans.factory.support.BeanDefinitionBuild er.addPropertyReference BeanDefinitionBuilder.java:115)<br>
[12:21:00.640] at org.springframework.transaction.config.TxAdviceBeanDefinition Parser.doParse TxAdviceBeanDefinitionParser.java:68)<br>
.....</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0 M5</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="398072166" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7439" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7439/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7439">#7439</a> SPR_2109 reoccurs in Resin 3.0.18 (<em><strong>"is depended on by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398078594" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8244" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8244/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8244">#8244</a> CLONE -context:component-scan does not work in the web application (<em><strong>"is duplicated by"</strong></em>)</li>
</ul> | 0 |
<p dir="auto">When using next.js app in production mode with assets hosted on static (or not next.js powered) CDN it breaks when user navigates to non-existing page.</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">Expected behavior to do full page "refresh" to allow integration between next.js powered pages other web pages on internet.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">It renders unexpected error page:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/50a5aa43ac59d940c76911b8bcb7796f92cc18508eebddc0aa4f7406becaf980/687474703a2f2f69612e67732f3258323430453331316730452f496d616765253230323031382d30322d3230253230617425323031312e35392e3435253230414d2e706e67"><img src="https://camo.githubusercontent.com/50a5aa43ac59d940c76911b8bcb7796f92cc18508eebddc0aa4f7406becaf980/687474703a2f2f69612e67732f3258323430453331316730452f496d616765253230323031382d30322d3230253230617425323031312e35392e3435253230414d2e706e67" alt="unexpected error" data-canonical-src="http://ia.gs/2X240E311g0E/Image%202018-02-20%20at%2011.59.45%20AM.png" style="max-width: 100%;"></a></p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">I created example repo: <a href="https://github.com/alexindigo/next-ab">https://github.com/alexindigo/next-ab</a></p>
<h2 dir="auto">Context</h2>
<p dir="auto">It doesn't allow us to integrate new next.js powered pages with the existing website.</p>
<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>5.0.0</td>
</tr>
<tr>
<td>node</td>
<td>8.9.3</td>
</tr>
<tr>
<td>OS</td>
<td>macOS 10.13.3</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 64</td>
</tr>
</tbody>
</table>
<p dir="auto">Thank you.</p> | <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/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<h2 dir="auto">Current Behavior</h2>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
<h2 dir="auto">Context</h2>
<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></td>
</tr>
<tr>
<td>node</td>
<td></td>
</tr>
<tr>
<td>OS</td>
<td></td>
</tr>
<tr>
<td>browser</td>
<td></td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/en/challenges/basic-javascript/escaping-literal-quotes-in-strings" rel="nofollow">escaping-literal-quotes-in-strings</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 10.0; 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 myStr = "I am a \"double quoted\" string inside \"double quotes\".";
"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">myStr</span> <span class="pl-c1">=</span> <span class="pl-s">"I am a \"double quoted\" string inside \"double quotes\"."</span><span class="pl-kos">;</span>
</pre></div> | <p dir="auto">On the current staging, two challenges ("Escaping Literal Quotes in Strings" and "Quoting Strings with Single Quotes") do not pass all tests with standard solution code.</p>
<p dir="auto">Namely, tests asserting regex match lengths for non-escaped double quotes are failing:<br>
<code class="notranslate">code.match(/[^\\\\]\"/g).length === 2</code> in the former challenge and<br>
<code class="notranslate">code.match(/\"/g).length === 4</code> in the latter.</p>
<p dir="auto">(Note: each of these is only one half of their respective test, and it might be beneficial in this case to split each test into two parts so users know where to look for their mistake instead of counting every quotation mark, as well as speeding up debugging if something breaks the regex again later on.)</p> | 1 |
<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">I'm not able to see <code class="notranslate">console.log('some message')</code> when applied to a pages getInitialProps.</p>
<p dir="auto">Taking a fresh copy of next and creating an index page like so:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import React, { Component} from 'react'
export default class Index extends Component {
async getInitialProps() {
console.log('show your self')
}
render() {
return (
<div>Index Page</div>
)
}
}"><pre class="notranslate"><code class="notranslate">import React, { Component} from 'react'
export default class Index extends Component {
async getInitialProps() {
console.log('show your self')
}
render() {
return (
<div>Index Page</div>
)
}
}
</code></pre></div>
<p dir="auto">Running the server (in dev mode) and hitting the index page shows no message in terminal.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">No log's at all</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Create a new version of next.js project</li>
<li>Apply the above code to pages/index.js file</li>
<li>Run dev server</li>
<li>Check for logs after visiting localhost:3000</li>
</ol>
<h2 dir="auto">Context</h2>
<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.4</td>
</tr>
<tr>
<td>node</td>
<td>9.2</td>
</tr>
<tr>
<td>OS</td>
<td>10.12.6 OSX</td>
</tr>
<tr>
<td>browser</td>
<td></td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <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">The server shouldn't spend 20ms to require the <code class="notranslate">Component</code> and the <code class="notranslate">Document</code> components.<br>
I believe we could <strong>use a cache to only pay the resolution cost once in production.</strong></p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The requests are delayed by 20ms.<br>
It might get worse in the future version as the <a href="https://github.com/zeit/next.js/blob/cdbbe928b26af2e79c4508f127351b6652c5aee6/server/resolve.js"><code class="notranslate">/server/resolve.js</code></a> logic has grown to support 5 different extensions in canary:<br>
<a href="https://github.com/zeit/next.js/blob/cdbbe928b26af2e79c4508f127351b6652c5aee6/server/resolve.js#L36-L42">https://github.com/zeit/next.js/blob/cdbbe928b26af2e79c4508f127351b6652c5aee6/server/resolve.js#L36-L42</a></p>
<p dir="auto">where it only supports 2 in 4.2.3<br>
<a href="https://github.com/zeit/next.js/blob/44de0f15c96c425c193ffdccacb14f28051051d5/server/resolve.js#L33-L36">https://github.com/zeit/next.js/blob/44de0f15c96c425c193ffdccacb14f28051051d5/server/resolve.js#L33-L36</a></p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Server side render a page with the <code class="notranslate">--inspect</code> flag</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">I have noticed the following issue investigating a server-side rendering slow issue.<br>
I have noticed that we systematically wait 20ms to require the <code class="notranslate">Component</code> and the <code class="notranslate">Document</code> components.</p>
<p dir="auto"><a href="https://github.com/zeit/next.js/blob/44de0f15c96c425c193ffdccacb14f28051051d5/server/render.js#L56-L59">https://github.com/zeit/next.js/blob/44de0f15c96c425c193ffdccacb14f28051051d5/server/render.js#L56-L59</a></p>
<p dir="auto">I believe a simple cache in production could make the resolution instant:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3165635/35807424-08b70ea6-0a83-11e8-97a9-98d9857ce199.png"><img src="https://user-images.githubusercontent.com/3165635/35807424-08b70ea6-0a83-11e8-97a9-98d9857ce199.png" alt="capture d ecran 2018-02-05 a 14 43 53" style="max-width: 100%;"></a></p>
<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.3</td>
</tr>
<tr>
<td>node</td>
<td>9.4.0</td>
</tr>
<tr>
<td>OS</td>
<td>macOS High Sierra 10.13.x</td>
</tr>
<tr>
<td>browser</td>
<td>N.A</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">Hello,</p>
<p dir="auto">I just tried VS Code recently and I was surprised to see it didn't exclude the files and folders listed in my <code class="notranslate">.gitignore</code> file.</p>
<p dir="auto">I think an option allowing us to hide those files in the Explorer would be really nice.</p>
<p dir="auto">Here is how Atom does it:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/89233/13565344/d476f9ea-e44f-11e5-896b-3a637ee36153.png"><img width="770" alt="screen shot 2016-03-07 at 10 31 42" src="https://cloud.githubusercontent.com/assets/89233/13565344/d476f9ea-e44f-11e5-896b-3a637ee36153.png" style="max-width: 100%;"></a></p>
<p dir="auto">And when this option isn't on, Atom colorizes the excluded files like that:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/89233/13565471/8abf97a2-e450-11e5-94ad-771193dd25c0.png"><img width="167" alt="screen shot 2016-03-07 at 10 36 52" src="https://cloud.githubusercontent.com/assets/89233/13565471/8abf97a2-e450-11e5-94ad-771193dd25c0.png" style="max-width: 100%;"></a></p> | <p dir="auto">The whole process of cloning mock-debug to make a debugger extension and then changing it is cumbersome. Like for normal extensions, there should be a yeoman generator that asks you questions about what languages the debugger is for, what the name should be etc.</p>
<p dir="auto">Secondly, in the docs you express the intent to move the common part of the mock-debug repo to a NPM module, which makes sense, as it's the TS implementation of the debugger protocol so we can write extensions in TS using it. You would be able to add more features over time etc.</p>
<p dir="auto">I think this would make writing debugger extensions more straight forward.</p> | 0 |
<p dir="auto">I am puzzled by the following</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" logger.debug('Indexes are identical: {}'.format(data_frame.index is categories.index))
logger.debug('Index is unique: {}'.format(data_frame.index.is_unique))
logger.debug('All columns are in data_frame: {}'.format(all(map(lambda x: x in data_frame, columns_regression))))
df_regression = data_frame[columns_regression].join(categories)"><pre class="notranslate"><code class="notranslate"> logger.debug('Indexes are identical: {}'.format(data_frame.index is categories.index))
logger.debug('Index is unique: {}'.format(data_frame.index.is_unique))
logger.debug('All columns are in data_frame: {}'.format(all(map(lambda x: x in data_frame, columns_regression))))
df_regression = data_frame[columns_regression].join(categories)
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2014-06-23 21:02:56,125 DEBUG pmt.portfolio_analytics.attribution.AlphaData - Indexes are identical: True
2014-06-23 21:02:56,141 DEBUG pmt.portfolio_analytics.attribution.AlphaData - Index is unique: True
2014-06-23 21:02:56,142 DEBUG pmt.portfolio_analytics.attribution.AlphaData - All columns are in data_frame: True
Traceback (most recent call last):
File "C:/Users/BKovtunenko/Perforce/bos-perforce01_1666/bkovtunenko_BKOVTUNENKO-D7/aam/branches/boris/pmt/python/pmt/portfolio_analytics/attribution/AlphaData.py", line 1782, in <module>
thresholds_mkt_cap=thresh_mkt_cap)
File "C:/Users/BKovtunenko/Perforce/bos-perforce01_1666/bkovtunenko_BKOVTUNENKO-D7/aam/branches/boris/pmt/python/pmt/portfolio_analytics/attribution/AlphaData.py", line 1640, in save_regression_results
regression_type=regresion_type)
File "C:/Users/BKovtunenko/Perforce/bos-perforce01_1666/bkovtunenko_BKOVTUNENKO-D7/aam/branches/boris/pmt/python/pmt/portfolio_analytics/attribution/AlphaData.py", line 1489, in save_regression_decomposition
df_regression = data_frame[columns_regression].join(categories)
File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 3580, in join
rsuffix=rsuffix, sort=sort)
File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 3594, in _join_compat
suffixes=(lsuffix, rsuffix), sort=sort)
File "C:\Python27\lib\site-packages\pandas\tools\merge.py", line 40, in merge
return op.get_result()
File "C:\Python27\lib\site-packages\pandas\tools\merge.py", line 189, in get_result
ldata, rdata = self._get_merge_data()
File "C:\Python27\lib\site-packages\pandas\tools\merge.py", line 284, in _get_merge_data
copydata=False)
File "C:\Python27\lib\site-packages\pandas\core\internals.py", line 3439, in _maybe_rename_join
to_rename = self.items.intersection(other.items)
File "C:\Python27\lib\site-packages\pandas\core\index.py", line 962, in intersection
indexer = self.get_indexer(other.values)
File "C:\Python27\lib\site-packages\pandas\core\index.py", line 1120, in get_indexer
raise InvalidIndexError('Reindexing only valid with uniquely'
pandas.core.index.InvalidIndexError: Reindexing only valid with uniquely valued Index objects
Process finished with exit code 1"><pre class="notranslate"><code class="notranslate">2014-06-23 21:02:56,125 DEBUG pmt.portfolio_analytics.attribution.AlphaData - Indexes are identical: True
2014-06-23 21:02:56,141 DEBUG pmt.portfolio_analytics.attribution.AlphaData - Index is unique: True
2014-06-23 21:02:56,142 DEBUG pmt.portfolio_analytics.attribution.AlphaData - All columns are in data_frame: True
Traceback (most recent call last):
File "C:/Users/BKovtunenko/Perforce/bos-perforce01_1666/bkovtunenko_BKOVTUNENKO-D7/aam/branches/boris/pmt/python/pmt/portfolio_analytics/attribution/AlphaData.py", line 1782, in <module>
thresholds_mkt_cap=thresh_mkt_cap)
File "C:/Users/BKovtunenko/Perforce/bos-perforce01_1666/bkovtunenko_BKOVTUNENKO-D7/aam/branches/boris/pmt/python/pmt/portfolio_analytics/attribution/AlphaData.py", line 1640, in save_regression_results
regression_type=regresion_type)
File "C:/Users/BKovtunenko/Perforce/bos-perforce01_1666/bkovtunenko_BKOVTUNENKO-D7/aam/branches/boris/pmt/python/pmt/portfolio_analytics/attribution/AlphaData.py", line 1489, in save_regression_decomposition
df_regression = data_frame[columns_regression].join(categories)
File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 3580, in join
rsuffix=rsuffix, sort=sort)
File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 3594, in _join_compat
suffixes=(lsuffix, rsuffix), sort=sort)
File "C:\Python27\lib\site-packages\pandas\tools\merge.py", line 40, in merge
return op.get_result()
File "C:\Python27\lib\site-packages\pandas\tools\merge.py", line 189, in get_result
ldata, rdata = self._get_merge_data()
File "C:\Python27\lib\site-packages\pandas\tools\merge.py", line 284, in _get_merge_data
copydata=False)
File "C:\Python27\lib\site-packages\pandas\core\internals.py", line 3439, in _maybe_rename_join
to_rename = self.items.intersection(other.items)
File "C:\Python27\lib\site-packages\pandas\core\index.py", line 962, in intersection
indexer = self.get_indexer(other.values)
File "C:\Python27\lib\site-packages\pandas\core\index.py", line 1120, in get_indexer
raise InvalidIndexError('Reindexing only valid with uniquely'
pandas.core.index.InvalidIndexError: Reindexing only valid with uniquely valued Index objects
Process finished with exit code 1
</code></pre></div> | <p dir="auto">xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="251275032" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/17282" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/17282/hovercard" href="https://github.com/pandas-dev/pandas/issues/17282">#17282</a></p>
<h4 dir="auto">Code Sample</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> x.isnull().sum()
0
>>> x.value_counts()
0.000000 693
12.561725 1
13.568112 1
12.521249 1
13.007628 1
6.993961 1
14.815512 1
6.017280 1
12.944714 1
Name: 0, dtype: int64
>>> categorized = pd.qcut(x, 10, duplicates='drop')
>>> categorized.isnull().sum()
0
>>> categorized.cat.categories # Notice how all values of x are contained in the only interval
IntervalIndex([(-0.001, 14.816]]
closed='right',
dtype='interval[float64]')
>>> res = pd.cut(x, categorized.cat.categories)
>>> res.isnull().sum()
701"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">x</span>.<span class="pl-en">isnull</span>().<span class="pl-en">sum</span>()
<span class="pl-c1">0</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">x</span>.<span class="pl-en">value_counts</span>()
<span class="pl-c1">0.000000</span> <span class="pl-c1">693</span>
<span class="pl-c1">12.561725</span> <span class="pl-c1">1</span>
<span class="pl-c1">13.568112</span> <span class="pl-c1">1</span>
<span class="pl-c1">12.521249</span> <span class="pl-c1">1</span>
<span class="pl-c1">13.007628</span> <span class="pl-c1">1</span>
<span class="pl-c1">6.993961</span> <span class="pl-c1">1</span>
<span class="pl-c1">14.815512</span> <span class="pl-c1">1</span>
<span class="pl-c1">6.017280</span> <span class="pl-c1">1</span>
<span class="pl-c1">12.944714</span> <span class="pl-c1">1</span>
<span class="pl-v">Name</span>: <span class="pl-c1">0</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">categorized</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">qcut</span>(<span class="pl-s1">x</span>, <span class="pl-c1">10</span>, <span class="pl-s1">duplicates</span><span class="pl-c1">=</span><span class="pl-s">'drop'</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">categorized</span>.<span class="pl-en">isnull</span>().<span class="pl-en">sum</span>()
<span class="pl-c1">0</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">categorized</span>.<span class="pl-s1">cat</span>.<span class="pl-s1">categories</span> <span class="pl-c"># Notice how all values of x are contained in the only interval</span>
<span class="pl-v">IntervalIndex</span>([(<span class="pl-c1">-</span><span class="pl-c1">0.001</span>, <span class="pl-c1">14.816</span>]]
<span class="pl-s1">closed</span><span class="pl-c1">=</span><span class="pl-s">'right'</span>,
<span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'interval[float64]'</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">cut</span>(<span class="pl-s1">x</span>, <span class="pl-s1">categorized</span>.<span class="pl-s1">cat</span>.<span class="pl-s1">categories</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">res</span>.<span class="pl-en">isnull</span>().<span class="pl-en">sum</span>()
<span class="pl-c1">701</span></pre></div>
<p dir="auto">Copy pastable</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="x = pd.read_csv('x.csv', header=None).iloc[:, 0] # x.csv is provided in a comment below
categorized = pd.qcut(x, 10, duplicates='drop')
res = pd.cut(x, categorized.cat.categories)
res.isnull().sum()"><pre class="notranslate"><span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-s">'x.csv'</span>, <span class="pl-s1">header</span><span class="pl-c1">=</span><span class="pl-c1">None</span>).<span class="pl-s1">iloc</span>[:, <span class="pl-c1">0</span>] <span class="pl-c"># x.csv is provided in a comment below</span>
<span class="pl-s1">categorized</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">qcut</span>(<span class="pl-s1">x</span>, <span class="pl-c1">10</span>, <span class="pl-s1">duplicates</span><span class="pl-c1">=</span><span class="pl-s">'drop'</span>)
<span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">cut</span>(<span class="pl-s1">x</span>, <span class="pl-s1">categorized</span>.<span class="pl-s1">cat</span>.<span class="pl-s1">categories</span>)
<span class="pl-s1">res</span>.<span class="pl-en">isnull</span>().<span class="pl-en">sum</span>()</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">When I use <code class="notranslate">qcut</code> to get the <code class="notranslate">IntervalIndex</code> corresponding to the quantiles of a <code class="notranslate">float64</code> series, and than use this as the <code class="notranslate">bins</code> of <code class="notranslate">cut</code> on the same float64 series, it doesn't work. It produces a new series with a lot of NaN values, while the original series contained no NaN and all of its values are contained at the interval of <code class="notranslate">IntervalIndex</code>.</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">The result of both <code class="notranslate">qcut</code> and <code class="notranslate">cut</code> should also be the same, but they are not.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.6.1.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 3.10.0-514.26.2.el7.x86_64<br>
machine: x86_64<br>
processor: x86_64<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: en_US.UTF-8<br>
LOCALE: en_US.UTF-8</p>
<p dir="auto">pandas: 0.20.1<br>
pytest: 3.0.7<br>
pip: 9.0.1<br>
setuptools: 27.2.0<br>
Cython: 0.25.2<br>
numpy: 1.12.1<br>
scipy: 0.19.0<br>
xarray: None<br>
IPython: 5.3.0<br>
sphinx: 1.5.6<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.2.1<br>
tables: 3.3.0<br>
numexpr: 2.6.2<br>
feather: None<br>
matplotlib: 2.0.2<br>
openpyxl: 2.4.7<br>
xlrd: 1.0.0<br>
xlwt: 1.2.0<br>
xlsxwriter: 0.9.6<br>
lxml: 3.7.3<br>
bs4: 4.6.0<br>
html5lib: 0.9999999<br>
sqlalchemy: 1.1.9<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.6<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details> | 0 |
<p dir="auto">Looks like go get is broken again on ssh git repos.</p>
<p dir="auto">For example:<br>
$ go get -v -f -u -insecure ./...<br>
package github.com/marcopeereboom/gck: unable to parse output of git config remote.origin.url<br>
package github.com/marcopeereboom/gck/ast: unable to parse output of git config remote.origin.url<br>
...</p>
<p dir="auto">$ git config remote.origin.url<br>
<a href="mailto:[email protected]">[email protected]</a>:marcopeereboom/gck.git</p>
<p dir="auto">This also happens for ssh git repos with an explicit ssh origin: ssh://my.server.com/git/myrepo.git</p>
<p dir="auto">https repos seem to still work fine.</p>
<p dir="auto">$ go version<br>
go version devel +60b7d27 Tue Jul 14 06:21:57 2015 +0000 darwin/amd64<br>
$ git version<br>
git version 2.3.8 (Apple Git-58)</p>
<p dir="auto">I do see this on OpenBSD as well.</p> | <p dir="auto">by <strong><a href="mailto:[email protected]">[email protected]</a></strong>:</p>
<pre class="notranslate">What does 'go version' print?
go1.3.3 (playground)
What steps reproduce the problem?
<a href="http://play.golang.org/p/9QmhMAmrSG" rel="nofollow">http://play.golang.org/p/9QmhMAmrSG</a>
What happened?
Compiles and runs
What should have happened instead?
Should be illegal to compile according to the spec on short-hand variable declarations
<a href="http://golang.org/ref/spec#Short_variable_declarations" rel="nofollow">http://golang.org/ref/spec#Short_variable_declarations</a> which states that "a, a :=
1, 2 // illegal: double declaration of a or no new variable if a was declared
elsewhere".</pre> | 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/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/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.7.6</li>
<li>Operating System version: linux</li>
<li>Java version: 8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>define a interface <code class="notranslate">com.demo.api.DemoService</code></li>
<li>implements <code class="notranslate">com.demo.api.DemoService</code> with version (1.0)</li>
<li>implements <code class="notranslate">com.demo.api.DemoService</code> with versiono (1.1)</li>
</ol>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">version 1.0 and 1.1 can be found .</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">only 1.0 can be found.</p>
<p dir="auto">Does Dubbo means application level registry?</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/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" checked=""> 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>
</ul>
<h3 dir="auto">Step to reproduce this issue</h3>
<ol dir="auto">
<li>配置限流过滤器;</li>
<li>运行时修改系统时间;</li>
<li>时间差范围内的正常请求全部被拒;</li>
</ol>
<h3 dir="auto">原因描述</h3>
<p dir="auto">过滤器<a href="https://github.com/apache/incubator-dubbo/blob/master/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/TpsLimitFilter.java">org.apache.dubbo.rpc.filter.TpsLimitFilter</a> 通过调用 <a href="https://github.com/apache/incubator-dubbo/blob/master/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/tps/StatItem.java">org.apache.dubbo.rpc.filter.tps.StatItem</a>实现TPS限流。类org.apache.dubbo.rpc.filter.tps.StatItem实现了令牌桶算法,</p>
<p dir="auto"><a href="https://github.com/apache/incubator-dubbo/blob/f720ccb965d490e6cc328af8d3e9820cb6eaf8f7/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/tps/StatItem.java#L42-L46">https://github.com/apache/incubator-dubbo/blob/f720ccb965d490e6cc328af8d3e9820cb6eaf8f7/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/tps/StatItem.java#L42-L46</a></p>
<p dir="auto">上面的实现通过原子计数器token来记录可用令牌数量,在能取到令牌的情况下,每次调用对令牌数的自减。令牌桶重置(重新设置为最大值)的条件:<strong><em>当前系统时间 > 上次重置令牌的时间 + 时间间隔</em></strong>。</p>
<p dir="auto">该实现对系统时间具有依赖性:<br>
以<code class="notranslate">rate</code>=5000,<code class="notranslate">interval</code>=1000ms(即限流5000TPS),实际访问量为1000TPS为例,应用原来的时钟与标准时间同步,在运行过程中系统时钟发生了偏差(可能因为应用服务器同步了错误的NTP服务导致):</p>
<ul dir="auto">
<li>
<p dir="auto">当系统时钟比标准时间慢(假设慢15分钟),则从差错时间点开始,当前系统时间重新变回到了15分钟前,而上次令牌重置时间并不会马上发生变化,导致 lastResetTime > now (相差约15分钟),条件<code class="notranslate">now > lastResetTime + interval</code> 在接下来的15分钟之内不再满足。意味着5000个令牌在1000TPS的实际访问量情况下5秒钟即被用完后,后续的14分钟55秒的时间段内,所有的请求由于取不到令牌全部被拒,直到15分钟后满足令牌桶重置的条件,才能恢复业务。</p>
</li>
<li>
<p dir="auto">当系统时间比标准时间快(假设快15分钟),当前系统时间和上次令牌桶重置时间的关系为: now > lastResetTime(相差约15分钟),此时满足令牌桶重置的条件,限流可以正常工作。但是,在系统时间恢复至标准时间时,lastResetTime会比标准时间提前约15分钟,这时同样会导致系统时间恢复的15分钟后续的请求全部被拒绝,直到15钟后满足令牌通重置的条件。</p>
</li>
</ul>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">在运行时系统时间发生变化,限流仍能正常发挥作用。</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">运行过程中系统时间发生变化,导致限流不能正确执行,更严重的是在时间差范围内,请求会错误地全部被拒绝。</p> | 0 |
<p dir="auto"><strong>Apache Airflow version</strong>: 1.10.11</p>
<p dir="auto"><strong>Environment</strong>: Linux aarch64</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Cloud provider or hardware configuration</strong>: AWS</p>
</li>
<li>
<p dir="auto"><strong>OS</strong> (e.g. from /etc/os-release):<br>
NAME="Ubuntu"<br>
VERSION="18.04.4 LTS (Bionic Beaver)"<br>
ID=ubuntu<br>
ID_LIKE=debian<br>
PRETTY_NAME="Ubuntu 18.04.4 LTS"<br>
VERSION_ID="18.04"</p>
</li>
<li>
<p dir="auto"><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):<br>
Linux 4.15.0-1063-aws <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="90256261" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/67" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/67/hovercard" href="https://github.com/apache/airflow/pull/67">#67</a>-Ubuntu SMP Mon Mar 2 07:25:24 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux</p>
</li>
<li>
<p dir="auto"><strong>Install tools</strong>: pip3</p>
</li>
<li>
<p dir="auto"><strong>Others</strong>:<br>
Config options for SQLAlchemy:</p>
</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sql_alchemy_conn = mysql+mysqldb://XXXXX:XXXXX@XXXXX/airflow
sql_engine_encoding = utf-8
sql_alchemy_pool_enabled = True
sql_alchemy_pool_size = 10
sql_alchemy_max_overflow = 10
sql_alchemy_pool_recycle = 270
sql_alchemy_pool_pre_ping = True"><pre class="notranslate"><code class="notranslate">sql_alchemy_conn = mysql+mysqldb://XXXXX:XXXXX@XXXXX/airflow
sql_engine_encoding = utf-8
sql_alchemy_pool_enabled = True
sql_alchemy_pool_size = 10
sql_alchemy_max_overflow = 10
sql_alchemy_pool_recycle = 270
sql_alchemy_pool_pre_ping = True
</code></pre></div>
<p dir="auto">Config options for MySQL server:<br>
<code class="notranslate">wait_timeout = 300</code></p>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">From the BashOperator logs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2020-09-02 03:38:04,363] {bash_operator.py:161} INFO - Command exited with return code 0
[2020-09-02 03:38:04,371] {taskinstance.py:1150} ERROR - (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away')
[SQL: SELECT airflow.task_instance.try_number AS airflow_task_instance_try_number, airflow.task_instance.task_id AS airflow_task_instance_task_id, airflow.task_instance.dag_id AS airflow_task_instance_dag_id, airflow.task_instance.execution_date AS airflow_task_instance_execution_date, airflow.task_instance.start_date AS airflow_task_instance_start_date, airflow.task_instance.end_date AS airflow_task_instance_end_date, airflow.task_instance.duration AS airflow_task_instance_duration, airflow.task_instance.state AS airflow_task_instance_state, airflow.task_instance.max_tries AS airflow_task_instance_max_tries, airflow.task_instance.hostname AS airflow_task_instance_hostname, airflow.task_instance.unixname AS airflow_task_instance_unixname, airflow.task_instance.job_id AS airflow_task_instance_job_id, airflow.task_instance.pool AS airflow_task_instance_pool, airflow.task_instance.pool_slots AS airflow_task_instance_pool_slots, airflow.task_instance.queue AS airflow_task_instance_queue, airflow.task_instance.priority_weight AS airflow_task_instance_priority_weight, airflow.task_instance.operator AS airflow_task_instance_operator, airflow.task_instance.queued_dttm AS airflow_task_instance_queued_dttm, airflow.task_instance.pid AS airflow_task_instance_pid, airflow.task_instance.executor_config AS airflow_task_instance_executor_config
FROM airflow.task_instance
WHERE airflow.task_instance.dag_id = %s AND airflow.task_instance.task_id = %s AND airflow.task_instance.execution_date = %s
LIMIT %s FOR UPDATE]
[parameters: ('XXXXX', 'XXXXX', datetime.datetime(2020, 9, 1, 21, 10), 1)]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
Traceback (most recent call last):
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1278, in _execute_context
cursor, statement, parameters, context
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 255, in execute
self.errorhandler(self, exc, value)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 252, in execute
res = self._query(query)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 378, in _query
db.query(q)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
_mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 1003, in _run_raw_task
self.refresh_from_db(lock_for_update=True)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/airflow/utils/db.py", line 74, in wrapper
return func(*args, **kwargs)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 473, in refresh_from_db
ti = qry.with_for_update().first()
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3397, in first
ret = list(self[0:1])
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3171, in __getitem__
return list(res)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3503, in __iter__
return self._execute_and_instances(context)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3528, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1014, in execute
return meth(self, multiparams, params)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1133, in _execute_clauseelement
distilled_params,
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1318, in _execute_context
e, statement, parameters, cursor, context
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1512, in _handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from_=e
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1278, in _execute_context
cursor, statement, parameters, context
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 255, in execute
self.errorhandler(self, exc, value)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 252, in execute
res = self._query(query)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 378, in _query
db.query(q)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away')
[SQL: SELECT airflow.task_instance.try_number AS airflow_task_instance_try_number, airflow.task_instance.task_id AS airflow_task_instance_task_id, airflow.task_instance.dag_id AS airflow_task_instance_dag_id, airflow.task_instance.execution_date AS airflow_task_instance_execution_date, airflow.task_instance.start_date AS airflow_task_instance_start_date, airflow.task_instance.end_date AS airflow_task_instance_end_date, airflow.task_instance.duration AS airflow_task_instance_duration, airflow.task_instance.state AS airflow_task_instance_state, airflow.task_instance.max_tries AS airflow_task_instance_max_tries, airflow.task_instance.hostname AS airflow_task_instance_hostname, airflow.task_instance.unixname AS airflow_task_instance_unixname, airflow.task_instance.job_id AS airflow_task_instance_job_id, airflow.task_instance.pool AS airflow_task_instance_pool, airflow.task_instance.pool_slots AS airflow_task_instance_pool_slots, airflow.task_instance.queue AS airflow_task_instance_queue, airflow.task_instance.priority_weight AS airflow_task_instance_priority_weight, airflow.task_instance.operator AS airflow_task_instance_operator, airflow.task_instance.queued_dttm AS airflow_task_instance_queued_dttm, airflow.task_instance.pid AS airflow_task_instance_pid, airflow.task_instance.executor_config AS airflow_task_instance_executor_config
FROM airflow.task_instance
WHERE airflow.task_instance.dag_id = %s AND airflow.task_instance.task_id = %s AND airflow.task_instance.execution_date = %s
LIMIT %s FOR UPDATE]
[parameters: ('XXXXX', 'XXXXX', datetime.datetime(2020, 9, 1, 21, 10), 1)]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
[2020-09-02 03:38:04,387] {taskinstance.py:1194} INFO - Marking task as FAILED. dag_id=XXXXX, task_id=XXXXX, execution_date=20200901T211000, start_date=20200901T211612, end_date=20200902T033804"><pre class="notranslate"><code class="notranslate">[2020-09-02 03:38:04,363] {bash_operator.py:161} INFO - Command exited with return code 0
[2020-09-02 03:38:04,371] {taskinstance.py:1150} ERROR - (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away')
[SQL: SELECT airflow.task_instance.try_number AS airflow_task_instance_try_number, airflow.task_instance.task_id AS airflow_task_instance_task_id, airflow.task_instance.dag_id AS airflow_task_instance_dag_id, airflow.task_instance.execution_date AS airflow_task_instance_execution_date, airflow.task_instance.start_date AS airflow_task_instance_start_date, airflow.task_instance.end_date AS airflow_task_instance_end_date, airflow.task_instance.duration AS airflow_task_instance_duration, airflow.task_instance.state AS airflow_task_instance_state, airflow.task_instance.max_tries AS airflow_task_instance_max_tries, airflow.task_instance.hostname AS airflow_task_instance_hostname, airflow.task_instance.unixname AS airflow_task_instance_unixname, airflow.task_instance.job_id AS airflow_task_instance_job_id, airflow.task_instance.pool AS airflow_task_instance_pool, airflow.task_instance.pool_slots AS airflow_task_instance_pool_slots, airflow.task_instance.queue AS airflow_task_instance_queue, airflow.task_instance.priority_weight AS airflow_task_instance_priority_weight, airflow.task_instance.operator AS airflow_task_instance_operator, airflow.task_instance.queued_dttm AS airflow_task_instance_queued_dttm, airflow.task_instance.pid AS airflow_task_instance_pid, airflow.task_instance.executor_config AS airflow_task_instance_executor_config
FROM airflow.task_instance
WHERE airflow.task_instance.dag_id = %s AND airflow.task_instance.task_id = %s AND airflow.task_instance.execution_date = %s
LIMIT %s FOR UPDATE]
[parameters: ('XXXXX', 'XXXXX', datetime.datetime(2020, 9, 1, 21, 10), 1)]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
Traceback (most recent call last):
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1278, in _execute_context
cursor, statement, parameters, context
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 255, in execute
self.errorhandler(self, exc, value)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 252, in execute
res = self._query(query)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 378, in _query
db.query(q)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
_mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 1003, in _run_raw_task
self.refresh_from_db(lock_for_update=True)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/airflow/utils/db.py", line 74, in wrapper
return func(*args, **kwargs)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 473, in refresh_from_db
ti = qry.with_for_update().first()
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3397, in first
ret = list(self[0:1])
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3171, in __getitem__
return list(res)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3503, in __iter__
return self._execute_and_instances(context)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3528, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1014, in execute
return meth(self, multiparams, params)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1133, in _execute_clauseelement
distilled_params,
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1318, in _execute_context
e, statement, parameters, cursor, context
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1512, in _handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from_=e
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1278, in _execute_context
cursor, statement, parameters, context
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 255, in execute
self.errorhandler(self, exc, value)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 252, in execute
res = self._query(query)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/cursors.py", line 378, in _query
db.query(q)
File "/opt/airflow/pyfiles/lib/python3.6/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away')
[SQL: SELECT airflow.task_instance.try_number AS airflow_task_instance_try_number, airflow.task_instance.task_id AS airflow_task_instance_task_id, airflow.task_instance.dag_id AS airflow_task_instance_dag_id, airflow.task_instance.execution_date AS airflow_task_instance_execution_date, airflow.task_instance.start_date AS airflow_task_instance_start_date, airflow.task_instance.end_date AS airflow_task_instance_end_date, airflow.task_instance.duration AS airflow_task_instance_duration, airflow.task_instance.state AS airflow_task_instance_state, airflow.task_instance.max_tries AS airflow_task_instance_max_tries, airflow.task_instance.hostname AS airflow_task_instance_hostname, airflow.task_instance.unixname AS airflow_task_instance_unixname, airflow.task_instance.job_id AS airflow_task_instance_job_id, airflow.task_instance.pool AS airflow_task_instance_pool, airflow.task_instance.pool_slots AS airflow_task_instance_pool_slots, airflow.task_instance.queue AS airflow_task_instance_queue, airflow.task_instance.priority_weight AS airflow_task_instance_priority_weight, airflow.task_instance.operator AS airflow_task_instance_operator, airflow.task_instance.queued_dttm AS airflow_task_instance_queued_dttm, airflow.task_instance.pid AS airflow_task_instance_pid, airflow.task_instance.executor_config AS airflow_task_instance_executor_config
FROM airflow.task_instance
WHERE airflow.task_instance.dag_id = %s AND airflow.task_instance.task_id = %s AND airflow.task_instance.execution_date = %s
LIMIT %s FOR UPDATE]
[parameters: ('XXXXX', 'XXXXX', datetime.datetime(2020, 9, 1, 21, 10), 1)]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
[2020-09-02 03:38:04,387] {taskinstance.py:1194} INFO - Marking task as FAILED. dag_id=XXXXX, task_id=XXXXX, execution_date=20200901T211000, start_date=20200901T211612, end_date=20200902T033804
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">Task marked as SUCCESS due to exit code 0 from the bash_command</p>
<p dir="auto"><strong>What do you think went wrong?</strong>:</p>
<p dir="auto">Airflow seems to hold a SQLAlchemy connection in a checked-out state for the entire duration of the task and then attempts to use this connection without any health checks</p>
<p dir="auto"><a href="url">http://www.ilian.io/sqlalchemy-and-lost-connection-mysql-server-during-query/</a> (more details in the comments)<br>
<a href="url">https://github.com/apache/airflow/issues/7937</a> (my report is probably a duplicate of this but this bug hasn't been touched in over 4 years, and mine further applies beyond Kubernetes/PythonOperator)</p>
<p dir="auto"><strong>How to reproduce it</strong>:</p>
<ol dir="auto">
<li>Set up a MySQL server with wait_timeout = 300 and point Airflow to this server to use as the backend database</li>
<li>Use CeleryExecutor</li>
<li>Run this:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="BashOperator(
task_id='Connection_Test',
dag=dag,
bash_command='sleep 10m'
)"><pre class="notranslate"><code class="notranslate">BashOperator(
task_id='Connection_Test',
dag=dag,
bash_command='sleep 10m'
)
</code></pre></div>
<p dir="auto"><strong>Anything else we need to know</strong>:</p>
<p dir="auto">I am able to reproduce this 100% of the time using CeleryExecutor and unable to reproduce this 100% of the time using LocalExecutor, so it may be related to how CeleryExecutor (and KubernetesExecutor based on the other report) are handling connections during task runs.</p> | <p dir="auto">From what i can tell, when i run backfill with --mark_success (actually just "-m"),<br>
tasks are run and executed (instead of just marked as succeeded).</p>
<p dir="auto">This is an issue with 1.6.1.2, but it might have been an issue with previous builds as well.</p>
<p dir="auto">Leo</p> | 0 |
<p dir="auto">Just tested on win7 64bit with Chrome Version 28.0.1500.72 m</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/51c59b1408e47016b6a44e404e6597beb239a740c214b807171665868142c687/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353131333132352f3934313536392f32336262646538302d303134612d313165332d396261342d6261633231313939353361352e6a7067"><img src="https://camo.githubusercontent.com/51c59b1408e47016b6a44e404e6597beb239a740c214b807171665868142c687/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353131333132352f3934313536392f32336262646538302d303134612d313165332d396261342d6261633231313939353361352e6a7067" alt="screen" data-canonical-src="https://f.cloud.github.com/assets/5113125/941569/23bbde80-014a-11e3-9ba4-bac2119953a5.jpg" style="max-width: 100%;"></a></p> | <p dir="auto">Anyone else?</p> | 1 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> def applym(df):
... print df.irow(0)['a']
... return DataFrame({'a':[1],'b':[1]})
>>> df = DataFrame({'a':[1,1,1,2,3],'b':['a','a','a','b','c']})
>>> df.groupby('b').apply(applym)
1
1
2
3
a b
b
a 0 1 1
b 0 1 1
c 0 1 1
>>>"><pre class="notranslate"><code class="notranslate">>>> def applym(df):
... print df.irow(0)['a']
... return DataFrame({'a':[1],'b':[1]})
>>> df = DataFrame({'a':[1,1,1,2,3],'b':['a','a','a','b','c']})
>>> df.groupby('b').apply(applym)
1
1
2
3
a b
b
a 0 1 1
b 0 1 1
c 0 1 1
>>>
</code></pre></div>
<p dir="auto">applym is called twice on the first group.</p> | <p dir="auto">It seems that the apply method of a group invokes the function passed as parameter once for each group, as expectes. However, the function is invoked twice for the first group. Enclose is a short code reproducing this behavior. Is it a normal behavior or am I doing something wrong here.</p>
<p dir="auto">I run the code with pandas 0.10.0 on. Windows 7, 32 bit version.</p>
<p dir="auto">The code reproducing this behavior:</p>
<p dir="auto">import pandas as pd</p>
<p dir="auto">tdf = pd.DataFrame( { 'cat' : [1,1,1,2,2,1,1,2], 'B' : range(8)})<br>
category = tdf['cat']<br>
pGroups = tdf.groupby(by=category)</p>
<p dir="auto">def getLen(df) :<br>
print 'len ',len(df)<br>
return len(df)</p>
<p dir="auto">plen = pGroups.apply(getLen)</p> | 1 |
<p dir="auto">Hello!</p>
<p dir="auto">This is pretty specific, but I was trying to use Deno as a test runner to test a web server that serves different content based on the <code class="notranslate">Host</code> header (NGINX server blocks / Apache VHosts), as Deno's batteries-included makes it very convenient.<br>
However, currently my testing code doesn't work using the built-in <code class="notranslate">fetch</code> nor when using the <code class="notranslate">node:http</code> compat module's <code class="notranslate">request()</code> (or any library that depends on it, like <code class="notranslate">npm:got</code>), because they silently ignore the <code class="notranslate">host</code> header. Trying to do the same thing in Node works.<br>
It makes sense that <code class="notranslate">fetch</code> should by default ignore the Host header like browsers do. However there should be an option to allow it as mentioned in the issues linked below, and the <code class="notranslate">node:http</code> module compat should allow it.</p>
<p dir="auto">I tried to do it myself, but I don't know Rust and got overwhelmed. For the record, this is where the Host (and Content Length) header is skipped:<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/denoland/deno/blob/92ba46c384806af171f1ad9c0040146a50531e84/ext/fetch/lib.rs#L307-L309">deno/ext/fetch/lib.rs</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 307 to 309
in
<a data-pjax="true" class="commit-tease-sha" href="/denoland/deno/commit/92ba46c384806af171f1ad9c0040146a50531e84">92ba46c</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="L307" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="307"></td>
<td id="LC307" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> !<span class="pl-en">matches</span><span class="pl-en">!</span><span class="pl-kos">(</span>name, <span class="pl-v">HOST</span> | <span class="pl-v">CONTENT_LENGTH</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L308" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="308"></td>
<td id="LC308" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> header_map<span class="pl-kos">.</span><span class="pl-en">append</span><span class="pl-kos">(</span>name<span class="pl-kos">,</span> v<span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L309" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="309"></td>
<td id="LC309" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<h4 dir="auto">Relevant issues / previous discussions:</h4>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="665242054" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/6868" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/6868/hovercard" href="https://github.com/denoland/deno/issues/6868">#6868</a> (Jul 24, 2020) proposes an <code class="notranslate">allowAllHeaders</code> option to <code class="notranslate">Deno.createHttpClient</code><br>
As noted in the comments:
<blockquote>
<p dir="auto">The problem is <code class="notranslate">fetch()</code> will always behave differently in a server context and a client context. You have all the situations with same origin and cross origin which just don't make sense in a server context. I am still just for documenting it. As you state, Node's implementation just passes forbidden as well.</p>
</blockquote>
</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="690171618" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/7307" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/7307/hovercard" href="https://github.com/denoland/deno/issues/7307">#7307</a> (Sep 1, 2020) talks about adding non-standard features to <code class="notranslate">fetch</code> via <code class="notranslate">HttpClient</code>.</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="923856528" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/11017" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/11017/hovercard" href="https://github.com/denoland/deno/issues/11017">#11017</a> (Jun 17, 2021) claims that the "Host" header should always be set by reqwest / hyper to align with browser <code class="notranslate">fetch</code>.</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1276044087" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/14909" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/14909/hovercard" href="https://github.com/denoland/deno/issues/14909">#14909</a> (Jun 19, 2022) reports the lack of a way to set the "Host" header. Closed and marked as duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="923856528" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/11017" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/11017/hovercard" href="https://github.com/denoland/deno/issues/11017">#11017</a>.</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1276052463" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/14910" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/14910/hovercard" href="https://github.com/denoland/deno/issues/14910">#14910</a> (Jun 19, 2022) by the same person about the Websocket API, closed for the same reason.</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1465267860" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/16840" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/16840/hovercard" href="https://github.com/denoland/deno/issues/16840">#16840</a> (Nov 26, 2022) asks for the <code class="notranslate">allowAllHeaders</code> proposed in the first issue.</li>
</ul>
<h4 dir="auto">Tests</h4>
<p dir="auto">Deno-only repro (from masx200 in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1276044087" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/14909" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/14909/hovercard" href="https://github.com/denoland/deno/issues/14909">#14909</a>):</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { serve } from "https://deno.land/[email protected]/http/mod.ts";
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
Deno.test("http-request-host", async () => {
const ac = new AbortController();
const { signal } = ac;
const p = serve(async (req) => new Response(req.url), {
signal,
port: 5000,
});
const response = await fetch("http://127.0.0.1:5000/", {
headers: { host: "localhost.hello.world:9900" },
});
const text = await response.text();
assertEquals(text, "http://localhost.hello.world:9900/");
ac.abort();
await p;
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">serve</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"https://deno.land/[email protected]/http/mod.ts"</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">assertEquals</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"https://deno.land/[email protected]/testing/asserts.ts"</span><span class="pl-kos">;</span>
<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">"http-request-host"</span><span class="pl-kos">,</span> <span class="pl-k">async</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">ac</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">AbortController</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span> signal <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">ac</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">p</span> <span class="pl-c1">=</span> <span class="pl-en">serve</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-k">new</span> <span class="pl-v">Response</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">url</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
signal<span class="pl-kos">,</span>
<span class="pl-c1">port</span>: <span class="pl-c1">5000</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">const</span> <span class="pl-s1">response</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">fetch</span><span class="pl-kos">(</span><span class="pl-s">"http://127.0.0.1:5000/"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">headers</span>: <span class="pl-kos">{</span> <span class="pl-c1">host</span>: <span class="pl-s">"localhost.hello.world:9900"</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-k">const</span> <span class="pl-s1">text</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">text</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">assertEquals</span><span class="pl-kos">(</span><span class="pl-s1">text</span><span class="pl-kos">,</span> <span class="pl-s">"http://localhost.hello.world:9900/"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">ac</span><span class="pl-kos">.</span><span class="pl-en">abort</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">p</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">Deno & Node repro (my own code, under the Unlicense (feel free to reuse, re-license etc) if that matters). Run it with <code class="notranslate">deno run --allow-env=HOST,PORT --allow-net=localhost:8007 main.mjs</code> and <code class="notranslate">node main.mjs</code>.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import assert from 'node:assert/strict';
import http from "node:http";
const isDeno = typeof Deno !== "undefined";
const host = (isDeno ? Deno.env.get("HOST") : process.env.HOST) || "localhost";
const port = (isDeno ? Deno.env.get("PORT") : process.env.PORT) || 8007;
// Set up a server that replies with the received Host header
const server = http.createServer((req, res) => {
res.writeHead(200);
res.end(`Host header: "${req.headers.host}"`);
});
server.listen(port, host, () => {
console.log(`Server is running on http://${host}:${port}`);
});
const CustomHostHeader = "test.localhost"
// Query our server
http.get(
{ host, port, headers: { "Host": CustomHostHeader } },
(response) => {
// Read the body...
let body = "";
response.on("data", d => body += d);
response.on("end", () => {
console.log("body received:", body);
try {
assert.equal(body, `Host header: "${CustomHostHeader}"`);
console.log("works!");
} catch(e) {
console.log("assertion error (deno):", e)
}
finally {
server.close();
}
});
}
);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">assert</span> <span class="pl-k">from</span> <span class="pl-s">'node:assert/strict'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-s1">http</span> <span class="pl-k">from</span> <span class="pl-s">"node:http"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">isDeno</span> <span class="pl-c1">=</span> <span class="pl-k">typeof</span> <span class="pl-v">Deno</span> <span class="pl-c1">!==</span> <span class="pl-s">"undefined"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">host</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">isDeno</span> ? <span class="pl-v">Deno</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"HOST"</span><span class="pl-kos">)</span> : <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">HOST</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-s">"localhost"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">port</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">isDeno</span> ? <span class="pl-v">Deno</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"PORT"</span><span class="pl-kos">)</span> : <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">PORT</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-c1">8007</span><span class="pl-kos">;</span>
<span class="pl-c">// Set up a server that replies with the received Host header</span>
<span class="pl-k">const</span> <span class="pl-s1">server</span> <span class="pl-c1">=</span> <span class="pl-s1">http</span><span class="pl-kos">.</span><span class="pl-en">createServer</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-s1">res</span><span class="pl-kos">.</span><span class="pl-en">writeHead</span><span class="pl-kos">(</span><span class="pl-c1">200</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">res</span><span class="pl-kos">.</span><span class="pl-en">end</span><span class="pl-kos">(</span><span class="pl-s">`Host header: "<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">headers</span><span class="pl-kos">.</span><span class="pl-c1">host</span><span class="pl-kos">}</span></span>"`</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-s1">server</span><span class="pl-kos">.</span><span class="pl-en">listen</span><span class="pl-kos">(</span><span class="pl-s1">port</span><span class="pl-kos">,</span> <span class="pl-s1">host</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">`Server is running on http://<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">host</span><span class="pl-kos">}</span></span>:<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">port</span><span class="pl-kos">}</span></span>`</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-k">const</span> <span class="pl-v">CustomHostHeader</span> <span class="pl-c1">=</span> <span class="pl-s">"test.localhost"</span>
<span class="pl-c">// Query our server</span>
<span class="pl-s1">http</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span>
<span class="pl-kos">{</span> host<span class="pl-kos">,</span> port<span class="pl-kos">,</span> <span class="pl-c1">headers</span>: <span class="pl-kos">{</span> <span class="pl-s">"Host"</span>: <span class="pl-v">CustomHostHeader</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">(</span><span class="pl-s1">response</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-c">// Read the body...</span>
<span class="pl-k">let</span> <span class="pl-s1">body</span> <span class="pl-c1">=</span> <span class="pl-s">""</span><span class="pl-kos">;</span>
<span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">"data"</span><span class="pl-kos">,</span> <span class="pl-s1">d</span> <span class="pl-c1">=></span> <span class="pl-s1">body</span> <span class="pl-c1">+=</span> <span class="pl-s1">d</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">"end"</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"body received:"</span><span class="pl-kos">,</span> <span class="pl-s1">body</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-s1">assert</span><span class="pl-kos">.</span><span class="pl-en">equal</span><span class="pl-kos">(</span><span class="pl-s1">body</span><span class="pl-kos">,</span> <span class="pl-s">`Host header: "<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-v">CustomHostHeader</span><span class="pl-kos">}</span></span>"`</span><span class="pl-kos">)</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-s">"works!"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">catch</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</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-s">"assertion error (deno):"</span><span class="pl-kos">,</span> <span class="pl-s1">e</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-k">finally</span> <span class="pl-kos">{</span>
<span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">close</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>
<span class="pl-kos">}</span>
<span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Thanks for your time!</p> | <p dir="auto">Only happening occasionally - only observed on windows.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test fetchPostBodyTypedArray_permW0N1E0R0
HttpUser: connection closed
at maybeError (deno/js/errors.ts:38:12)
at handleAsyncMsgFromRust (deno/js/dispatch.ts:27:17)
test result: FAILED. 7 passed; 1 failed; 0 ignored; 0 measured; 206 filtered out
Error: There were 1 test failures.
at setTimeout (file:///C:/deno/js/testing/testing.ts:110:13)
at fire (deno/js/timers.ts:131:3)"><pre class="notranslate"><code class="notranslate">test fetchPostBodyTypedArray_permW0N1E0R0
HttpUser: connection closed
at maybeError (deno/js/errors.ts:38:12)
at handleAsyncMsgFromRust (deno/js/dispatch.ts:27:17)
test result: FAILED. 7 passed; 1 failed; 0 ignored; 0 measured; 206 filtered out
Error: There were 1 test failures.
at setTimeout (file:///C:/deno/js/testing/testing.ts:110:13)
at fire (deno/js/timers.ts:131:3)
</code></pre></div>
<p dir="auto">ex: <a href="https://ci.appveyor.com/project/deno/deno/builds/20541747" rel="nofollow">https://ci.appveyor.com/project/deno/deno/builds/20541747</a></p> | 0 |
<p dir="auto">It seems that test_weighted_vs_repeated in sklearn/cluster/tests/test_k_means.py sometimes fails on AppVeyor.<br>
See <a href="https://ci.appveyor.com/project/raghavrv/scikit-learn/build/1.0.10154" rel="nofollow">https://ci.appveyor.com/project/raghavrv/scikit-learn/build/1.0.10154</a><br>
<a href="https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.22983" rel="nofollow">https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.22983</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" def test_weighted_vs_repeated():
# a sample weight of N should yield the same result as an N-fold
# repetition of the sample
sample_weight = np.random.randint(1, 5, size=n_samples)
X_repeat = np.repeat(X, sample_weight, axis=0)
estimators = [KMeans(init="k-means++", n_clusters=n_clusters,
random_state=42),
KMeans(init="random", n_clusters=n_clusters,
random_state=42),
KMeans(init=centers.copy(), n_clusters=n_clusters,
random_state=42),
MiniBatchKMeans(n_clusters=n_clusters, batch_size=10,
random_state=42)]
for estimator in estimators:
est_weighted = clone(estimator).fit(X, sample_weight=sample_weight)
est_repeated = clone(estimator).fit(X_repeat)
repeated_labels = np.repeat(est_weighted.labels_, sample_weight)
assert_almost_equal(v_measure_score(est_repeated.labels_,
> repeated_labels), 1.0)
E AssertionError:
E Arrays are not almost equal to 7 decimals
E ACTUAL: 0.95215689354371202
E DESIRED: 1.0"><pre class="notranslate"><code class="notranslate"> def test_weighted_vs_repeated():
# a sample weight of N should yield the same result as an N-fold
# repetition of the sample
sample_weight = np.random.randint(1, 5, size=n_samples)
X_repeat = np.repeat(X, sample_weight, axis=0)
estimators = [KMeans(init="k-means++", n_clusters=n_clusters,
random_state=42),
KMeans(init="random", n_clusters=n_clusters,
random_state=42),
KMeans(init=centers.copy(), n_clusters=n_clusters,
random_state=42),
MiniBatchKMeans(n_clusters=n_clusters, batch_size=10,
random_state=42)]
for estimator in estimators:
est_weighted = clone(estimator).fit(X, sample_weight=sample_weight)
est_repeated = clone(estimator).fit(X_repeat)
repeated_labels = np.repeat(est_weighted.labels_, sample_weight)
assert_almost_equal(v_measure_score(est_repeated.labels_,
> repeated_labels), 1.0)
E AssertionError:
E Arrays are not almost equal to 7 decimals
E ACTUAL: 0.95215689354371202
E DESIRED: 1.0
</code></pre></div>
<p dir="auto">Using a fixed random state (for <code class="notranslate">sample_weight</code> I guess?) might be a solution, but if we can figure out the reason, that's definitely better.<br>
ping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jnhansen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jnhansen">@jnhansen</a> for possible insight.</p> | <p dir="auto">We might a have a test which somehow flaky:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[00:11:40] ================================== FAILURES ===================================
[00:11:40] __________________________ test_weighted_vs_repeated __________________________
[00:11:40]
[00:11:40] def test_weighted_vs_repeated():
[00:11:40] # a sample weight of N should yield the same result as an N-fold
[00:11:40] # repetition of the sample
[00:11:40] sample_weight = np.random.randint(1, 5, size=n_samples)
[00:11:40] X_repeat = np.repeat(X, sample_weight, axis=0)
[00:11:40] estimators = [KMeans(init="k-means++", n_clusters=n_clusters,
[00:11:40] random_state=42),
[00:11:40] KMeans(init="random", n_clusters=n_clusters,
[00:11:40] random_state=42),
[00:11:40] KMeans(init=centers.copy(), n_clusters=n_clusters,
[00:11:40] random_state=42),
[00:11:40] MiniBatchKMeans(n_clusters=n_clusters, batch_size=10,
[00:11:40] random_state=42)]
[00:11:40] for estimator in estimators:
[00:11:40] est_weighted = clone(estimator).fit(X, sample_weight=sample_weight)
[00:11:40] est_repeated = clone(estimator).fit(X_repeat)
[00:11:40] repeated_labels = np.repeat(est_weighted.labels_, sample_weight)
[00:11:40] assert_almost_equal(v_measure_score(est_repeated.labels_,
[00:11:40] > repeated_labels), 1.0)
[00:11:40] E AssertionError:
[00:11:40] E Arrays are not almost equal to 7 decimals
[00:11:40] E ACTUAL: 0.95443625305609903
[00:11:40] E DESIRED: 1.0
[00:11:40]
[00:11:40] X_repeat = array([[ 0.1777796 , 0.24368721, 0.24496657, 4.49305682, 0.52896169],
[00:11:40] [ 0.41278093, 5.82206016, 1.8967929...367, -0.56629773, 0.09965137, -0.50347565],
[00:11:40] [ 2.19045563, 4.00946367, -0.56629773, 0.09965137, -0.50347565]])
[00:11:40] est_repeated = MiniBatchKMeans(batch_size=10, compute_labels=True, init='k-means++',
[00:11:40] init_size=None, max_iter=100, max_no_improvement=10, n_clusters=3,
[00:11:40] n_init=3, random_state=42, reassignment_ratio=0.01, tol=0.0,
[00:11:40] verbose=0)
[00:11:40] est_weighted = MiniBatchKMeans(batch_size=10, compute_labels=True, init='k-means++',
[00:11:40] init_size=None, max_iter=100, max_no_improvement=10, n_clusters=3,
[00:11:40] n_init=3, random_state=42, reassignment_ratio=0.01, tol=0.0,
[00:11:40] verbose=0)
[00:11:40] estimator = MiniBatchKMeans(batch_size=10, compute_labels=True, init='k-means++',
[00:11:40] init_size=None, max_iter=100, max_no_improvement=10, n_clusters=3,
[00:11:40] n_init=3, random_state=42, reassignment_ratio=0.01, tol=0.0,
[00:11:40] verbose=0)
[00:11:40] estimators = [KMeans(algorithm='auto', copy_x=True, init='k-means++', max_iter=300,
[00:11:40] n_clusters=3, n_init=10, n_jobs=1, precompu..._improvement=10, n_clusters=3,
[00:11:40] n_init=3, random_state=42, reassignment_ratio=0.01, tol=0.0,
[00:11:40] verbose=0)]
[00:11:40] repeated_labels = array([1, 2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
[00:11:40] 1, 0, 0, 0, 0, 2, 1, 1, 0, 2, 2, 2,...1, 2, 2, 2, 2, 2,
[00:11:40] 2, 0, 0, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1,
[00:11:40] 0, 0, 2, 2, 2, 2])
[00:11:40] sample_weight = array([1, 1, 4, 1, 1, 2, 2, 2, 2, 4, 4, 4, 1, 2, 1, 4, 3, 4, 1, 1, 4, 2, 3,
[00:11:40] 3, 1, 4, 3, 1, 2, 4, 1, 4, 2, 4, 4,...3, 4, 4, 3,
[00:11:40] 4, 2, 1, 4, 2, 4, 4, 2, 2, 3, 3, 1, 4, 1, 3, 1, 2, 2, 3, 2, 2, 4, 3,
[00:11:40] 3, 3, 4, 3, 2, 4, 2, 4])
[00:11:40]
[00:11:40] c:\python36\lib\site-packages\sklearn\cluster\tests\test_k_means.py:935: AssertionError"><pre class="notranslate"><code class="notranslate">[00:11:40] ================================== FAILURES ===================================
[00:11:40] __________________________ test_weighted_vs_repeated __________________________
[00:11:40]
[00:11:40] def test_weighted_vs_repeated():
[00:11:40] # a sample weight of N should yield the same result as an N-fold
[00:11:40] # repetition of the sample
[00:11:40] sample_weight = np.random.randint(1, 5, size=n_samples)
[00:11:40] X_repeat = np.repeat(X, sample_weight, axis=0)
[00:11:40] estimators = [KMeans(init="k-means++", n_clusters=n_clusters,
[00:11:40] random_state=42),
[00:11:40] KMeans(init="random", n_clusters=n_clusters,
[00:11:40] random_state=42),
[00:11:40] KMeans(init=centers.copy(), n_clusters=n_clusters,
[00:11:40] random_state=42),
[00:11:40] MiniBatchKMeans(n_clusters=n_clusters, batch_size=10,
[00:11:40] random_state=42)]
[00:11:40] for estimator in estimators:
[00:11:40] est_weighted = clone(estimator).fit(X, sample_weight=sample_weight)
[00:11:40] est_repeated = clone(estimator).fit(X_repeat)
[00:11:40] repeated_labels = np.repeat(est_weighted.labels_, sample_weight)
[00:11:40] assert_almost_equal(v_measure_score(est_repeated.labels_,
[00:11:40] > repeated_labels), 1.0)
[00:11:40] E AssertionError:
[00:11:40] E Arrays are not almost equal to 7 decimals
[00:11:40] E ACTUAL: 0.95443625305609903
[00:11:40] E DESIRED: 1.0
[00:11:40]
[00:11:40] X_repeat = array([[ 0.1777796 , 0.24368721, 0.24496657, 4.49305682, 0.52896169],
[00:11:40] [ 0.41278093, 5.82206016, 1.8967929...367, -0.56629773, 0.09965137, -0.50347565],
[00:11:40] [ 2.19045563, 4.00946367, -0.56629773, 0.09965137, -0.50347565]])
[00:11:40] est_repeated = MiniBatchKMeans(batch_size=10, compute_labels=True, init='k-means++',
[00:11:40] init_size=None, max_iter=100, max_no_improvement=10, n_clusters=3,
[00:11:40] n_init=3, random_state=42, reassignment_ratio=0.01, tol=0.0,
[00:11:40] verbose=0)
[00:11:40] est_weighted = MiniBatchKMeans(batch_size=10, compute_labels=True, init='k-means++',
[00:11:40] init_size=None, max_iter=100, max_no_improvement=10, n_clusters=3,
[00:11:40] n_init=3, random_state=42, reassignment_ratio=0.01, tol=0.0,
[00:11:40] verbose=0)
[00:11:40] estimator = MiniBatchKMeans(batch_size=10, compute_labels=True, init='k-means++',
[00:11:40] init_size=None, max_iter=100, max_no_improvement=10, n_clusters=3,
[00:11:40] n_init=3, random_state=42, reassignment_ratio=0.01, tol=0.0,
[00:11:40] verbose=0)
[00:11:40] estimators = [KMeans(algorithm='auto', copy_x=True, init='k-means++', max_iter=300,
[00:11:40] n_clusters=3, n_init=10, n_jobs=1, precompu..._improvement=10, n_clusters=3,
[00:11:40] n_init=3, random_state=42, reassignment_ratio=0.01, tol=0.0,
[00:11:40] verbose=0)]
[00:11:40] repeated_labels = array([1, 2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
[00:11:40] 1, 0, 0, 0, 0, 2, 1, 1, 0, 2, 2, 2,...1, 2, 2, 2, 2, 2,
[00:11:40] 2, 0, 0, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1,
[00:11:40] 0, 0, 2, 2, 2, 2])
[00:11:40] sample_weight = array([1, 1, 4, 1, 1, 2, 2, 2, 2, 4, 4, 4, 1, 2, 1, 4, 3, 4, 1, 1, 4, 2, 3,
[00:11:40] 3, 1, 4, 3, 1, 2, 4, 1, 4, 2, 4, 4,...3, 4, 4, 3,
[00:11:40] 4, 2, 1, 4, 2, 4, 4, 2, 2, 3, 3, 1, 4, 1, 3, 1, 2, 2, 3, 2, 2, 4, 3,
[00:11:40] 3, 3, 4, 3, 2, 4, 2, 4])
[00:11:40]
[00:11:40] c:\python36\lib\site-packages\sklearn\cluster\tests\test_k_means.py:935: AssertionError
</code></pre></div>
<p dir="auto">This is the second time that I got a CI failing on this one. I could not find any other issue related to that.</p> | 1 |
<h3 dir="auto">Description</h3>
<p dir="auto">Consider these 2 equivalent functions. Only the one that doesn't use <code class="notranslate">scan</code> is differentiable via <code class="notranslate">jax.linear_transpose</code>:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def foo(p):
x = jnp.zeros_like(p)
for _ in range(10):
x += p
return x
def bar(p):
return jax.lax.scan(lambda x, _: (x + p, None), jnp.zeros_like(p), None, length=10)[0]
# works
jax.linear_transpose(foo, jnp.zeros(10))(jnp.ones(10))
# nope
jax.linear_transpose(bar, jnp.zeros(10))(jnp.ones(10))"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">foo</span>(<span class="pl-s1">p</span>):
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">jnp</span>.<span class="pl-en">zeros_like</span>(<span class="pl-s1">p</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">10</span>):
<span class="pl-s1">x</span> <span class="pl-c1">+=</span> <span class="pl-s1">p</span>
<span class="pl-k">return</span> <span class="pl-s1">x</span>
<span class="pl-k">def</span> <span class="pl-en">bar</span>(<span class="pl-s1">p</span>):
<span class="pl-k">return</span> <span class="pl-s1">jax</span>.<span class="pl-s1">lax</span>.<span class="pl-en">scan</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>, <span class="pl-s1">_</span>: (<span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-s1">p</span>, <span class="pl-c1">None</span>), <span class="pl-s1">jnp</span>.<span class="pl-en">zeros_like</span>(<span class="pl-s1">p</span>), <span class="pl-c1">None</span>, <span class="pl-s1">length</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)[<span class="pl-c1">0</span>]
<span class="pl-c"># works</span>
<span class="pl-s1">jax</span>.<span class="pl-en">linear_transpose</span>(<span class="pl-s1">foo</span>, <span class="pl-s1">jnp</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">10</span>))(<span class="pl-s1">jnp</span>.<span class="pl-en">ones</span>(<span class="pl-c1">10</span>))
<span class="pl-c"># nope</span>
<span class="pl-s1">jax</span>.<span class="pl-en">linear_transpose</span>(<span class="pl-s1">bar</span>, <span class="pl-s1">jnp</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">10</span>))(<span class="pl-s1">jnp</span>.<span class="pl-en">ones</span>(<span class="pl-c1">10</span>))</pre></div>
<p dir="auto">Traceback:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
JaxStackTraceBeforeTransformation Traceback (most recent call last)
File /opt/homebrew/Cellar/[email protected]/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py:191, in _run_module_as_main(***failed resolving arguments***)
190 except _Error as exc:
--> 191 msg = "%s: %s" % (sys.executable, exc)
192 sys.exit(msg)
File /opt/homebrew/Cellar/[email protected]/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py:75, in _run_code(***failed resolving arguments***)
74 loader = mod_spec.loader
---> 75 fname = mod_spec.origin
76 cached = mod_spec.cached
File ~/.virtualenvs/science/lib/python3.10/site-packages/ipykernel_launcher.py:12, in <module>
9 if __name__ == "__main__":
10 # Remove the CWD from sys.path while we load stuff.
11 # This is added back by InteractiveShellApp.init_path()
---> 12 if sys.path[0] == "":
13 del sys.path[0]
File ~/.virtualenvs/science/lib/python3.10/site-packages/traitlets/config/application.py:963, in Application.launch_instance(***failed resolving arguments***)
959 """Launch a global instance of this Application
960
961 If a global instance already exists, this reinitializes and starts it
962 """
--> 963 app = cls.instance(**kwargs)
964 app.initialize(argv)
File ~/.virtualenvs/science/lib/python3.10/site-packages/ipykernel/kernelapp.py:702, in IPKernelApp.start(***failed resolving arguments***)
701 if self.trio_loop:
--> 702 from ipykernel.trio_runner import TrioRunner
704 tr = TrioRunner()
File ~/.virtualenvs/science/lib/python3.10/site-packages/tornado/platform/asyncio.py:195, in BaseAsyncIOLoop.start(***failed resolving arguments***)
194 except (RuntimeError, AssertionError):
--> 195 old_loop = None # type: ignore
196 try:
File /opt/homebrew/Cellar/[email protected]/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py:594, in BaseEventLoop.run_forever(***failed resolving arguments***)
592 self._thread_id = threading.get_ident()
--> 594 old_agen_hooks = sys.get_asyncgen_hooks()
595 sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook,
596 finalizer=self._asyncgen_finalizer_hook)
File /opt/homebrew/Cellar/[email protected]/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py:1860, in BaseEventLoop._run_once(***failed resolving arguments***)
1858 timeout = min(max(0, when - self.time()), MAXIMUM_SELECT_TIMEOUT)
-> 1860 event_list = self._selector.select(timeout)
1861 self._process_events(event_list)
File /opt/homebrew/Cellar/[email protected]/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/events.py:80, in Handle._run(***failed resolving arguments***)
79 try:
---> 80 self._context.run(self._callback, *self._args)
81 except (SystemExit, KeyboardInterrupt):
File ~/.virtualenvs/science/lib/python3.10/site-packages/ipykernel/kernelbase.py:504, in Kernel.dispatch_queue(***failed resolving arguments***)
503 try:
--> 504 await self.process_one()
505 except Exception:
File ~/.virtualenvs/science/lib/python3.10/site-packages/ipykernel/kernelbase.py:490, in Kernel.process_one(***failed resolving arguments***)
489 try:
--> 490 t, dispatch, args = self.msg_queue.get_nowait()
491 except (asyncio.QueueEmpty, QueueEmpty):
File ~/.virtualenvs/science/lib/python3.10/site-packages/ipykernel/kernelbase.py:377, in Kernel.dispatch_shell(***failed resolving arguments***)
376 self.shell_stream.flush(zmq.POLLOUT)
--> 377 return
379 # Print some info about this message and leave a '--->' marker, so it's
380 # easier to trace visually the message chain when debugging. Each
381 # handler prints its message at the end.
File ~/.virtualenvs/science/lib/python3.10/site-packages/ipykernel/kernelbase.py:695, in Kernel.execute_request(***failed resolving arguments***)
693 stop_on_error = content.get("stop_on_error", True)
--> 695 metadata = self.init_metadata(parent)
697 # Re-broadcast our input for the benefit of listening clients, and
698 # start computing output
File ~/.virtualenvs/science/lib/python3.10/site-packages/ipykernel/ipkernel.py:352, in IPythonKernel.do_execute(***failed resolving arguments***)
350 if with_cell_id:
351 coro = run_cell(
--> 352 code,
353 store_history=store_history,
354 silent=silent,
355 transformed_cell=transformed_cell,
356 preprocessing_exc_tuple=preprocessing_exc_tuple,
357 cell_id=cell_id,
358 )
359 else:
File ~/.virtualenvs/science/lib/python3.10/site-packages/ipykernel/zmqshell.py:528, in ZMQInteractiveShell.run_cell(***failed resolving arguments***)
527 self._last_traceback = None
--> 528 return super().run_cell(*args, **kwargs)
File ~/.virtualenvs/science/lib/python3.10/site-packages/IPython/core/interactiveshell.py:2881, in InteractiveShell.run_cell(***failed resolving arguments***)
2879 try:
2880 result = self._run_cell(
-> 2881 raw_cell, store_history, silent, shell_futures, cell_id
2882 )
2883 finally:
File ~/.virtualenvs/science/lib/python3.10/site-packages/IPython/core/interactiveshell.py:2910, in InteractiveShell._run_cell(***failed resolving arguments***)
2908 assert transformed_cell is not None
2909 coro = self.run_cell_async(
-> 2910 raw_cell,
2911 store_history=store_history,
2912 silent=silent,
2913 shell_futures=shell_futures,
2914 transformed_cell=transformed_cell,
2915 preprocessing_exc_tuple=preprocessing_exc_tuple,
2916 cell_id=cell_id,
2917 )
2919 # run_cell_async is async, but may not actually need an eventloop.
2920 # when this is the case, we want to run it using the pseudo_sync_runner
2921 # so that code can invoke eventloops (for example via the %run , and
2922 # `%paste` magic.
File ~/.virtualenvs/science/lib/python3.10/site-packages/IPython/core/async_helpers.py:129, in _pseudo_sync_runner(***failed resolving arguments***)
128 try:
--> 129 coro.send(None)
130 except StopIteration as exc:
File ~/.virtualenvs/science/lib/python3.10/site-packages/IPython/core/interactiveshell.py:3108, in InteractiveShell.run_cell_async(***failed resolving arguments***)
3107 code_ast = compiler.ast_parse(cell, filename=cell_name)
-> 3108 except self.custom_exceptions as e:
3109 etype, value, tb = sys.exc_info()
File ~/.virtualenvs/science/lib/python3.10/site-packages/IPython/core/interactiveshell.py:3305, in InteractiveShell.run_ast_nodes(***failed resolving arguments***)
3304 to_run_exec, to_run_interactive = nodelist[:-1], nodelist[-1:]
-> 3305 elif interactivity == 'all':
3306 to_run_exec, to_run_interactive = [], nodelist
File ~/.virtualenvs/science/lib/python3.10/site-packages/IPython/core/interactiveshell.py:3394, in InteractiveShell.run_code(***failed resolving arguments***)
3393 try:
-> 3394 if async_:
3395 await eval(code_obj, self.user_global_ns, self.user_ns)
Input In [207], in <cell line: 10>()
8 return x
---> 10 jax.linear_transpose(foo, jnp.zeros(10))(jnp.ones(10))
Input In [207], in foo(***failed resolving arguments***)
1 def foo(p):
----> 2 return jax.lax.scan(lambda x, _: (x + p, None), jnp.zeros_like(p), None, length=10)[0]
JaxStackTraceBeforeTransformation: AssertionError
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:
AssertionError Traceback (most recent call last)
Input In [207], in <cell line: 10>()
7 x += p
8 return x
---> 10 jax.linear_transpose(foo, jnp.zeros(10))(jnp.ones(10))
[... skipping hidden 3 frame]
File ~/.virtualenvs/science/lib/python3.10/site-packages/jax/_src/lax/control_flow/loops.py:663, in _scan_transpose(reduce_axes, cts, reverse, length, num_consts, num_carry, jaxpr, linear, unroll, *args)
661 ires, _ = split_list(consts, [num_ires])
662 _, eres = split_list(xs, [sum(xs_lin)])
--> 663 assert not any(ad.is_undefined_primal(r) for r in ires)
664 assert not any(ad.is_undefined_primal(r) for r in eres)
666 carry_avals, y_avals = split_list(jaxpr.out_avals, [num_carry])
AssertionError: "><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">JaxStackTraceBeforeTransformation</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-v">File</span> <span class="pl-c1">/</span><span class="pl-s1">opt</span><span class="pl-c1">/</span><span class="pl-s1">homebrew</span><span class="pl-c1">/</span><span class="pl-v">Cellar</span><span class="pl-c1">/</span><span class="pl-s1">python</span>@<span class="pl-c1">3.10</span><span class="pl-c1">/</span><span class="pl-c1">3.10</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-v">Frameworks</span><span class="pl-c1">/</span><span class="pl-v">Python</span>.<span class="pl-s1">framework</span><span class="pl-c1">/</span><span class="pl-v">Versions</span><span class="pl-c1">/</span><span class="pl-c1">3.10</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">runpy</span>.<span class="pl-s1">py</span>:<span class="pl-c1">191</span>, <span class="pl-s1">in</span> <span class="pl-en">_run_module_as_main</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">190</span> <span class="pl-s1">except</span> <span class="pl-s1">_Error</span> <span class="pl-k">as</span> <span class="pl-s1">exc</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">191</span> <span class="pl-s1">msg</span> <span class="pl-c1">=</span> <span class="pl-s">"%s: %s"</span> <span class="pl-c1">%</span> (<span class="pl-s1">sys</span>.<span class="pl-s1">executable</span>, <span class="pl-s1">exc</span>)
<span class="pl-c1">192</span> <span class="pl-s1">sys</span>.<span class="pl-en">exit</span>(<span class="pl-s1">msg</span>)
<span class="pl-v">File</span> <span class="pl-c1">/</span><span class="pl-s1">opt</span><span class="pl-c1">/</span><span class="pl-s1">homebrew</span><span class="pl-c1">/</span><span class="pl-v">Cellar</span><span class="pl-c1">/</span><span class="pl-s1">python</span>@<span class="pl-c1">3.10</span><span class="pl-c1">/</span><span class="pl-c1">3.10</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-v">Frameworks</span><span class="pl-c1">/</span><span class="pl-v">Python</span>.<span class="pl-s1">framework</span><span class="pl-c1">/</span><span class="pl-v">Versions</span><span class="pl-c1">/</span><span class="pl-c1">3.10</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">runpy</span>.<span class="pl-s1">py</span>:<span class="pl-c1">75</span>, <span class="pl-s1">in</span> <span class="pl-en">_run_code</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">74</span> <span class="pl-s1">loader</span> <span class="pl-c1">=</span> <span class="pl-s1">mod_spec</span>.<span class="pl-s1">loader</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">75</span> <span class="pl-s1">fname</span> <span class="pl-c1">=</span> <span class="pl-s1">mod_spec</span>.<span class="pl-s1">origin</span>
<span class="pl-c1">76</span> <span class="pl-s1">cached</span> <span class="pl-c1">=</span> <span class="pl-s1">mod_spec</span>.<span class="pl-s1">cached</span>
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">ipykernel_launcher</span>.<span class="pl-s1">py</span>:<span class="pl-c1">12</span>, <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-c1">9</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-c1">10</span> <span class="pl-c"># Remove the CWD from sys.path while we load stuff.</span>
<span class="pl-c1">11</span> <span class="pl-c"># This is added back by InteractiveShellApp.init_path()</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">12</span> <span class="pl-k">if</span> <span class="pl-s1">sys</span>.<span class="pl-s1">path</span>[<span class="pl-c1">0</span>] <span class="pl-c1">==</span> <span class="pl-s">""</span>:
<span class="pl-c1">13</span> <span class="pl-s1">del</span> <span class="pl-s1">sys</span>.<span class="pl-s1">path</span>[<span class="pl-c1">0</span>]
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">traitlets</span><span class="pl-c1">/</span><span class="pl-s1">config</span><span class="pl-c1">/</span><span class="pl-s1">application</span>.<span class="pl-s1">py</span>:<span class="pl-c1">963</span>, <span class="pl-c1">in</span> <span class="pl-v">Application</span>.<span class="pl-s1">launch_instance</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">959</span> <span class="pl-s">"""Launch a global instance of this Application</span>
<span class="pl-s"> 960 </span>
<span class="pl-s"> 961 If a global instance already exists, this reinitializes and starts it</span>
<span class="pl-s"> 962 """</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">963</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">cls</span>.<span class="pl-en">instance</span>(<span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">964</span> <span class="pl-s1">app</span>.<span class="pl-en">initialize</span>(<span class="pl-s1">argv</span>)
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">ipykernel</span><span class="pl-c1">/</span><span class="pl-s1">kernelapp</span>.<span class="pl-s1">py</span>:<span class="pl-c1">702</span>, <span class="pl-s1">in</span> <span class="pl-v">IPKernelApp</span>.<span class="pl-s1">start</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">701</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">trio_loop</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">702</span> <span class="pl-s1">from</span> <span class="pl-s1">ipykernel</span>.<span class="pl-s1">trio_runner</span> <span class="pl-s1">import</span> <span class="pl-v">TrioRunner</span>
<span class="pl-c1">704</span> <span class="pl-s1">tr</span> <span class="pl-c1">=</span> <span class="pl-v">TrioRunner</span>()
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">tornado</span><span class="pl-c1">/</span><span class="pl-s1">platform</span><span class="pl-c1">/</span><span class="pl-s1">asyncio</span>.<span class="pl-s1">py</span>:<span class="pl-c1">195</span>, <span class="pl-c1">in</span> <span class="pl-v">BaseAsyncIOLoop</span>.<span class="pl-s1">start</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">194</span> <span class="pl-en">except</span> (<span class="pl-v">RuntimeError</span>, <span class="pl-v">AssertionError</span>):
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">195</span> <span class="pl-s1">old_loop</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span> <span class="pl-c"># type: ignore</span>
<span class="pl-c1">196</span> <span class="pl-s1">try</span>:
<span class="pl-v">File</span> <span class="pl-c1">/</span><span class="pl-s1">opt</span><span class="pl-c1">/</span><span class="pl-s1">homebrew</span><span class="pl-c1">/</span><span class="pl-v">Cellar</span><span class="pl-c1">/</span><span class="pl-s1">python</span>@<span class="pl-c1">3.10</span><span class="pl-c1">/</span><span class="pl-c1">3.10</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-v">Frameworks</span><span class="pl-c1">/</span><span class="pl-v">Python</span>.<span class="pl-s1">framework</span><span class="pl-c1">/</span><span class="pl-v">Versions</span><span class="pl-c1">/</span><span class="pl-c1">3.10</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">asyncio</span><span class="pl-c1">/</span><span class="pl-s1">base_events</span>.<span class="pl-s1">py</span>:<span class="pl-c1">594</span>, <span class="pl-s1">in</span> <span class="pl-v">BaseEventLoop</span>.<span class="pl-s1">run_forever</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">592</span> <span class="pl-s1">self</span>.<span class="pl-s1">_thread_id</span> <span class="pl-c1">=</span> <span class="pl-s1">threading</span>.<span class="pl-en">get_ident</span>()
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">594</span> <span class="pl-s1">old_agen_hooks</span> <span class="pl-c1">=</span> <span class="pl-s1">sys</span>.<span class="pl-en">get_asyncgen_hooks</span>()
<span class="pl-c1">595</span> <span class="pl-s1">sys</span>.<span class="pl-en">set_asyncgen_hooks</span>(<span class="pl-s1">firstiter</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">_asyncgen_firstiter_hook</span>,
<span class="pl-c1">596</span> <span class="pl-s1">finalizer</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">_asyncgen_finalizer_hook</span>)
<span class="pl-v">File</span> <span class="pl-c1">/</span><span class="pl-s1">opt</span><span class="pl-c1">/</span><span class="pl-s1">homebrew</span><span class="pl-c1">/</span><span class="pl-v">Cellar</span><span class="pl-c1">/</span><span class="pl-s1">python</span>@<span class="pl-c1">3.10</span><span class="pl-c1">/</span><span class="pl-c1">3.10</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-v">Frameworks</span><span class="pl-c1">/</span><span class="pl-v">Python</span>.<span class="pl-s1">framework</span><span class="pl-c1">/</span><span class="pl-v">Versions</span><span class="pl-c1">/</span><span class="pl-c1">3.10</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">asyncio</span><span class="pl-c1">/</span><span class="pl-s1">base_events</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1860</span>, <span class="pl-s1">in</span> <span class="pl-v">BaseEventLoop</span>.<span class="pl-s1">_run_once</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">1858</span> <span class="pl-s1">timeout</span> <span class="pl-c1">=</span> <span class="pl-en">min</span>(<span class="pl-en">max</span>(<span class="pl-c1">0</span>, <span class="pl-s1">when</span> <span class="pl-c1">-</span> <span class="pl-s1">self</span>.<span class="pl-en">time</span>()), <span class="pl-v">MAXIMUM_SELECT_TIMEOUT</span>)
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">1860</span> <span class="pl-s1">event_list</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_selector</span>.<span class="pl-en">select</span>(<span class="pl-s1">timeout</span>)
<span class="pl-c1">1861</span> <span class="pl-s1">self</span>.<span class="pl-en">_process_events</span>(<span class="pl-s1">event_list</span>)
<span class="pl-v">File</span> <span class="pl-c1">/</span><span class="pl-s1">opt</span><span class="pl-c1">/</span><span class="pl-s1">homebrew</span><span class="pl-c1">/</span><span class="pl-v">Cellar</span><span class="pl-c1">/</span><span class="pl-s1">python</span>@<span class="pl-c1">3.10</span><span class="pl-c1">/</span><span class="pl-c1">3.10</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-v">Frameworks</span><span class="pl-c1">/</span><span class="pl-v">Python</span>.<span class="pl-s1">framework</span><span class="pl-c1">/</span><span class="pl-v">Versions</span><span class="pl-c1">/</span><span class="pl-c1">3.10</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">asyncio</span><span class="pl-c1">/</span><span class="pl-s1">events</span>.<span class="pl-s1">py</span>:<span class="pl-c1">80</span>, <span class="pl-s1">in</span> <span class="pl-v">Handle</span>.<span class="pl-s1">_run</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">79</span> <span class="pl-s1">try</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">80</span> <span class="pl-s1">self</span>.<span class="pl-s1">_context</span>.<span class="pl-en">run</span>(<span class="pl-s1">self</span>.<span class="pl-s1">_callback</span>, <span class="pl-c1">*</span><span class="pl-s1">self</span>.<span class="pl-s1">_args</span>)
<span class="pl-c1">81</span> <span class="pl-en">except</span> (<span class="pl-v">SystemExit</span>, <span class="pl-v">KeyboardInterrupt</span>):
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">ipykernel</span><span class="pl-c1">/</span><span class="pl-s1">kernelbase</span>.<span class="pl-s1">py</span>:<span class="pl-c1">504</span>, <span class="pl-s1">in</span> <span class="pl-v">Kernel</span>.<span class="pl-s1">dispatch_queue</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">503</span> <span class="pl-s1">try</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">504</span> <span class="pl-s1">await</span> <span class="pl-s1">self</span>.<span class="pl-en">process_one</span>()
<span class="pl-c1">505</span> <span class="pl-s1">except</span> <span class="pl-v">Exception</span>:
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">ipykernel</span><span class="pl-c1">/</span><span class="pl-s1">kernelbase</span>.<span class="pl-s1">py</span>:<span class="pl-c1">490</span>, <span class="pl-s1">in</span> <span class="pl-v">Kernel</span>.<span class="pl-s1">process_one</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">489</span> <span class="pl-s1">try</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">490</span> <span class="pl-s1">t</span>, <span class="pl-s1">dispatch</span>, <span class="pl-s1">args</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">msg_queue</span>.<span class="pl-en">get_nowait</span>()
<span class="pl-c1">491</span> <span class="pl-en">except</span> (<span class="pl-s1">asyncio</span>.<span class="pl-v">QueueEmpty</span>, <span class="pl-v">QueueEmpty</span>):
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">ipykernel</span><span class="pl-c1">/</span><span class="pl-s1">kernelbase</span>.<span class="pl-s1">py</span>:<span class="pl-c1">377</span>, <span class="pl-s1">in</span> <span class="pl-v">Kernel</span>.<span class="pl-s1">dispatch_shell</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">376</span> <span class="pl-s1">self</span>.<span class="pl-s1">shell_stream</span>.<span class="pl-en">flush</span>(<span class="pl-s1">zmq</span>.<span class="pl-v">POLLOUT</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">377</span> <span class="pl-s1">return</span>
<span class="pl-c1">379</span> <span class="pl-c"># Print some info about this message and leave a '--->' marker, so it's</span>
<span class="pl-c1">380</span> <span class="pl-c"># easier to trace visually the message chain when debugging. Each</span>
<span class="pl-c1">381</span> <span class="pl-c"># handler prints its message at the end.</span>
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">ipykernel</span><span class="pl-c1">/</span><span class="pl-s1">kernelbase</span>.<span class="pl-s1">py</span>:<span class="pl-c1">695</span>, <span class="pl-s1">in</span> <span class="pl-v">Kernel</span>.<span class="pl-s1">execute_request</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">693</span> <span class="pl-s1">stop_on_error</span> <span class="pl-c1">=</span> <span class="pl-s1">content</span>.<span class="pl-en">get</span>(<span class="pl-s">"stop_on_error"</span>, <span class="pl-c1">True</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">695</span> <span class="pl-s1">metadata</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">init_metadata</span>(<span class="pl-s1">parent</span>)
<span class="pl-c1">697</span> <span class="pl-c"># Re-broadcast our input for the benefit of listening clients, and</span>
<span class="pl-c1">698</span> <span class="pl-c"># start computing output</span>
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">ipykernel</span><span class="pl-c1">/</span><span class="pl-s1">ipkernel</span>.<span class="pl-s1">py</span>:<span class="pl-c1">352</span>, <span class="pl-s1">in</span> <span class="pl-v">IPythonKernel</span>.<span class="pl-s1">do_execute</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">350</span> <span class="pl-k">if</span> <span class="pl-s1">with_cell_id</span>:
<span class="pl-c1">351</span> <span class="pl-s1">coro</span> <span class="pl-c1">=</span> <span class="pl-en">run_cell</span>(
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">352</span> <span class="pl-s1">code</span>,
<span class="pl-c1">353</span> <span class="pl-s1">store_history</span><span class="pl-c1">=</span><span class="pl-s1">store_history</span>,
<span class="pl-c1">354</span> <span class="pl-s1">silent</span><span class="pl-c1">=</span><span class="pl-s1">silent</span>,
<span class="pl-c1">355</span> <span class="pl-s1">transformed_cell</span><span class="pl-c1">=</span><span class="pl-s1">transformed_cell</span>,
<span class="pl-c1">356</span> <span class="pl-s1">preprocessing_exc_tuple</span><span class="pl-c1">=</span><span class="pl-s1">preprocessing_exc_tuple</span>,
<span class="pl-c1">357</span> <span class="pl-s1">cell_id</span><span class="pl-c1">=</span><span class="pl-s1">cell_id</span>,
<span class="pl-c1">358</span> )
<span class="pl-c1">359</span> <span class="pl-k">else</span>:
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">ipykernel</span><span class="pl-c1">/</span><span class="pl-s1">zmqshell</span>.<span class="pl-s1">py</span>:<span class="pl-c1">528</span>, <span class="pl-s1">in</span> <span class="pl-v">ZMQInteractiveShell</span>.<span class="pl-s1">run_cell</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">527</span> <span class="pl-s1">self</span>.<span class="pl-s1">_last_traceback</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">528</span> <span class="pl-s1">return</span> <span class="pl-en">super</span>().<span class="pl-en">run_cell</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-v">IPython</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">interactiveshell</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2881</span>, <span class="pl-s1">in</span> <span class="pl-v">InteractiveShell</span>.<span class="pl-s1">run_cell</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">2879</span> <span class="pl-s1">try</span>:
<span class="pl-c1">2880</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_run_cell</span>(
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">2881</span> <span class="pl-s1">raw_cell</span>, <span class="pl-s1">store_history</span>, <span class="pl-s1">silent</span>, <span class="pl-s1">shell_futures</span>, <span class="pl-s1">cell_id</span>
<span class="pl-c1">2882</span> )
<span class="pl-c1">2883</span> <span class="pl-k">finally</span>:
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-v">IPython</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">interactiveshell</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2910</span>, <span class="pl-s1">in</span> <span class="pl-v">InteractiveShell</span>.<span class="pl-s1">_run_cell</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">2908</span> <span class="pl-s1">assert</span> <span class="pl-s1">transformed_cell</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-c1">None</span>
<span class="pl-c1">2909</span> <span class="pl-s1">coro</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">run_cell_async</span>(
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">2910</span> <span class="pl-s1">raw_cell</span>,
<span class="pl-c1">2911</span> <span class="pl-s1">store_history</span><span class="pl-c1">=</span><span class="pl-s1">store_history</span>,
<span class="pl-c1">2912</span> <span class="pl-s1">silent</span><span class="pl-c1">=</span><span class="pl-s1">silent</span>,
<span class="pl-c1">2913</span> <span class="pl-s1">shell_futures</span><span class="pl-c1">=</span><span class="pl-s1">shell_futures</span>,
<span class="pl-c1">2914</span> <span class="pl-s1">transformed_cell</span><span class="pl-c1">=</span><span class="pl-s1">transformed_cell</span>,
<span class="pl-c1">2915</span> <span class="pl-s1">preprocessing_exc_tuple</span><span class="pl-c1">=</span><span class="pl-s1">preprocessing_exc_tuple</span>,
<span class="pl-c1">2916</span> <span class="pl-s1">cell_id</span><span class="pl-c1">=</span><span class="pl-s1">cell_id</span>,
<span class="pl-c1">2917</span> )
<span class="pl-c1">2919</span> <span class="pl-c"># run_cell_async is async, but may not actually need an eventloop.</span>
<span class="pl-c1">2920</span> <span class="pl-c"># when this is the case, we want to run it using the pseudo_sync_runner</span>
<span class="pl-c1">2921</span> <span class="pl-c"># so that code can invoke eventloops (for example via the %run , and</span>
<span class="pl-c1">2922</span> <span class="pl-c"># `%paste` magic.</span>
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-v">IPython</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">async_helpers</span>.<span class="pl-s1">py</span>:<span class="pl-c1">129</span>, <span class="pl-s1">in</span> <span class="pl-s1">_pseudo_sync_runner</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">128</span> <span class="pl-s1">try</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">129</span> <span class="pl-s1">coro</span>.<span class="pl-en">send</span>(<span class="pl-c1">None</span>)
<span class="pl-c1">130</span> <span class="pl-s1">except</span> <span class="pl-v">StopIteration</span> <span class="pl-k">as</span> <span class="pl-s1">exc</span>:
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-v">IPython</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">interactiveshell</span>.<span class="pl-s1">py</span>:<span class="pl-c1">3108</span>, <span class="pl-s1">in</span> <span class="pl-v">InteractiveShell</span>.<span class="pl-s1">run_cell_async</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">3107</span> <span class="pl-s1">code_ast</span> <span class="pl-c1">=</span> <span class="pl-s1">compiler</span>.<span class="pl-en">ast_parse</span>(<span class="pl-s1">cell</span>, <span class="pl-s1">filename</span><span class="pl-c1">=</span><span class="pl-s1">cell_name</span>)
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">3108</span> <span class="pl-s1">except</span> <span class="pl-s1">self</span>.<span class="pl-s1">custom_exceptions</span> <span class="pl-k">as</span> <span class="pl-s1">e</span>:
<span class="pl-c1">3109</span> <span class="pl-s1">etype</span>, <span class="pl-s1">value</span>, <span class="pl-s1">tb</span> <span class="pl-c1">=</span> <span class="pl-s1">sys</span>.<span class="pl-en">exc_info</span>()
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-v">IPython</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">interactiveshell</span>.<span class="pl-s1">py</span>:<span class="pl-c1">3305</span>, <span class="pl-s1">in</span> <span class="pl-v">InteractiveShell</span>.<span class="pl-s1">run_ast_nodes</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">3304</span> <span class="pl-s1">to_run_exec</span>, <span class="pl-s1">to_run_interactive</span> <span class="pl-c1">=</span> <span class="pl-s1">nodelist</span>[:<span class="pl-c1">-</span><span class="pl-c1">1</span>], <span class="pl-s1">nodelist</span>[<span class="pl-c1">-</span><span class="pl-c1">1</span>:]
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">3305</span> <span class="pl-s1">elif</span> <span class="pl-s1">interactivity</span> <span class="pl-c1">==</span> <span class="pl-s">'all'</span>:
<span class="pl-c1">3306</span> <span class="pl-s1">to_run_exec</span>, <span class="pl-s1">to_run_interactive</span> <span class="pl-c1">=</span> [], <span class="pl-s1">nodelist</span>
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-v">IPython</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">interactiveshell</span>.<span class="pl-s1">py</span>:<span class="pl-c1">3394</span>, <span class="pl-s1">in</span> <span class="pl-v">InteractiveShell</span>.<span class="pl-s1">run_code</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">3393</span> <span class="pl-s1">try</span>:
<span class="pl-c1">-></span> <span class="pl-c1">3394</span> <span class="pl-k">if</span> <span class="pl-s1">async_</span>:
<span class="pl-c1">3395</span> <span class="pl-k">await</span> <span class="pl-en">eval</span>(<span class="pl-s1">code_obj</span>, <span class="pl-s1">self</span>.<span class="pl-s1">user_global_ns</span>, <span class="pl-s1">self</span>.<span class="pl-s1">user_ns</span>)
<span class="pl-v">Input</span> <span class="pl-v">In</span> [<span class="pl-c1">207</span>], <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">cell</span> <span class="pl-s1">line</span>: <span class="pl-c1">10</span><span class="pl-c1">></span>()
<span class="pl-c1">8</span> <span class="pl-s1">return</span> <span class="pl-s1">x</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">10</span> <span class="pl-s1">jax</span>.<span class="pl-en">linear_transpose</span>(<span class="pl-s1">foo</span>, <span class="pl-s1">jnp</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">10</span>))(<span class="pl-s1">jnp</span>.<span class="pl-en">ones</span>(<span class="pl-c1">10</span>))
<span class="pl-v">Input</span> <span class="pl-v">In</span> [<span class="pl-c1">207</span>], <span class="pl-s1">in</span> <span class="pl-s1">foo</span>(<span class="pl-c1">**</span><span class="pl-c1">*</span><span class="pl-s1">failed</span> <span class="pl-s1">resolving</span> <span class="pl-s1">arguments</span><span class="pl-c1">**</span><span class="pl-c1">*</span>)
<span class="pl-c1">1</span> <span class="pl-s1">def</span> <span class="pl-en">foo</span>(<span class="pl-s1">p</span>):
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">2</span> <span class="pl-s1">return</span> <span class="pl-s1">jax</span>.<span class="pl-s1">lax</span>.<span class="pl-en">scan</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>, <span class="pl-s1">_</span>: (<span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-s1">p</span>, <span class="pl-c1">None</span>), <span class="pl-s1">jnp</span>.<span class="pl-en">zeros_like</span>(<span class="pl-s1">p</span>), <span class="pl-c1">None</span>, <span class="pl-s1">length</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)[<span class="pl-c1">0</span>]
<span class="pl-v">JaxStackTraceBeforeTransformation</span>: <span class="pl-v">AssertionError</span>
<span class="pl-v">The</span> <span class="pl-s1">preceding</span> <span class="pl-s1">stack</span> <span class="pl-s1">trace</span> <span class="pl-c1">is</span> <span class="pl-s1">the</span> <span class="pl-s1">source</span> <span class="pl-s1">of</span> <span class="pl-s1">the</span> <span class="pl-v">JAX</span> <span class="pl-s1">operation</span> <span class="pl-s1">that</span>, <span class="pl-s1">once</span> <span class="pl-s1">transformed</span> <span class="pl-s1">by</span> <span class="pl-v">JAX</span>, <span class="pl-s1">triggered</span> <span class="pl-s1">the</span> <span class="pl-s1">following</span> <span class="pl-s1">exception</span>.
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">The</span> <span class="pl-s1">above</span> <span class="pl-s1">exception</span> <span class="pl-s1">was</span> <span class="pl-s1">the</span> <span class="pl-s1">direct</span> <span class="pl-s1">cause</span> <span class="pl-s1">of</span> <span class="pl-s1">the</span> <span class="pl-s1">following</span> <span class="pl-s1">exception</span>:
<span class="pl-v">AssertionError</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-v">Input</span> <span class="pl-v">In</span> [<span class="pl-c1">207</span>], <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">cell</span> <span class="pl-s1">line</span>: <span class="pl-c1">10</span><span class="pl-c1">></span>()
<span class="pl-c1">7</span> <span class="pl-s1">x</span> <span class="pl-c1">+=</span> <span class="pl-s1">p</span>
<span class="pl-c1">8</span> <span class="pl-s1">return</span> <span class="pl-s1">x</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">10</span> <span class="pl-s1">jax</span>.<span class="pl-en">linear_transpose</span>(<span class="pl-s1">foo</span>, <span class="pl-s1">jnp</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">10</span>))(<span class="pl-s1">jnp</span>.<span class="pl-en">ones</span>(<span class="pl-c1">10</span>))
[... <span class="pl-s1">skipping</span> <span class="pl-s1">hidden</span> <span class="pl-c1">3</span> <span class="pl-s1">frame</span>]
<span class="pl-v">File</span> <span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">science</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">10</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">jax</span><span class="pl-c1">/</span><span class="pl-s1">_src</span><span class="pl-c1">/</span><span class="pl-s1">lax</span><span class="pl-c1">/</span><span class="pl-s1">control_flow</span><span class="pl-c1">/</span><span class="pl-s1">loops</span>.<span class="pl-s1">py</span>:<span class="pl-c1">663</span>, <span class="pl-s1">in</span> <span class="pl-en">_scan_transpose</span>(<span class="pl-s1">reduce_axes</span>, <span class="pl-s1">cts</span>, <span class="pl-s1">reverse</span>, <span class="pl-s1">length</span>, <span class="pl-s1">num_consts</span>, <span class="pl-s1">num_carry</span>, <span class="pl-s1">jaxpr</span>, <span class="pl-s1">linear</span>, <span class="pl-s1">unroll</span>, <span class="pl-c1">*</span><span class="pl-s1">args</span>)
<span class="pl-c1">661</span> <span class="pl-s1">ires</span>, <span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-en">split_list</span>(<span class="pl-s1">consts</span>, [<span class="pl-s1">num_ires</span>])
<span class="pl-c1">662</span> <span class="pl-s1">_</span>, <span class="pl-s1">eres</span> <span class="pl-c1">=</span> <span class="pl-en">split_list</span>(<span class="pl-s1">xs</span>, [<span class="pl-en">sum</span>(<span class="pl-s1">xs_lin</span>)])
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">663</span> <span class="pl-s1">assert</span> <span class="pl-c1">not</span> <span class="pl-s1">any</span>(<span class="pl-s1">ad</span>.<span class="pl-en">is_undefined_primal</span>(<span class="pl-s1">r</span>) <span class="pl-k">for</span> <span class="pl-s1">r</span> <span class="pl-c1">in</span> <span class="pl-s1">ires</span>)
<span class="pl-c1">664</span> <span class="pl-k">assert</span> <span class="pl-c1">not</span> <span class="pl-s1">any</span>(<span class="pl-s1">ad</span>.<span class="pl-en">is_undefined_primal</span>(<span class="pl-s1">r</span>) <span class="pl-k">for</span> <span class="pl-s1">r</span> <span class="pl-c1">in</span> <span class="pl-s1">eres</span>)
<span class="pl-c1">666</span> <span class="pl-s1">carry_avals</span>, <span class="pl-s1">y_avals</span> <span class="pl-c1">=</span> <span class="pl-en">split_list</span>(<span class="pl-s1">jaxpr</span>.<span class="pl-s1">out_avals</span>, [<span class="pl-s1">num_carry</span>])
<span class="pl-v">AssertionError</span>: </pre></div>
<h3 dir="auto">What jax/jaxlib version are you using?</h3>
<p dir="auto">v0.3.15</p>
<h3 dir="auto">Which accelerator(s) are you using?</h3>
<p dir="auto">CPU</p>
<h3 dir="auto">Additional System Info</h3>
<p dir="auto">OSX ARM</p> | <p dir="auto"><em>first some motivation:</em></p>
<p dir="auto">I have a <strong>hermitian</strong> linear operator which is using a jvp followed by a vjp of complex (shallow) neural networks which ~ looks like this:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def matvec(apply_fun, params, samples, v):
_, w = jax.jvp(lambda p: apply_fun(p, samples), (params,), (v,))
w = w.conj()
res, _ = jax.vjp(apply_fun, params, samples)[1](w)
return jax.tree_map(jax.lax.conj, res)"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">matvec</span>(<span class="pl-s1">apply_fun</span>, <span class="pl-s1">params</span>, <span class="pl-s1">samples</span>, <span class="pl-s1">v</span>):
<span class="pl-s1">_</span>, <span class="pl-s1">w</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-en">jvp</span>(<span class="pl-k">lambda</span> <span class="pl-s1">p</span>: <span class="pl-en">apply_fun</span>(<span class="pl-s1">p</span>, <span class="pl-s1">samples</span>), (<span class="pl-s1">params</span>,), (<span class="pl-s1">v</span>,))
<span class="pl-s1">w</span> <span class="pl-c1">=</span> <span class="pl-s1">w</span>.<span class="pl-en">conj</span>()
<span class="pl-s1">res</span>, <span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-en">vjp</span>(<span class="pl-s1">apply_fun</span>, <span class="pl-s1">params</span>, <span class="pl-s1">samples</span>)[<span class="pl-c1">1</span>](<span class="pl-s1">w</span>)
<span class="pl-k">return</span> <span class="pl-s1">jax</span>.<span class="pl-en">tree_map</span>(<span class="pl-s1">jax</span>.<span class="pl-s1">lax</span>.<span class="pl-s1">conj</span>, <span class="pl-s1">res</span>)</pre></div>
<p dir="auto">It works fine, however storing the forward pass of the vjp uses too much memory when using many parameters and samples (think of both like ~1M). However one can to split the vjp into smaller vjp's looping over batches of samples and summing the result (which works surprisingly well). See the snipped below which should make this clear.</p>
<p dir="auto">I am using this linear operator with the cg and gmres iterative solvers, where its required to be linear_transpose'able.<br>
I have implemented the loop with lax.scan to try to make it transposable, however the _scan_transpose rule is giving an error which I dont't really know how to solve.</p>
<p dir="auto">Here is a minimal snipped of code (where for simplicity I have replaced the jvp/vjp in the linear operator with products with the matrix J), which reproduces the error I am getting:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax
import jax.numpy as jnp
from functools import partial
n = 100
batchsize = 5
d = 10
# generate a random jacobian and a vector
k0, k1, k2, k3 = jax.random.split(jax.random.PRNGKey(0), 4)
J = jax.random.uniform(k0, shape=(n,d)) + 1j * jax.random.uniform(k1, shape=(n,d))
v = jax.random.uniform(k2, shape=(d,)) + 1j * jax.random.normal(k3, shape=(d,))
# the linar operator
def mv(J, v):
return J.T.conj()@(J@v)
# works fine
_ = jax.scipy.sparse.linalg.cg(partial(mv, J), v)
_ = jax.scipy.sparse.linalg.gmres(partial(mv, J), v, solve_method='incremental')
# mv is hermitian, so its transpose is trivial
def mv_transposed(J, v):
return mv(J, v.conj()).conj()
# now the operator where the vjp is looping over small batches
def mv_batched(J, v):
w = J@v
J_batched = J.reshape((-1, batchsize)+J.shape[1:])
w_batched = w.reshape((-1, batchsize)+w.shape[1:])
Jw = J_batched, w_batched
def _mv(Jw):
J, w = Jw
return (w.conj() @ J).conj()
def f(carry, x):
return carry + _mv(x), None
res, _ = jax.lax.scan(f, jnp.zeros_like(v), Jw, unroll=1)
return res
assert jnp.allclose(mv(J,v), mv_batched(J,v))
assert jnp.allclose(mv_transposed(J,v), jax.linear_transpose(partial(mv, J), v)(v)[0])
# linear_transposing mv_batched gives the error:
print( jax.linear_transpose(partial(mv_batched, J), v)(v)[0] )
# goal: use mv_batched with the iterative solvers
# same error:
# print( jax.scipy.sparse.linalg.cg(partial(mv_batched, J), v))
# print( jax.scipy.sparse.linalg.gmres(partial(mv_batched, J), v, solve_method='incremental'))"><pre class="notranslate"><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">jnp</span>
<span class="pl-k">from</span> <span class="pl-s1">functools</span> <span class="pl-k">import</span> <span class="pl-s1">partial</span>
<span class="pl-s1">n</span> <span class="pl-c1">=</span> <span class="pl-c1">100</span>
<span class="pl-s1">batchsize</span> <span class="pl-c1">=</span> <span class="pl-c1">5</span>
<span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span>
<span class="pl-c"># generate a random jacobian and a vector</span>
<span class="pl-s1">k0</span>, <span class="pl-s1">k1</span>, <span class="pl-s1">k2</span>, <span class="pl-s1">k3</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">split</span>(<span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-v">PRNGKey</span>(<span class="pl-c1">0</span>), <span class="pl-c1">4</span>)
<span class="pl-v">J</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">uniform</span>(<span class="pl-s1">k0</span>, <span class="pl-s1">shape</span><span class="pl-c1">=</span>(<span class="pl-s1">n</span>,<span class="pl-s1">d</span>)) <span class="pl-c1">+</span> <span class="pl-c1">1j</span> <span class="pl-c1">*</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">uniform</span>(<span class="pl-s1">k1</span>, <span class="pl-s1">shape</span><span class="pl-c1">=</span>(<span class="pl-s1">n</span>,<span class="pl-s1">d</span>))
<span class="pl-s1">v</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">uniform</span>(<span class="pl-s1">k2</span>, <span class="pl-s1">shape</span><span class="pl-c1">=</span>(<span class="pl-s1">d</span>,)) <span class="pl-c1">+</span> <span class="pl-c1">1j</span> <span class="pl-c1">*</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">normal</span>(<span class="pl-s1">k3</span>, <span class="pl-s1">shape</span><span class="pl-c1">=</span>(<span class="pl-s1">d</span>,))
<span class="pl-c"># the linar operator</span>
<span class="pl-k">def</span> <span class="pl-en">mv</span>(<span class="pl-v">J</span>, <span class="pl-s1">v</span>):
<span class="pl-k">return</span> <span class="pl-v">J</span>.<span class="pl-v">T</span>.<span class="pl-en">conj</span>()@(<span class="pl-v">J</span>@<span class="pl-s1">v</span>)
<span class="pl-c"># works fine</span>
<span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">scipy</span>.<span class="pl-s1">sparse</span>.<span class="pl-s1">linalg</span>.<span class="pl-en">cg</span>(<span class="pl-en">partial</span>(<span class="pl-s1">mv</span>, <span class="pl-v">J</span>), <span class="pl-s1">v</span>)
<span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">scipy</span>.<span class="pl-s1">sparse</span>.<span class="pl-s1">linalg</span>.<span class="pl-en">gmres</span>(<span class="pl-en">partial</span>(<span class="pl-s1">mv</span>, <span class="pl-v">J</span>), <span class="pl-s1">v</span>, <span class="pl-s1">solve_method</span><span class="pl-c1">=</span><span class="pl-s">'incremental'</span>)
<span class="pl-c"># mv is hermitian, so its transpose is trivial</span>
<span class="pl-k">def</span> <span class="pl-en">mv_transposed</span>(<span class="pl-v">J</span>, <span class="pl-s1">v</span>):
<span class="pl-k">return</span> <span class="pl-en">mv</span>(<span class="pl-v">J</span>, <span class="pl-s1">v</span>.<span class="pl-en">conj</span>()).<span class="pl-en">conj</span>()
<span class="pl-c"># now the operator where the vjp is looping over small batches</span>
<span class="pl-k">def</span> <span class="pl-en">mv_batched</span>(<span class="pl-v">J</span>, <span class="pl-s1">v</span>):
<span class="pl-s1">w</span> <span class="pl-c1">=</span> <span class="pl-v">J</span>@<span class="pl-s1">v</span>
<span class="pl-v">J_batched</span> <span class="pl-c1">=</span> <span class="pl-v">J</span>.<span class="pl-en">reshape</span>((<span class="pl-c1">-</span><span class="pl-c1">1</span>, <span class="pl-s1">batchsize</span>)<span class="pl-c1">+</span><span class="pl-v">J</span>.<span class="pl-s1">shape</span>[<span class="pl-c1">1</span>:])
<span class="pl-s1">w_batched</span> <span class="pl-c1">=</span> <span class="pl-s1">w</span>.<span class="pl-en">reshape</span>((<span class="pl-c1">-</span><span class="pl-c1">1</span>, <span class="pl-s1">batchsize</span>)<span class="pl-c1">+</span><span class="pl-s1">w</span>.<span class="pl-s1">shape</span>[<span class="pl-c1">1</span>:])
<span class="pl-v">Jw</span> <span class="pl-c1">=</span> <span class="pl-v">J_batched</span>, <span class="pl-s1">w_batched</span>
<span class="pl-k">def</span> <span class="pl-en">_mv</span>(<span class="pl-v">Jw</span>):
<span class="pl-v">J</span>, <span class="pl-s1">w</span> <span class="pl-c1">=</span> <span class="pl-v">Jw</span>
<span class="pl-k">return</span> (<span class="pl-s1">w</span>.<span class="pl-en">conj</span>() @ <span class="pl-v">J</span>).<span class="pl-en">conj</span>()
<span class="pl-k">def</span> <span class="pl-en">f</span>(<span class="pl-s1">carry</span>, <span class="pl-s1">x</span>):
<span class="pl-k">return</span> <span class="pl-s1">carry</span> <span class="pl-c1">+</span> <span class="pl-en">_mv</span>(<span class="pl-s1">x</span>), <span class="pl-c1">None</span>
<span class="pl-s1">res</span>, <span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">lax</span>.<span class="pl-en">scan</span>(<span class="pl-s1">f</span>, <span class="pl-s1">jnp</span>.<span class="pl-en">zeros_like</span>(<span class="pl-s1">v</span>), <span class="pl-v">Jw</span>, <span class="pl-s1">unroll</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)
<span class="pl-k">return</span> <span class="pl-s1">res</span>
<span class="pl-k">assert</span> <span class="pl-s1">jnp</span>.<span class="pl-en">allclose</span>(<span class="pl-en">mv</span>(<span class="pl-v">J</span>,<span class="pl-s1">v</span>), <span class="pl-en">mv_batched</span>(<span class="pl-v">J</span>,<span class="pl-s1">v</span>))
<span class="pl-k">assert</span> <span class="pl-s1">jnp</span>.<span class="pl-en">allclose</span>(<span class="pl-en">mv_transposed</span>(<span class="pl-v">J</span>,<span class="pl-s1">v</span>), <span class="pl-s1">jax</span>.<span class="pl-en">linear_transpose</span>(<span class="pl-en">partial</span>(<span class="pl-s1">mv</span>, <span class="pl-v">J</span>), <span class="pl-s1">v</span>)(<span class="pl-s1">v</span>)[<span class="pl-c1">0</span>])
<span class="pl-c"># linear_transposing mv_batched gives the error:</span>
<span class="pl-en">print</span>( <span class="pl-s1">jax</span>.<span class="pl-en">linear_transpose</span>(<span class="pl-en">partial</span>(<span class="pl-s1">mv_batched</span>, <span class="pl-v">J</span>), <span class="pl-s1">v</span>)(<span class="pl-s1">v</span>)[<span class="pl-c1">0</span>] )
<span class="pl-c"># goal: use mv_batched with the iterative solvers</span>
<span class="pl-c"># same error:</span>
<span class="pl-c"># print( jax.scipy.sparse.linalg.cg(partial(mv_batched, J), v))</span>
<span class="pl-c"># print( jax.scipy.sparse.linalg.gmres(partial(mv_batched, J), v, solve_method='incremental'))</span></pre></div>
<p dir="auto">And the output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-1-dbeaca6d614d> in <module>
45 # jax.scipy.sparse.linalg.gmres(partial(mv_batched, J), v, solve_method='incremental')
46
---> 47 print( jax.linear_transpose(partial(mv_batched, J), v)(v)[0] )
/usr/local/lib/python3.9/site-packages/jax/api.py in transposed_fun(out_cotangent)
1957 in_cotangents = map(
1958 ad.instantiate_zeros,
-> 1959 ad.backward_pass(jaxpr, consts, dummies, out_cotangents))
1960 return tree_unflatten(in_tree, in_cotangents)
1961
/usr/local/lib/python3.9/site-packages/jax/interpreters/ad.py in backward_pass(jaxpr, consts, primals_in, cotangents_in)
216 params, call_jaxpr, invals, cts_in, cts_in_avals)
217 else:
--> 218 cts_out = get_primitive_transpose(eqn.primitive)(cts_in, *invals,
219 **eqn.params)
220 cts_out = [Zero(v.aval) for v in eqn.invars] if cts_out is Zero else cts_out
/usr/local/lib/python3.9/site-packages/jax/_src/lax/control_flow.py in _scan_transpose(cts, reverse, length, num_consts, num_carry, jaxpr, linear, unroll, *args)
1680 _, eres = split_list(xs, [sum(xs_lin)])
1681 assert not any(ad.is_undefined_primal(r) for r in ires)
-> 1682 assert not any(ad.is_undefined_primal(r) for r in eres)
1683
1684 carry_avals, y_avals = split_list(jaxpr.out_avals, [num_carry])
AssertionError: "><pre class="notranslate"><code class="notranslate">WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-1-dbeaca6d614d> in <module>
45 # jax.scipy.sparse.linalg.gmres(partial(mv_batched, J), v, solve_method='incremental')
46
---> 47 print( jax.linear_transpose(partial(mv_batched, J), v)(v)[0] )
/usr/local/lib/python3.9/site-packages/jax/api.py in transposed_fun(out_cotangent)
1957 in_cotangents = map(
1958 ad.instantiate_zeros,
-> 1959 ad.backward_pass(jaxpr, consts, dummies, out_cotangents))
1960 return tree_unflatten(in_tree, in_cotangents)
1961
/usr/local/lib/python3.9/site-packages/jax/interpreters/ad.py in backward_pass(jaxpr, consts, primals_in, cotangents_in)
216 params, call_jaxpr, invals, cts_in, cts_in_avals)
217 else:
--> 218 cts_out = get_primitive_transpose(eqn.primitive)(cts_in, *invals,
219 **eqn.params)
220 cts_out = [Zero(v.aval) for v in eqn.invars] if cts_out is Zero else cts_out
/usr/local/lib/python3.9/site-packages/jax/_src/lax/control_flow.py in _scan_transpose(cts, reverse, length, num_consts, num_carry, jaxpr, linear, unroll, *args)
1680 _, eres = split_list(xs, [sum(xs_lin)])
1681 assert not any(ad.is_undefined_primal(r) for r in ires)
-> 1682 assert not any(ad.is_undefined_primal(r) for r in eres)
1683
1684 carry_avals, y_avals = split_list(jaxpr.out_avals, [num_carry])
AssertionError:
</code></pre></div>
<p dir="auto">[I thought of just using linear_call, however it's still missing a XLA translation rule so it currently can't be jitted]</p>
<p dir="auto">Please see this more like a feature request for a more universal transpose rule (unless there's a trivial trick to make it transposable which I'm missing; otherwise I would also be happy to have a go at trying to relax the requirement of the linear operator being transposable in the solvers if you point me in the right direction since there are several possible ways to do this).</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: Microsoft Windows [Version 10.0.18362.239]
Windows Terminal version (if applicable): 0.2.1831.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.239]
Windows Terminal version (if applicable): 0.2.1831.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">I edit my settings to add a key binding for <code class="notranslate">newWindow</code> as listed here: <a href="https://github.com/microsoft/terminal/blob/v0.2.1831.0/src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp#L28">https://github.com/microsoft/terminal/blob/v0.2.1831.0/src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp#L28</a></p>
<p dir="auto">This is a sample of the configuration:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" {
"command" : "newWindow",
"keys" :
[
"ctrl+n"
]
}"><pre class="notranslate"><code class="notranslate"> {
"command" : "newWindow",
"keys" :
[
"ctrl+n"
]
}
</code></pre></div>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Upon pressing <code class="notranslate">ctrl+n</code> a new Windows terminal window should be opened.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Nothing happens.</p> | <p dir="auto">It would be great to be able to add MS Exchange Shell to Terminal to manage On-Prem exchange.</p> | 0 |
<p dir="auto">How about having some kind of insert mode , such that screen can be abstracted as text and we can select some text from anywhere?</p>
<p dir="auto">So , say I am doing git pull , it failed throwing error that "error: Your local changes to the following files would be overwritten by merge:"</p>
<p dir="auto">Now I want to get the name of that file I have to use mouse to go up and copy and paste the file name , instead if I have some kind of insert mode , the terminal will behave as text and I can move my cursor up , select and copy relevant line, press some kind of escape sequence and paste the copied text in next command.</p>
<p dir="auto">This is Quick Edit mode / Mark mode in command line</p> | <p dir="auto">This will only be an issue for users in Enterprise environments where there are tight firewall controls.</p>
<p dir="auto">I don't have access to the Windows Store and I downloaded Windows Terminal from the GitHub page. I installed the required runtimes and was able to launch the app, only to be contacted by network security about alerts coming from my PC. After explaining what I was doing, they said they would submit a ticket for a false positive, but in the meantime I cannot use the application at all without triggering more alerts. If someone who is not familiar with my case is on duty, then I get calls again.</p>
<p dir="auto">Rather than having issues like this, it is better if Microsoft approaches a few major security vendors with details about Windows Terminal so that they can work out the kinks in their rules. This would avoid issues when trying to do the product launch next year.</p> | 0 |
<p dir="auto">User can not force refresh data for filter component, it only re-run query and get cached results.</p>
<h4 dir="auto">Screenshots</h4>
<p dir="auto">How about force run query in populate/refresh action?<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/27990562/119396612-edbc1580-bc89-11eb-8e20-0ac3472c67df.png"><img width="563" alt="Screen Shot 2021-05-24 at 12 16 45 PM" src="https://user-images.githubusercontent.com/27990562/119396612-edbc1580-bc89-11eb-8e20-0ac3472c67df.png" style="max-width: 100%;"></a></p>
<h3 dir="auto">Environment</h3>
<p dir="auto">latest master</p>
<h3 dir="auto">Additional context</h3>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/junlincc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/junlincc">@junlincc</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/villebro/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/villebro">@villebro</a></p> | <h2 dir="auto">Screenshot</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/114905957/218428692-528b90c5-707d-4893-a952-625537dedaf3.png"><img src="https://user-images.githubusercontent.com/114905957/218428692-528b90c5-707d-4893-a952-625537dedaf3.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">Description</h2>
<p dir="auto">Hi everyone,<br>
I have a problem that I want to display the cross filter as in the picture above, is there any way?<br>
I tried to turn on that feature in file/Superset/suPerset/config.py.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/114905957/218428132-3717e0ca-8f63-4389-962d-090aed5245b6.png"><img src="https://user-images.githubusercontent.com/114905957/218428132-3717e0ca-8f63-4389-962d-090aed5245b6.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Thank!</p> | 0 |
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">webpack's <code class="notranslate">config.resolve.alias</code> works different for initial landing and navigation. It seems to be ignored when landing on a page but used as expected when navigating to a page (via next/link).</p>
<p dir="auto">Edit: Difference is only observable for files inside <code class="notranslate">node_modules/</code></p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">See <a href="https://github.com/eps1lon/next-webpack-alias#steps-to-reproduce">https://github.com/eps1lon/next-webpack-alias#steps-to-reproduce</a></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">aliases are used for initial landing as well. The idea for the implementation was taken from <a href="https://github.com/zeit/next.js/tree/canary/examples/with-absolute-imports">https://github.com/zeit/next.js/tree/canary/examples/with-absolute-imports</a></p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto">N/A</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Ubuntu 18.04.2 LTS</li>
<li>Browser: Version 75.0.3770.80 (Official Build) (64-bit)</li>
<li>Version of Next.js: 8.1.0 and 9.0.2</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">The use case in the constructed repository is simpler than our actual use case but I believe that config.resolve.alias working differently in some cases is the root cause.</p>
<p dir="auto">We have docs and published packages living in a monorepo. Some of the npm packages used in our docs depend on our packages and want only a single version of our published packages in the docs bundle.</p>
<h2 dir="auto">Debug notes</h2>
<h3 dir="auto">why is resolve.alias ignored?</h3>
<p dir="auto"><code class="notranslate">.next/server/static/BUILD_ID/pages/*</code> uses standard <code class="notranslate">require</code> instead of inlining those modules. The node_modules/ are included via node's <code class="notranslate">require</code> at which point webpack's resolve.alias will no longer be of effect. This may be an issue with chunking? Should probably just disable it for static/BUILD_ID/pages</p>
<h3 dir="auto">fix iteration</h3>
<ul dir="auto">
<li>removing <code class="notranslate">externals</code> from the webpack config fixes the issue. Need to find out why all node_modules should be externals.</li>
</ul> | <p dir="auto">Now some of us ships NPM packages (specially components) written in ES2015 without transpiling them.</p>
<p dir="auto">That's a pretty good thing specially if they are gonna used in a project like Next.js or CRA (which does transpiling). They offer benefits like:</p>
<ul dir="auto">
<li>No need to transpile before shipping to NPM</li>
<li>Get the benefit of Webpack 2's tree-shaking</li>
</ul>
<p dir="auto">But we can't do this now we <a href="https://github.com/zeit/next.js/blob/master/server/build/webpack.js#L166">exclude</a> everything inside node_modules from babel transpiling.</p>
<p dir="auto">So, here's the proposed solution.</p>
<p dir="auto">We have an entry in <code class="notranslate">next.config.js</code> to include modules which needs to go through babel. See:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = {
transpileModules: [
"my-component",
"redux/src"
]
}"><pre class="notranslate"><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">transpileModules</span>: <span class="pl-kos">[</span>
<span class="pl-s">"my-component"</span><span class="pl-kos">,</span>
<span class="pl-s">"redux/src"</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">As it says. (I'm talking about the class-level column attributes that can be used like `.filter(User.name == "bob)" etc.)</p>
<p dir="auto">I suppose there's a logical technical reason for this behaviour, but I think it's still rather unexpected from the perspective of the user. I spent a while tracking down some bugs I was having because of this.</p>
<hr>
<p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/773/orm_attr_testcase.py">orm_attr_testcase.py</a></p> | <p dir="auto">Hello world,</p>
<p dir="auto">we have a middle sized application that is using SQLAlchemy as the ORM. We started in 2011 with SQLAlchemy 0.6 when the declarative mapping style was still a new feature (and there was <a href="https://pypi.org/project/Elixir/" rel="nofollow">Elixir</a> as an alternative).</p>
<p dir="auto">Today we are still struggling with our mapping configuration. As our data model is mostly hierarchic (a version control system in a database) we have problems with circular dependencies.</p>
<p dir="auto">With declarative this would be a non-issue given forward declarations. Also, IDE support would be much better (currently most column accesses are flagged as error given that the descriptors are added by calling the mapper on the existing class). Finally, to work around some issues we have classes that don't have any ORM related stuff in their home modules but a final <code class="notranslate">foo_bar_mapper.py</code> import attaches the mapper for multiple related classes.</p>
<p dir="auto">This really sucks, therefore there have been multiple attempts to convert our code base to use the declarative extension. Some leaf classes have been converted but the core is still stuck.</p>
<p dir="auto">We tried to go from the base classes downwards or from the leaf classes upward in conversion. But incremental conversion has been unsuccessful.</p>
<p dir="auto">Therefore I would really like some guidance in the SQLAlchemy documentation about how to approach converting a non-simple code base from classical to declarative mapping. Are there any success stories to do this in an incremental way?</p>
<p dir="auto">I'd like to help out here but so far all attempts were a dead end wrt. the hard parts.</p>
<p dir="auto">Thanks and greetings,</p>
<p dir="auto">Torsten</p> | 0 |
<p dir="auto">My only complaint about <code class="notranslate">deno test</code> is its lack of detail at the time of executing the tests, specially for big codebases.</p>
<p dir="auto">I understand it's influenced by <code class="notranslate">cargo test</code>, but I argue that a much cleaner way to address this is by telling <strong>what file is being tested</strong> at the time of running the test. Specially since Deno does pattern match when running it's tests instead of looking for them inside the code itself _ a la rust_.</p>
<p dir="auto">This will improve quite a few aspects:</p>
<h3 dir="auto">Shorter test name</h3>
<p dir="auto">Currently for describing tests that handle different things inside the code you would go with this approach:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// server.js
Deno.test(`Server starts correctly`, ...);
Deno.test(`Server serves correct files`, ...);
Deno.test(`Server pauses on event`, ...);
//With the new approach
Deno.test(`Starts correctly`, ...);
Deno.test(`Serves correct files`, ...);
Deno.test(`Pauses on event`, ...);"><pre class="notranslate"><span class="pl-c">// server.js</span>
<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">`Server starts correctly`</span><span class="pl-kos">,</span> ...<span class="pl-kos">)</span><span class="pl-kos">;</span>
<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">`Server serves correct files`</span><span class="pl-kos">,</span> ...<span class="pl-kos">)</span><span class="pl-kos">;</span>
<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">`Server pauses on event`</span><span class="pl-kos">,</span> ...<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">//With the new approach</span>
<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">`Starts correctly`</span><span class="pl-kos">,</span> ...<span class="pl-kos">)</span><span class="pl-kos">;</span>
<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">`Serves correct files`</span><span class="pl-kos">,</span> ...<span class="pl-kos">)</span><span class="pl-kos">;</span>
<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">`Pauses on event`</span><span class="pl-kos">,</span> ...<span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Easier to debug assert errors</h3>
<p dir="auto">The stack trace does it's job, but it's just harder to guess where it's failing following this approach (specially when it fails on multiple tests)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="at assertEquals (file:///home/nicolas/Documents/Programming/deno/std/testing/asserts.ts:196:9)
at file:///home/nicolas/Documents/Programming/deno/std/node/_stream/stream_test.ts:40:3
at async asyncOpSanitizer (deno:cli/rt/40_testing.js:34:7)
at async Object.resourceSanitizer [as fn] (deno:cli/rt/40_testing.js:68:7)
at async TestRunner.[Symbol.asyncIterator] (deno:cli/rt/40_testing.js:240:13)
at async Object.runTests (deno:cli/rt/40_testing.js:317:22)"><pre lang="log" class="notranslate"><code class="notranslate">at assertEquals (file:///home/nicolas/Documents/Programming/deno/std/testing/asserts.ts:196:9)
at file:///home/nicolas/Documents/Programming/deno/std/node/_stream/stream_test.ts:40:3
at async asyncOpSanitizer (deno:cli/rt/40_testing.js:34:7)
at async Object.resourceSanitizer [as fn] (deno:cli/rt/40_testing.js:68:7)
at async TestRunner.[Symbol.asyncIterator] (deno:cli/rt/40_testing.js:240:13)
at async Object.runTests (deno:cli/rt/40_testing.js:317:22)
</code></pre></div>
<p dir="auto">The new approach would be more descriptive in less space</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="running 34 tests
-- stream_test.ts
test Stream to async iterator ... FAILED (5ms)
test Stream to async iterator throws on 'error' emitted ... ok (7ms)
-- async_iterator_test.ts
test Async iterator matches values of Readable ... ok (1ms)
test Async iterator throws on Readable destroyed sync ... ok (7ms)
test Async iterator throws on Readable destroyed async ... ok (5ms)
test Async iterator finishes the iterator when Readable destroyed ... ok (5ms)"><pre lang="log" class="notranslate"><code class="notranslate">running 34 tests
-- stream_test.ts
test Stream to async iterator ... FAILED (5ms)
test Stream to async iterator throws on 'error' emitted ... ok (7ms)
-- async_iterator_test.ts
test Async iterator matches values of Readable ... ok (1ms)
test Async iterator throws on Readable destroyed sync ... ok (7ms)
test Async iterator throws on Readable destroyed async ... ok (5ms)
test Async iterator finishes the iterator when Readable destroyed ... ok (5ms)
</code></pre></div>
<h3 dir="auto">Easier to debug compile errors</h3>
<p dir="auto">Currently a failing compile check would output the following</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno test
Check file:///some_folder/$deno$test.ts
error: TS2790 [ERROR]: The operand of a 'delete' operator must be optional.
delete progress.queued;
~~~~~~~~~~~~~~~
at https://deno.land/[email protected]/testing/bench.ts:323:10"><pre lang="log" class="notranslate"><code class="notranslate">deno test
Check file:///some_folder/$deno$test.ts
error: TS2790 [ERROR]: The operand of a 'delete' operator must be optional.
delete progress.queued;
~~~~~~~~~~~~~~~
at https://deno.land/[email protected]/testing/bench.ts:323:10
</code></pre></div>
<p dir="auto">I guess this is because the files are being checked all together after being matched by the test file pattern, so the main file would be resolved to <code class="notranslate">$deno$test.ts</code> but it makes it really hard to debug which one of the files has a compile error when the error isn't in the file itself. This would be solved as well by executing each file separately.</p>
<p dir="auto">I'm not sure if this would be a breaking change, I'm sure it would involve tons of work though, and the tools like <code class="notranslate">--filter</code> would work differently, so maybe a better approach would be an option to switch between this and the classic approach?</p>
<p dir="auto">Would love to hear your thoughts about this, I really feel like this is needed</p> | <p dir="auto">Currently, all tests from different test file are printed as if they are all from one file. This could be a problem on a large test suite where developer needs to find failed test case/file.</p>
<p dir="auto">In Jest, tests are grouped per file. By default, only file names and names of failed tests are shown.</p>
<h2 dir="auto">Alternative Proposals</h2>
<ol dir="auto">
<li>Show file names alongside test case.</li>
<li>Display a tree of file names and test case. File names are branches, and test cases are leafs.</li>
<li>Create a <code class="notranslate">Deno.testGroup</code> function that acts like <code class="notranslate">describe</code> in Jest, use it in <code class="notranslate">.deno.test.ts</code> to wrap import line of a test file.</li>
<li>Log test file names before execution (similar to <code class="notranslate">cargo test</code>).</li>
</ol> | 1 |
<h3 dir="auto">Bug summary</h3>
<p dir="auto"><code class="notranslate">matplotlib.get_backend()</code> fails with the indicated exception. This method is also executed when the debugger hits a breakpoint, even if not actually using matplotlib. A fix/workaround is included.</p>
<h3 dir="auto">Code for reproduction</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import unittest
class Test(unittest.TestCase):
def test(self): # Debug this test.
pass # Place a breakpoint here.
# Alternatively, without a unit test:
import matplotlib
print(matplotlib.get_backend())"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">unittest</span>
<span class="pl-k">class</span> <span class="pl-v">Test</span>(<span class="pl-s1">unittest</span>.<span class="pl-v">TestCase</span>):
<span class="pl-k">def</span> <span class="pl-en">test</span>(<span class="pl-s1">self</span>): <span class="pl-c"># Debug this test.</span>
<span class="pl-k">pass</span> <span class="pl-c"># Place a breakpoint here.</span>
<span class="pl-c"># Alternatively, without a unit test:</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>
<span class="pl-en">print</span>(<span class="pl-s1">matplotlib</span>.<span class="pl-en">get_backend</span>())</pre></div>
<h3 dir="auto">Actual outcome</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./tests/test_test.py::Test::test Failed with Error: int() argument must be a string, a bytes-like object or a real number, not 'KeyboardModifier'
File "C:\Program Files\Python310\lib\unittest\case.py", line 59, in testPartExecutor
yield
File "C:\Program Files\Python310\lib\unittest\case.py", line 591, in run
self._callTestMethod(testMethod)
File "C:\Program Files\Python310\lib\unittest\case.py", line 549, in _callTestMethod
method()
File "D:\Lasertrimmer\Software\ltsoftware\tests\test_test.py", line 4, in test
pass
File "D:\Lasertrimmer\Software\ltsoftware\tests\test_test.py", line 4, in test
pass
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_frame.py", line 987, in trace_dispatch
self.do_wait_suspend(thread, frame, event, arg)
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_frame.py", line 164, in do_wait_suspend
self._args[0].do_wait_suspend(*args, **kwargs)
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd.py", line 2062, in do_wait_suspend
keep_suspended = self._do_wait_suspend(thread, frame, event, arg, suspend_type, from_this_thread, frames_tracker)
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd.py", line 2085, in _do_wait_suspend
self._activate_gui_if_needed()
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd.py", line 1581, in _activate_gui_if_needed
activate_function()
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd.py", line 1565, in <lambda>
self.mpl_modules_for_patching = {"matplotlib": lambda: activate_matplotlib(do_enable_gui),
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydev_ipython\matplotlibtools.py", line 93, in activate_matplotlib
gui, backend = find_gui_and_backend()
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydev_ipython\matplotlibtools.py", line 45, in find_gui_and_backend
backend = matplotlib.rcParams['backend']
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\__init__.py", line 677, in __getitem__
plt.switch_backend(rcsetup._auto_backend_sentinel)
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\pyplot.py", line 252, in switch_backend
switch_backend(candidate)
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\pyplot.py", line 265, in switch_backend
backend_mod = importlib.import_module(
File "C:\Program Files\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\backends\backend_qtagg.py", line 12, in <module>
from .backend_qt import QtCore, QtGui, _BackendQT, FigureCanvasQT
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\backends\backend_qt.py", line 72, in <module>
_MODIFIER_KEYS = [
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\backends\backend_qt.py", line 73, in <listcomp>
(_to_int(getattr(_enum("QtCore.Qt.KeyboardModifier"), mod)),
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'KeyboardModifier'"><pre class="notranslate"><code class="notranslate">./tests/test_test.py::Test::test Failed with Error: int() argument must be a string, a bytes-like object or a real number, not 'KeyboardModifier'
File "C:\Program Files\Python310\lib\unittest\case.py", line 59, in testPartExecutor
yield
File "C:\Program Files\Python310\lib\unittest\case.py", line 591, in run
self._callTestMethod(testMethod)
File "C:\Program Files\Python310\lib\unittest\case.py", line 549, in _callTestMethod
method()
File "D:\Lasertrimmer\Software\ltsoftware\tests\test_test.py", line 4, in test
pass
File "D:\Lasertrimmer\Software\ltsoftware\tests\test_test.py", line 4, in test
pass
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_frame.py", line 987, in trace_dispatch
self.do_wait_suspend(thread, frame, event, arg)
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_frame.py", line 164, in do_wait_suspend
self._args[0].do_wait_suspend(*args, **kwargs)
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd.py", line 2062, in do_wait_suspend
keep_suspended = self._do_wait_suspend(thread, frame, event, arg, suspend_type, from_this_thread, frames_tracker)
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd.py", line 2085, in _do_wait_suspend
self._activate_gui_if_needed()
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd.py", line 1581, in _activate_gui_if_needed
activate_function()
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd.py", line 1565, in <lambda>
self.mpl_modules_for_patching = {"matplotlib": lambda: activate_matplotlib(do_enable_gui),
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydev_ipython\matplotlibtools.py", line 93, in activate_matplotlib
gui, backend = find_gui_and_backend()
File "c:\Users\laboreng\.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydev_ipython\matplotlibtools.py", line 45, in find_gui_and_backend
backend = matplotlib.rcParams['backend']
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\__init__.py", line 677, in __getitem__
plt.switch_backend(rcsetup._auto_backend_sentinel)
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\pyplot.py", line 252, in switch_backend
switch_backend(candidate)
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\pyplot.py", line 265, in switch_backend
backend_mod = importlib.import_module(
File "C:\Program Files\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\backends\backend_qtagg.py", line 12, in <module>
from .backend_qt import QtCore, QtGui, _BackendQT, FigureCanvasQT
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\backends\backend_qt.py", line 72, in <module>
_MODIFIER_KEYS = [
File "C:\Users\laboreng\AppData\Roaming\Python\Python310\site-packages\matplotlib\backends\backend_qt.py", line 73, in <listcomp>
(_to_int(getattr(_enum("QtCore.Qt.KeyboardModifier"), mod)),
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'KeyboardModifier'
</code></pre></div>
<h3 dir="auto">Expected outcome</h3>
<p dir="auto">VSCode should stay at the breakpoint without raising an exception. The alternative code should print <code class="notranslate">QtAgg</code> without raising an exception.</p>
<h3 dir="auto">Additional information</h3>
<ul dir="auto">
<li>Just running (not debugging) the code does not cause the problem.</li>
<li>Debugging the code when no breakpoint is hit does not cause the problem.</li>
<li><code class="notranslate">matplotlib.get_backend()</code> is called automatically when the debugger hits a breakpoint (even when not actually using matplotlib in the code), which causes the exception.</li>
<li>The issue is probably not triggered if
<ul dir="auto">
<li>explicitly using another backend than PySide6</li>
<li>PyQt6 is installed as well</li>
</ul>
</li>
</ul>
<p dir="auto">On my system, I was able to fix the behaviour as follows:</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--- "a/C:\\Users\\laboreng\\AppData\\Roaming\\Python\\Python310\\site-packages\\matplotlib\\backends\\qt_compat.py"
+++ "b/C:\\Users\\laboreng\\AppData\\Roaming\\Python\\Python310\\site-packages\\matplotlib\\backends\\qt_compat_fix.py"
@@ -141,7 +141,7 @@ if (sys.platform == 'darwin' and
# PyQt6 enum compat helpers.
-_to_int = operator.attrgetter("value") if QT_API == "PyQt6" else int
+_to_int = operator.attrgetter("value") if QT_API in ["PyQt6", "PySide6"] else int
@functools.lru_cache(None)"><pre class="notranslate"><span class="pl-md">--- "a/C:\\Users\\laboreng\\AppData\\Roaming\\Python\\Python310\\site-packages\\matplotlib\\backends\\qt_compat.py"</span>
<span class="pl-mi1">+++ "b/C:\\Users\\laboreng\\AppData\\Roaming\\Python\\Python310\\site-packages\\matplotlib\\backends\\qt_compat_fix.py"</span>
<span class="pl-mdr">@@ -141,7 +141,7 @@</span> if (sys.platform == 'darwin' and
# PyQt6 enum compat helpers.
<span class="pl-md"><span class="pl-md">-</span>_to_int = operator.attrgetter("value") if QT_API == "PyQt6" else int</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>_to_int = operator.attrgetter("value") if QT_API in ["PyQt6", "PySide6"] else int</span>
@functools.lru_cache(None)</pre></div>
<h3 dir="auto">Operating system</h3>
<p dir="auto">Windows 11</p>
<h3 dir="auto">Matplotlib Version</h3>
<p dir="auto">3.6.1</p>
<h3 dir="auto">Matplotlib Backend</h3>
<p dir="auto">QtAgg (code fails without the indicated fix)</p>
<h3 dir="auto">Python version</h3>
<p dir="auto">Python 3.10.8</p>
<h3 dir="auto">Jupyter version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Installation</h3>
<p dir="auto">pip</p> | <h3 dir="auto">Bug summary</h3>
<p dir="auto">Error while importing matplotlib qt backend.</p>
<p dir="auto">The version details are as below<br>
matplotlib: 3.6.1<br>
pyside: 6.4.0<br>
python: 3.9.9</p>
<p dir="auto">on a macOS-M1 machine.</p>
<h3 dir="auto">Code for reproduction</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from matplotlib.backends.backend_qtagg import NavigationToolbar2QT as NavigationToolbar"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">backends</span>.<span class="pl-s1">backend_qtagg</span> <span class="pl-k">import</span> <span class="pl-v">NavigationToolbar2QT</span> <span class="pl-k">as</span> <span class="pl-v">NavigationToolbar</span></pre></div>
<h3 dir="auto">Actual outcome</h3>
<p dir="auto">Traceback (most recent call last):<br>
File "", line 1, in <br>
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/matplotlib/backends/backend_qtagg.py", line 12, in <br>
from .backend_qt import QtCore, QtGui, _BackendQT, FigureCanvasQT<br>
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/matplotlib/backends/backend_qt.py", line 72, in <br>
_MODIFIER_KEYS = [<br>
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/matplotlib/backends/backend_qt.py", line 73, in <br>
(_to_int(getattr(_enum("QtCore.Qt.KeyboardModifier"), mod)),<br>
TypeError: int() argument must be a string, a bytes-like object or a number, not 'KeyboardModifier'</p>
<h3 dir="auto">Expected outcome</h3>
<p dir="auto">No error!</p>
<h3 dir="auto">Additional information</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Operating system</h3>
<p dir="auto">OS/X</p>
<h3 dir="auto">Matplotlib Version</h3>
<p dir="auto">3.6.1</p>
<h3 dir="auto">Matplotlib Backend</h3>
<p dir="auto">MacOSX</p>
<h3 dir="auto">Python version</h3>
<p dir="auto">3.9.9</p>
<h3 dir="auto">Jupyter version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Installation</h3>
<p dir="auto">pip</p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=hikage" rel="nofollow">Gildas Cuisinier</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6250?redirect=false" rel="nofollow">SPR-6250</a></strong> and commented</p>
<p dir="auto">If you use the 'executor' element of the task namespace ( or simply do a new ExecutorBeanDefinitionParser() ), there are an error :</p>
<p dir="auto">Exception in thread "main" java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/ThreadPoolExecutor$AbortPolicy</p>
<p dir="auto">And, even with JDK 6 or 5. But they possess java.util.currurent directly, it should not be any errors.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 M4, 3.0 RC1</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="398097789" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10829" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10829/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10829">#10829</a> Task namespace usage should not require concurrent backport JARs (<em><strong>"duplicates"</strong></em>)</li>
</ul> | <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-7093?redirect=false" rel="nofollow">SPR-7093</a></strong> and commented</p>
<p dir="auto">It would be cool to have <code class="notranslate">ViewResolvers</code> like <code class="notranslate">InternalResourceViewResolver</code> available to be declared via the MVC namespace. I imagine something similar to the <code class="notranslate"><mvc:interceptors /></code> element already present, where you provide either predefined subelements or plain bean definitions. Although one could argue that the benefit is rather limited it completes the picture of configurable MVC components nicely, especially as the order can then be determined explicitly.</p>
<p dir="auto">Maybe one can also ease the use of <code class="notranslate">ContentNegotiatingViewResolver</code> which is not the most approachable class in regards of configuration currently ;).</p>
<p dir="auto">I'll probably provide a draft implementation as patch in a few days.</p>
<hr>
<p dir="auto"><strong>Sub-tasks:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398169903" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/16605" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/16605/hovercard" href="https://github.com/spring-projects/spring-framework/issues/16605">#16605</a> Update documentation with MVC config view resolution examples</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="398151408" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14167" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14167/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14167">#14167</a> Allow configuring view resolution through the MVC Java config (<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="398100856" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11222" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11222/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11222">#11222</a> Add mvc:annotation-driven Tiles Configuration (<em><strong>"supersedes"</strong></em>)</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/dfcc1d7e8c8051004b6a8cd8329eed0f6c71efd2/hovercard" href="https://github.com/spring-projects/spring-framework/commit/dfcc1d7e8c8051004b6a8cd8329eed0f6c71efd2"><tt>dfcc1d7</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/52f1be7ade665a0c6030cff630ce980827b4c304/hovercard" href="https://github.com/spring-projects/spring-framework/commit/52f1be7ade665a0c6030cff630ce980827b4c304"><tt>52f1be7</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/10a4c2cd8140095777343262ba728e51a5f6c873/hovercard" href="https://github.com/spring-projects/spring-framework/commit/10a4c2cd8140095777343262ba728e51a5f6c873"><tt>10a4c2c</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/a26b1ef8d9e95ee636ccfb4cbc26b5afc8812f24/hovercard" href="https://github.com/spring-projects/spring-framework/commit/a26b1ef8d9e95ee636ccfb4cbc26b5afc8812f24"><tt>a26b1ef</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/5e1a5c8d5182e04acd35ebeb5dee098104439c1d/hovercard" href="https://github.com/spring-projects/spring-framework/commit/5e1a5c8d5182e04acd35ebeb5dee098104439c1d"><tt>5e1a5c8</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/f54cee47b06c041c5c976ce23fc2079d70fad404/hovercard" href="https://github.com/spring-projects/spring-framework/commit/f54cee47b06c041c5c976ce23fc2079d70fad404"><tt>f54cee4</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/92402e7715fc1dfdf4cba8eb00e1fc787d434bcf/hovercard" href="https://github.com/spring-projects/spring-framework/commit/92402e7715fc1dfdf4cba8eb00e1fc787d434bcf"><tt>92402e7</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/5bc793768cb3d5a584e10175fe73ea5baa8e372a/hovercard" href="https://github.com/spring-projects/spring-framework/commit/5bc793768cb3d5a584e10175fe73ea5baa8e372a"><tt>5bc7937</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/cc7e8f55583b91c29dc1375160d7f7d2403590ff/hovercard" href="https://github.com/spring-projects/spring-framework/commit/cc7e8f55583b91c29dc1375160d7f7d2403590ff"><tt>cc7e8f5</tt></a></p>
<p dir="auto">2 votes, 7 watchers</p> | 0 |
<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>
</ul>
<p dir="auto">I've been trying to build jaxlib v.0.3.10 from source on a new cluster with cuda 11.3.1 and cudnn 8.2.1 but it seems<br>
to be that the bazel builder is having issues with fetching <code class="notranslate">llvm-raw</code> as its returning an input/output error.</p>
<ul dir="auto">
<li>Operating system RHEL 8</li>
<li>CUDA version 11.3.1</li>
<li>cuDNN version 8.2.1.32</li>
<li>Python version 3.9.5</li>
<li>compiler GCC 10.3.0</li>
</ul>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ git clone https://github.com/google/jax
$ cd jax
$ python build/build.py --enable_cuda --enable_nccl --cuda_path='/usr/local/easybuild/software/CUDA/11.3.1/' --cudnn_path='/usr/local/easybuild/software/cuDNN/8.2.1.32-CUDA-11.3.1/' --cuda_version='11.3' --cudnn_version='8.2.1' --target_cpu_features='native'"><pre class="notranslate">$ git clone https://github.com/google/jax
$ <span class="pl-c1">cd</span> jax
$ python build/build.py --enable_cuda --enable_nccl --cuda_path=<span class="pl-s"><span class="pl-pds">'</span>/usr/local/easybuild/software/CUDA/11.3.1/<span class="pl-pds">'</span></span> --cudnn_path=<span class="pl-s"><span class="pl-pds">'</span>/usr/local/easybuild/software/cuDNN/8.2.1.32-CUDA-11.3.1/<span class="pl-pds">'</span></span> --cuda_version=<span class="pl-s"><span class="pl-pds">'</span>11.3<span class="pl-pds">'</span></span> --cudnn_version=<span class="pl-s"><span class="pl-pds">'</span>8.2.1<span class="pl-pds">'</span></span> --target_cpu_features=<span class="pl-s"><span class="pl-pds">'</span>native<span class="pl-pds">'</span></span></pre></div>
<ul class="contains-task-list">
<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>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" _ _ __ __
| | / \ \ \/ /
_ | |/ _ \ \ /
| |_| / ___ \/ \
\___/_/ \/_/\_\
Bazel binary path: ./bazel-5.1.1-linux-x86_64
Bazel version: 5.1.1
Python binary path: /usr/local/easybuild/software/Python/3.9.5-GCCcore-10.3.0/bin/python
Python version: 3.9
NumPy version: 1.21.0
MKL-DNN enabled: yes
Target CPU: x86_64
Target CPU features: native
CUDA enabled: yes
CUDA toolkit path: /usr/local/easybuild/software/CUDA/11.3.1/
CUDNN library path: /usr/local/easybuild/software/cuDNN/8.2.1.32-CUDA-11.3.1/
CUDA version: 11.3
CUDNN version: 8.2.1
NCCL enabled: yes
TPU enabled: no
ROCm enabled: no
Building XLA and installing it in the jaxlib source tree...
./bazel-5.1.1-linux-x86_64 run --verbose_failures=true --config=native_arch_posix --config=mkl_open_source_only --config=cuda :build_wheel -- --output_path=/home/oxg34/user_modules/jax_0.3.10/jax/dist --cpu=x86_64
Starting local Bazel server and connecting to it...
INFO: Options provided by the client:
Inherited 'common' options: --isatty=0 --terminal_columns=80
INFO: Reading rc options for 'run' from /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc:
Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'run' from /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc:
Inherited 'build' options: --apple_platform_type=macos --macos_minimum_os=10.9 --announce_rc --define open_source_build=true --spawn_strategy=standalone --enable_platform_specific_config --experimental_cc_shared_library --define=no_aws_support=true --define=no_gcp_support=true --define=no_hdfs_support=true --define=no_kafka_support=true --define=no_ignite_support=true --define=grpc_no_ares=true -c opt --config=short_logs --copt=-DMLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir.
INFO: Reading rc options for 'run' from /home/oxg34/user_modules/jax_0.3.10/jax/.jax_configure.bazelrc:
Inherited 'build' options: --strategy=Genrule=standalone --repo_env PYTHON_BIN_PATH=/usr/local/easybuild/software/Python/3.9.5-GCCcore-10.3.0/bin/python --action_env=PYENV_ROOT --python_path=/usr/local/easybuild/software/Python/3.9.5-GCCcore-10.3.0/bin/python --action_env CUDA_TOOLKIT_PATH=/usr/local/easybuild/software/CUDA/11.3.1/ --action_env CUDNN_INSTALL_PATH=/usr/local/easybuild/software/cuDNN/8.2.1.32-CUDA-11.3.1/ --action_env TF_CUDA_PATHS=/usr/local/easybuild/software/CUDA/11.3.1/,/usr/local/easybuild/software/cuDNN/8.2.1.32-CUDA-11.3.1/ --action_env TF_CUDA_VERSION=11.3 --action_env TF_CUDNN_VERSION=8.2.1 --distinct_host_configuration=false
INFO: Found applicable config definition build:short_logs in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:native_arch_posix in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --copt=-march=native --host_copt=-march=native
INFO: Found applicable config definition build:mkl_open_source_only in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --define=tensorflow_mkldnn_contraction_kernel=1
INFO: Found applicable config definition build:cuda in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
INFO: Found applicable config definition build:linux in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --config=posix --copt=-Wno-stringop-truncation --copt=-Wno-array-parameter
INFO: Found applicable config definition build:posix in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --copt=-fvisibility=hidden --copt=-Wno-sign-compare --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: in <toplevel>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: in workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: in repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: in <toplevel>
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: in <toplevel>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: in workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: in repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'llvm-raw':
Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: in <toplevel>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: in workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: in repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'llvm-raw':
Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: in <toplevel>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: in workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: in repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'llvm-raw':
Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: in <toplevel>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: in workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: in repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'llvm-raw':
Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: in <toplevel>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: in workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: in repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'llvm-raw':
Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
ERROR: @local_config_cuda//:enable_cuda :: Error loading option @local_config_cuda//:enable_cuda: no such package '@llvm-raw//utils/bazel': java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: in <toplevel>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: in workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: in repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'llvm-raw':
Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
ERROR: @local_config_cuda//:enable_cuda :: Error loading option @local_config_cuda//:enable_cuda: no such package '@llvm-raw//utils/bazel': java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
write (Input/output error)
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: in <toplevel>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: in workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: in repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'llvm-raw':
Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
ERROR: @local_config_cuda//:enable_cuda :: Error loading option @local_config_cuda//:enable_cuda: no such package '@llvm-raw//utils/bazel': java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
write (Input/output error)
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: in <toplevel>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: in workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: in repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'llvm-raw':
Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
ERROR: @local_config_cuda//:enable_cuda :: Error loading option @local_config_cuda//:enable_cuda: no such package '@llvm-raw//utils/bazel': java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
write (Input/output error)
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: in <toplevel>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: in workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: in repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'llvm-raw':
Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File "/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl", line 64, column 33, in _tf_http_archive_impl
ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda in file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
ERROR: @local_config_cuda//:enable_cuda :: Error loading option @local_config_cuda//:enable_cuda: no such package '@llvm-raw//utils/bazel': java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
write (Input/output error)
b''
Traceback (most recent call last):
File "/home/oxg34/user_modules/jax_0.3.10/jax/build/build.py", line 528, in <module>
main()
File "/home/oxg34/user_modules/jax_0.3.10/jax/build/build.py", line 523, in main
shell(command)
File "/home/oxg34/user_modules/jax_0.3.10/jax/build/build.py", line 53, in shell
output = subprocess.check_output(cmd)
File "/usr/local/easybuild/software/Python/3.9.5-GCCcore-10.3.0/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/easybuild/software/Python/3.9.5-GCCcore-10.3.0/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['./bazel-5.1.1-linux-x86_64', 'run', '--verbose_failures=true', '--config=native_arch_posix', '--config=mkl_open_source_only', '--config=cuda', ':build_wheel', '--', '--output_path=/home/oxg34/user_modules/jax_0.3.10/jax/dist', '--cpu=x86_64']' returned non-zero exit status 2."><pre class="notranslate"> _ _ __ __
<span class="pl-k">|</span> <span class="pl-k">|</span> / <span class="pl-cce">\ \ \/</span> /
_ <span class="pl-k">|</span> <span class="pl-k">|</span>/ _ <span class="pl-cce">\ \ </span> /
<span class="pl-k">|</span> <span class="pl-k">|</span>_<span class="pl-k">|</span> / ___ <span class="pl-cce">\/</span> \
<span class="pl-cce">\_</span>__/_/ <span class="pl-cce">\/</span>_/<span class="pl-cce">\_</span>\
Bazel binary path: ./bazel-5.1.1-linux-x86_64
Bazel version: 5.1.1
Python binary path: /usr/local/easybuild/software/Python/3.9.5-GCCcore-10.3.0/bin/python
Python version: 3.9
NumPy version: 1.21.0
MKL-DNN enabled: yes
Target CPU: x86_64
Target CPU features: native
CUDA enabled: yes
CUDA toolkit path: /usr/local/easybuild/software/CUDA/11.3.1/
CUDNN library path: /usr/local/easybuild/software/cuDNN/8.2.1.32-CUDA-11.3.1/
CUDA version: 11.3
CUDNN version: 8.2.1
NCCL enabled: yes
TPU enabled: no
ROCm enabled: no
Building XLA and installing it <span class="pl-k">in</span> the jaxlib <span class="pl-c1">source</span> tree...
./bazel-5.1.1-linux-x86_64 run --verbose_failures=true --config=native_arch_posix --config=mkl_open_source_only --config=cuda :build_wheel -- --output_path=/home/oxg34/user_modules/jax_0.3.10/jax/dist --cpu=x86_64
Starting <span class="pl-k">local</span> Bazel server and connecting to it...
INFO: Options provided by the client:
Inherited <span class="pl-s"><span class="pl-pds">'</span>common<span class="pl-pds">'</span></span> options: --isatty=0 --terminal_columns=80
INFO: Reading rc options <span class="pl-k">for</span> <span class="pl-s"><span class="pl-pds">'</span>run<span class="pl-pds">'</span></span> from /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc:
Inherited <span class="pl-s"><span class="pl-pds">'</span>common<span class="pl-pds">'</span></span> options: --experimental_repo_remote_exec
INFO: Reading rc options <span class="pl-k">for</span> <span class="pl-s"><span class="pl-pds">'</span>run<span class="pl-pds">'</span></span> from /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc:
Inherited <span class="pl-s"><span class="pl-pds">'</span>build<span class="pl-pds">'</span></span> options: --apple_platform_type=macos --macos_minimum_os=10.9 --announce_rc --define open_source_build=true --spawn_strategy=standalone --enable_platform_specific_config --experimental_cc_shared_library --define=no_aws_support=true --define=no_gcp_support=true --define=no_hdfs_support=true --define=no_kafka_support=true --define=no_ignite_support=true --define=grpc_no_ares=true -c opt --config=short_logs --copt=-DMLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir.
INFO: Reading rc options <span class="pl-k">for</span> <span class="pl-s"><span class="pl-pds">'</span>run<span class="pl-pds">'</span></span> from /home/oxg34/user_modules/jax_0.3.10/jax/.jax_configure.bazelrc:
Inherited <span class="pl-s"><span class="pl-pds">'</span>build<span class="pl-pds">'</span></span> options: --strategy=Genrule=standalone --repo_env PYTHON_BIN_PATH=/usr/local/easybuild/software/Python/3.9.5-GCCcore-10.3.0/bin/python --action_env=PYENV_ROOT --python_path=/usr/local/easybuild/software/Python/3.9.5-GCCcore-10.3.0/bin/python --action_env CUDA_TOOLKIT_PATH=/usr/local/easybuild/software/CUDA/11.3.1/ --action_env CUDNN_INSTALL_PATH=/usr/local/easybuild/software/cuDNN/8.2.1.32-CUDA-11.3.1/ --action_env TF_CUDA_PATHS=/usr/local/easybuild/software/CUDA/11.3.1/,/usr/local/easybuild/software/cuDNN/8.2.1.32-CUDA-11.3.1/ --action_env TF_CUDA_VERSION=11.3 --action_env TF_CUDNN_VERSION=8.2.1 --distinct_host_configuration=false
INFO: Found applicable config definition build:short_logs <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:native_arch_posix <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --copt=-march=native --host_copt=-march=native
INFO: Found applicable config definition build:mkl_open_source_only <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --define=tensorflow_mkldnn_contraction_kernel=1
INFO: Found applicable config definition build:cuda <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
INFO: Found applicable config definition build:linux <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --config=posix --copt=-Wno-stringop-truncation --copt=-Wno-array-parameter
INFO: Found applicable config definition build:posix <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --copt=-fvisibility=hidden --copt=-Wno-sign-compare --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: <span class="pl-k">in</span> workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: <span class="pl-k">in</span> repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: <span class="pl-k">in</span> tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: <span class="pl-k">in</span> workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: <span class="pl-k">in</span> repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: <span class="pl-k">in</span> tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
ERROR: An error occurred during the fetch of repository <span class="pl-s"><span class="pl-pds">'</span>llvm-raw<span class="pl-pds">'</span></span>:
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: <span class="pl-k">in</span> workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: <span class="pl-k">in</span> repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: <span class="pl-k">in</span> tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
ERROR: An error occurred during the fetch of repository <span class="pl-s"><span class="pl-pds">'</span>llvm-raw<span class="pl-pds">'</span></span>:
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: <span class="pl-k">in</span> workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: <span class="pl-k">in</span> repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: <span class="pl-k">in</span> tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
ERROR: An error occurred during the fetch of repository <span class="pl-s"><span class="pl-pds">'</span>llvm-raw<span class="pl-pds">'</span></span>:
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: <span class="pl-k">in</span> workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: <span class="pl-k">in</span> repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: <span class="pl-k">in</span> tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
ERROR: An error occurred during the fetch of repository <span class="pl-s"><span class="pl-pds">'</span>llvm-raw<span class="pl-pds">'</span></span>:
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: <span class="pl-k">in</span> workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: <span class="pl-k">in</span> repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: <span class="pl-k">in</span> tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
ERROR: An error occurred during the fetch of repository <span class="pl-s"><span class="pl-pds">'</span>llvm-raw<span class="pl-pds">'</span></span>:
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
ERROR: @local_config_cuda//:enable_cuda :: Error loading option @local_config_cuda//:enable_cuda: no such package <span class="pl-s"><span class="pl-pds">'</span>@llvm-raw//utils/bazel<span class="pl-pds">'</span></span>: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: <span class="pl-k">in</span> workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: <span class="pl-k">in</span> repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: <span class="pl-k">in</span> tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
ERROR: An error occurred during the fetch of repository <span class="pl-s"><span class="pl-pds">'</span>llvm-raw<span class="pl-pds">'</span></span>:
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
ERROR: @local_config_cuda//:enable_cuda :: Error loading option @local_config_cuda//:enable_cuda: no such package <span class="pl-s"><span class="pl-pds">'</span>@llvm-raw//utils/bazel<span class="pl-pds">'</span></span>: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
write (Input/output error)
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: <span class="pl-k">in</span> workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: <span class="pl-k">in</span> repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: <span class="pl-k">in</span> tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
ERROR: An error occurred during the fetch of repository <span class="pl-s"><span class="pl-pds">'</span>llvm-raw<span class="pl-pds">'</span></span>:
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
ERROR: @local_config_cuda//:enable_cuda :: Error loading option @local_config_cuda//:enable_cuda: no such package <span class="pl-s"><span class="pl-pds">'</span>@llvm-raw//utils/bazel<span class="pl-pds">'</span></span>: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
write (Input/output error)
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: <span class="pl-k">in</span> workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: <span class="pl-k">in</span> repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: <span class="pl-k">in</span> tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
ERROR: An error occurred during the fetch of repository <span class="pl-s"><span class="pl-pds">'</span>llvm-raw<span class="pl-pds">'</span></span>:
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
ERROR: @local_config_cuda//:enable_cuda :: Error loading option @local_config_cuda//:enable_cuda: no such package <span class="pl-s"><span class="pl-pds">'</span>@llvm-raw//utils/bazel<span class="pl-pds">'</span></span>: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
write (Input/output error)
INFO: Repository llvm-raw instantiated at:
/home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/tensorflow/workspace3.bzl:32:9: <span class="pl-k">in</span> workspace
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/llvm/workspace.bzl:10:20: <span class="pl-k">in</span> repo
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:128:21: <span class="pl-k">in</span> tf_http_archive
Repository rule _tf_http_archive defined at:
/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl:81:35: <span class="pl-k">in</span> <span class="pl-k"><</span>toplevel<span class="pl-k">></span>
ERROR: An error occurred during the fetch of repository <span class="pl-s"><span class="pl-pds">'</span>llvm-raw<span class="pl-pds">'</span></span>:
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
ERROR: /home/oxg34/user_modules/jax_0.3.10/jax/WORKSPACE:28:14: fetching _tf_http_archive rule //external:llvm-raw: Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/org_tensorflow/third_party/repo.bzl<span class="pl-pds">"</span></span>, line 64, column 33, <span class="pl-k">in</span> _tf_http_archive_impl
ctx.download_and_extract(
Error <span class="pl-k">in</span> download_and_extract: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
INFO: Found applicable config definition build:cuda <span class="pl-k">in</span> file /home/oxg34/user_modules/jax_0.3.10/jax/.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_52,sm_60,sm_70,compute_80 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
write (Input/output error)
ERROR: @local_config_cuda//:enable_cuda :: Error loading option @local_config_cuda//:enable_cuda: no such package <span class="pl-s"><span class="pl-pds">'</span>@llvm-raw//utils/bazel<span class="pl-pds">'</span></span>: java.io.IOException: Error extracting /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076/e2ed3fd71e08ac50ca326c79f31247e7e4a16b7b.tar.gz to /home/oxg34/.cache/bazel/_bazel_oxg34/6b511a965134ca496153611be50e71ba/external/llvm-raw/temp11546401468023270076: Input/output error
write (Input/output error)
b<span class="pl-s"><span class="pl-pds">'</span><span class="pl-pds">'</span></span>
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/user_modules/jax_0.3.10/jax/build/build.py<span class="pl-pds">"</span></span>, line 528, <span class="pl-k">in</span> <span class="pl-k"><</span>module<span class="pl-k">></span>
<span class="pl-en">main</span>()
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/user_modules/jax_0.3.10/jax/build/build.py<span class="pl-pds">"</span></span>, line 523, <span class="pl-k">in</span> main
shell(command)
File <span class="pl-s"><span class="pl-pds">"</span>/home/oxg34/user_modules/jax_0.3.10/jax/build/build.py<span class="pl-pds">"</span></span>, line 53, <span class="pl-k">in</span> shell
output = subprocess.check_output(cmd)
File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/easybuild/software/Python/3.9.5-GCCcore-10.3.0/lib/python3.9/subprocess.py<span class="pl-pds">"</span></span>, line 424, <span class="pl-k">in</span> check_output
<span class="pl-k">return</span> run(<span class="pl-k">*</span>popenargs, stdout=PIPE, timeout=timeout, check=True,
File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/easybuild/software/Python/3.9.5-GCCcore-10.3.0/lib/python3.9/subprocess.py<span class="pl-pds">"</span></span>, line 528, <span class="pl-k">in</span> run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command <span class="pl-s"><span class="pl-pds">'</span>[<span class="pl-pds">'</span></span>./bazel-5.1.1-linux-x86_64<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>run<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>--verbose_failures=true<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>--config=native_arch_posix<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>--config=mkl_open_source_only<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>--config=cuda<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>:build_wheel<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>--<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>--output_path=/home/oxg34/user_modules/jax_0.3.10/jax/dist<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>--cpu=x86_64<span class="pl-s"><span class="pl-pds">'</span>]<span class="pl-pds">'</span></span> returned non-zero <span class="pl-c1">exit</span> status 2.</pre></div> | <p dir="auto">Implement <a href="https://numpy.org/doc/stable/reference/generated/numpy.partition.html" rel="nofollow">numpy.partition</a> and <a href="https://numpy.org/doc/stable/reference/generated/numpy.argpartition.html" rel="nofollow">numpy.argpartition</a> (currently <a href="https://jax.readthedocs.io/en/latest/jax.numpy.html#jaxlib.xla_extension.DeviceArray.argpartition" rel="nofollow">in the docs</a> but unimplemented). Among other things, this allows for efficient computation of <a href="https://en.wikipedia.org/wiki/Order_statistics" rel="nofollow">order statistics</a> (see <a href="https://en.wikipedia.org/wiki/Selection_algorithm" rel="nofollow">selection algorithms</a>) without having to sort the entire array:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
from timeit import default_timer
def order1(a, k, axis=-1):
return np.partition(a, k, axis).take(k, axis)
def order2(a, k, axis=-1):
return np.sort(a, axis).take(k, axis)
def test_order(shape, axis):
a = np.random.rand(*shape)
k = np.random.randint(shape[axis])
start = default_timer()
ans1 = order1(a, k, axis)
print('partition-based: {:g} seconds'.format(default_timer() - start))
start = default_timer()
ans2 = order2(a, k, axis)
print('sort-based: {:g} seconds'.format(default_timer() - start))
assert np.array_equal(ans1, ans2)
for shape in [(10**7,), (10**4, 10**3), (10**3, 10**2, 10**2)]:
for axis in range(len(shape)):
print()
test_order(shape, axis)"><pre class="notranslate"><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-k">from</span> <span class="pl-s1">timeit</span> <span class="pl-k">import</span> <span class="pl-s1">default_timer</span>
<span class="pl-k">def</span> <span class="pl-en">order1</span>(<span class="pl-s1">a</span>, <span class="pl-s1">k</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">return</span> <span class="pl-s1">np</span>.<span class="pl-en">partition</span>(<span class="pl-s1">a</span>, <span class="pl-s1">k</span>, <span class="pl-s1">axis</span>).<span class="pl-en">take</span>(<span class="pl-s1">k</span>, <span class="pl-s1">axis</span>)
<span class="pl-k">def</span> <span class="pl-en">order2</span>(<span class="pl-s1">a</span>, <span class="pl-s1">k</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">return</span> <span class="pl-s1">np</span>.<span class="pl-en">sort</span>(<span class="pl-s1">a</span>, <span class="pl-s1">axis</span>).<span class="pl-en">take</span>(<span class="pl-s1">k</span>, <span class="pl-s1">axis</span>)
<span class="pl-k">def</span> <span class="pl-en">test_order</span>(<span class="pl-s1">shape</span>, <span class="pl-s1">axis</span>):
<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">*</span><span class="pl-s1">shape</span>)
<span class="pl-s1">k</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-s1">shape</span>[<span class="pl-s1">axis</span>])
<span class="pl-s1">start</span> <span class="pl-c1">=</span> <span class="pl-en">default_timer</span>()
<span class="pl-s1">ans1</span> <span class="pl-c1">=</span> <span class="pl-en">order1</span>(<span class="pl-s1">a</span>, <span class="pl-s1">k</span>, <span class="pl-s1">axis</span>)
<span class="pl-en">print</span>(<span class="pl-s">'partition-based: {:g} seconds'</span>.<span class="pl-en">format</span>(<span class="pl-en">default_timer</span>() <span class="pl-c1">-</span> <span class="pl-s1">start</span>))
<span class="pl-s1">start</span> <span class="pl-c1">=</span> <span class="pl-en">default_timer</span>()
<span class="pl-s1">ans2</span> <span class="pl-c1">=</span> <span class="pl-en">order2</span>(<span class="pl-s1">a</span>, <span class="pl-s1">k</span>, <span class="pl-s1">axis</span>)
<span class="pl-en">print</span>(<span class="pl-s">'sort-based: {:g} seconds'</span>.<span class="pl-en">format</span>(<span class="pl-en">default_timer</span>() <span class="pl-c1">-</span> <span class="pl-s1">start</span>))
<span class="pl-k">assert</span> <span class="pl-s1">np</span>.<span class="pl-en">array_equal</span>(<span class="pl-s1">ans1</span>, <span class="pl-s1">ans2</span>)
<span class="pl-k">for</span> <span class="pl-s1">shape</span> <span class="pl-c1">in</span> [(<span class="pl-c1">10</span><span class="pl-c1">**</span><span class="pl-c1">7</span>,), (<span class="pl-c1">10</span><span class="pl-c1">**</span><span class="pl-c1">4</span>, <span class="pl-c1">10</span><span class="pl-c1">**</span><span class="pl-c1">3</span>), (<span class="pl-c1">10</span><span class="pl-c1">**</span><span class="pl-c1">3</span>, <span class="pl-c1">10</span><span class="pl-c1">**</span><span class="pl-c1">2</span>, <span class="pl-c1">10</span><span class="pl-c1">**</span><span class="pl-c1">2</span>)]:
<span class="pl-k">for</span> <span class="pl-s1">axis</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-en">len</span>(<span class="pl-s1">shape</span>)):
<span class="pl-en">print</span>()
<span class="pl-en">test_order</span>(<span class="pl-s1">shape</span>, <span class="pl-s1">axis</span>)</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="partition-based: 0.12672 seconds
sort-based: 0.878069 seconds
partition-based: 0.300224 seconds
sort-based: 0.679816 seconds
partition-based: 0.0932873 seconds
sort-based: 0.38649 seconds
partition-based: 0.16949 seconds
sort-based: 0.445229 seconds
partition-based: 0.134436 seconds
sort-based: 0.273936 seconds
partition-based: 0.130433 seconds
sort-based: 0.260393 seconds"><pre class="notranslate"><code class="notranslate">partition-based: 0.12672 seconds
sort-based: 0.878069 seconds
partition-based: 0.300224 seconds
sort-based: 0.679816 seconds
partition-based: 0.0932873 seconds
sort-based: 0.38649 seconds
partition-based: 0.16949 seconds
sort-based: 0.445229 seconds
partition-based: 0.134436 seconds
sort-based: 0.273936 seconds
partition-based: 0.130433 seconds
sort-based: 0.260393 seconds
</code></pre></div> | 0 |
<p dir="auto">Running Celery with MongoDB as broker and results backend we're seeing these errors happening regularly:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2012-09-07 21:15:25,643: ERROR/MainProcess] Consumer: Connection to broker lost. Trying to re-establish the connection...
Traceback (most recent call last):
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/consumer.py", line 369, in start
self.consume_messages()
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/consumer.py", line 842, in consume_messages
self.connection.drain_events(timeout=10.0)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/connection.py", line 197, in drain_events
return self.transport.drain_events(self.connection, **kwargs)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/__init__.py", line 743, in drain_events
item, channel = get(timeout=timeout)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/scheduling.py", line 42, in get
return self.fun(resource, **kwargs), resource
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/__init__.py", line 763, in _drain_channel
return channel.drain_events(timeout=timeout)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/__init__.py", line 560, in drain_events
return self._poll(self.cycle, timeout=timeout)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/__init__.py", line 290, in _poll
return cycle.get()
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/scheduling.py", line 42, in get
return self.fun(resource, **kwargs), resource
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/mongodb.py", line 52, in _get
msg = self._queue_cursors[queue].next()
File "/mnt/nimble/eggs/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 703, in next
if len(self.__data) or self._refresh():
File "/mnt/nimble/eggs/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 679, in _refresh
limit, self.__id))
File "/mnt/nimble/eggs/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 628, in __send_message
self.__tz_aware)
File "/mnt/nimble/eggs/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/helpers.py", line 95, in _unpack_response
cursor_id)
OperationFailure: cursor id '1323433598770136089' not valid at server
[2012-09-07 21:15:25,703: ERROR/MainProcess] Unrecoverable error: KeyError('ip-10-248-69-149.celery.pidbox',)
Traceback (most recent call last):
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/__init__.py", line 353, in start
component.start()
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/consumer.py", line 368, in start
self.reset_connection()
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/consumer.py", line 712, in reset_connection
self.reset_pidbox_node()
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/consumer.py", line 656, in reset_pidbox_node
callback=self.on_control)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/pidbox.py", line 68, in listen
callbacks=[callback or self.handle_message])
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/pidbox.py", line 59, in Consumer
**options)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/messaging.py", line 285, in __init__
self.revive(self.channel)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/messaging.py", line 297, in revive
self.declare()
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/messaging.py", line 307, in declare
queue.declare()
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/entity.py", line 387, in declare
self.queue_declare(nowait, passive=False)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/entity.py", line 409, in queue_declare
nowait=nowait)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/__init__.py", line 401, in queue_declare
return queue, self._size(queue), 0
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/mongodb.py", line 73, in _size
return (self._queue_cursors[queue].count() -
KeyError: 'ip-10-248-69-149.celery.pidbox'"><pre class="notranslate"><code class="notranslate">[2012-09-07 21:15:25,643: ERROR/MainProcess] Consumer: Connection to broker lost. Trying to re-establish the connection...
Traceback (most recent call last):
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/consumer.py", line 369, in start
self.consume_messages()
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/consumer.py", line 842, in consume_messages
self.connection.drain_events(timeout=10.0)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/connection.py", line 197, in drain_events
return self.transport.drain_events(self.connection, **kwargs)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/__init__.py", line 743, in drain_events
item, channel = get(timeout=timeout)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/scheduling.py", line 42, in get
return self.fun(resource, **kwargs), resource
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/__init__.py", line 763, in _drain_channel
return channel.drain_events(timeout=timeout)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/__init__.py", line 560, in drain_events
return self._poll(self.cycle, timeout=timeout)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/__init__.py", line 290, in _poll
return cycle.get()
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/scheduling.py", line 42, in get
return self.fun(resource, **kwargs), resource
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/mongodb.py", line 52, in _get
msg = self._queue_cursors[queue].next()
File "/mnt/nimble/eggs/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 703, in next
if len(self.__data) or self._refresh():
File "/mnt/nimble/eggs/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 679, in _refresh
limit, self.__id))
File "/mnt/nimble/eggs/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 628, in __send_message
self.__tz_aware)
File "/mnt/nimble/eggs/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/helpers.py", line 95, in _unpack_response
cursor_id)
OperationFailure: cursor id '1323433598770136089' not valid at server
[2012-09-07 21:15:25,703: ERROR/MainProcess] Unrecoverable error: KeyError('ip-10-248-69-149.celery.pidbox',)
Traceback (most recent call last):
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/__init__.py", line 353, in start
component.start()
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/consumer.py", line 368, in start
self.reset_connection()
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/consumer.py", line 712, in reset_connection
self.reset_pidbox_node()
File "/mnt/nimble/eggs/celery-3.0.9-py2.7.egg/celery/worker/consumer.py", line 656, in reset_pidbox_node
callback=self.on_control)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/pidbox.py", line 68, in listen
callbacks=[callback or self.handle_message])
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/pidbox.py", line 59, in Consumer
**options)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/messaging.py", line 285, in __init__
self.revive(self.channel)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/messaging.py", line 297, in revive
self.declare()
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/messaging.py", line 307, in declare
queue.declare()
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/entity.py", line 387, in declare
self.queue_declare(nowait, passive=False)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/entity.py", line 409, in queue_declare
nowait=nowait)
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/virtual/__init__.py", line 401, in queue_declare
return queue, self._size(queue), 0
File "/mnt/nimble/eggs/kombu-2.4.5-py2.7.egg/kombu/transport/mongodb.py", line 73, in _size
return (self._queue_cursors[queue].count() -
KeyError: 'ip-10-248-69-149.celery.pidbox'
</code></pre></div>
<p dir="auto">That's followed by Celery exiting with error code 0. MongoDB database is sharded cluster and Celery connects to it via mongos instance run on localhost. The error itself looks similar to timeouted cursor, but I believe that timeouts are not applicable to tailable cursors.</p>
<p dir="auto">Celery report for our machine is here:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:3.0.9 (Chiastic Slide) kombu:2.4.5 py:2.7.3
billiard:2.7.3.12 pymongo:2.1.1
platform -> system:Linux arch:64bit, ELF imp:CPython
loader -> celery.loaders.default.Loader
settings -> transport:mongodb results:mongodb"><pre class="notranslate"><code class="notranslate">software -> celery:3.0.9 (Chiastic Slide) kombu:2.4.5 py:2.7.3
billiard:2.7.3.12 pymongo:2.1.1
platform -> system:Linux arch:64bit, ELF imp:CPython
loader -> celery.loaders.default.Loader
settings -> transport:mongodb results:mongodb
</code></pre></div> | <p dir="auto">We've started observing this problem in our production systems following major increase in traffic on the mongo backend.</p>
<p dir="auto">I am cross posting this issue with kombu (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="5974033" data-permission-text="Title is private" data-url="https://github.com/celery/kombu/issues/150" data-hovercard-type="issue" data-hovercard-url="/celery/kombu/issues/150/hovercard" href="https://github.com/celery/kombu/issues/150">celery/kombu#150</a>), as it's not clear who is misbehaving.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[2012-08-01 00:30:27,163: ERROR/MainProcess] Unrecoverable error: KeyError('awfe1.example.com.celeryd.pidbox',)
Traceback (most recent call last):
File "/opt/lfsp/eggs/celery-2.4.6-py2.7.egg/celery/worker/__init__.py", line 268, in start
component.start()
File "/opt/lfsp/eggs/celery-2.4.6-py2.7.egg/celery/worker/consumer.py", line 309, in start
self.reset_connection()
File "/opt/lfsp/eggs/celery-2.4.6-py2.7.egg/celery/worker/consumer.py", line 592, in reset_connection
self.reset_pidbox_node()
File "/opt/lfsp/eggs/celery-2.4.6-py2.7.egg/celery/worker/consumer.py", line 531, in reset_pidbox_node
callback=self.on_control)
File "/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/pidbox.py", line 65, in listen
callbacks=[callback or self.handle_message])
File "/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/pidbox.py", line 56, in Consumer
**options)
File "/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/messaging.py", line 285, in __init__
self.declare()
File "/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/messaging.py", line 295, in declare
queue.declare()
File "/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/entity.py", line 388, in declare
self.queue_declare(nowait, passive=False)
File "/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/entity.py", line 408, in queue_declare
nowait=nowait)
File "/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/transport/virtual/__init__.py", line 380, in queue_declare
return queue, self._size(queue), 0
File "/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/transport/mongodb.py", line 71, in _size
return (self._queue_cursors[queue].count() -
KeyError: 'awfe1.example.com.celeryd.pidbox'"><pre class="notranslate">[<span class="pl-c1">2012</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">30</span>:<span class="pl-c1">27</span>,<span class="pl-c1">163</span>: <span class="pl-v">ERROR</span><span class="pl-c1">/</span><span class="pl-v">MainProcess</span>] <span class="pl-v">Unrecoverable</span> <span class="pl-s1">error</span>: <span class="pl-v">KeyError</span>(<span class="pl-s">'awfe1.example.com.celeryd.pidbox'</span>,)
<span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>):
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/celery-2.4.6-py2.7.egg/celery/worker/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">268</span>, <span class="pl-s1">in</span> <span class="pl-s1">start</span>
<span class="pl-s1">component</span>.<span class="pl-en">start</span>()
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/celery-2.4.6-py2.7.egg/celery/worker/consumer.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">309</span>, <span class="pl-s1">in</span> <span class="pl-s1">start</span>
<span class="pl-s1">self</span>.<span class="pl-en">reset_connection</span>()
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/celery-2.4.6-py2.7.egg/celery/worker/consumer.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">592</span>, <span class="pl-s1">in</span> <span class="pl-s1">reset_connection</span>
<span class="pl-s1">self</span>.<span class="pl-en">reset_pidbox_node</span>()
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/celery-2.4.6-py2.7.egg/celery/worker/consumer.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">531</span>, <span class="pl-s1">in</span> <span class="pl-s1">reset_pidbox_node</span>
<span class="pl-s1">callback</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">on_control</span>)
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/pidbox.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">65</span>, <span class="pl-s1">in</span> <span class="pl-s1">listen</span>
<span class="pl-s1">callbacks</span><span class="pl-c1">=</span>[<span class="pl-s1">callback</span> <span class="pl-c1">or</span> <span class="pl-s1">self</span>.<span class="pl-s1">handle_message</span>])
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/pidbox.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">56</span>, <span class="pl-s1">in</span> <span class="pl-v">Consumer</span>
<span class="pl-c1">**</span><span class="pl-s1">options</span>)
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/messaging.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">285</span>, <span class="pl-s1">in</span> <span class="pl-s1">__init__</span>
<span class="pl-s1">self</span>.<span class="pl-en">declare</span>()
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/messaging.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">295</span>, <span class="pl-s1">in</span> <span class="pl-s1">declare</span>
<span class="pl-s1">queue</span>.<span class="pl-en">declare</span>()
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/entity.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">388</span>, <span class="pl-s1">in</span> <span class="pl-s1">declare</span>
<span class="pl-s1">self</span>.<span class="pl-en">queue_declare</span>(<span class="pl-s1">nowait</span>, <span class="pl-s1">passive</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/entity.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">408</span>, <span class="pl-s1">in</span> <span class="pl-s1">queue_declare</span>
<span class="pl-s1">nowait</span><span class="pl-c1">=</span><span class="pl-s1">nowait</span>)
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/transport/virtual/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">380</span>, <span class="pl-s1">in</span> <span class="pl-s1">queue_declare</span>
<span class="pl-k">return</span> <span class="pl-s1">queue</span>, <span class="pl-s1">self</span>.<span class="pl-en">_size</span>(<span class="pl-s1">queue</span>), <span class="pl-c1">0</span>
<span class="pl-v">File</span> <span class="pl-s">"/opt/lfsp/eggs/kombu-2.1.1-py2.7.egg/kombu/transport/mongodb.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">71</span>, <span class="pl-s1">in</span> <span class="pl-s1">_size</span>
<span class="pl-k">return</span> (<span class="pl-s1">self</span>.<span class="pl-s1">_queue_cursors</span>[<span class="pl-s1">queue</span>].<span class="pl-en">count</span>() <span class="pl-c1">-</span>
<span class="pl-v">KeyError</span>: <span class="pl-s">'awfe1.example.com.celeryd.pidbox'</span></pre></div> | 1 |
<p dir="auto">The space at the end here seems to be a bug:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> @sprintf("%.6g", 1.0)
"1 ""><pre class="notranslate"><code class="notranslate">julia> @sprintf("%.6g", 1.0)
"1 "
</code></pre></div> | <p dir="auto">The printf <code class="notranslate">%g</code> specifier will at times output an additional, unnecessary trailing space:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> @sprintf "%g" 1
"1 "
julia> @sprintf "%.8g" 23
"23 "
julia> @sprintf "%.2g" 23
"23""><pre class="notranslate"><code class="notranslate">julia> @sprintf "%g" 1
"1 "
julia> @sprintf "%.8g" 23
"23 "
julia> @sprintf "%.2g" 23
"23"
</code></pre></div>
<p dir="auto">CC <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dfannius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dfannius">@dfannius</a> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="91944011" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/11941" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/11941/hovercard" href="https://github.com/JuliaLang/julia/pull/11941">#11941</a>)</p> | 1 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/c7d9c37d37526d241e6c507b2bc4344384950abaee6e06e2a07f824c7297b479/68747470733a2f2f7777772e657665726e6f74652e636f6d2f6c2f4171536f4d5f4978547542434b496b4f42475776714a414f626d725a43576f3442746b422f696d6167652e706e67"><img src="https://camo.githubusercontent.com/c7d9c37d37526d241e6c507b2bc4344384950abaee6e06e2a07f824c7297b479/68747470733a2f2f7777772e657665726e6f74652e636f6d2f6c2f4171536f4d5f4978547542434b496b4f42475776714a414f626d725a43576f3442746b422f696d6167652e706e67" alt="" data-canonical-src="https://www.evernote.com/l/AqSoM_IxTuBCKIkOBGWvqJAObmrZCWo4BtkB/image.png" style="max-width: 100%;"></a></p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-say-hello-to-html-elements#?solution=%3Ch1%3EHello%20%3C%2Fh1%3E%0A" rel="nofollow">Waypoint: Say Hello to HTML Elements</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<h1>Hello World</h1>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">h1</span><span class="pl-kos">></span>Hello World<span class="pl-kos"></</span><span class="pl-ent">h1</span><span class="pl-kos">></span></pre></div>
<p dir="auto">After I click run test. The output is not displayed on the right screen. I refreshed it multiple times, tried in different browser. Didn't help.<br>
Please help me out of this. I am new to FCC.</p> | 1 |
<p dir="auto">Scrapy docs recommends using PEP8 coding convention when writing code for inclusion in Scrapy, with the exception of 79 character line length rule . A quick run of <code class="notranslate">pep8</code> utility shows me that there are several occurrence of PEP8 violation in the master branch. If given the nod from the maintainers, I would like to work on resolving this.</p> | <p dir="auto">PEP8 is <a href="http://doc.scrapy.org/en/latest/contributing.html#coding-style" rel="nofollow">recommended in the docs</a> but is not strictly enforced.</p>
<p dir="auto">Some violations:</p>
<ol dir="auto">
<li>Multiple imports in <a href="https://github.com/scrapy/scrapy/blob/master/scrapy/commands/edit.py#L1">one line</a></li>
<li>Two blank lines <a href="https://github.com/scrapy/scrapy/blob/master/scrapy/commands/edit.py#L5">not maintained</a> between class definitions.</li>
<li><a href="https://github.com/scrapy/scrapy/blob/master/scrapy/commands/check.py#L3">Unused imports</a></li>
<li>Lines longer than 80 characters everywhere</li>
</ol>
<p dir="auto">I believe we should strictly enforce PEP8 and also edit our CI configurations to test for these violations.<br>
I would love to submit a patch for this if the idea sounds good to everyone.</p> | 1 |
<p dir="auto">interpn returns nan when one of the dimensions of the grid has length 1, even if the inputs are perfectly valid. I know this is an edge case, but it's crucial to my program, and working around it requires ugly hacks.</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="values = np.array([0.1,1,10]).reshape((1,3))
xi = np.array([[1, 2.2], [1, 3.2], [1, 3.8]])
print(scipy.interpolate.interpn(([1], [2,3,4]), values, xi))"><pre class="notranslate"><code class="notranslate">values = np.array([0.1,1,10]).reshape((1,3))
xi = np.array([[1, 2.2], [1, 3.2], [1, 3.8]])
print(scipy.interpolate.interpn(([1], [2,3,4]), values, xi))
</code></pre></div>
<h3 dir="auto">Error message:</h3>
<p dir="auto">No error message, but returns array([nan, nan, nan])</p>
<h3 dir="auto">Scipy/Numpy/Python version information:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.1.0 1.15.1 sys.version_info(major=3, minor=7, micro=0, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">1.1.0 1.15.1 sys.version_info(major=3, minor=7, micro=0, releaselevel='final', serial=0)
</code></pre></div> | <p dir="auto">The documentation for the <a href="https://docs.scipy.org/doc/scipy-0.19.1/reference/generated/scipy.interpolate.RegularGridInterpolator.html" rel="nofollow">RegularGridInterpolator</a> states that if the <code class="notranslate">bounds_error</code> is set to False the <code class="notranslate">fill_value</code> is used. And if the <code class="notranslate">fill_value</code> is None, the values are extrapolated.</p>
<p dir="auto">However, in the case of a dimensions with length 1, this doesn't seem to apply. Interpolating and extrapolating with 1 value is certainly an edge case. But based on the documentation i would expect (correct me if i'm wrong), that extrapolating or interpolating with 1 value will yield that same value.</p>
<p dir="auto">The current implementation results in <code class="notranslate">nan</code> values. The difficulty is that if you cant be sure that all data dimensions are n>1, you have to check this and slice out those dimensions, and change the call to the <code class="notranslate">Interpolator</code> to exclude those parameters.</p>
<h3 dir="auto">Reproducing code example:</h3>
<p dir="auto">This doesnt work:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from scipy.interpolate import RegularGridInterpolator
import numpy as np
def f(x,y):
return (y+1) * x
x = np.array([0, 5., 10])
y = np.array([0.])
data = f(*np.meshgrid(x,y, indexing='ij', sparse=True))
# data = array([[ 0.], [ 5.], [ 10.]])
my_interp = RegularGridInterpolator((x, y), data, fill_value=None, bounds_error=False)
my_interp((5.0, 0.))
output[4]: array(nan)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">interpolate</span> <span class="pl-k">import</span> <span class="pl-v">RegularGridInterpolator</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-k">def</span> <span class="pl-en">f</span>(<span class="pl-s1">x</span>,<span class="pl-s1">y</span>):
<span class="pl-k">return</span> (<span class="pl-s1">y</span><span class="pl-c1">+</span><span class="pl-c1">1</span>) <span class="pl-c1">*</span> <span class="pl-s1">x</span>
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">0</span>, <span class="pl-c1">5.</span>, <span class="pl-c1">10</span>])
<span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">0.</span>])
<span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-en">f</span>(<span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-en">meshgrid</span>(<span class="pl-s1">x</span>,<span class="pl-s1">y</span>, <span class="pl-s1">indexing</span><span class="pl-c1">=</span><span class="pl-s">'ij'</span>, <span class="pl-s1">sparse</span><span class="pl-c1">=</span><span class="pl-c1">True</span>))
<span class="pl-c"># data = array([[ 0.], [ 5.], [ 10.]])</span>
<span class="pl-s1">my_interp</span> <span class="pl-c1">=</span> <span class="pl-v">RegularGridInterpolator</span>((<span class="pl-s1">x</span>, <span class="pl-s1">y</span>), <span class="pl-s1">data</span>, <span class="pl-s1">fill_value</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">bounds_error</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
<span class="pl-en">my_interp</span>((<span class="pl-c1">5.0</span>, <span class="pl-c1">0.</span>))
<span class="pl-s1">output</span>[<span class="pl-c1">4</span>]: <span class="pl-en">array</span>(<span class="pl-s1">nan</span>)</pre></div>
<p dir="auto">But adding a value to <code class="notranslate">y</code> makes it work:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="y = np.array([0., 1.0])
data = f(*np.meshgrid(x,y, indexing='ij', sparse=True))
# data = array([[ 0., 0.], [ 5., 10.], [ 10., 20.]])
my_interp = RegularGridInterpolator((x, y), data, fill_value=None, bounds_error=False)
my_interp([5.0, 0.])
output[5]: array([ 5.])"><pre class="notranslate"><span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">0.</span>, <span class="pl-c1">1.0</span>])
<span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-en">f</span>(<span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-en">meshgrid</span>(<span class="pl-s1">x</span>,<span class="pl-s1">y</span>, <span class="pl-s1">indexing</span><span class="pl-c1">=</span><span class="pl-s">'ij'</span>, <span class="pl-s1">sparse</span><span class="pl-c1">=</span><span class="pl-c1">True</span>))
<span class="pl-c"># data = array([[ 0., 0.], [ 5., 10.], [ 10., 20.]])</span>
<span class="pl-s1">my_interp</span> <span class="pl-c1">=</span> <span class="pl-v">RegularGridInterpolator</span>((<span class="pl-s1">x</span>, <span class="pl-s1">y</span>), <span class="pl-s1">data</span>, <span class="pl-s1">fill_value</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">bounds_error</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
<span class="pl-en">my_interp</span>([<span class="pl-c1">5.0</span>, <span class="pl-c1">0.</span>])
<span class="pl-s1">output</span>[<span class="pl-c1">5</span>]: <span class="pl-en">array</span>([ <span class="pl-c1">5.</span>])</pre></div>
<h3 dir="auto">Error message:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="C:\Miniconda3\envs\py36\lib\site-packages\scipy\interpolate\interpolate.py:2467: RuntimeWarning: invalid value encountered in true_divide
(grid[i + 1] - grid[i]))"><pre class="notranslate"><code class="notranslate">C:\Miniconda3\envs\py36\lib\site-packages\scipy\interpolate\interpolate.py:2467: RuntimeWarning: invalid value encountered in true_divide
(grid[i + 1] - grid[i]))
</code></pre></div>
<h3 dir="auto">Scipy/Numpy/Python version information:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0.19.0 1.12.1 sys.version_info(major=3, minor=6, micro=1, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">0.19.0 1.12.1 sys.version_info(major=3, minor=6, micro=1, releaselevel='final', serial=0)
</code></pre></div> | 1 |
<p dir="auto">We're seeing it in pretty much all our serial and soak suites and is probably most common failure reason for our tests - including a number of P0 issues. Marking it as a P0 release blocker because of this, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thockin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thockin">@thockin</a> please remove if you think it shouldn't be one.</p>
<p dir="auto">cc @kubernetes/test-infra-maintainers <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/derekwaynecarr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/derekwaynecarr">@derekwaynecarr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rmmh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rmmh">@rmmh</a></p> | <p dir="auto">Quite a few tests flake with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="an error on the server has prevented the request from succeeding (put replicasets.extensions frontend-
88237173); Current resource version 493"><pre class="notranslate"><code class="notranslate">an error on the server has prevented the request from succeeding (put replicasets.extensions frontend-
88237173); Current resource version 493
</code></pre></div>
<p dir="auto">This seems to indicate:</p>
<ul dir="auto">
<li>test should retry</li>
<li>that's a lot of flake on GKE</li>
</ul>
<p dir="auto">eg: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="166209576" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/29149" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/29149/hovercard" href="https://github.com/kubernetes/kubernetes/issues/29149">#29149</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="169668085" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/30156" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/30156/hovercard" href="https://github.com/kubernetes/kubernetes/issues/30156">#30156</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="170381730" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/30352" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/30352/hovercard?comment_id=243299162&comment_type=issue_comment" href="https://github.com/kubernetes/kubernetes/issues/30352#issuecomment-243299162">#30352 (comment)</a>, pretty much all the failures in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="172579508" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/31188" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/31188/hovercard" href="https://github.com/kubernetes/kubernetes/issues/31188">#31188</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="173205462" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/31429" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/31429/hovercard" href="https://github.com/kubernetes/kubernetes/issues/31429#issue-173205462">#31429 (comment)</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="173576613" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/31575" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/31575/hovercard" href="https://github.com/kubernetes/kubernetes/issues/31575">#31575</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="173107321" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/31408" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/31408/hovercard" href="https://github.com/kubernetes/kubernetes/issues/31408">#31408</a></p> | 1 |
<p dir="auto">The Deprecation Cop encourages users to create issues on repositories when deprecated features are being used. This may lead to a lot of <a href="https://github.com/awatson1978/meteor-api/issues">duplicate issues</a>.</p> | <p dir="auto">I'm not <em>that</em> sure about how to implement this, but plugins repos are getting flooded with duplicate issues reported by deprecation-cop (see, for example, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54660281" data-permission-text="Title is private" data-url="https://github.com/thomaslindstrom/color-picker/issues/49" data-hovercard-type="issue" data-hovercard-url="/thomaslindstrom/color-picker/issues/49/hovercard" href="https://github.com/thomaslindstrom/color-picker/issues/49">thomaslindstrom/color-picker#49</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54627644" data-permission-text="Title is private" data-url="https://github.com/thomaslindstrom/color-picker/issues/48" data-hovercard-type="issue" data-hovercard-url="/thomaslindstrom/color-picker/issues/48/hovercard" href="https://github.com/thomaslindstrom/color-picker/issues/48">thomaslindstrom/color-picker#48</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54677135" data-permission-text="Title is private" data-url="https://github.com/thomaslindstrom/color-picker/issues/50" data-hovercard-type="issue" data-hovercard-url="/thomaslindstrom/color-picker/issues/50/hovercard" href="https://github.com/thomaslindstrom/color-picker/issues/50">thomaslindstrom/color-picker#50</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54790659" data-permission-text="Title is private" data-url="https://github.com/thomaslindstrom/color-picker/issues/52" data-hovercard-type="issue" data-hovercard-url="/thomaslindstrom/color-picker/issues/52/hovercard" href="https://github.com/thomaslindstrom/color-picker/issues/52">thomaslindstrom/color-picker#52</a>).</p>
<p dir="auto">May be querying GitHub's api to check if there already is an issue with the same subject would work - as the subjects are being auto-generated.</p> | 1 |
<p dir="auto"><strong>I'm submitting a ...</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request"><pre class="notranslate"><code class="notranslate">[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
Building angular on windows throws the following error:</p>
<blockquote>
<p dir="auto">Error at D:/GitHub/angular/modules/@angular/benchpress/src/reporter/console_reporter.ts:10:21: Cannot find module '../facade/lang'.</p>
</blockquote>
<p dir="auto">There is a missing symlink to facade in benchpress/src. The developer guide advises that running ./scripts/windows/create-symlinks.sh should create the symlinks required, but the text file the script uses as input to decide where to create them is missing an entry for benchpress/src.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Build should proceed without this error.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
Clone the angular repo to Windows. Run the create-symlinks.sh script, observe there is no symlink to facade in @angular/benchpress/src/ . After following the other instructions in the developer guide run build.sh and see the error listed above.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
It is broken.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<p dir="auto">Windows 10, Bash scripts run on MINGW64 that came with my git installation.</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.X<br>
Angular Master Branch forked today.</li>
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]<br>
N/A</li>
<li><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]<br>
N/A</li>
<li><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =<br>
N/A</li>
</ul> | <p dir="auto"><strong>I'm submitting a ...</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request"><pre class="notranslate"><code class="notranslate">[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
Building angular on windows throws the following error:</p>
<blockquote>
<p dir="auto">Error: Error at D:/GitHub/angular/modules/@angular/upgrade/src/aot/upgrade_component.ts:12:30: Cannot find module '../facade/lang'.</p>
</blockquote>
<p dir="auto">There is a missing symlink to facade in upgrade/src. The developer guide advises that running ./scripts/windows/create-symlinks.sh should create the symlinks required. This reads packages.txt to get the list of folders that need the links. In the text file each folder is listed on its own line. The upgrade/src folder is the last entry in that file, however because the line does not end in a \n, the bash script fails to read it. While a newline could be added to the packages.txt file, its likely that someone could delete it in future, so the bash script should be updated to work either way.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Build should proceed without this error.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
Clone the angular repo to Windows. If <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="184363285" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/12420" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/12420/hovercard" href="https://github.com/angular/angular/issues/12420">#12420</a> is not fixed yet add the line</p>
<blockquote>
<p dir="auto">benchpress/src<br>
to the top of<br>
./scripts/windows/packages.txt<br>
Run the create-symlinks.sh script, observe there is no symlink to facade in @angular/upgrade/src/ . After following the other instructions in the developer guide run build.sh and see the error listed above.</p>
</blockquote>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Its broken and best to fix in a way that the issue isn't likely to be reintroduced.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<p dir="auto">Windows 10, Bash scripts run on MINGW64 that came with my git installation.</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.X<br>
Angular Master Branch forked today.</li>
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]<br>
N/A</li>
<li><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]<br>
N/A</li>
<li><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =<br>
N/A</li>
</ul> | 1 |
<p dir="auto">I tried searching in the issue tracker here but didn't find any, so let me know if this is a duplicate.</p>
<p dir="auto">This issue was first brought up in CuPy (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="295780540" data-permission-text="Title is private" data-url="https://github.com/cupy/cupy/issues/944" data-hovercard-type="issue" data-hovercard-url="/cupy/cupy/issues/944/hovercard" href="https://github.com/cupy/cupy/issues/944">cupy/cupy#944</a>) and has regained some interest, and I believe it's better to be implemented/considered first in upstream, which downstream libraries like SciPy and CuPy can follow.</p>
<p dir="auto">The desired effect is to do the normalization opposite to <code class="notranslate">norm=None</code>; that is, the backward/inverse transform is unscaled, and the forward transform is scaled by 1/n. For a perfectionist's point of view adding this option makes a lot of sense, as it would cover every possible normalization scheme.</p>
<p dir="auto">In particular, for GPU libraries like CuPy this could be performance critical for certain applications, as kernel launching is more costly in the GPU world. People usually don't do extra work whenever possible, especially if the normalization is of no interest.</p>
<p dir="auto">The name <code class="notranslate">"unnormalized"</code> can be changed to a more informative one. I don't have any preference (in fact I'm just a messenger bringing this to NumPy...)</p> | <p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1932" rel="nofollow">http://projects.scipy.org/numpy/ticket/1932</a> on 2011-08-12 by trac user josdekloe, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pearu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pearu">@pearu</a>.</em></p>
<p dir="auto">I have been trying to use the f2py routinely to build an interface around the ECMWF BUFR library. See <a href="http://code.google.com/p/pybufr-ecmwf/" rel="nofollow">http://code.google.com/p/pybufr-ecmwf/</a> for details. This works fine for the python 2.x versions.</p>
<p dir="auto">However, I also tried to add the possibility to use python3 and here I encountered some trouble. My python code converts properly to python3 using to 2to3 tool, but when I try to use the python3 version of f2py I encounter this error somewhere deep inside the f2py internals:</p>
<p dir="auto">Post-processing (stage 2)...<br>
Saving signatures to file "f2py_build/signatures.pyf"<br>
Traceback (most recent call last):<br>
File "./run_f2py_tool.py", line 11, in <br>
main()<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/f2py2e.py", line 563, in main<br>
run_main(sys.argv[1:])<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/f2py2e.py", line 342, in run_main<br>
postlist=callcrackfortran(files,options)<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/f2py2e.py", line 279, in callcrackfortran<br>
pyf=crackfortran.crack2fortran(postlist)<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/crackfortran.py", line 2693, in crack2fortran<br>
pyf=crack2fortrangen(block)+'\n'<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/crackfortran.py", line 2465, in crack2fortrangen<br>
ret=ret+crack2fortrangen(g,tab)<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/crackfortran.py", line 2505, in crack2fortrangen<br>
body=crack2fortrangen(block['body'],tab+tabchar)<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/crackfortran.py", line 2465, in crack2fortrangen<br>
ret=ret+crack2fortrangen(g,tab)<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/crackfortran.py", line 2505, in crack2fortrangen<br>
body=crack2fortrangen(block['body'],tab+tabchar)<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/crackfortran.py", line 2465, in crack2fortrangen<br>
ret=ret+crack2fortrangen(g,tab)<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/crackfortran.py", line 2506, in crack2fortrangen<br>
vars=vars2fortran(block,block['vars'],al,tab+tabchar)<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/crackfortran.py", line 2655, in vars2fortran<br>
lst = true_intent_list(vars[a])<br>
File "/usr/lib64/python3.2/site-packages/numpy/f2py/crackfortran.py", line 2557, in true_intent_list<br>
if c:<br>
UnboundLocalError: local variable 'c' referenced before assignment<br>
ERROR: build of python wrapper failed<br>
the signatures file could not be found<br>
Traceback (most recent call last):<br>
File "./build_interface.py", line 1803, in <br>
BI.build()<br>
File "./build_interface.py", line 543, in build<br>
self.generate_python_wrapper(source_dir)<br>
File "./build_interface.py", line 1667, in generate_python_wrapper<br>
raise InterfaceBuildError<br>
<strong>main</strong>.InterfaceBuildError</p>
<p dir="auto">I any additional information is needed I would be happy to provide it.</p> | 0 |
<p dir="auto">My operation is hacktonish OSX 12.<br>
Graphic is GTX960.<br>
Installed Cuda 8 and CLT.<br>
Python version is 2.7<br>
Try the install from the source show error.<br>
How can i fix it?</p>
<p dir="auto">[ 4%] Linking CXX shared library libTHD.dylib<br>
Undefined symbols for architecture x86_64:<br>
"_state", referenced from:<br>
_THDTensorDescriptor_newFromTHCudaDoubleTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaFloatTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaLongTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaIntTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaShortTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaCharTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaByteTensor in TensorDescriptor.cpp.o<br>
...<br>
ld: symbol(s) not found for architecture x86_64<br>
clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>
make[2]: *** [libTHD.1.dylib] Error 1<br>
make[1]: *** [CMakeFiles/THD.dir/all] Error 2<br>
make: *** [all] Error 2</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/29519350/27422722-d52a3b1e-5761-11e7-9145-962054c59b19.png"><img src="https://user-images.githubusercontent.com/29519350/27422722-d52a3b1e-5761-11e7-9145-962054c59b19.png" alt="sy" style="max-width: 100%;"></a></p> | <p dir="auto">I'm trying to build on Mac OS X, using</p>
<p dir="auto"><code class="notranslate">MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python3 setup.py install</code></p>
<p dir="auto">And I'm running into this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ 4%] Linking CXX shared library libTHD.dylib
ld: warning: directory not found for option '-L/usr/local/cuda/lib64'
Undefined symbols for architecture x86_64:
"_state", referenced from:
_THDTensorDescriptor_newFromTHCudaDoubleTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaFloatTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaLongTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaIntTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaShortTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaCharTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaByteTensor in TensorDescriptor.cpp.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libTHD.1.dylib] Error 1
make[1]: *** [CMakeFiles/THD.dir/all] Error 2
make: *** [all] Error 2"><pre class="notranslate"><code class="notranslate">[ 4%] Linking CXX shared library libTHD.dylib
ld: warning: directory not found for option '-L/usr/local/cuda/lib64'
Undefined symbols for architecture x86_64:
"_state", referenced from:
_THDTensorDescriptor_newFromTHCudaDoubleTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaFloatTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaLongTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaIntTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaShortTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaCharTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaByteTensor in TensorDescriptor.cpp.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libTHD.1.dylib] Error 1
make[1]: *** [CMakeFiles/THD.dir/all] Error 2
make: *** [all] Error 2
</code></pre></div>
<p dir="auto">Is this a bug or did I miss something?</p>
<p dir="auto">Edit:</p>
<p dir="auto">This might be relevant:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: /usr/local/cuda/lib found in: ~/Desktop/pytorch/torch/lib/tmp_install/lib/libTHPP.1.dylib (for architecture x86_64), required for specified option "-delete_rpath /usr/local/cuda/lib""><pre class="notranslate"><code class="notranslate">error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: /usr/local/cuda/lib found in: ~/Desktop/pytorch/torch/lib/tmp_install/lib/libTHPP.1.dylib (for architecture x86_64), required for specified option "-delete_rpath /usr/local/cuda/lib"
</code></pre></div> | 1 |
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">Every face in a <code class="notranslate">Geometry</code> has a <code class="notranslate">materialIndex</code>. When Three converts from a Geometry to a BufferGeometry...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var bufferGeometry = THREE.BufferGeometry.new().fromGeometry(geometry);"><pre class="notranslate"><code class="notranslate">var bufferGeometry = THREE.BufferGeometry.new().fromGeometry(geometry);
</code></pre></div>
<p dir="auto">...there's <a href="https://github.com/mrdoob/three.js/blob/bde8a0540d1b6a7f0a9daf66f00e8f160994ff93/src/core/BufferGeometry.js#L467">an intermediary step where a DirectGeometry is used</a>...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fromGeometry: function ( geometry ) {
geometry.__directGeometry = new DirectGeometry().fromGeometry( geometry );"><pre class="notranslate"><code class="notranslate">fromGeometry: function ( geometry ) {
geometry.__directGeometry = new DirectGeometry().fromGeometry( geometry );
</code></pre></div>
<p dir="auto">Note that a <a href="https://github.com/mrdoob/three.js/blob/bde8a0540d1b6a7f0a9daf66f00e8f160994ff93/src/core/DirectGeometry.js#L9"><code class="notranslate">DirectGeometry</code> defines an <code class="notranslate">indices</code> array, then does nothing with it</a>.</p>
<p dir="auto">So it's not surprising when BufferGeometry <a href="https://github.com/mrdoob/three.js/blob/bde8a0540d1b6a7f0a9daf66f00e8f160994ff93/src/core/BufferGeometry.js#L506">checks the intermediary <code class="notranslate">directGeometry.indices.length</code>, it won't ever be populated</a>.</p>
<p dir="auto">When the BufferGeometry comes out the other end, it has no indices. <code class="notranslate">bufferGeometry.getIndex()</code> is null.</p>
<p dir="auto"><a href="https://github.com/mrdoob/three.js/commit/ed0b2eafe895de62bd5dbe63db14501f28647573#diff-3a1a405a5084cef2556ee83466287251L69">It looks like DirectGeometry's ability to handle indices was removed two years ago</a>.</p>
<p dir="auto">Here's a CodePen demonstrating the problem. Check the logs. The merged geometry should have indices returned, but it doesn't. <a href="https://codepen.io/andrewray/pen/gRyrzR?editors=0010" rel="nofollow">https://codepen.io/andrewray/pen/gRyrzR?editors=0010</a></p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r85</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
</ul> | <h5 dir="auto">Description of the problem</h5>
<p dir="auto">There is a very useful object property colorWrite described here:</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/28869268/three-js-transparent-object-occlusion" rel="nofollow">https://stackoverflow.com/questions/28869268/three-js-transparent-object-occlusion</a><br>
<a href="http://jsfiddle.net/4vnsbdz6/1/" rel="nofollow">http://jsfiddle.net/4vnsbdz6/1/</a><br>
<a href="http://jsfiddle.net/4vnsbdz6/4/" rel="nofollow">http://jsfiddle.net/4vnsbdz6/4/</a></p>
<p dir="auto">However, it relies on manually setting the render order and excludes rendering of objects behind other objects.</p>
<p dir="auto">What I would find useful is a rendering option that does this kind of occlusion but for object groups inside or perhaps just behind another geometry and using its alpha map to determine the visibility of the objects inside, with the option to set an influence value to do inverse.</p>
<p dir="auto">For example, there would be a cube with an alpha map on it.<br>
There would be a THREE.Group with a property that uses one or more objects as a mask with a mask influence such as the cube.<br>
If the group is inside the cube, it would render the group objects according to the alpha map.<br>
The group would have the list of mask objects and if any of the pixels in the group are behind an opaque pixel in the cube, they'd be rendered, otherwise not rendered.</p>
<p dir="auto">This would behave like world-space alpha maps. It can probably be achieved using a custom shader but the shader would need to be applied per object. This would allow easily doing things like cutaways for architectural models:</p>
<p dir="auto"><a href="https://cdn1.28dayslater.co.uk/xf/2017/07/1458657_8291f7d765e875b0ce71ac9087b1350b.jpg" rel="nofollow">https://cdn1.28dayslater.co.uk/xf/2017/07/1458657_8291f7d765e875b0ce71ac9087b1350b.jpg</a></p>
<p dir="auto">For that, a full architecture geometry would be modelled and put in a group and then one or more masking geometries made with alpha maps. The architecture group would set the masking geometries as properties but with a negative influence so that only pixels outside the masking geometry are drawn fully and inside, according to the alpha map.</p>
<p dir="auto">I guess it can be applied per material using a loop, it would just be easier to do per group.</p>
<p dir="auto">The colorWrite examples above are almost usable for this but it's not possible to set an inverse on it, it doesn't use alpha maps so would have to model intricate masks but the most important aspect is being able to easily exclude or include geometry in the occlusion - being able to set a list of masks on a specific set of objects would be much easier than using render order, especially with multiple masks.</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li>
<li>[x ] r109</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> | 0 |
<p dir="auto">Button looks pressed when tapped in touch devices, I have observed this issue in Firefox android Motorola Tab specially on browse button. Check screenshot for ref.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6355923/4351890/b6b8d2d8-4217-11e4-8b5e-112c1711b5ca.jpg"><img src="https://cloud.githubusercontent.com/assets/6355923/4351890/b6b8d2d8-4217-11e4-8b5e-112c1711b5ca.jpg" alt="upload-an-image2014-06-30-13-18-55" style="max-width: 100%;"></a></p> | <p dir="auto">It looks like <code class="notranslate">data-toggle="buttons"</code> does not correctly toggle the button state on mobile devices..</p>
<p dir="auto">You can see this behavior here:</p>
<p dir="auto"><a href="http://www.bootply.com/render/116436" rel="nofollow">http://www.bootply.com/render/116436</a></p>
<p dir="auto">Tested on iPhone (iOS7)</p> | 1 |
<h2 dir="auto">Bug Report<strong>For English only</strong>, other languages will not accept.</h2>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response anymore and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">5.0.0-RC1-SNAPSHOT</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">i got some error when use 5.0.0-RC1-SNAPSHOT although it's work well in 5.0.0-beta</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">SQL: select count(<em>) from (select car,count(</em>) as cnt from table group by car) a<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/35786966/126596688-9a1d784d-22c2-4263-82ab-714fb2d5542d.png"><img src="https://user-images.githubusercontent.com/35786966/126596688-9a1d784d-22c2-4263-82ab-714fb2d5542d.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Reason analyze (If you can)### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> | <h2 dir="auto">Bug Report</h2>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">5.1.1</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-Proxy</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">execute prepareStatement like <code class="notranslate">INSERT INTO remark (userid, content, </code>time<code class="notranslate">) VALUES (?, ?, ?) </code></p>
<h3 dir="auto">Actual behavior</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'org.apache.shardingsphere.sharding.rewrite.token.pojo.ShardingInsertValuesToken@' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1242)
at com.wingkingbobo.splitdb.service.RemarkServiceImpl.testInsert(RemarkServiceImpl.java:107)"><pre class="notranslate"><code class="notranslate">com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'org.apache.shardingsphere.sharding.rewrite.token.pojo.ShardingInsertValuesToken@' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1242)
at com.wingkingbobo.splitdb.service.RemarkServiceImpl.testInsert(RemarkServiceImpl.java:107)
</code></pre></div>
<h3 dir="auto">Reason analyze (If you can)</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<ul dir="auto">
<li>steps
<ul dir="auto">
<li>create database <code class="notranslate">p</code>, <code class="notranslate">p1</code> by create table statement.</li>
<li>run demo
<ul dir="auto">
<li><code class="notranslate">jdbcUrl=JDBC_URL_MYSQL</code>: OK</li>
<li><code class="notranslate">jdbcUrl=JDBC_URL_MYSQL</code>: throw <code class="notranslate">MySQLSyntaxErrorException</code></li>
</ul>
</li>
</ul>
</li>
<li>demo</li>
</ul>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
private static final String JDBC_URL_MYSQL = "jdbc:mysql://localhost:3306/p1?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai";
private static final String JDBC_URL_SHARDING_PROXY = "jdbc:mysql://localhost:3307/sharding_db?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai";
public static void main(String[] args) {
String jdbcUrl = JDBC_URL_SHARDING_PROXY;
try {
testInsert(createRemarkList(1).get(0), jdbcUrl);
// testBatchInsert(createRemarkList(1).get(0), jdbcUrl);
} catch(Exception e) {
e.printStacktrace();
}
}
private List<RemarkPO> createRemarkList(int count) {
List<RemarkPO> remarks = new ArrayList<>();
for (int i = 0; i < count; i++) {
RemarkPO remark = new RemarkPO();
remark.setUserId(4);
remark.setContent("test"+i);
remark.setTime(new Date());
remarks.add(remark);
}
return remarks;
}
private boolean testInsert(RemarkPO remark, String jdbcUrl) throws Exception{
DriverManager.registerDriver(new Driver());
Connection connection = DriverManager.getConnection(jdbcUrl, "root", "123456");
String sql = "INSERT INTO remark(userid, content, `time`) VALUES (?, ?, ?)";
PreparedStatement statement = connection.prepareStatement(sql);
statement.setLong(1, remark.getUserId());
statement.setString(2, remark.getContent());
statement.setDate(3, toSqlDate(remark.getTime()));
statement.execute();
return true;
}
private boolean testBatchInsert(List<RemarkPO> remarks, String jdbcUrl) throws Exception {
if (remarks.isEmpty()) {
return false;
}
DriverManager.registerDriver(new Driver());
Connection connection = DriverManager.getConnection(jdbcUrl, "root", "123456");
StringBuilder sb = new StringBuilder("INSERT INTO remark(userid, content, `time`) VALUES ");
for (int i = 0; i < remarks.size(); i++) {
if (i != 0) {
sb.append(",");
}
sb.append(" (?, ?, ?)");
}
String sql = sb.toString();
PreparedStatement statement = connection.prepareStatement(sql);
int stride = 3;
for (int i = 0; i < remarks.size(); i++) {
int offset = stride * i;
RemarkPO remark = remarks.get(i);
statement.setLong(1 + offset, remark.getUserId());
statement.setString(2 + offset, remark.getContent());
statement.setDate(3 + offset, toSqlDate(remark.getTime()));
}
statement.execute();
return true;
}
private java.sql.Date toSqlDate(Date date) {
return new java.sql.Date(date.getTime());
}"><pre class="notranslate"> <span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-k">final</span> <span class="pl-smi">String</span> <span class="pl-c1">JDBC_URL_MYSQL</span> = <span class="pl-s">"jdbc:mysql://localhost:3306/p1?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai"</span>;
<span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-k">final</span> <span class="pl-smi">String</span> <span class="pl-c1">JDBC_URL_SHARDING_PROXY</span> = <span class="pl-s">"jdbc:mysql://localhost:3307/sharding_db?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai"</span>;
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-s1">main</span>(<span class="pl-smi">String</span>[] <span class="pl-s1">args</span>) {
<span class="pl-smi">String</span> <span class="pl-s1">jdbcUrl</span> = <span class="pl-c1">JDBC_URL_SHARDING_PROXY</span>;
<span class="pl-k">try</span> {
<span class="pl-en">testInsert</span>(<span class="pl-en">createRemarkList</span>(<span class="pl-c1">1</span>).<span class="pl-en">get</span>(<span class="pl-c1">0</span>), <span class="pl-s1">jdbcUrl</span>);
<span class="pl-c">// testBatchInsert(createRemarkList(1).get(0), jdbcUrl);</span>
} <span class="pl-k">catch</span>(<span class="pl-smi">Exception</span> <span class="pl-s1">e</span>) {
<span class="pl-s1">e</span>.<span class="pl-en">printStacktrace</span>();
}
}
<span class="pl-k">private</span> <span class="pl-smi">List</span><<span class="pl-smi">RemarkPO</span>> <span class="pl-s1">createRemarkList</span>(<span class="pl-smi">int</span> <span class="pl-s1">count</span>) {
<span class="pl-smi">List</span><<span class="pl-smi">RemarkPO</span>> <span class="pl-s1">remarks</span> = <span class="pl-k">new</span> <span class="pl-smi">ArrayList</span><>();
<span class="pl-k">for</span> (<span class="pl-smi">int</span> <span class="pl-s1">i</span> = <span class="pl-c1">0</span>; <span class="pl-s1">i</span> < <span class="pl-s1">count</span>; <span class="pl-s1">i</span>++) {
<span class="pl-smi">RemarkPO</span> <span class="pl-s1">remark</span> = <span class="pl-k">new</span> <span class="pl-smi">RemarkPO</span>();
<span class="pl-s1">remark</span>.<span class="pl-en">setUserId</span>(<span class="pl-c1">4</span>);
<span class="pl-s1">remark</span>.<span class="pl-en">setContent</span>(<span class="pl-s">"test"</span>+<span class="pl-s1">i</span>);
<span class="pl-s1">remark</span>.<span class="pl-en">setTime</span>(<span class="pl-k">new</span> <span class="pl-smi">Date</span>());
<span class="pl-s1">remarks</span>.<span class="pl-en">add</span>(<span class="pl-s1">remark</span>);
}
<span class="pl-k">return</span> <span class="pl-s1">remarks</span>;
}
<span class="pl-k">private</span> <span class="pl-smi">boolean</span> <span class="pl-s1">testInsert</span>(<span class="pl-smi">RemarkPO</span> <span class="pl-s1">remark</span>, <span class="pl-smi">String</span> <span class="pl-s1">jdbcUrl</span>) <span class="pl-k">throws</span> <span class="pl-s1">Exception</span>{
<span class="pl-smi">DriverManager</span>.<span class="pl-en">registerDriver</span>(<span class="pl-k">new</span> <span class="pl-smi">Driver</span>());
<span class="pl-smi">Connection</span> <span class="pl-s1">connection</span> = <span class="pl-smi">DriverManager</span>.<span class="pl-en">getConnection</span>(<span class="pl-s1">jdbcUrl</span>, <span class="pl-s">"root"</span>, <span class="pl-s">"123456"</span>);
<span class="pl-smi">String</span> <span class="pl-s1">sql</span> = <span class="pl-s">"INSERT INTO remark(userid, content, `time`) VALUES (?, ?, ?)"</span>;
<span class="pl-smi">PreparedStatement</span> <span class="pl-s1">statement</span> = <span class="pl-s1">connection</span>.<span class="pl-en">prepareStatement</span>(<span class="pl-s1">sql</span>);
<span class="pl-s1">statement</span>.<span class="pl-en">setLong</span>(<span class="pl-c1">1</span>, <span class="pl-s1">remark</span>.<span class="pl-en">getUserId</span>());
<span class="pl-s1">statement</span>.<span class="pl-en">setString</span>(<span class="pl-c1">2</span>, <span class="pl-s1">remark</span>.<span class="pl-en">getContent</span>());
<span class="pl-s1">statement</span>.<span class="pl-en">setDate</span>(<span class="pl-c1">3</span>, <span class="pl-en">toSqlDate</span>(<span class="pl-s1">remark</span>.<span class="pl-en">getTime</span>()));
<span class="pl-s1">statement</span>.<span class="pl-en">execute</span>();
<span class="pl-k">return</span> <span class="pl-c1">true</span>;
}
<span class="pl-k">private</span> <span class="pl-smi">boolean</span> <span class="pl-s1">testBatchInsert</span>(<span class="pl-smi">List</span><<span class="pl-smi">RemarkPO</span>> <span class="pl-s1">remarks</span>, <span class="pl-smi">String</span> <span class="pl-s1">jdbcUrl</span>) <span class="pl-k">throws</span> <span class="pl-s1">Exception</span> {
<span class="pl-k">if</span> (<span class="pl-s1">remarks</span>.<span class="pl-en">isEmpty</span>()) {
<span class="pl-k">return</span> <span class="pl-c1">false</span>;
}
<span class="pl-smi">DriverManager</span>.<span class="pl-en">registerDriver</span>(<span class="pl-k">new</span> <span class="pl-smi">Driver</span>());
<span class="pl-smi">Connection</span> <span class="pl-s1">connection</span> = <span class="pl-smi">DriverManager</span>.<span class="pl-en">getConnection</span>(<span class="pl-s1">jdbcUrl</span>, <span class="pl-s">"root"</span>, <span class="pl-s">"123456"</span>);
<span class="pl-smi">StringBuilder</span> <span class="pl-s1">sb</span> = <span class="pl-k">new</span> <span class="pl-smi">StringBuilder</span>(<span class="pl-s">"INSERT INTO remark(userid, content, `time`) VALUES "</span>);
<span class="pl-k">for</span> (<span class="pl-smi">int</span> <span class="pl-s1">i</span> = <span class="pl-c1">0</span>; <span class="pl-s1">i</span> < <span class="pl-s1">remarks</span>.<span class="pl-en">size</span>(); <span class="pl-s1">i</span>++) {
<span class="pl-k">if</span> (<span class="pl-s1">i</span> != <span class="pl-c1">0</span>) {
<span class="pl-s1">sb</span>.<span class="pl-en">append</span>(<span class="pl-s">","</span>);
}
<span class="pl-s1">sb</span>.<span class="pl-en">append</span>(<span class="pl-s">" (?, ?, ?)"</span>);
}
<span class="pl-smi">String</span> <span class="pl-s1">sql</span> = <span class="pl-s1">sb</span>.<span class="pl-en">toString</span>();
<span class="pl-smi">PreparedStatement</span> <span class="pl-s1">statement</span> = <span class="pl-s1">connection</span>.<span class="pl-en">prepareStatement</span>(<span class="pl-s1">sql</span>);
<span class="pl-smi">int</span> <span class="pl-s1">stride</span> = <span class="pl-c1">3</span>;
<span class="pl-k">for</span> (<span class="pl-smi">int</span> <span class="pl-s1">i</span> = <span class="pl-c1">0</span>; <span class="pl-s1">i</span> < <span class="pl-s1">remarks</span>.<span class="pl-en">size</span>(); <span class="pl-s1">i</span>++) {
<span class="pl-smi">int</span> <span class="pl-s1">offset</span> = <span class="pl-s1">stride</span> * <span class="pl-s1">i</span>;
<span class="pl-smi">RemarkPO</span> <span class="pl-s1">remark</span> = <span class="pl-s1">remarks</span>.<span class="pl-en">get</span>(<span class="pl-s1">i</span>);
<span class="pl-s1">statement</span>.<span class="pl-en">setLong</span>(<span class="pl-c1">1</span> + <span class="pl-s1">offset</span>, <span class="pl-s1">remark</span>.<span class="pl-en">getUserId</span>());
<span class="pl-s1">statement</span>.<span class="pl-en">setString</span>(<span class="pl-c1">2</span> + <span class="pl-s1">offset</span>, <span class="pl-s1">remark</span>.<span class="pl-en">getContent</span>());
<span class="pl-s1">statement</span>.<span class="pl-en">setDate</span>(<span class="pl-c1">3</span> + <span class="pl-s1">offset</span>, <span class="pl-en">toSqlDate</span>(<span class="pl-s1">remark</span>.<span class="pl-en">getTime</span>()));
}
<span class="pl-s1">statement</span>.<span class="pl-en">execute</span>();
<span class="pl-k">return</span> <span class="pl-c1">true</span>;
}
<span class="pl-k">private</span> <span class="pl-smi">java</span>.<span class="pl-smi">sql</span>.<span class="pl-smi">Date</span> <span class="pl-s1">toSqlDate</span>(<span class="pl-smi">Date</span> <span class="pl-s1">date</span>) {
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">java</span>.<span class="pl-smi">sql</span>.<span class="pl-smi">Date</span>(<span class="pl-s1">date</span>.<span class="pl-en">getTime</span>());
}</pre></div>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package com.test.po;
import java.util.Date;
public class RemarkPO {
private long id;
private long userId;
private String content;
private Date time;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public long getUserId() {
return userId;
}
public void setUserId(long userId) {
this.userId = userId;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
}
"><pre class="notranslate"><span class="pl-k">package</span> <span class="pl-s1">com</span>.<span class="pl-s1">test</span>.<span class="pl-s1">po</span>;
<span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">Date</span>;
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">RemarkPO</span> {
<span class="pl-k">private</span> <span class="pl-smi">long</span> <span class="pl-s1">id</span>;
<span class="pl-k">private</span> <span class="pl-smi">long</span> <span class="pl-s1">userId</span>;
<span class="pl-k">private</span> <span class="pl-smi">String</span> <span class="pl-s1">content</span>;
<span class="pl-k">private</span> <span class="pl-smi">Date</span> <span class="pl-s1">time</span>;
<span class="pl-k">public</span> <span class="pl-smi">long</span> <span class="pl-en">getId</span>() {
<span class="pl-k">return</span> <span class="pl-s1">id</span>;
}
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">setId</span>(<span class="pl-smi">long</span> <span class="pl-s1">id</span>) {
<span class="pl-smi">this</span>.<span class="pl-s1">id</span> = <span class="pl-s1">id</span>;
}
<span class="pl-k">public</span> <span class="pl-smi">long</span> <span class="pl-en">getUserId</span>() {
<span class="pl-k">return</span> <span class="pl-s1">userId</span>;
}
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">setUserId</span>(<span class="pl-smi">long</span> <span class="pl-s1">userId</span>) {
<span class="pl-smi">this</span>.<span class="pl-s1">userId</span> = <span class="pl-s1">userId</span>;
}
<span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-en">getContent</span>() {
<span class="pl-k">return</span> <span class="pl-s1">content</span>;
}
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">setContent</span>(<span class="pl-smi">String</span> <span class="pl-s1">content</span>) {
<span class="pl-smi">this</span>.<span class="pl-s1">content</span> = <span class="pl-s1">content</span>;
}
<span class="pl-k">public</span> <span class="pl-smi">Date</span> <span class="pl-en">getTime</span>() {
<span class="pl-k">return</span> <span class="pl-s1">time</span>;
}
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">setTime</span>(<span class="pl-smi">Date</span> <span class="pl-s1">time</span>) {
<span class="pl-smi">this</span>.<span class="pl-s1">time</span> = <span class="pl-s1">time</span>;
}
}</pre></div>
<ul dir="auto">
<li>server.yaml</li>
</ul>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mode:
type: Cluster
repository:
type: ZooKeeper
props:
namespace: governance_ds
server-lists: localhost:2182
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
overwrite: false
rules:
- !AUTHORITY
users:
- root@%:123456
provider:
type: ALL_PRIVILEGES_PERMITTED
- !TRANSACTION
defaultType: LOCAL
props:
recoveryStoreUrl: jdbc:mysql://127.0.0.1:3306/jbossts
recoveryStoreDataSource: com.mysql.jdbc.jdbc2.optional.MysqlDataSource
recoveryStoreUser: root
recoveryStorePassword: 12345678
- !SQL_PARSER
sqlCommentParseEnabled: true
sqlStatementCache:
initialCapacity: 2000
maximumSize: 65535
concurrencyLevel: 4
parseTreeCache:
initialCapacity: 128
maximumSize: 1024
concurrencyLevel: 4
props:
max-connections-size-per-query: 1
kernel-executor-size: 16
proxy-frontend-flush-threshold: 128
proxy-hint-enabled: false
sql-show: true
check-table-metadata-enabled: false
show-process-list-enabled: false
proxy-backend-query-fetch-size: -1
check-duplicate-table-enabled: false
proxy-frontend-executor-size: 0
proxy-backend-executor-suitable: OLAP
proxy-frontend-max-connections: 0
sql-federation-enabled: false
proxy-backend-driver-type: JDBC
"><pre class="notranslate"><span class="pl-ent">mode</span>:
<span class="pl-ent">type</span>: <span class="pl-s">Cluster</span>
<span class="pl-ent">repository</span>:
<span class="pl-ent">type</span>: <span class="pl-s">ZooKeeper</span>
<span class="pl-ent">props</span>:
<span class="pl-ent">namespace</span>: <span class="pl-s">governance_ds</span>
<span class="pl-ent">server-lists</span>: <span class="pl-s">localhost:2182</span>
<span class="pl-ent">retryIntervalMilliseconds</span>: <span class="pl-c1">500</span>
<span class="pl-ent">timeToLiveSeconds</span>: <span class="pl-c1">60</span>
<span class="pl-ent">maxRetries</span>: <span class="pl-c1">3</span>
<span class="pl-ent">operationTimeoutMilliseconds</span>: <span class="pl-c1">500</span>
<span class="pl-ent">overwrite</span>: <span class="pl-c1">false</span>
<span class="pl-ent">rules</span>:
- <span class="pl-k">!AUTHORITY</span>
<span class="pl-ent">users</span>:
- <span class="pl-s">root@%:123456</span>
<span class="pl-ent">provider</span>:
<span class="pl-ent">type</span>: <span class="pl-s">ALL_PRIVILEGES_PERMITTED</span>
- <span class="pl-k">!TRANSACTION</span>
<span class="pl-ent">defaultType</span>: <span class="pl-s">LOCAL</span>
<span class="pl-ent">props</span>:
<span class="pl-ent">recoveryStoreUrl</span>: <span class="pl-s">jdbc:mysql://127.0.0.1:3306/jbossts</span>
<span class="pl-ent">recoveryStoreDataSource</span>: <span class="pl-s">com.mysql.jdbc.jdbc2.optional.MysqlDataSource</span>
<span class="pl-ent">recoveryStoreUser</span>: <span class="pl-s">root</span>
<span class="pl-ent">recoveryStorePassword</span>: <span class="pl-c1">12345678</span>
- <span class="pl-k">!SQL_PARSER</span>
<span class="pl-ent">sqlCommentParseEnabled</span>: <span class="pl-c1">true</span>
<span class="pl-ent">sqlStatementCache</span>:
<span class="pl-ent">initialCapacity</span>: <span class="pl-c1">2000</span>
<span class="pl-ent">maximumSize</span>: <span class="pl-c1">65535</span>
<span class="pl-ent">concurrencyLevel</span>: <span class="pl-c1">4</span>
<span class="pl-ent">parseTreeCache</span>:
<span class="pl-ent">initialCapacity</span>: <span class="pl-c1">128</span>
<span class="pl-ent">maximumSize</span>: <span class="pl-c1">1024</span>
<span class="pl-ent">concurrencyLevel</span>: <span class="pl-c1">4</span>
<span class="pl-ent">props</span>:
<span class="pl-ent">max-connections-size-per-query</span>: <span class="pl-c1">1</span>
<span class="pl-ent">kernel-executor-size</span>: <span class="pl-c1">16</span>
<span class="pl-ent">proxy-frontend-flush-threshold</span>: <span class="pl-c1">128</span>
<span class="pl-ent">proxy-hint-enabled</span>: <span class="pl-c1">false</span>
<span class="pl-ent">sql-show</span>: <span class="pl-c1">true</span>
<span class="pl-ent">check-table-metadata-enabled</span>: <span class="pl-c1">false</span>
<span class="pl-ent">show-process-list-enabled</span>: <span class="pl-c1">false</span>
<span class="pl-ent">proxy-backend-query-fetch-size</span>: <span class="pl-c1">-1</span>
<span class="pl-ent">check-duplicate-table-enabled</span>: <span class="pl-c1">false</span>
<span class="pl-ent">proxy-frontend-executor-size</span>: <span class="pl-c1">0</span>
<span class="pl-ent">proxy-backend-executor-suitable</span>: <span class="pl-s">OLAP</span>
<span class="pl-ent">proxy-frontend-max-connections</span>: <span class="pl-c1">0</span>
<span class="pl-ent">sql-federation-enabled</span>: <span class="pl-c1">false</span>
<span class="pl-ent">proxy-backend-driver-type</span>: <span class="pl-s">JDBC</span>
</pre></div>
<ul dir="auto">
<li>config-sharding.yaml</li>
</ul>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="schemaName: sharding_db
dataSources:
p:
url: jdbc:mysql://localhost:3306/p?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
p1:
url: jdbc:mysql://localhost:3306/p1?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !SHARDING
tables:
remark:
actualDataNodes: p.remark,p$->{1..1}.remark
databaseStrategy:
standard:
shardingColumn: userid
shardingAlgorithmName: database_inline
shardingAlgorithms:
database_inline:
type: INLINE
props:
algorithm-expression: p$->{userid<3?"":(String)((int)((userid-3)/2)+1)}"><pre class="notranslate"><span class="pl-ent">schemaName</span>: <span class="pl-s">sharding_db</span>
<span class="pl-ent">dataSources</span>:
<span class="pl-ent">p</span>:
<span class="pl-ent">url</span>: <span class="pl-s">jdbc:mysql://localhost:3306/p?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai</span>
<span class="pl-ent">username</span>: <span class="pl-s">root</span>
<span class="pl-ent">password</span>: <span class="pl-c1">123456</span>
<span class="pl-ent">connectionTimeoutMilliseconds</span>: <span class="pl-c1">30000</span>
<span class="pl-ent">idleTimeoutMilliseconds</span>: <span class="pl-c1">60000</span>
<span class="pl-ent">maxLifetimeMilliseconds</span>: <span class="pl-c1">1800000</span>
<span class="pl-ent">maxPoolSize</span>: <span class="pl-c1">50</span>
<span class="pl-ent">minPoolSize</span>: <span class="pl-c1">1</span>
<span class="pl-ent">p1</span>:
<span class="pl-ent">url</span>: <span class="pl-s">jdbc:mysql://localhost:3306/p1?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai</span>
<span class="pl-ent">username</span>: <span class="pl-s">root</span>
<span class="pl-ent">password</span>: <span class="pl-c1">123456</span>
<span class="pl-ent">connectionTimeoutMilliseconds</span>: <span class="pl-c1">30000</span>
<span class="pl-ent">idleTimeoutMilliseconds</span>: <span class="pl-c1">60000</span>
<span class="pl-ent">maxLifetimeMilliseconds</span>: <span class="pl-c1">1800000</span>
<span class="pl-ent">maxPoolSize</span>: <span class="pl-c1">50</span>
<span class="pl-ent">minPoolSize</span>: <span class="pl-c1">1</span>
<span class="pl-ent">rules</span>:
- <span class="pl-k">!SHARDING</span>
<span class="pl-ent">tables</span>:
<span class="pl-ent">remark</span>:
<span class="pl-ent">actualDataNodes</span>: <span class="pl-s">p.remark,p$->{1..1}.remark</span>
<span class="pl-ent">databaseStrategy</span>:
<span class="pl-ent">standard</span>:
<span class="pl-ent">shardingColumn</span>: <span class="pl-s">userid</span>
<span class="pl-ent">shardingAlgorithmName</span>: <span class="pl-s">database_inline</span>
<span class="pl-ent">shardingAlgorithms</span>:
<span class="pl-ent">database_inline</span>:
<span class="pl-ent">type</span>: <span class="pl-s">INLINE</span>
<span class="pl-ent">props</span>:
<span class="pl-ent">algorithm-expression</span>: <span class="pl-s">p$->{userid<3?"":(String)((int)((userid-3)/2)+1)}</span></pre></div>
<ul dir="auto">
<li>create table statement</li>
</ul>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50708
Source Host : localhost:3306
Source Schema : p
Target Server Type : MySQL
Target Server Version : 50708
File Encoding : 65001
Date: 12/05/2022 16:42:31
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for remark
-- ----------------------------
DROP TABLE IF EXISTS `remark`;
CREATE TABLE `remark` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userid` int(11) NOT NULL,
`content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`time` datetime NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
SET FOREIGN_KEY_CHECKS = 1;
"><pre class="notranslate"><span class="pl-c"><span class="pl-c">/*</span></span>
<span class="pl-c"> Navicat Premium Data Transfer</span>
<span class="pl-c"></span>
<span class="pl-c"> Source Server : localhost</span>
<span class="pl-c"> Source Server Type : MySQL</span>
<span class="pl-c"> Source Server Version : 50708</span>
<span class="pl-c"> Source Host : localhost:3306</span>
<span class="pl-c"> Source Schema : p</span>
<span class="pl-c"></span>
<span class="pl-c"> Target Server Type : MySQL</span>
<span class="pl-c"> Target Server Version : 50708</span>
<span class="pl-c"> File Encoding : 65001</span>
<span class="pl-c"></span>
<span class="pl-c"> Date: 12/05/2022 16:42:31</span>
<span class="pl-c"><span class="pl-c">*/</span></span>
<span class="pl-k">SET</span> NAMES utf8mb4;
<span class="pl-k">SET</span> FOREIGN_KEY_CHECKS <span class="pl-k">=</span> <span class="pl-c1">0</span>;
<span class="pl-c"><span class="pl-c">--</span> ----------------------------</span>
<span class="pl-c"><span class="pl-c">--</span> Table structure for remark</span>
<span class="pl-c"><span class="pl-c">--</span> ----------------------------</span>
<span class="pl-k">DROP</span> <span class="pl-k">TABLE</span> IF EXISTS <span class="pl-s"><span class="pl-pds">`</span>remark<span class="pl-pds">`</span></span>;
<span class="pl-k">CREATE</span> <span class="pl-k">TABLE</span> `<span class="pl-en">remark</span>` (
<span class="pl-s"><span class="pl-pds">`</span>id<span class="pl-pds">`</span></span> <span class="pl-k">int</span>(<span class="pl-c1">11</span>) <span class="pl-k">NOT NULL</span> AUTO_INCREMENT,
<span class="pl-s"><span class="pl-pds">`</span>userid<span class="pl-pds">`</span></span> <span class="pl-k">int</span>(<span class="pl-c1">11</span>) <span class="pl-k">NOT NULL</span>,
<span class="pl-s"><span class="pl-pds">`</span>content<span class="pl-pds">`</span></span> <span class="pl-k">varchar</span>(<span class="pl-c1">255</span>) CHARACTER <span class="pl-k">SET</span> utf8 COLLATE utf8_general_ci <span class="pl-k">NOT NULL</span>,
<span class="pl-s"><span class="pl-pds">`</span>time<span class="pl-pds">`</span></span> datetime <span class="pl-k">NOT NULL</span>,
<span class="pl-k">PRIMARY KEY</span> (<span class="pl-s"><span class="pl-pds">`</span>id<span class="pl-pds">`</span></span>) USING BTREE
) ENGINE <span class="pl-k">=</span> InnoDB AUTO_INCREMENT <span class="pl-k">=</span> <span class="pl-c1">6</span> CHARACTER <span class="pl-k">SET</span> <span class="pl-k">=</span> utf8 COLLATE <span class="pl-k">=</span> utf8_general_ci ROW_FORMAT <span class="pl-k">=</span> COMPACT;
<span class="pl-k">SET</span> FOREIGN_KEY_CHECKS <span class="pl-k">=</span> <span class="pl-c1">1</span>;
</pre></div> | 0 |
<p dir="auto">To recreate, add the following to <code class="notranslate">config.yml</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="twig:
globals:
foo: "@@bar""><pre class="notranslate"><code class="notranslate">twig:
globals:
foo: "@@bar"
</code></pre></div>
<p dir="auto"><strong>Expected behaviour:</strong> Twig has a global variable named <code class="notranslate">foo</code> containing the string <code class="notranslate">@bar</code>.</p>
<p dir="auto"><strong>Actual behaviour:</strong> ServiceNotFoundException: The service "twig" has a dependency on a non-existent service "<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bar">@bar</a>".</p>
<p dir="auto">Environment tested on:</p>
<ul dir="auto">
<li>Symfony Standard Distribution 2.3.2</li>
<li>OS X 10.8.4</li>
<li>PHP 5.4.16</li>
</ul> | <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>yes</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.4.x</td>
</tr>
</tbody>
</table>
<p dir="auto">I have a project that depends on symfony/http-foundation. With 3.4.x-dev I'm getting some RuntimeErrors recently:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RuntimeException: Failed to set the session handler because headers have already been sent
by ".../vendor/phpunit/phpunit/src/Util/Printer.php" at line 110.
.../vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:397
.../vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:112
.../classes/Http/SessionProvider.php:128
.../vendor/autarky/container/classes/Factory/Factory.php:89
.../vendor/autarky/container/classes/Container.php:256
.../vendor/autarky/container/classes/Container.php:226
.../classes/Application.php:511
.../tests/unit/Session/SessionProviderTest.php:20"><pre class="notranslate"><code class="notranslate">RuntimeException: Failed to set the session handler because headers have already been sent
by ".../vendor/phpunit/phpunit/src/Util/Printer.php" at line 110.
.../vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:397
.../vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:112
.../classes/Http/SessionProvider.php:128
.../vendor/autarky/container/classes/Factory/Factory.php:89
.../vendor/autarky/container/classes/Container.php:256
.../vendor/autarky/container/classes/Container.php:226
.../classes/Application.php:511
.../tests/unit/Session/SessionProviderTest.php:20
</code></pre></div>
<p dir="auto">I tracked down the line to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="246510573" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/23711" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/23711/hovercard" href="https://github.com/symfony/symfony/pull/23711">#23711</a> which was merged 2 days ago. If I remove the if headers_sent thing from setSaveHandler, my test runs fine again.</p>
<p dir="auto">PHPUnit 5.7.22, symfony/http-foundation is at <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/0fe9b3dc9902a89e646ca5bf053690018830999b/hovercard" href="https://github.com/symfony/symfony/commit/0fe9b3dc9902a89e646ca5bf053690018830999b"><tt>0fe9b3d</tt></a></p> | 0 |
<p dir="auto">When creating the npz file, each array is written to a temporary file before adding to a zip archive: <a href="https://github.com/numpy/numpy/blob/master/numpy/lib/npyio.py#L601">https://github.com/numpy/numpy/blob/master/numpy/lib/npyio.py#L601</a></p>
<p dir="auto">This means that if /tmp is close to full, npz file creation will fail even when the actual target device has plenty of space. Even worse, it fails with a cryptic IOError message that doesn't point to /tmp.</p> | <p dir="auto">The size limit causes problems because savez goes through _savez, which creates a temporary file, then zips it. The size limit arises in recent Linux distros -- Ubuntu, Fedora, others -- that have started mounting tmpfs on /tmp. The tmpfs file system is essentially a ram disk and uses memory, which limits the size available. The advantage is spped and that SSD life is extended by not doing large numbers of small writes. On Linux is it probably better to use /var/tmp when writing big temporary files, but probably the easiest solution would be to put the temporary file in the user's directory. It gets deleted in any case.</p> | 1 |
<p dir="auto">[Enter steps to reproduce below:]</p>
<ol dir="auto">
<li>...</li>
<li>...</li>
</ol>
<p dir="auto"><strong>Atom Version</strong>: 0.211.0<br>
<strong>System</strong>: Microsoft Windows 8.1 Pro<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: Cannot find module './context-menu'<br>
Error: Cannot find module './context-menu'<br>
at Function.Module._resolveFilename (module.js:328:15)<br>
at Function.Module._load (module.js:270:25)<br>
at Module.require (module.js:357:17)<br>
at require (module.js:376:17)<br>
at BrowserWindow. (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\src\browser\atom-window.js:152:27)<br>
at emitOne (events.js:77:13)<br>
at BrowserWindow.emit (events.js:166:7)<br>
at callFunction (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br>
at EventEmitter. (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br>
at emitMany (events.js:108:13)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\src\window-event-handler.js:150:33)
at HTMLDocument.handler (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
"><pre class="notranslate"><code class="notranslate">At C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\src\window-event-handler.js:150:33)
at HTMLDocument.handler (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\Jbbae\AppData\Local\atom\app-0.211.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"disabledPackages": [
"merge-conflicts",
"editorconfig"
]
},
"editor": {
"invisibles": {},
"scrollPastEnd": true
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"disabledPackages"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>merge-conflicts<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>editorconfig<span class="pl-pds">"</span></span>
]
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"invisibles"</span>: {},
<span class="pl-ent">"scrollPastEnd"</span>: <span class="pl-c1">true</span>
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
color-picker, v2.0.7
file-icons, v1.5.7
minimap, v4.10.0
react, v0.12.0
react-snippets, v0.1.4
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
color<span class="pl-k">-</span>picker, v2.<span class="pl-ii">0</span>.<span class="pl-ii">7</span>
file<span class="pl-k">-</span>icons, v1.<span class="pl-ii">5</span>.<span class="pl-ii">7</span>
minimap, v4.<span class="pl-ii">10</span>.<span class="pl-ii">0</span>
react, v0.<span class="pl-ii">12</span>.<span class="pl-ii">0</span>
react<span class="pl-k">-</span>snippets, v0.<span class="pl-ii">1</span>.<span class="pl-ii">4</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | <p dir="auto">I right-clicked on a folder in the tree view</p>
<p dir="auto"><strong>Atom Version</strong>: 0.194.0<br>
<strong>System</strong>: Windows 7 Entreprise<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: Cannot find module './context-menu'<br>
Error: Cannot find module './context-menu'<br>
at Function.Module._resolveFilename (module.js:328:15)<br>
at Function.Module._load (module.js:270:25)<br>
at Module.require (module.js:357:17)<br>
at require (module.js:376:17)<br>
at BrowserWindow. (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)<br>
at emitOne (events.js:77:13)<br>
at BrowserWindow.emit (events.js:166:7)<br>
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br>
at EventEmitter. (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br>
at emitMany (events.js:108:13)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\window-event-handler.js:149:33)
at HTMLDocument.handler (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
"><pre class="notranslate"><code class="notranslate">At C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\window-event-handler.js:149:33)
at HTMLDocument.handler (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -4:55.5.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused)
2x -3:41.6.0 window:focus-pane-on-right (atom-text-editor.editor)
-3:17.5.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-2:47.4.0 editor:newline (atom-text-editor.editor.is-focused)
-2:38.2.0 core:cut (atom-text-editor.editor)
-2:36.5.0 core:paste (atom-text-editor.editor.is-focused)
-2:26.6.0 core:save (atom-text-editor.editor.is-focused)
-2:20.6.0 core:move-down (atom-text-editor.editor)
-2:20.4.0 autocomplete-plus:confirm (atom-text-editor.editor)
-2:15.8.0 core:save (atom-text-editor.editor)
-2:08.7.0 core:copy (atom-text-editor.editor.is-focused)
-2:01.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:59.7.0 core:save (atom-text-editor.editor.is-focused)
-1:52.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:51.6.0 core:save (atom-text-editor.editor.is-focused)
-1:30.6.0 core:backspace (atom-text-editor.editor)"><pre class="notranslate"><code class="notranslate"> -4:55.5.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused)
2x -3:41.6.0 window:focus-pane-on-right (atom-text-editor.editor)
-3:17.5.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-2:47.4.0 editor:newline (atom-text-editor.editor.is-focused)
-2:38.2.0 core:cut (atom-text-editor.editor)
-2:36.5.0 core:paste (atom-text-editor.editor.is-focused)
-2:26.6.0 core:save (atom-text-editor.editor.is-focused)
-2:20.6.0 core:move-down (atom-text-editor.editor)
-2:20.4.0 autocomplete-plus:confirm (atom-text-editor.editor)
-2:15.8.0 core:save (atom-text-editor.editor)
-2:08.7.0 core:copy (atom-text-editor.editor.is-focused)
-2:01.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:59.7.0 core:save (atom-text-editor.editor.is-focused)
-1:52.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:51.6.0 core:save (atom-text-editor.editor.is-focused)
-1:30.6.0 core:backspace (atom-text-editor.editor)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"ignoredNames": [
"node_modules"
],
"themes": [
"atom-dark-ui",
"seti-syntax"
],
"disabledPackages": [
"Tern"
],
"projectHome": "Y:\\app-tfoumax"
},
"editor": {
"invisibles": {},
"softWrap": true,
"showIndentGuide": true
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"ignoredNames"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>node_modules<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"themes"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>seti-syntax<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"disabledPackages"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>Tern<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"projectHome"</span>: <span class="pl-s"><span class="pl-pds">"</span>Y:<span class="pl-cce">\\</span>app-tfoumax<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"invisibles"</span>: {},
<span class="pl-ent">"softWrap"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"showIndentGuide"</span>: <span class="pl-c1">true</span>
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
autocomplete-plus, v2.12.0
autocomplete-snippets, v1.2.0
javascript-snippets, v1.0.0
jshint, v1.3.5
language-ejs, v0.1.0
linter, v0.12.1
pretty-json, v0.3.3
save-session, v0.14.0
Search, v0.4.0
seti-syntax, v0.4.0
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
autocomplete<span class="pl-k">-</span>plus, v2.<span class="pl-ii">12</span>.<span class="pl-ii">0</span>
autocomplete<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">2</span>.<span class="pl-ii">0</span>
javascript<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">0</span>.<span class="pl-ii">0</span>
jshint, v1.<span class="pl-ii">3</span>.<span class="pl-ii">5</span>
language<span class="pl-k">-</span>ejs, v0.<span class="pl-ii">1</span>.<span class="pl-ii">0</span>
linter, v0.<span class="pl-ii">12</span>.<span class="pl-ii">1</span>
pretty<span class="pl-k">-</span>json, v0.<span class="pl-ii">3</span>.<span class="pl-ii">3</span>
save<span class="pl-k">-</span>session, v0.<span class="pl-ii">14</span>.<span class="pl-ii">0</span>
Search, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span>
seti<span class="pl-k">-</span>syntax, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | 1 |
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-learn-how-script-tags-and-document-ready-work" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-learn-how-script-tags-and-document-ready-work</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">For this problem, I used the following code:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<script type="text/javascript">
$(document).ready(function(){
});</script>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">script</span> <span class="pl-c1">type</span>="<span class="pl-s">text/javascript</span>"<span class="pl-kos">></span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">ready</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-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span><span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span></pre></div>
<p dir="auto">The last 3 learning 'goals' will show checked and complete, but the first one: "Create a script element" will not for some reason. Not sure why. Thanks for your time</p>
<p dir="auto"><a href="mailto:[email protected]">[email protected]</a></p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-learn-how-script-tags-and-document-ready-work" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-learn-how-script-tags-and-document-ready-work</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">The working code (the enter inside the anonymous function is optional)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<script>
$(document).ready(function(){
});
</script>"><pre class="notranslate"><code class="notranslate"><script>
$(document).ready(function(){
});
</script>
</code></pre></div>
<p dir="auto">However there are several <em>versions</em> that do not satisfy the two last tests.</p>
<p dir="auto">Fails test 3 (the space between <code class="notranslate">[...]ready(</code> and <code class="notranslate">function</code>)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<script>
$(document).ready( function(){
});
</script>"><pre class="notranslate"><code class="notranslate"><script>
$(document).ready( function(){
});
</script>
</code></pre></div>
<p dir="auto">Fails test 4 (closing with <code class="notranslate">});</code>)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<script>
$(document).ready(function(){ });
</script>"><pre class="notranslate"><code class="notranslate"><script>
$(document).ready(function(){ });
</script>
</code></pre></div>
<p dir="auto">Given that javascript is a language where whitespace is (mostly) insignificant.</p> | 1 |
<p dir="auto">I'm a mathematician trying to plot several distributions (notably in this case Gamma and truncated Normal) in order to do some basic notebook-style exploration for different parameter choices. I first started with truncated normal, and after over half an hour, I still could not get scipy.stats.truncnorm to plot a simple normal distribution with mean = 18, standard distribution = 1.5, but truncated at 12 and 24. This includes after trying to follow the formula in the documentation for a and b - the behavior was always surprising, typically cutting the distribution in half and throwing it's support way beyond 24. I finally settled for just plotting a regular normal distribution when I couldn't get it to work.</p>
<p dir="auto">Now I'm messing around with the gamma distribution, and the API is again surprising. I would suggest that in the spirit of "batteries included", the user shouldn't have to do the sort of computations described in <a href="http://docs.scipy.org/doc/scipy/reference/tutorial/stats.html" rel="nofollow">http://docs.scipy.org/doc/scipy/reference/tutorial/stats.html</a>, shape parameter section, just to use the gamma distribution with its two typical parameters (k and theta, or alpha and beta, it doesn't matter - they are easy to translate between) as described on wikipedia <a href="https://en.wikipedia.org/wiki/Gamma_distribution" rel="nofollow">https://en.wikipedia.org/wiki/Gamma_distribution</a>.</p>
<p dir="auto">My request is that these standardized functions which lack a typical, full parameterization expose some kind of API allowing the user to specify all their typical parameters directly and get back a distribution with no further work required.</p> | <p dir="auto">scipy.stats defines univariate distributions in a standard form, with location and scale parameters. For some distributions, these do not agree with well with "common" parametrizations, which leads to confusion on various levels.</p>
<p dir="auto">It might be good to at least identify the most problematic cases and add some text to their docstrings. Possibly there might be a way of adding some actual conversion code(?)</p>
<p dir="auto">(cross-ref: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="58096266" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/4533" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/4533/hovercard?comment_id=75260691&comment_type=issue_comment" href="https://github.com/scipy/scipy/pull/4533#issuecomment-75260691">#4533 (comment)</a>)</p>
<p dir="auto">Likely suspects:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> lognormal (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="96439765" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/5075" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/5075/hovercard" href="https://github.com/scipy/scipy/pull/5075">gh-5075</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> exponnorm (done in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="58896819" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/4559" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/4559/hovercard" href="https://github.com/scipy/scipy/pull/4559">gh-4559</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> nbinom</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> rice (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="60154835" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/4605" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/4605/hovercard" href="https://github.com/scipy/scipy/pull/4605">gh-4605</a> for a specific issue and a suggestion for how to fix) EDIT: done in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="60288259" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/4611" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/4611/hovercard" href="https://github.com/scipy/scipy/pull/4611">gh-4611</a></li>
</ul> | 1 |
<h2 dir="auto">Feature request</h2>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
I need some webpack internals to use a <code class="notranslate">Promise</code> <strong>ponyfill</strong> instead of the global <code class="notranslate">Promise</code>.</p>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong><br>
I'm bundling a web app that runs on 3rd party websites and I <strong>must not</strong> pollute their global namespace with polyfills.</p>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong><br>
No idea, but I guess <code class="notranslate">Promise</code> is the only thing that needs a polyfill for IE11.</p>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong><br>
yes</p> | <p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br>
I want to report a performance bug.</p>
<p dir="auto"><strong>What is the current behavior?</strong><br>
In projects with a lot of chunks, a lot of time is spent on <code class="notranslate">RemoveParentModulesPlugin</code>.</p>
<p dir="auto">The original report (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="216717731" data-permission-text="Title is private" data-url="https://github.com/angular/angular-cli/issues/5618" data-hovercard-type="issue" data-hovercard-url="/angular/angular-cli/issues/5618/hovercard?comment_id=354973859&comment_type=issue_comment" href="https://github.com/angular/angular-cli/issues/5618#issuecomment-354973859">angular/angular-cli#5618 (comment)</a>) detailed a 1h build time for a non-production (no uglify etc) build.</p>
<p dir="auto">The project uses Angular CLI and contains around ~2700 source files. This project has <a href="https://github.com/angular/angular-cli/files/1599960/ng-build.log">376 chunks</a>.</p>
<p dir="auto">A similar sized project (<a href="https://github.com/filipesilva/angular-cli-test-repo">https://github.com/filipesilva/angular-cli-test-repo</a>) takes only a few minutes to build using the same options.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto">The project is closed source so I do not have a source, but the owner is available for some remote debugging (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="216717731" data-permission-text="Title is private" data-url="https://github.com/angular/angular-cli/issues/5618" data-hovercard-type="issue" data-hovercard-url="/angular/angular-cli/issues/5618/hovercard?comment_id=355033864&comment_type=issue_comment" href="https://github.com/angular/angular-cli/issues/5618#issuecomment-355033864">angular/angular-cli#5618 (comment)</a>).</p>
<p dir="auto">He provided CPU profiles for the first ~10m with node 8.4.0 (<a href="https://github.com/angular/angular-cli/files/1600687/CPU-20180103T195000.cpuprofile.zip">here</a>) and with node 9.3.0 (<a href="https://github.com/angular/angular-cli/files/1606383/CPU-20180105T160658.cpuprofile.zip">here</a>).</p>
<p dir="auto">Both profiles show the majority of time being spent in <code class="notranslate">RemoveParentModulesPlugin</code>, specifically within the <code class="notranslate">hasModule</code> function. Also see the "Other information" bit at the end for a comparison with Webpack 4.</p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
<code class="notranslate">RemoveParentModulesPlugin</code> is optimized to allow having a lot of chunks without a big performance hit.</p>
<p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.</strong></p>
<p dir="auto">Node.js 8.4.0, Webpack 3.10.0. Unknown browser/OS.</p>
<p dir="auto"><strong>Other information.</strong></p>
<p dir="auto">I've been looking at Webpack 4 and thought maybe it could help since there are a lot of performance improvements there. The plugin in question has suffered some changes:</p>
<ul dir="auto">
<li>in <code class="notranslate">[email protected]</code>: <a href="https://github.com/webpack/webpack/blob/b545b519b2024e3f8be3041385bd326bf5d24449/lib/optimize/RemoveParentModulesPlugin.js">https://github.com/webpack/webpack/blob/b545b519b2024e3f8be3041385bd326bf5d24449/lib/optimize/RemoveParentModulesPlugin.js</a></li>
<li>in <code class="notranslate">[email protected]</code>: <a href="https://github.com/webpack/webpack/blob/9334fd8547831ded7f11e05319616a72ea0b4698/lib/optimize/RemoveParentModulesPlugin.js">https://github.com/webpack/webpack/blob/9334fd8547831ded7f11e05319616a72ea0b4698/lib/optimize/RemoveParentModulesPlugin.js</a></li>
</ul>
<p dir="auto">It looks like there's a fair bit of optimizations changes there. But I'm not sure if the bottleneck has changed.</p>
<p dir="auto">There's two places where time is being spent on the CPU profile:</p>
<ul dir="auto">
<li>a <code class="notranslate">has</code> call inside the <code class="notranslate">hasModule</code> function:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4172079/34612357-52195fb0-f221-11e7-9af3-435cdfaab77f.png"><img src="https://user-images.githubusercontent.com/4172079/34612357-52195fb0-f221-11e7-9af3-435cdfaab77f.png" alt="image" style="max-width: 100%;"></a></li>
<li>a <code class="notranslate">filter</code> call inside the <code class="notranslate">hasModule</code> function:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4172079/34612366-61c554b4-f221-11e7-8c22-e4aa27a57744.png"><img src="https://user-images.githubusercontent.com/4172079/34612366-61c554b4-f221-11e7-8c22-e4aa27a57744.png" alt="image" style="max-width: 100%;"></a></li>
</ul>
<p dir="auto">This function hasn't changed though so I don't think it would speed up in this case.</p>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pleerock/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pleerock">@pleerock</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/TheLarkInn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/TheLarkInn">@TheLarkInn</a></p> | 0 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>"@playwright/experimental-ct-vue": "^1.31.2"</li>
<li>Operating System: All</li>
<li>Browser: All</li>
</ul>
<h3 dir="auto">Source code</h3>
<p dir="auto">Creating a Typescript test file ... I need to mock some test objects that I will use as props in my test... I found that when I use <code class="notranslate"><</code> in normal Typescript (that is not TSX or JSX) that my test file will not get parsed and processed correctly.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { test, expect } from '@playwright/experimental-ct-vue';
interface MyType {
test: string;
}
const myVar = <MyType>{
test: 'Hello',
};
test('hello', async ({ page, mount }) => {
console.log(myVar);
});"><pre class="notranslate"><code class="notranslate">import { test, expect } from '@playwright/experimental-ct-vue';
interface MyType {
test: string;
}
const myVar = <MyType>{
test: 'Hello',
};
test('hello', async ({ page, mount }) => {
console.log(myVar);
});
</code></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Run or debug the test</li>
</ul>
<p dir="auto"><strong>Expected</strong><br>
No Error</p>
<p dir="auto"><strong>Actual</strong><br>
SyntaxError: Unexpected token, expected "}" (8:6)</p>
<p dir="auto">Personally I never use TSX or JSX... I looked but I couldn't find an option... is there a way to just turn that kind of parsing off?<br>
Thanks!</p> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [1.32.3]</li>
<li>Operating System: [macOS Ventura 13.3.1]</li>
<li>Browser: [All]</li>
<li>Other info:</li>
</ul>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Run some tests in Playwright</li>
<li>Now run test report through the following command:<code class="notranslate">npx playwright show-report</code></li>
<li>We get the test result in the browser</li>
<li>Now select the <strong>Skipped</strong> option in the test result</li>
<li>Now in the search box of the test result, write: <code class="notranslate">s:flaky s:passed s:passed s:passed </code></li>
<li>We get all the test specs in the report</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">Searching with multiple term should not show all test specs</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">Searching shows all the spec results in test report</p>
<p dir="auto"><strong>Attachments</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45368054/231453195-344ac70c-928c-4cfc-96a4-b06aa14d83b9.gif"><img src="https://user-images.githubusercontent.com/45368054/231453195-344ac70c-928c-4cfc-96a4-b06aa14d83b9.gif" alt="wrong test result with multiple term" data-animated-image="" style="max-width: 100%;"></a></p> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> function f()
const a = 1;
a = 2;
return a;
end
f (generic function with 1 method)
julia> f()
2"><pre class="notranslate"><code class="notranslate">julia> function f()
const a = 1;
a = 2;
return a;
end
f (generic function with 1 method)
julia> f()
2
</code></pre></div>
<p dir="auto">Although it is not that important for the compiler/optimizer to declare a local constant variable as it can probably figure out itself, it is still useful as a hint/constraint for the user to avoid stupid error or breakage sometimes.</p>
<p dir="auto">IMHO, as long as local const variable is a valid syntax, it should at least give a warning if the value/binding changes (just as the global one). It might even make sense to be more restrictive and make that an error instead of a warning.</p> | <p dir="auto">Not sure what's going on here – this runs but no <code class="notranslate">.mem</code> file appears. The same issue may affect measuring coverage (the logging logic is shared). It might be good to add some testing for this and run those tests under CI on Travis and AppVeyor.</p> | 0 |
<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>
</ul>
<p dir="auto"><code class="notranslate">average</code> will succeed if <code class="notranslate">axis=False</code> but fail when using <code class="notranslate">value_and_grads</code></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax
def fn(arg_0):
return jax.numpy.average(arg_0, axis=False).sum()
mykey = jax.random.PRNGKey(92127318)
array = jax.random.uniform(mykey, [2, 3, 4], jax.numpy.float32, minval=0, maxval=2)
arg_0 = array.clone()
print(fn(arg_0))
# 12.970601
arg_0 = array.clone()
jax.value_and_grad(fn, (0))(arg_0)
# ValueError: boolean array argument obj to delete must be one dimensional and match the axis length of 3"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>
<span class="pl-k">def</span> <span class="pl-en">fn</span>(<span class="pl-s1">arg_0</span>):
<span class="pl-k">return</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span>.<span class="pl-en">average</span>(<span class="pl-s1">arg_0</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">False</span>).<span class="pl-en">sum</span>()
<span class="pl-s1">mykey</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-v">PRNGKey</span>(<span class="pl-c1">92127318</span>)
<span class="pl-s1">array</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">uniform</span>(<span class="pl-s1">mykey</span>, [<span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>], <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span>.<span class="pl-s1">float32</span>, <span class="pl-s1">minval</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">maxval</span><span class="pl-c1">=</span><span class="pl-c1">2</span>)
<span class="pl-s1">arg_0</span> <span class="pl-c1">=</span> <span class="pl-s1">array</span>.<span class="pl-en">clone</span>()
<span class="pl-en">print</span>(<span class="pl-en">fn</span>(<span class="pl-s1">arg_0</span>))
<span class="pl-c"># 12.970601</span>
<span class="pl-s1">arg_0</span> <span class="pl-c1">=</span> <span class="pl-s1">array</span>.<span class="pl-en">clone</span>()
<span class="pl-s1">jax</span>.<span class="pl-en">value_and_grad</span>(<span class="pl-s1">fn</span>, (<span class="pl-c1">0</span>))(<span class="pl-s1">arg_0</span>)
<span class="pl-c"># ValueError: boolean array argument obj to delete must be one dimensional and match the axis length of 3</span></pre></div>
<ul class="contains-task-list">
<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>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
JaxStackTraceBeforeTransformation Traceback (most recent call last)
/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py in _run_module_as_main(***failed resolving arguments***)
196 sys.argv[0] = mod_spec.origin
--> 197 return _run_code(code, main_globals, None,
198 "__main__", mod_spec)
/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py in _run_code(***failed resolving arguments***)
86 __spec__ = mod_spec)
---> 87 exec(code, run_globals)
88 return run_globals
~/Library/Python/3.9/lib/python/site-packages/ipykernel_launcher.py in <module>
15 from ipykernel import kernelapp as app
---> 16 app.launch_new_instance()
~/Library/Python/3.9/lib/python/site-packages/traitlets/config/application.py in launch_instance(***failed resolving arguments***)
844 app.initialize(argv)
--> 845 app.start()
846
~/Library/Python/3.9/lib/python/site-packages/ipykernel/kernelapp.py in start(***failed resolving arguments***)
618 try:
--> 619 self.io_loop.start()
620 except KeyboardInterrupt:
~/Library/Python/3.9/lib/python/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:
/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py in run_forever(***failed resolving arguments***)
600 while True:
--> 601 self._run_once()
602 if self._stopping:
/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py in _run_once(***failed resolving arguments***)
1904 else:
-> 1905 handle._run()
1906 handle = None # Needed to break cycles when an exception occurs.
/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/events.py in _run(***failed resolving arguments***)
79 try:
---> 80 self._context.run(self._callback, *self._args)
81 except (SystemExit, KeyboardInterrupt):
~/Library/Python/3.9/lib/python/site-packages/tornado/ioloop.py in <lambda>(***failed resolving arguments***)
687 future.add_done_callback(
--> 688 lambda f: self._run_callback(functools.partial(callback, future))
689 )
~/Library/Python/3.9/lib/python/site-packages/tornado/ioloop.py in _run_callback(***failed resolving arguments***)
740 try:
--> 741 ret = callback()
742 if ret is not None:
~/Library/Python/3.9/lib/python/site-packages/tornado/gen.py in inner(***failed resolving arguments***)
813 f = None # noqa: F841
--> 814 self.ctx_run(self.run)
815
~/Library/Python/3.9/lib/python/site-packages/tornado/gen.py in run(***failed resolving arguments***)
774 else:
--> 775 yielded = self.gen.send(value)
776
~/Library/Python/3.9/lib/python/site-packages/ipykernel/kernelbase.py in process_one(***failed resolving arguments***)
357 return None
--> 358 yield gen.maybe_future(dispatch(*args))
359
~/Library/Python/3.9/lib/python/site-packages/tornado/gen.py in wrapper(***failed resolving arguments***)
233 try:
--> 234 yielded = ctx_run(next, result)
235 except (StopIteration, Return) as e:
~/Library/Python/3.9/lib/python/site-packages/ipykernel/kernelbase.py in dispatch_shell(***failed resolving arguments***)
260 try:
--> 261 yield gen.maybe_future(handler(stream, idents, msg))
262 except Exception:
~/Library/Python/3.9/lib/python/site-packages/tornado/gen.py in wrapper(***failed resolving arguments***)
233 try:
--> 234 yielded = ctx_run(next, result)
235 except (StopIteration, Return) as e:
~/Library/Python/3.9/lib/python/site-packages/ipykernel/kernelbase.py in execute_request(***failed resolving arguments***)
535 reply_content = yield gen.maybe_future(
--> 536 self.do_execute(
537 code, silent, store_history,
~/Library/Python/3.9/lib/python/site-packages/tornado/gen.py in wrapper(***failed resolving arguments***)
233 try:
--> 234 yielded = ctx_run(next, result)
235 except (StopIteration, Return) as e:
~/Library/Python/3.9/lib/python/site-packages/ipykernel/ipkernel.py in do_execute(***failed resolving arguments***)
301 # letting shell dispatch to loop runners
--> 302 res = shell.run_cell(code, store_history=store_history, silent=silent)
303 finally:
~/Library/Python/3.9/lib/python/site-packages/ipykernel/zmqshell.py in run_cell(***failed resolving arguments***)
538 self._last_traceback = None
--> 539 return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
540
~/Library/Python/3.9/lib/python/site-packages/IPython/core/interactiveshell.py in run_cell(***failed resolving arguments***)
2897 try:
-> 2898 result = self._run_cell(
2899 raw_cell, store_history, silent, shell_futures)
~/Library/Python/3.9/lib/python/site-packages/IPython/core/interactiveshell.py in _run_cell(***failed resolving arguments***)
2943 try:
-> 2944 return runner(coro)
2945 except BaseException as e:
~/Library/Python/3.9/lib/python/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:
~/Library/Python/3.9/lib/python/site-packages/IPython/core/interactiveshell.py in run_cell_async(***failed resolving arguments***)
3168
-> 3169 has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
3170 interactivity=interactivity, compiler=compiler, result=result)
~/Library/Python/3.9/lib/python/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
~/Library/Python/3.9/lib/python/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:
<ipython-input-16-d01aa5baed3f> in <module>
17 arg_0 = arg_0_array.clone()
---> 18 results['res_2'], _ = jax.value_and_grad(fn, (0))(arg_0)
19 except Exception as e:
<ipython-input-16-d01aa5baed3f> in fn(***failed resolving arguments***)
5 returned = False
----> 6 return jax.numpy.average(arg_0, arg_1, returned=returned).sum()
7 try:
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in average(***failed resolving arguments***)
284 returned=False):
--> 285 return _average(a, _ensure_optional_axes(axis), weights, returned)
286
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in _average(***failed resolving arguments***)
292 if weights is None: # Treat all weights as 1
--> 293 avg = mean(a, axis=axis)
294 if axis is None:
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in mean(***failed resolving arguments***)
251 out=None, keepdims=False, *, where=None):
--> 252 return _mean(a, _ensure_optional_axes(axis), dtype, out, keepdims,
253 where=where)
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in _mean(***failed resolving arguments***)
278 return lax.div(
--> 279 sum(a, axis, dtype=dtype, keepdims=keepdims, where=where),
280 lax.convert_element_type(normalizer, dtype))
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in sum(***failed resolving arguments***)
164 out=None, keepdims=None, initial=None, where=None):
--> 165 return _reduce_sum(a, axis=_ensure_optional_axes(axis), dtype=dtype, out=out,
166 keepdims=keepdims, initial=initial, where=where)
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in _reduce_sum(***failed resolving arguments***)
156 dtype=None, out=None, keepdims=None, initial=None, where=None):
--> 157 return _reduction(a, "sum", np.sum, lax.add, 0,
158 bool_op=lax.bitwise_or, upcast_f16_for_computation=True,
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in _reduction(***failed resolving arguments***)
97 else:
---> 98 result = lax.reduce(a, init_val, op, dims)
99 if initial is not None:
JaxStackTraceBeforeTransformation: ValueError: boolean array argument obj to delete must be one dimensional and match the axis length of 3
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:
ValueError Traceback (most recent call last)
<ipython-input-25-7d77a6f1d189> in <module>
11
12 arg_0 = array.clone()
---> 13 jax.value_and_grad(fn, (0))(arg_0)
[... skipping hidden 37 frame]
<__array_function__ internals> in delete(*args, **kwargs)
/usr/local/lib/python3.9/site-packages/numpy/lib/function_base.py in delete(arr, obj, axis)
4470 if obj.dtype == bool:
4471 if obj.shape != (N,):
-> 4472 raise ValueError('boolean array argument obj to delete '
4473 'must be one dimensional and match the axis '
4474 'length of {}'.format(N))
ValueError: boolean array argument obj to delete must be one dimensional and match the axis length of 3"><pre class="notranslate"><code class="notranslate">---------------------------------------------------------------------------
JaxStackTraceBeforeTransformation Traceback (most recent call last)
/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py in _run_module_as_main(***failed resolving arguments***)
196 sys.argv[0] = mod_spec.origin
--> 197 return _run_code(code, main_globals, None,
198 "__main__", mod_spec)
/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py in _run_code(***failed resolving arguments***)
86 __spec__ = mod_spec)
---> 87 exec(code, run_globals)
88 return run_globals
~/Library/Python/3.9/lib/python/site-packages/ipykernel_launcher.py in <module>
15 from ipykernel import kernelapp as app
---> 16 app.launch_new_instance()
~/Library/Python/3.9/lib/python/site-packages/traitlets/config/application.py in launch_instance(***failed resolving arguments***)
844 app.initialize(argv)
--> 845 app.start()
846
~/Library/Python/3.9/lib/python/site-packages/ipykernel/kernelapp.py in start(***failed resolving arguments***)
618 try:
--> 619 self.io_loop.start()
620 except KeyboardInterrupt:
~/Library/Python/3.9/lib/python/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:
/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py in run_forever(***failed resolving arguments***)
600 while True:
--> 601 self._run_once()
602 if self._stopping:
/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py in _run_once(***failed resolving arguments***)
1904 else:
-> 1905 handle._run()
1906 handle = None # Needed to break cycles when an exception occurs.
/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/events.py in _run(***failed resolving arguments***)
79 try:
---> 80 self._context.run(self._callback, *self._args)
81 except (SystemExit, KeyboardInterrupt):
~/Library/Python/3.9/lib/python/site-packages/tornado/ioloop.py in <lambda>(***failed resolving arguments***)
687 future.add_done_callback(
--> 688 lambda f: self._run_callback(functools.partial(callback, future))
689 )
~/Library/Python/3.9/lib/python/site-packages/tornado/ioloop.py in _run_callback(***failed resolving arguments***)
740 try:
--> 741 ret = callback()
742 if ret is not None:
~/Library/Python/3.9/lib/python/site-packages/tornado/gen.py in inner(***failed resolving arguments***)
813 f = None # noqa: F841
--> 814 self.ctx_run(self.run)
815
~/Library/Python/3.9/lib/python/site-packages/tornado/gen.py in run(***failed resolving arguments***)
774 else:
--> 775 yielded = self.gen.send(value)
776
~/Library/Python/3.9/lib/python/site-packages/ipykernel/kernelbase.py in process_one(***failed resolving arguments***)
357 return None
--> 358 yield gen.maybe_future(dispatch(*args))
359
~/Library/Python/3.9/lib/python/site-packages/tornado/gen.py in wrapper(***failed resolving arguments***)
233 try:
--> 234 yielded = ctx_run(next, result)
235 except (StopIteration, Return) as e:
~/Library/Python/3.9/lib/python/site-packages/ipykernel/kernelbase.py in dispatch_shell(***failed resolving arguments***)
260 try:
--> 261 yield gen.maybe_future(handler(stream, idents, msg))
262 except Exception:
~/Library/Python/3.9/lib/python/site-packages/tornado/gen.py in wrapper(***failed resolving arguments***)
233 try:
--> 234 yielded = ctx_run(next, result)
235 except (StopIteration, Return) as e:
~/Library/Python/3.9/lib/python/site-packages/ipykernel/kernelbase.py in execute_request(***failed resolving arguments***)
535 reply_content = yield gen.maybe_future(
--> 536 self.do_execute(
537 code, silent, store_history,
~/Library/Python/3.9/lib/python/site-packages/tornado/gen.py in wrapper(***failed resolving arguments***)
233 try:
--> 234 yielded = ctx_run(next, result)
235 except (StopIteration, Return) as e:
~/Library/Python/3.9/lib/python/site-packages/ipykernel/ipkernel.py in do_execute(***failed resolving arguments***)
301 # letting shell dispatch to loop runners
--> 302 res = shell.run_cell(code, store_history=store_history, silent=silent)
303 finally:
~/Library/Python/3.9/lib/python/site-packages/ipykernel/zmqshell.py in run_cell(***failed resolving arguments***)
538 self._last_traceback = None
--> 539 return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
540
~/Library/Python/3.9/lib/python/site-packages/IPython/core/interactiveshell.py in run_cell(***failed resolving arguments***)
2897 try:
-> 2898 result = self._run_cell(
2899 raw_cell, store_history, silent, shell_futures)
~/Library/Python/3.9/lib/python/site-packages/IPython/core/interactiveshell.py in _run_cell(***failed resolving arguments***)
2943 try:
-> 2944 return runner(coro)
2945 except BaseException as e:
~/Library/Python/3.9/lib/python/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:
~/Library/Python/3.9/lib/python/site-packages/IPython/core/interactiveshell.py in run_cell_async(***failed resolving arguments***)
3168
-> 3169 has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
3170 interactivity=interactivity, compiler=compiler, result=result)
~/Library/Python/3.9/lib/python/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
~/Library/Python/3.9/lib/python/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:
<ipython-input-16-d01aa5baed3f> in <module>
17 arg_0 = arg_0_array.clone()
---> 18 results['res_2'], _ = jax.value_and_grad(fn, (0))(arg_0)
19 except Exception as e:
<ipython-input-16-d01aa5baed3f> in fn(***failed resolving arguments***)
5 returned = False
----> 6 return jax.numpy.average(arg_0, arg_1, returned=returned).sum()
7 try:
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in average(***failed resolving arguments***)
284 returned=False):
--> 285 return _average(a, _ensure_optional_axes(axis), weights, returned)
286
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in _average(***failed resolving arguments***)
292 if weights is None: # Treat all weights as 1
--> 293 avg = mean(a, axis=axis)
294 if axis is None:
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in mean(***failed resolving arguments***)
251 out=None, keepdims=False, *, where=None):
--> 252 return _mean(a, _ensure_optional_axes(axis), dtype, out, keepdims,
253 where=where)
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in _mean(***failed resolving arguments***)
278 return lax.div(
--> 279 sum(a, axis, dtype=dtype, keepdims=keepdims, where=where),
280 lax.convert_element_type(normalizer, dtype))
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in sum(***failed resolving arguments***)
164 out=None, keepdims=None, initial=None, where=None):
--> 165 return _reduce_sum(a, axis=_ensure_optional_axes(axis), dtype=dtype, out=out,
166 keepdims=keepdims, initial=initial, where=where)
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in _reduce_sum(***failed resolving arguments***)
156 dtype=None, out=None, keepdims=None, initial=None, where=None):
--> 157 return _reduction(a, "sum", np.sum, lax.add, 0,
158 bool_op=lax.bitwise_or, upcast_f16_for_computation=True,
/usr/local/lib/python3.9/site-packages/jax/_src/numpy/reductions.py in _reduction(***failed resolving arguments***)
97 else:
---> 98 result = lax.reduce(a, init_val, op, dims)
99 if initial is not None:
JaxStackTraceBeforeTransformation: ValueError: boolean array argument obj to delete must be one dimensional and match the axis length of 3
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:
ValueError Traceback (most recent call last)
<ipython-input-25-7d77a6f1d189> in <module>
11
12 arg_0 = array.clone()
---> 13 jax.value_and_grad(fn, (0))(arg_0)
[... skipping hidden 37 frame]
<__array_function__ internals> in delete(*args, **kwargs)
/usr/local/lib/python3.9/site-packages/numpy/lib/function_base.py in delete(arr, obj, axis)
4470 if obj.dtype == bool:
4471 if obj.shape != (N,):
-> 4472 raise ValueError('boolean array argument obj to delete '
4473 'must be one dimensional and match the axis '
4474 'length of {}'.format(N))
ValueError: boolean array argument obj to delete must be one dimensional and match the axis length of 3
</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>
</ul>
<p dir="auto"><code class="notranslate">cummax, cummin, cumprod</code> will succeed when using <code class="notranslate">value_and_grads</code> but fail if directly call</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax
def fn(arg_0):
axis = -1
return jax.lax.cummax(arg_0, axis=axis).sum()
mykey = jax.random.PRNGKey(14830444)
array = jax.random.uniform(mykey, [2, 3], jax.numpy.float32, minval=0, maxval=128)
try:
arg_0 = array.clone()
res1 = fn(arg_0)
except Exception as e:
print(e)
arg_0 = array.clone()
res2, _ = jax.value_and_grad(fn, (0))(arg_0)
print(res2)
# axis -1 is out of bounds for array of shape (2, 3)
# 676.8106"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>
<span class="pl-k">def</span> <span class="pl-en">fn</span>(<span class="pl-s1">arg_0</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">return</span> <span class="pl-s1">jax</span>.<span class="pl-s1">lax</span>.<span class="pl-en">cummax</span>(<span class="pl-s1">arg_0</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-s1">axis</span>).<span class="pl-en">sum</span>()
<span class="pl-s1">mykey</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-v">PRNGKey</span>(<span class="pl-c1">14830444</span>)
<span class="pl-s1">array</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">uniform</span>(<span class="pl-s1">mykey</span>, [<span class="pl-c1">2</span>, <span class="pl-c1">3</span>], <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span>.<span class="pl-s1">float32</span>, <span class="pl-s1">minval</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">maxval</span><span class="pl-c1">=</span><span class="pl-c1">128</span>)
<span class="pl-k">try</span>:
<span class="pl-s1">arg_0</span> <span class="pl-c1">=</span> <span class="pl-s1">array</span>.<span class="pl-en">clone</span>()
<span class="pl-s1">res1</span> <span class="pl-c1">=</span> <span class="pl-en">fn</span>(<span class="pl-s1">arg_0</span>)
<span class="pl-k">except</span> <span class="pl-v">Exception</span> <span class="pl-k">as</span> <span class="pl-s1">e</span>:
<span class="pl-en">print</span>(<span class="pl-s1">e</span>)
<span class="pl-s1">arg_0</span> <span class="pl-c1">=</span> <span class="pl-s1">array</span>.<span class="pl-en">clone</span>()
<span class="pl-s1">res2</span>, <span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-en">value_and_grad</span>(<span class="pl-s1">fn</span>, (<span class="pl-c1">0</span>))(<span class="pl-s1">arg_0</span>)
<span class="pl-en">print</span>(<span class="pl-s1">res2</span>)
<span class="pl-c"># axis -1 is out of bounds for array of shape (2, 3)</span>
<span class="pl-c"># 676.8106</span></pre></div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax
def fn(arg_0):
axis = -1
return jax.lax.cummin(arg_0, axis=axis).sum()
mykey = jax.random.PRNGKey(14830444)
array = jax.random.uniform(mykey, [2, 3], jax.numpy.float32, minval=0, maxval=128)
try:
arg_0 = array.clone()
res1 = fn(arg_0)
except Exception as e:
print(e)
arg_0 = array.clone()
res2, _ = jax.value_and_grad(fn, (0))(arg_0)
print(res2)
# axis -1 is out of bounds for array of shape (2, 3)
# 549.35925"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>
<span class="pl-k">def</span> <span class="pl-en">fn</span>(<span class="pl-s1">arg_0</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">return</span> <span class="pl-s1">jax</span>.<span class="pl-s1">lax</span>.<span class="pl-en">cummin</span>(<span class="pl-s1">arg_0</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-s1">axis</span>).<span class="pl-en">sum</span>()
<span class="pl-s1">mykey</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-v">PRNGKey</span>(<span class="pl-c1">14830444</span>)
<span class="pl-s1">array</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">uniform</span>(<span class="pl-s1">mykey</span>, [<span class="pl-c1">2</span>, <span class="pl-c1">3</span>], <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span>.<span class="pl-s1">float32</span>, <span class="pl-s1">minval</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">maxval</span><span class="pl-c1">=</span><span class="pl-c1">128</span>)
<span class="pl-k">try</span>:
<span class="pl-s1">arg_0</span> <span class="pl-c1">=</span> <span class="pl-s1">array</span>.<span class="pl-en">clone</span>()
<span class="pl-s1">res1</span> <span class="pl-c1">=</span> <span class="pl-en">fn</span>(<span class="pl-s1">arg_0</span>)
<span class="pl-k">except</span> <span class="pl-v">Exception</span> <span class="pl-k">as</span> <span class="pl-s1">e</span>:
<span class="pl-en">print</span>(<span class="pl-s1">e</span>)
<span class="pl-s1">arg_0</span> <span class="pl-c1">=</span> <span class="pl-s1">array</span>.<span class="pl-en">clone</span>()
<span class="pl-s1">res2</span>, <span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-en">value_and_grad</span>(<span class="pl-s1">fn</span>, (<span class="pl-c1">0</span>))(<span class="pl-s1">arg_0</span>)
<span class="pl-en">print</span>(<span class="pl-s1">res2</span>)
<span class="pl-c"># axis -1 is out of bounds for array of shape (2, 3)</span>
<span class="pl-c"># 549.35925</span></pre></div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax
def fn(arg_0):
axis = -1
return jax.lax.cumprod(arg_0, axis=axis).sum()
mykey = jax.random.PRNGKey(14830444)
array = jax.random.uniform(mykey, [2, 3], jax.numpy.float32, minval=0, maxval=128)
try:
arg_0 = array.clone()
res1 = fn(arg_0)
except Exception as e:
print(e)
arg_0 = array.clone()
res2, _ = jax.value_and_grad(fn, (0))(arg_0)
print(res2)
# axis -1 is out of bounds for array of shape (2, 3)
# 1533018.6"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>
<span class="pl-k">def</span> <span class="pl-en">fn</span>(<span class="pl-s1">arg_0</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">return</span> <span class="pl-s1">jax</span>.<span class="pl-s1">lax</span>.<span class="pl-en">cumprod</span>(<span class="pl-s1">arg_0</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-s1">axis</span>).<span class="pl-en">sum</span>()
<span class="pl-s1">mykey</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-v">PRNGKey</span>(<span class="pl-c1">14830444</span>)
<span class="pl-s1">array</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">uniform</span>(<span class="pl-s1">mykey</span>, [<span class="pl-c1">2</span>, <span class="pl-c1">3</span>], <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span>.<span class="pl-s1">float32</span>, <span class="pl-s1">minval</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">maxval</span><span class="pl-c1">=</span><span class="pl-c1">128</span>)
<span class="pl-k">try</span>:
<span class="pl-s1">arg_0</span> <span class="pl-c1">=</span> <span class="pl-s1">array</span>.<span class="pl-en">clone</span>()
<span class="pl-s1">res1</span> <span class="pl-c1">=</span> <span class="pl-en">fn</span>(<span class="pl-s1">arg_0</span>)
<span class="pl-k">except</span> <span class="pl-v">Exception</span> <span class="pl-k">as</span> <span class="pl-s1">e</span>:
<span class="pl-en">print</span>(<span class="pl-s1">e</span>)
<span class="pl-s1">arg_0</span> <span class="pl-c1">=</span> <span class="pl-s1">array</span>.<span class="pl-en">clone</span>()
<span class="pl-s1">res2</span>, <span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-en">value_and_grad</span>(<span class="pl-s1">fn</span>, (<span class="pl-c1">0</span>))(<span class="pl-s1">arg_0</span>)
<span class="pl-en">print</span>(<span class="pl-s1">res2</span>)
<span class="pl-c"># axis -1 is out of bounds for array of shape (2, 3)</span>
<span class="pl-c"># 1533018.6</span></pre></div>
<ul class="contains-task-list">
<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>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-9-b034345b2caa> in <module>
15
16 arg_0 = array.clone()
---> 17 res1 = fn(arg_0)
<ipython-input-9-b034345b2caa> in fn(arg_0)
3 def fn(arg_0):
4 axis = -1
----> 5 return jax.lax.cummin(arg_0, axis=axis).sum()
6
7 mykey = jax.random.PRNGKey(14830444)
/usr/local/lib/python3.9/site-packages/jax/_src/lax/control_flow.py in cummin(operand, axis, reverse)
2869 def cummin(operand: Array, axis: int = 0, reverse: bool = False) -> Array:
2870 """Computes a cumulative minimum along `axis`."""
-> 2871 return cummin_p.bind(operand, axis=int(axis), reverse=bool(reverse))
2872
2873 def _cumred_shape_rule(x, *, axis: int, reverse: bool):
/usr/local/lib/python3.9/site-packages/jax/core.py in bind(self, *args, **params)
321 assert (not config.jax_enable_checks or
322 all(isinstance(arg, Tracer) or valid_jaxtype(arg) for arg in args)), args
--> 323 return self.bind_with_trace(find_top_trace(args), args, params)
324
325 def bind_with_trace(self, trace, args, params):
/usr/local/lib/python3.9/site-packages/jax/core.py in bind_with_trace(self, trace, args, params)
324
325 def bind_with_trace(self, trace, args, params):
--> 326 out = trace.process_primitive(self, map(trace.full_raise, args), params)
327 return map(full_lower, out) if self.multiple_results else full_lower(out)
328
/usr/local/lib/python3.9/site-packages/jax/core.py in process_primitive(self, primitive, tracers, params)
673
674 def process_primitive(self, primitive, tracers, params):
--> 675 return primitive.impl(*tracers, **params)
676
677 def process_call(self, primitive, f, tracers, params):
/usr/local/lib/python3.9/site-packages/jax/_src/dispatch.py in apply_primitive(prim, *args, **params)
96 def apply_primitive(prim, *args, **params):
97 """Impl rule that compiles and runs a single primitive 'prim' using XLA."""
---> 98 compiled_fun = xla_primitive_callable(prim, *unsafe_map(arg_spec, args),
99 **params)
100 return compiled_fun(*args)
/usr/local/lib/python3.9/site-packages/jax/_src/util.py in wrapper(*args, **kwargs)
217 return f(*args, **kwargs)
218 else:
--> 219 return cached(config._trace_context(), *args, **kwargs)
220
221 wrapper.cache_clear = cached.cache_clear
/usr/local/lib/python3.9/site-packages/jax/_src/util.py in cached(_, *args, **kwargs)
210 @functools.lru_cache(max_size)
211 def cached(_, *args, **kwargs):
--> 212 return f(*args, **kwargs)
213
214 @functools.wraps(f)
/usr/local/lib/python3.9/site-packages/jax/_src/dispatch.py in xla_primitive_callable(prim, *arg_specs, **params)
146 else:
147 return out,
--> 148 compiled = _xla_callable_uncached(lu.wrap_init(prim_fun), device, None,
149 prim.name, donated_invars, False, *arg_specs)
150 if not prim.multiple_results:
/usr/local/lib/python3.9/site-packages/jax/_src/dispatch.py in _xla_callable_uncached(fun, device, backend, name, donated_invars, keep_unused, *arg_specs)
228 def _xla_callable_uncached(fun: lu.WrappedFun, device, backend, name,
229 donated_invars, keep_unused, *arg_specs):
--> 230 return lower_xla_callable(fun, device, backend, name, donated_invars, False,
231 keep_unused, *arg_specs).compile().unsafe_call
232
/usr/local/lib/python3.9/site-packages/jax/_src/profiler.py in wrapper(*args, **kwargs)
204 def wrapper(*args, **kwargs):
205 with TraceAnnotation(name, **decorator_kwargs):
--> 206 return func(*args, **kwargs)
207 return wrapper
208 return wrapper
/usr/local/lib/python3.9/site-packages/jax/_src/dispatch.py in lower_xla_callable(fun, device, backend, name, donated_invars, always_lower, keep_unused, *arg_specs)
270 with log_elapsed_time(f"Finished tracing + transforming {fun.__name__} "
271 "for jit in {elapsed_time} sec"):
--> 272 jaxpr, out_avals, consts = pe.trace_to_jaxpr_final(
273 fun, abstract_args, pe.debug_info_final(fun, "jit"), which_explicit)
274 if any(isinstance(c, core.Tracer) for c in consts):
/usr/local/lib/python3.9/site-packages/jax/_src/profiler.py in wrapper(*args, **kwargs)
204 def wrapper(*args, **kwargs):
205 with TraceAnnotation(name, **decorator_kwargs):
--> 206 return func(*args, **kwargs)
207 return wrapper
208 return wrapper
/usr/local/lib/python3.9/site-packages/jax/interpreters/partial_eval.py in trace_to_jaxpr_final(fun, in_avals, debug_info, keep_inputs)
1891 main.jaxpr_stack = () # type: ignore
1892 with core.new_sublevel():
-> 1893 jaxpr, out_avals, consts = trace_to_subjaxpr_dynamic(
1894 fun, main, in_avals, keep_inputs=keep_inputs)
1895 del fun, main
/usr/local/lib/python3.9/site-packages/jax/interpreters/partial_eval.py in trace_to_subjaxpr_dynamic(fun, main, in_avals, keep_inputs)
1863 in_tracers = _input_type_to_tracers(trace, in_avals)
1864 in_tracers_ = [t for t, keep in zip(in_tracers, keep_inputs) if keep]
-> 1865 ans = fun.call_wrapped(*in_tracers_)
1866 out_tracers = map(trace.full_raise, ans)
1867 jaxpr, consts = frame.to_jaxpr(out_tracers)
/usr/local/lib/python3.9/site-packages/jax/linear_util.py in call_wrapped(self, *args, **kwargs)
166
167 try:
--> 168 ans = self.f(*args, **dict(self.params, **kwargs))
169 except:
170 # Some transformations yield from inside context managers, so we have to
/usr/local/lib/python3.9/site-packages/jax/_src/dispatch.py in prim_fun(*args)
141 device = _device_from_arg_devices(arg_devices)
142 def prim_fun(*args):
--> 143 out = prim.bind(*args, **params)
144 if prim.multiple_results:
145 return out
/usr/local/lib/python3.9/site-packages/jax/core.py in bind(self, *args, **params)
321 assert (not config.jax_enable_checks or
322 all(isinstance(arg, Tracer) or valid_jaxtype(arg) for arg in args)), args
--> 323 return self.bind_with_trace(find_top_trace(args), args, params)
324
325 def bind_with_trace(self, trace, args, params):
/usr/local/lib/python3.9/site-packages/jax/core.py in bind_with_trace(self, trace, args, params)
324
325 def bind_with_trace(self, trace, args, params):
--> 326 out = trace.process_primitive(self, map(trace.full_raise, args), params)
327 return map(full_lower, out) if self.multiple_results else full_lower(out)
328
/usr/local/lib/python3.9/site-packages/jax/interpreters/partial_eval.py in process_primitive(self, primitive, tracers, params)
1558 if primitive in custom_staging_rules:
1559 return custom_staging_rules[primitive](self, *tracers, **params)
-> 1560 return self.default_process_primitive(primitive, tracers, params)
1561
1562 def default_process_primitive(self, primitive, tracers, params):
/usr/local/lib/python3.9/site-packages/jax/interpreters/partial_eval.py in default_process_primitive(self, primitive, tracers, params)
1562 def default_process_primitive(self, primitive, tracers, params):
1563 avals = [t.aval for t in tracers]
-> 1564 out_avals, effects = primitive.abstract_eval(*avals, **params)
1565 out_avals = [out_avals] if not primitive.multiple_results else out_avals
1566 source_info = source_info_util.current()
/usr/local/lib/python3.9/site-packages/jax/core.py in abstract_eval_(*args, **kwargs)
357 def _effect_free_abstract_eval(abstract_eval):
358 def abstract_eval_(*args, **kwargs):
--> 359 return abstract_eval(*args, **kwargs), no_effects
360 return abstract_eval_
361
/usr/local/lib/python3.9/site-packages/jax/_src/lax/utils.py in standard_abstract_eval(prim, shape_rule, dtype_rule, weak_type_rule, named_shape_rule, *avals, **kwargs)
64 return core.ConcreteArray(out.dtype, out, weak_type=weak_type)
65 elif least_specialized is core.ShapedArray:
---> 66 return core.ShapedArray(shape_rule(*avals, **kwargs),
67 dtype_rule(*avals, **kwargs), weak_type=weak_type,
68 named_shape=named_shape_rule(*avals, **kwargs))
/usr/local/lib/python3.9/site-packages/jax/_src/lax/control_flow.py in _cumred_shape_rule(x, axis, reverse)
2873 def _cumred_shape_rule(x, *, axis: int, reverse: bool):
2874 if axis < 0 or axis >= x.ndim:
-> 2875 raise ValueError(
2876 "axis {} is out of bounds for array of shape {}".format(axis, x.shape))
2877 return x.shape
ValueError: axis -1 is out of bounds for array of shape (2, 3)"><pre class="notranslate"><code class="notranslate">---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-9-b034345b2caa> in <module>
15
16 arg_0 = array.clone()
---> 17 res1 = fn(arg_0)
<ipython-input-9-b034345b2caa> in fn(arg_0)
3 def fn(arg_0):
4 axis = -1
----> 5 return jax.lax.cummin(arg_0, axis=axis).sum()
6
7 mykey = jax.random.PRNGKey(14830444)
/usr/local/lib/python3.9/site-packages/jax/_src/lax/control_flow.py in cummin(operand, axis, reverse)
2869 def cummin(operand: Array, axis: int = 0, reverse: bool = False) -> Array:
2870 """Computes a cumulative minimum along `axis`."""
-> 2871 return cummin_p.bind(operand, axis=int(axis), reverse=bool(reverse))
2872
2873 def _cumred_shape_rule(x, *, axis: int, reverse: bool):
/usr/local/lib/python3.9/site-packages/jax/core.py in bind(self, *args, **params)
321 assert (not config.jax_enable_checks or
322 all(isinstance(arg, Tracer) or valid_jaxtype(arg) for arg in args)), args
--> 323 return self.bind_with_trace(find_top_trace(args), args, params)
324
325 def bind_with_trace(self, trace, args, params):
/usr/local/lib/python3.9/site-packages/jax/core.py in bind_with_trace(self, trace, args, params)
324
325 def bind_with_trace(self, trace, args, params):
--> 326 out = trace.process_primitive(self, map(trace.full_raise, args), params)
327 return map(full_lower, out) if self.multiple_results else full_lower(out)
328
/usr/local/lib/python3.9/site-packages/jax/core.py in process_primitive(self, primitive, tracers, params)
673
674 def process_primitive(self, primitive, tracers, params):
--> 675 return primitive.impl(*tracers, **params)
676
677 def process_call(self, primitive, f, tracers, params):
/usr/local/lib/python3.9/site-packages/jax/_src/dispatch.py in apply_primitive(prim, *args, **params)
96 def apply_primitive(prim, *args, **params):
97 """Impl rule that compiles and runs a single primitive 'prim' using XLA."""
---> 98 compiled_fun = xla_primitive_callable(prim, *unsafe_map(arg_spec, args),
99 **params)
100 return compiled_fun(*args)
/usr/local/lib/python3.9/site-packages/jax/_src/util.py in wrapper(*args, **kwargs)
217 return f(*args, **kwargs)
218 else:
--> 219 return cached(config._trace_context(), *args, **kwargs)
220
221 wrapper.cache_clear = cached.cache_clear
/usr/local/lib/python3.9/site-packages/jax/_src/util.py in cached(_, *args, **kwargs)
210 @functools.lru_cache(max_size)
211 def cached(_, *args, **kwargs):
--> 212 return f(*args, **kwargs)
213
214 @functools.wraps(f)
/usr/local/lib/python3.9/site-packages/jax/_src/dispatch.py in xla_primitive_callable(prim, *arg_specs, **params)
146 else:
147 return out,
--> 148 compiled = _xla_callable_uncached(lu.wrap_init(prim_fun), device, None,
149 prim.name, donated_invars, False, *arg_specs)
150 if not prim.multiple_results:
/usr/local/lib/python3.9/site-packages/jax/_src/dispatch.py in _xla_callable_uncached(fun, device, backend, name, donated_invars, keep_unused, *arg_specs)
228 def _xla_callable_uncached(fun: lu.WrappedFun, device, backend, name,
229 donated_invars, keep_unused, *arg_specs):
--> 230 return lower_xla_callable(fun, device, backend, name, donated_invars, False,
231 keep_unused, *arg_specs).compile().unsafe_call
232
/usr/local/lib/python3.9/site-packages/jax/_src/profiler.py in wrapper(*args, **kwargs)
204 def wrapper(*args, **kwargs):
205 with TraceAnnotation(name, **decorator_kwargs):
--> 206 return func(*args, **kwargs)
207 return wrapper
208 return wrapper
/usr/local/lib/python3.9/site-packages/jax/_src/dispatch.py in lower_xla_callable(fun, device, backend, name, donated_invars, always_lower, keep_unused, *arg_specs)
270 with log_elapsed_time(f"Finished tracing + transforming {fun.__name__} "
271 "for jit in {elapsed_time} sec"):
--> 272 jaxpr, out_avals, consts = pe.trace_to_jaxpr_final(
273 fun, abstract_args, pe.debug_info_final(fun, "jit"), which_explicit)
274 if any(isinstance(c, core.Tracer) for c in consts):
/usr/local/lib/python3.9/site-packages/jax/_src/profiler.py in wrapper(*args, **kwargs)
204 def wrapper(*args, **kwargs):
205 with TraceAnnotation(name, **decorator_kwargs):
--> 206 return func(*args, **kwargs)
207 return wrapper
208 return wrapper
/usr/local/lib/python3.9/site-packages/jax/interpreters/partial_eval.py in trace_to_jaxpr_final(fun, in_avals, debug_info, keep_inputs)
1891 main.jaxpr_stack = () # type: ignore
1892 with core.new_sublevel():
-> 1893 jaxpr, out_avals, consts = trace_to_subjaxpr_dynamic(
1894 fun, main, in_avals, keep_inputs=keep_inputs)
1895 del fun, main
/usr/local/lib/python3.9/site-packages/jax/interpreters/partial_eval.py in trace_to_subjaxpr_dynamic(fun, main, in_avals, keep_inputs)
1863 in_tracers = _input_type_to_tracers(trace, in_avals)
1864 in_tracers_ = [t for t, keep in zip(in_tracers, keep_inputs) if keep]
-> 1865 ans = fun.call_wrapped(*in_tracers_)
1866 out_tracers = map(trace.full_raise, ans)
1867 jaxpr, consts = frame.to_jaxpr(out_tracers)
/usr/local/lib/python3.9/site-packages/jax/linear_util.py in call_wrapped(self, *args, **kwargs)
166
167 try:
--> 168 ans = self.f(*args, **dict(self.params, **kwargs))
169 except:
170 # Some transformations yield from inside context managers, so we have to
/usr/local/lib/python3.9/site-packages/jax/_src/dispatch.py in prim_fun(*args)
141 device = _device_from_arg_devices(arg_devices)
142 def prim_fun(*args):
--> 143 out = prim.bind(*args, **params)
144 if prim.multiple_results:
145 return out
/usr/local/lib/python3.9/site-packages/jax/core.py in bind(self, *args, **params)
321 assert (not config.jax_enable_checks or
322 all(isinstance(arg, Tracer) or valid_jaxtype(arg) for arg in args)), args
--> 323 return self.bind_with_trace(find_top_trace(args), args, params)
324
325 def bind_with_trace(self, trace, args, params):
/usr/local/lib/python3.9/site-packages/jax/core.py in bind_with_trace(self, trace, args, params)
324
325 def bind_with_trace(self, trace, args, params):
--> 326 out = trace.process_primitive(self, map(trace.full_raise, args), params)
327 return map(full_lower, out) if self.multiple_results else full_lower(out)
328
/usr/local/lib/python3.9/site-packages/jax/interpreters/partial_eval.py in process_primitive(self, primitive, tracers, params)
1558 if primitive in custom_staging_rules:
1559 return custom_staging_rules[primitive](self, *tracers, **params)
-> 1560 return self.default_process_primitive(primitive, tracers, params)
1561
1562 def default_process_primitive(self, primitive, tracers, params):
/usr/local/lib/python3.9/site-packages/jax/interpreters/partial_eval.py in default_process_primitive(self, primitive, tracers, params)
1562 def default_process_primitive(self, primitive, tracers, params):
1563 avals = [t.aval for t in tracers]
-> 1564 out_avals, effects = primitive.abstract_eval(*avals, **params)
1565 out_avals = [out_avals] if not primitive.multiple_results else out_avals
1566 source_info = source_info_util.current()
/usr/local/lib/python3.9/site-packages/jax/core.py in abstract_eval_(*args, **kwargs)
357 def _effect_free_abstract_eval(abstract_eval):
358 def abstract_eval_(*args, **kwargs):
--> 359 return abstract_eval(*args, **kwargs), no_effects
360 return abstract_eval_
361
/usr/local/lib/python3.9/site-packages/jax/_src/lax/utils.py in standard_abstract_eval(prim, shape_rule, dtype_rule, weak_type_rule, named_shape_rule, *avals, **kwargs)
64 return core.ConcreteArray(out.dtype, out, weak_type=weak_type)
65 elif least_specialized is core.ShapedArray:
---> 66 return core.ShapedArray(shape_rule(*avals, **kwargs),
67 dtype_rule(*avals, **kwargs), weak_type=weak_type,
68 named_shape=named_shape_rule(*avals, **kwargs))
/usr/local/lib/python3.9/site-packages/jax/_src/lax/control_flow.py in _cumred_shape_rule(x, axis, reverse)
2873 def _cumred_shape_rule(x, *, axis: int, reverse: bool):
2874 if axis < 0 or axis >= x.ndim:
-> 2875 raise ValueError(
2876 "axis {} is out of bounds for array of shape {}".format(axis, x.shape))
2877 return x.shape
ValueError: axis -1 is out of bounds for array of shape (2, 3)
</code></pre></div>
<p dir="auto">version: 0.3.13</p> | 1 |
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Your code here
import pandas as pd
tables = pd.read_html('D:\\myhtml.html', header=0)
print (tables)"><pre class="notranslate"><span class="pl-c"># Your code here</span>
<span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-s1">tables</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_html</span>(<span class="pl-s">'D:<span class="pl-cce">\\</span>myhtml.html'</span>, <span class="pl-s1">header</span><span class="pl-c1">=</span><span class="pl-c1">0</span>)
<span class="pl-en">print</span> (<span class="pl-s1">tables</span>)</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">[The html code looks like below. Note simple table scrapping looks good but on this one exactly it is not working as expected<br>
<a href="https://drive.google.com/file/d/0B5HhBthFvDrtMWNtRDBhS1lQcGM/view?usp=sharing" rel="nofollow">The html code</a></p>
<p dir="auto">I have a html file locally with multiple tables. Sometimes the content of the table is exactly the same including headers. While reading it through pandas I have noticed that when two tables are exactly identical it will drop the second one as if it is not there. When I change one Value value in the second table it will read the second table also and display.</p>
<p dir="auto">How can i stop pandas doing that and read every table. Or is it a feature or bug<br>
Attaching the exact HTML file in link. If you see there are 4 tables. Still I get only 3 tables values. The big 2 two tables have exact same data and it is publishing only first one</p>
<p dir="auto">environment : Anaconda 3.6</p>
<p dir="auto">]</p>
<p dir="auto"><strong>Note</strong>: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before.<br>
Please check first before submitting so that we do not have to handle and close duplicates!</p>
<p dir="auto"><strong>Note</strong>: Many problems can be resolved by simply upgrading <code class="notranslate">pandas</code> to the latest version. Before submitting, please check<br>
if that solution works for you. If possible, you may want to check if <code class="notranslate">master</code> addresses this issue, but that is not necessary.</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">Ideally it should show 4 tables. Showing only 3</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]<br>
INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.6.0.final.0<br>
python-bits: 64<br>
OS: Windows<br>
OS-release: 7<br>
machine: AMD64<br>
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: en<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.19.2<br>
nose: 1.3.7<br>
pip: 9.0.1<br>
setuptools: 27.2.0<br>
Cython: 0.25.2<br>
numpy: 1.11.3<br>
scipy: 0.18.1<br>
statsmodels: 0.6.1<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: 1.5.1<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2016.10<br>
blosc: None<br>
bottleneck: 1.2.0<br>
tables: 3.2.2<br>
numexpr: 2.6.1<br>
matplotlib: 2.0.0<br>
openpyxl: 2.4.1<br>
xlrd: 1.0.0<br>
xlwt: 1.2.0<br>
xlsxwriter: 0.9.6<br>
lxml: 3.7.2<br>
bs4: 4.6.0<br>
html5lib: 0.9999999<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: 1.1.5<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.4<br>
boto: 2.45.0<br>
pandas_datareader: None</p>
</details> | <h4 dir="auto">Code Sample</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def get_user_account_credentials(): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L160
from oauth2client.client import OAuth2WebServerFlow
from oauth2client.file import Storage
from oauth2client.tools import run_flow, argparser
reauth = False
flow = OAuth2WebServerFlow(
client_id=('495642085510-k0tmvj2m941jhre2nbqka17vqpjfddtd'
'.apps.googleusercontent.com'),
client_secret='kOc9wMptUtxkcIFbtZCcrEAc',
scope=['https://www.googleapis.com/auth/bigquery'],
redirect_uri='urn:ietf:wg:oauth:2.0:oob')
storage = Storage('bigquery_credentials.dat')
credentials = storage.get()
if credentials is None or credentials.invalid or reauth:
credentials = run_flow(flow, storage, argparser.parse_args([]))
return credentials
def _generate_bq_schema(df, default_type='STRING'): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L735
""" Given a passed df, generate the associated Google BigQuery schema.
Parameters
----------
df : DataFrame
default_type : string
The default big query type in case the type of the column
does not exist in the schema.
"""
type_mapping = {
'i': 'INTEGER',
'b': 'BOOLEAN',
'f': 'FLOAT',
'O': 'STRING',
'S': 'STRING',
'U': 'STRING',
'M': 'TIMESTAMP'
}
fields = []
for column_name, dtype in df.dtypes.iteritems():
fields.append({'name': column_name,
'type': type_mapping.get(dtype.kind, default_type)})
return {'fields': fields}
def get_service(): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L267
from apiclient.discovery import build
import httplib2
http = httplib2.Http()
credentials = get_user_account_credentials()
http = credentials.authorize(http)
return build('bigquery', 'v2', http=http)
def verify_schema(dataset_id, table_id, schema): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L476
from apiclient.errors import HttpError
bigquery_service = get_service()
try:
return (bigquery_service.tables().get(
projectId='publicdata',
datasetId=dataset_id,
tableId=table_id
).execute()['schema']) == schema
except HttpError as ex:
pass
# self.process_http_error(ex)
def main():
shakespeare_df = pd.DataFrame({'word': 'foo', 'word_count': [1], 'corpus': 'bar', 'corpus_date': [2016]},
columns=['word', 'word_count', 'corpus', 'corpus_date'])
table_schema = _generate_bq_schema(shakespeare_df)
print 'Is the schema verified?'
print verify_schema('samples', 'shakespeare', table_schema)
if __name__ == '__main__':
main()"><pre class="notranslate"><code class="notranslate">def get_user_account_credentials(): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L160
from oauth2client.client import OAuth2WebServerFlow
from oauth2client.file import Storage
from oauth2client.tools import run_flow, argparser
reauth = False
flow = OAuth2WebServerFlow(
client_id=('495642085510-k0tmvj2m941jhre2nbqka17vqpjfddtd'
'.apps.googleusercontent.com'),
client_secret='kOc9wMptUtxkcIFbtZCcrEAc',
scope=['https://www.googleapis.com/auth/bigquery'],
redirect_uri='urn:ietf:wg:oauth:2.0:oob')
storage = Storage('bigquery_credentials.dat')
credentials = storage.get()
if credentials is None or credentials.invalid or reauth:
credentials = run_flow(flow, storage, argparser.parse_args([]))
return credentials
def _generate_bq_schema(df, default_type='STRING'): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L735
""" Given a passed df, generate the associated Google BigQuery schema.
Parameters
----------
df : DataFrame
default_type : string
The default big query type in case the type of the column
does not exist in the schema.
"""
type_mapping = {
'i': 'INTEGER',
'b': 'BOOLEAN',
'f': 'FLOAT',
'O': 'STRING',
'S': 'STRING',
'U': 'STRING',
'M': 'TIMESTAMP'
}
fields = []
for column_name, dtype in df.dtypes.iteritems():
fields.append({'name': column_name,
'type': type_mapping.get(dtype.kind, default_type)})
return {'fields': fields}
def get_service(): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L267
from apiclient.discovery import build
import httplib2
http = httplib2.Http()
credentials = get_user_account_credentials()
http = credentials.authorize(http)
return build('bigquery', 'v2', http=http)
def verify_schema(dataset_id, table_id, schema): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L476
from apiclient.errors import HttpError
bigquery_service = get_service()
try:
return (bigquery_service.tables().get(
projectId='publicdata',
datasetId=dataset_id,
tableId=table_id
).execute()['schema']) == schema
except HttpError as ex:
pass
# self.process_http_error(ex)
def main():
shakespeare_df = pd.DataFrame({'word': 'foo', 'word_count': [1], 'corpus': 'bar', 'corpus_date': [2016]},
columns=['word', 'word_count', 'corpus', 'corpus_date'])
table_schema = _generate_bq_schema(shakespeare_df)
print 'Is the schema verified?'
print verify_schema('samples', 'shakespeare', table_schema)
if __name__ == '__main__':
main()
</code></pre></div>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">We want <code class="notranslate">verify_schema</code> to return True since the dataframe's columns are in the correct order, are named correctly, and have the correct types. The BigQuery table schema, however, has <code class="notranslate">description</code> and <code class="notranslate">mode</code> in addition to <code class="notranslate">name</code> and <code class="notranslate">type</code>.</p>
<p dir="auto">Therefore <code class="notranslate">verify_schema</code> should remove <code class="notranslate">description</code> and <code class="notranslate">mode</code> from the BigQuery table schema when comparing it to the dataframe's schema.</p>
<h4 dir="auto">Solution:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def get_user_account_credentials(): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L160
from oauth2client.client import OAuth2WebServerFlow
from oauth2client.file import Storage
from oauth2client.tools import run_flow, argparser
reauth = False
flow = OAuth2WebServerFlow(
client_id=('495642085510-k0tmvj2m941jhre2nbqka17vqpjfddtd'
'.apps.googleusercontent.com'),
client_secret='kOc9wMptUtxkcIFbtZCcrEAc',
scope=['https://www.googleapis.com/auth/bigquery'],
redirect_uri='urn:ietf:wg:oauth:2.0:oob')
storage = Storage('bigquery_credentials.dat')
credentials = storage.get()
if credentials is None or credentials.invalid or reauth:
credentials = run_flow(flow, storage, argparser.parse_args([]))
return credentials
def _generate_bq_schema(df, default_type='STRING'): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L735
""" Given a passed df, generate the associated Google BigQuery schema.
Parameters
----------
df : DataFrame
default_type : string
The default big query type in case the type of the column
does not exist in the schema.
"""
type_mapping = {
'i': 'INTEGER',
'b': 'BOOLEAN',
'f': 'FLOAT',
'O': 'STRING',
'S': 'STRING',
'U': 'STRING',
'M': 'TIMESTAMP'
}
fields = []
for column_name, dtype in df.dtypes.iteritems():
fields.append({'name': column_name,
'type': type_mapping.get(dtype.kind, default_type)})
return {'fields': fields}
def get_service(): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L267
from apiclient.discovery import build
import httplib2
http = httplib2.Http()
credentials = get_user_account_credentials()
http = credentials.authorize(http)
return build('bigquery', 'v2', http=http)
def verify_schema(dataset_id, table_id, schema): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L476
from apiclient.errors import HttpError
bigquery_service = get_service()
try:
return (bigquery_service.tables().get(
projectId='publicdata',
datasetId=dataset_id,
tableId=table_id
).execute()['schema']) == schema
except HttpError as ex:
pass
# self.process_http_error(ex)
def verify_schema_modified(dataset_id, table_id, schema):
from apiclient.errors import HttpError
bigquery_service = get_service()
try:
original_schema = bigquery_service.tables().get(
projectId='publicdata',
datasetId=dataset_id,
tableId=table_id
).execute()['schema']
modified_schema_list = [{key:field[key] for key in field if key != 'mode' and key != 'description'}
for field in original_schema['fields']]
return {'fields': modified_schema_list} == schema
except HttpError as ex:
pass
#self.process_http_error(ex)
def main():
shakespeare_df = pd.DataFrame({'word': 'foo', 'word_count': [1], 'corpus': 'bar', 'corpus_date': [2016]},
columns=['word', 'word_count', 'corpus', 'corpus_date'])
table_schema = _generate_bq_schema(shakespeare_df)
print 'Is the schema verified?'
print verify_schema('samples', 'shakespeare', table_schema)
print verify_schema_modified('samples', 'shakespeare', table_schema)
if __name__ == '__main__':
main()"><pre class="notranslate"><code class="notranslate">def get_user_account_credentials(): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L160
from oauth2client.client import OAuth2WebServerFlow
from oauth2client.file import Storage
from oauth2client.tools import run_flow, argparser
reauth = False
flow = OAuth2WebServerFlow(
client_id=('495642085510-k0tmvj2m941jhre2nbqka17vqpjfddtd'
'.apps.googleusercontent.com'),
client_secret='kOc9wMptUtxkcIFbtZCcrEAc',
scope=['https://www.googleapis.com/auth/bigquery'],
redirect_uri='urn:ietf:wg:oauth:2.0:oob')
storage = Storage('bigquery_credentials.dat')
credentials = storage.get()
if credentials is None or credentials.invalid or reauth:
credentials = run_flow(flow, storage, argparser.parse_args([]))
return credentials
def _generate_bq_schema(df, default_type='STRING'): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L735
""" Given a passed df, generate the associated Google BigQuery schema.
Parameters
----------
df : DataFrame
default_type : string
The default big query type in case the type of the column
does not exist in the schema.
"""
type_mapping = {
'i': 'INTEGER',
'b': 'BOOLEAN',
'f': 'FLOAT',
'O': 'STRING',
'S': 'STRING',
'U': 'STRING',
'M': 'TIMESTAMP'
}
fields = []
for column_name, dtype in df.dtypes.iteritems():
fields.append({'name': column_name,
'type': type_mapping.get(dtype.kind, default_type)})
return {'fields': fields}
def get_service(): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L267
from apiclient.discovery import build
import httplib2
http = httplib2.Http()
credentials = get_user_account_credentials()
http = credentials.authorize(http)
return build('bigquery', 'v2', http=http)
def verify_schema(dataset_id, table_id, schema): # https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py#L476
from apiclient.errors import HttpError
bigquery_service = get_service()
try:
return (bigquery_service.tables().get(
projectId='publicdata',
datasetId=dataset_id,
tableId=table_id
).execute()['schema']) == schema
except HttpError as ex:
pass
# self.process_http_error(ex)
def verify_schema_modified(dataset_id, table_id, schema):
from apiclient.errors import HttpError
bigquery_service = get_service()
try:
original_schema = bigquery_service.tables().get(
projectId='publicdata',
datasetId=dataset_id,
tableId=table_id
).execute()['schema']
modified_schema_list = [{key:field[key] for key in field if key != 'mode' and key != 'description'}
for field in original_schema['fields']]
return {'fields': modified_schema_list} == schema
except HttpError as ex:
pass
#self.process_http_error(ex)
def main():
shakespeare_df = pd.DataFrame({'word': 'foo', 'word_count': [1], 'corpus': 'bar', 'corpus_date': [2016]},
columns=['word', 'word_count', 'corpus', 'corpus_date'])
table_schema = _generate_bq_schema(shakespeare_df)
print 'Is the schema verified?'
print verify_schema('samples', 'shakespeare', table_schema)
print verify_schema_modified('samples', 'shakespeare', table_schema)
if __name__ == '__main__':
main()
</code></pre></div>
<h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INSTALLED VERSIONS
------------------
commit: 5fd6ed036324f5de28816e2b66348e8a56b96f04
python: 2.7.10.final.0
python-bits: 64
OS: Darwin
OS-release: 15.3.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.1+8.g5fd6ed0
nose: 1.3.6
pip: 8.1.1
setuptools: 20.8.1
Cython: 0.22
numpy: 1.11.0
scipy: 0.13.0b1
statsmodels: None
xarray: None
IPython: 4.0.0
sphinx: 1.3.1
patsy: None
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.3.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: 0.9.2
apiclient: 1.5.0
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.38.0
pandas_datareader: None"><pre class="notranslate"><code class="notranslate">INSTALLED VERSIONS
------------------
commit: 5fd6ed036324f5de28816e2b66348e8a56b96f04
python: 2.7.10.final.0
python-bits: 64
OS: Darwin
OS-release: 15.3.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.1+8.g5fd6ed0
nose: 1.3.6
pip: 8.1.1
setuptools: 20.8.1
Cython: 0.22
numpy: 1.11.0
scipy: 0.13.0b1
statsmodels: None
xarray: None
IPython: 4.0.0
sphinx: 1.3.1
patsy: None
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.3.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: 0.9.2
apiclient: 1.5.0
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.38.0
pandas_datareader: None
</code></pre></div> | 0 |
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">The scale on the y-axis is missing in some logarithmic plots.</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="import matplotlib.pyplot as plt
x = [1, 2]
y = [3.7, 3.8]
plt.plot(x,y)
plt.yscale("log")
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">x</span> <span class="pl-c1">=</span> [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>]
<span class="pl-s1">y</span> <span class="pl-c1">=</span> [<span class="pl-c1">3.7</span>, <span class="pl-c1">3.8</span>]
<span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>,<span class="pl-s1">y</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">yscale</span>(<span class="pl-s">"log"</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"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/39418860/48962990-92f6b580-ef89-11e8-8bd0-31d2314855c5.png"><img src="https://user-images.githubusercontent.com/39418860/48962990-92f6b580-ef89-11e8-8bd0-31d2314855c5.png" alt="abc" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">There should be a scale on the y-axis. Without the scale, you can't tell what the value of y is.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Linux</li>
<li>Matplotlib version: 2.2.2</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): TkAgg</li>
<li>Python version: 3.5.2</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries:</li>
</ul> | <h3 dir="auto">Bug report</h3>
<p dir="auto">For the data in a small range, there is just on tick in the default log scale axis, which means nothing.</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="import matplotlib.pylab as plt
plt.loglog([ 0.53, 0.41],[ 0.53, 0.41] )
plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pylab</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-s1">plt</span>.<span class="pl-en">loglog</span>([ <span class="pl-c1">0.53</span>, <span class="pl-c1">0.41</span>],[ <span class="pl-c1">0.53</span>, <span class="pl-c1">0.41</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"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6657200/27209937-79adcc04-5281-11e7-82d2-003beb5706f4.png"><img src="https://user-images.githubusercontent.com/6657200/27209937-79adcc04-5281-11e7-82d2-003beb5706f4.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong><br>
Give at least two ticks for each axis.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating System: Ubuntu 16.04</li>
<li>Matplotlib Version: 2.02</li>
<li>Python Version: 3.6.0<br>
I install the library by conda.</li>
</ul> | 1 |
<p dir="auto">Hi,</p>
<p dir="auto">Can you make a seperate folder where all you store the shortcuts of PT Run as<br>
sometimes it shows two search results due to the same shortcut being in two location.</p> | <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.18362.295
PowerToys version: 0.11.0
PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.295
PowerToys version: 0.11.0
PowerToy module for which you are reporting the bug (if applicable): FancyZones
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">My main language is Dutch with US (International) keyboard layout and as second language English (United States) with US keyboard. With none of the language setting Win + ~ is working.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">When using US (International) keyboard ~ is a dead key so I think that would not work. But with US keyboard it should work.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4982940/64375040-5500e480-d025-11e9-94bd-b85e5174c0f3.png"><img src="https://user-images.githubusercontent.com/4982940/64375040-5500e480-d025-11e9-94bd-b85e5174c0f3.png" alt="Language selector" style="max-width: 100%;"></a></p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">FancyZone editor is not launched.</p> | 0 |
<p dir="auto">OS: Ubuntu 14.10 x86-64<br>
Atom: 0.168.0</p>
<p dir="auto">line 92: 5289 세그멘테이션 오류 (core dumped) nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$DOT_ATOM_DIR/nohup.out" 2>&1<br>
[5289:0109/072204:ERROR:browser_main_loop.cc(163)] Running without the SUID sandbox! See <a href="https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment" rel="nofollow">https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment</a> for more information on developing with the sandbox on.<br>
App load time: 111ms<br>
[5319:0109/072204:INFO:renderer_main.cc(207)] Renderer process started<br>
[5289:0109/072205:INFO:CONSOLE(58)] "No deserializer found for", source: /opt/atom/resources/app/src/deserializer-manager.js (58)<br>
[5289:0109/072205:INFO:CONSOLE(64)] "Window load time: 1102ms", source: file:///opt/atom/resources/app/static/index.js (64)<br>
Crash dump id: 0cd1948e-e980-4867-a381-c03d6d2ef221</p> | <p dir="auto"><strong>OS:</strong> Ubuntu 14.04<br>
<strong>Atom:</strong> 0.167.0-8f4555b</p>
<h4 dir="auto">Steps to Reproduce</h4>
<ol dir="auto">
<li>Open Atom with <code class="notranslate">--safe</code></li>
<li>File > Open Folder...</li>
<li>Select a project</li>
<li>Open a file</li>
<li>Right-click Paste</li>
</ol>
<p dir="auto">Here is the crash dump of running it in <code class="notranslate">--safe</code> mode: <a href="http://pastebin.com/eKHMHCfq" rel="nofollow">http://pastebin.com/eKHMHCfq</a></p> | 1 |
<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/mui-org/material-ui/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">There should be an intuitive Multiple Select component that has the correct items selected in the popup list. Maybe it would be better to use a list with additional checkboxes in it, something like in this <a href="https://devexpress.github.io/devextreme-reactive/react/grid/docs/guides/column-visibility/" rel="nofollow">demo (when you click the struck through eye</a>. An alternative would be like it is solved in this <a href="https://github.com/mui-org/material-ui/pull/9570" data-hovercard-type="pull_request" data-hovercard-url="/mui/material-ui/pull/9570/hovercard">pull request</a>, but I am not sure if this is the right way, as I like how Single Select components behave. That`s why I opened an own issue for Multiple Select components.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">When creating a Select field with the <code class="notranslate">multiple</code> option and then clicking that initially empty Select field the first item in the popped up list is automatically highlighted.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Go to the official <a href="https://material-ui-next.com/demos/selects/" rel="nofollow">component demo of the multiple <code class="notranslate">Select</code></a> and click it. The first item stays the selected in the popped up list even if you move the mouse pointer elsewhere.</p>
<h2 dir="auto">Context</h2>
<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.25</td>
</tr>
<tr>
<td>React</td>
<td>16.2</td>
</tr>
<tr>
<td>Chrome</td>
<td>63.0.3239.108</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <h3 dir="auto">Problem description</h3>
<p dir="auto">After initial open of menu, first item remains highlighted even after hovering off.</p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto"><code class="notranslate">next</code> branch, menus demo <a href="http://localhost:3000/#/component-demos/menus" rel="nofollow">http://localhost:3000/#/component-demos/menus</a></p>
<ol dir="auto">
<li>click to open</li>
<li>hover to a lower item</li>
</ol>
<h3 dir="auto">Versions</h3>
<p dir="auto"><code class="notranslate">next</code> branch <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/mui/material-ui/commit/a38068f90c28ee240f0622d40a87f6d888dd74e2/hovercard" href="https://github.com/mui/material-ui/commit/a38068f90c28ee240f0622d40a87f6d888dd74e2"><tt>a38068f</tt></a></p>
<ul dir="auto">
<li>Browser: Mac Chrome 52.0.2743.116</li>
<li>Browser: Mac Firefox 48.0.2</li>
<li>Browser: Mac Safari 9.1.2</li>
</ul>
<h3 dir="auto">Images</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/136564/18555732/8166e41a-7b2e-11e6-8354-9b6cb6b9a55f.png"><img src="https://cloud.githubusercontent.com/assets/136564/18555732/8166e41a-7b2e-11e6-8354-9b6cb6b9a55f.png" alt="fullscreen_9_15_16__10_21_am" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">I am new to Glide, i started to use it today because the support for Gif.<br>
but some images were not displayed int the list(see the attachment), which got 200 http code while captured by Fiddler, while displayed well when using Picasso.<br>
Any idea how to solve this, Thannks a lot.</p>
<p dir="auto">These are where and how i used Glide:</p>
<p dir="auto">Code in the adapter:<br>
Glide.with(Application.getInstance()).load(url).into(threeImagesHolder.image0);</p>
<p dir="auto">Code int the layout file:<br>
</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" <ImageView
android:id="@+id/iv_image0"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:layout_marginRight="3dp"
android:background="@drawable/img_holder_bg"
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/iv_image1"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:layout_marginRight="3dp"
android:background="@drawable/img_holder_bg"
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/iv_image2"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:background="@drawable/img_holder_bg"
android:scaleType="centerCrop" />
</LinearLayout>"><pre class="notranslate"><code class="notranslate"> <ImageView
android:id="@+id/iv_image0"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:layout_marginRight="3dp"
android:background="@drawable/img_holder_bg"
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/iv_image1"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:layout_marginRight="3dp"
android:background="@drawable/img_holder_bg"
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/iv_image2"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_vertical"
android:background="@drawable/img_holder_bg"
android:scaleType="centerCrop" />
</LinearLayout>
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2045717/5427468/d2a41cde-83d8-11e4-9d46-aa0677c35e6f.png"><img src="https://cloud.githubusercontent.com/assets/2045717/5427468/d2a41cde-83d8-11e4-9d46-aa0677c35e6f.png" alt="qq 20141214212925" style="max-width: 100%;"></a></p> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IndexOutOfBoundsException: index=6, limit=6, size of type=2
at java.nio.Buffer.checkIndex(Buffer.java:165)
at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:203)
at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$RandomAccessReader.getInt16(ImageHeaderParser.java:315)
at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser.parseExifSegment(ImageHeaderParser.java:199)
at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser.getOrientation(ImageHeaderParser.java:140)
at com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:116)"><pre class="notranslate"><code class="notranslate">java.lang.IndexOutOfBoundsException: index=6, limit=6, size of type=2
at java.nio.Buffer.checkIndex(Buffer.java:165)
at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:203)
at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$RandomAccessReader.getInt16(ImageHeaderParser.java:315)
at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser.parseExifSegment(ImageHeaderParser.java:199)
at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser.getOrientation(ImageHeaderParser.java:140)
at com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:116)
</code></pre></div>
<p dir="auto">Because of the exif data is only 6 bytes which equals to jpeg preamble.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/476886/5317120/c70b59e8-7cce-11e4-9d8c-ae5481233b28.JPG"><img src="https://cloud.githubusercontent.com/assets/476886/5317120/c70b59e8-7cce-11e4-9d8c-ae5481233b28.JPG" alt="1" style="max-width: 100%;"></a></p>
<p dir="auto">Perhaps we can use the Throwable instead of IOException to ignore it.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="try {
orientation = new ImageHeaderParser(stream).getOrientation();
} catch (IOException Throwable e) {
if (Log.isLoggable(TAG, Log.WARN)) {
Log.w(TAG, "Cannot determine the image orientation from header", e);
}
}"><pre class="notranslate"><code class="notranslate">try {
orientation = new ImageHeaderParser(stream).getOrientation();
} catch (IOException Throwable e) {
if (Log.isLoggable(TAG, Log.WARN)) {
Log.w(TAG, "Cannot determine the image orientation from header", e);
}
}
</code></pre></div> | 1 |
<p dir="auto">From the docs on static HTML export:</p>
<blockquote>
<p dir="auto">So, you could only use pathname, query and asPath fields of the context object passed to getInitialProps. You can't use req or res fields.</p>
</blockquote>
<p dir="auto">Does static export entirely negate the ability to use the _error.js component for error handling, which is dependent on <code class="notranslate">res</code>? How would I go about creating a 404 page?</p>
<p dir="auto">The current behavior is that any unknown routes redirect to <code class="notranslate">/index.js</code>.</p>
<p dir="auto">One possible solution I can think of is to maintain a list of all routes and check against it to see if pathname is found. However this seems especially onerous to run on every page load for a site/blog that generates 100s of routes.</p>
<p dir="auto">Is there a way to do this?<br>
Or is it possible to define a custom error route and redirect to that instead?<br>
Or even better, catch all routes within subfolders? eg</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" {
...routes,
'/*': { page: '/_error.js' },
'/blog/*': { page: '/blog/_error.js' },
}"><pre class="notranslate"><code class="notranslate"> {
...routes,
'/*': { page: '/_error.js' },
'/blog/*': { page: '/blog/_error.js' },
}
</code></pre></div>
<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> | <h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">Building nextjs app throws an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Failed to compile.
chunk c8f7fe3b0e41be846d5687592cf2018ff6e22687
static/css/030f3c81fcf6deab04e9.css
Cannot read property 'pop' of undefined"><pre class="notranslate"><code class="notranslate">Failed to compile.
chunk c8f7fe3b0e41be846d5687592cf2018ff6e22687
static/css/030f3c81fcf6deab04e9.css
Cannot read property 'pop' of undefined
</code></pre></div>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">add some [name].module.css and build the app</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">App builds without errors</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto">If applicable, add screenshots to help explain your problem.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Tried on MacOS (nodejs v10 and nodejs v12) and Linux (Docker container node:12)</li>
<li>Version of Next.js: 9.0.2</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">adding next snippet in my next.config.js solves the issue but I don't think it is the best way</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" if (config.optimization.splitChunks) {
config.optimization.splitChunks.cacheGroups.shared.enforce = true;
}"><pre class="notranslate"><code class="notranslate"> if (config.optimization.splitChunks) {
config.optimization.splitChunks.cacheGroups.shared.enforce = true;
}
</code></pre></div> | 0 |
<h3 dir="auto">Describe the issue:</h3>
<p dir="auto">In numpy 1.19.3 or later, when using np.linalg.svd on a certain architecture, the 2nd and 3rd columns of the <code class="notranslate">u</code> result array and the 2nd and 3rd rows of the <code class="notranslate">vh</code> result arrays are switched.</p>
<h3 dir="auto">Reproduce the code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
array = np.array([[-4.0, -2.0, -2.0], [-2.0, -4.0, -2.0], [-2.0, -2.0, -4.0]])
expected_u = np.array(
[
[-5.77350269e-01, 8.16496581e-01, -5.04179082e-17],
[-5.77350269e-01, -4.08248290e-01, -7.07106781e-01],
[-5.77350269e-01, -4.08248290e-01, 7.07106781e-01],
]
)
expected_vh = np.array(
[
[0.57735027, 0.57735027, 0.57735027],
[-0.81649658, 0.40824829, 0.40824829],
[-0.0, 0.70710678, -0.70710678],
]
)
(u, _, vh) = np.linalg.svd(array, full_matrices=False)
np.testing.assert_almost_equal(expected_u, u)
np.testing.assert_almost_equal(expected_vh, vh)"><pre class="notranslate"><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-s1">array</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([[<span class="pl-c1">-</span><span class="pl-c1">4.0</span>, <span class="pl-c1">-</span><span class="pl-c1">2.0</span>, <span class="pl-c1">-</span><span class="pl-c1">2.0</span>], [<span class="pl-c1">-</span><span class="pl-c1">2.0</span>, <span class="pl-c1">-</span><span class="pl-c1">4.0</span>, <span class="pl-c1">-</span><span class="pl-c1">2.0</span>], [<span class="pl-c1">-</span><span class="pl-c1">2.0</span>, <span class="pl-c1">-</span><span class="pl-c1">2.0</span>, <span class="pl-c1">-</span><span class="pl-c1">4.0</span>]])
<span class="pl-s1">expected_u</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(
[
[<span class="pl-c1">-</span><span class="pl-c1">5.77350269e-01</span>, <span class="pl-c1">8.16496581e-01</span>, <span class="pl-c1">-</span><span class="pl-c1">5.04179082e-17</span>],
[<span class="pl-c1">-</span><span class="pl-c1">5.77350269e-01</span>, <span class="pl-c1">-</span><span class="pl-c1">4.08248290e-01</span>, <span class="pl-c1">-</span><span class="pl-c1">7.07106781e-01</span>],
[<span class="pl-c1">-</span><span class="pl-c1">5.77350269e-01</span>, <span class="pl-c1">-</span><span class="pl-c1">4.08248290e-01</span>, <span class="pl-c1">7.07106781e-01</span>],
]
)
<span class="pl-s1">expected_vh</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(
[
[<span class="pl-c1">0.57735027</span>, <span class="pl-c1">0.57735027</span>, <span class="pl-c1">0.57735027</span>],
[<span class="pl-c1">-</span><span class="pl-c1">0.81649658</span>, <span class="pl-c1">0.40824829</span>, <span class="pl-c1">0.40824829</span>],
[<span class="pl-c1">-</span><span class="pl-c1">0.0</span>, <span class="pl-c1">0.70710678</span>, <span class="pl-c1">-</span><span class="pl-c1">0.70710678</span>],
]
)
(<span class="pl-s1">u</span>, <span class="pl-s1">_</span>, <span class="pl-s1">vh</span>) <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">linalg</span>.<span class="pl-en">svd</span>(<span class="pl-s1">array</span>, <span class="pl-s1">full_matrices</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
<span class="pl-s1">np</span>.<span class="pl-s1">testing</span>.<span class="pl-en">assert_almost_equal</span>(<span class="pl-s1">expected_u</span>, <span class="pl-s1">u</span>)
<span class="pl-s1">np</span>.<span class="pl-s1">testing</span>.<span class="pl-en">assert_almost_equal</span>(<span class="pl-s1">expected_vh</span>, <span class="pl-s1">vh</span>)</pre></div>
<h3 dir="auto">Error message:</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Mismatched elements: 6 / 9 (66.7%)
Max absolute difference: 1.11535507
Max relative difference: 1.60871119e+16
x: array([[-5.7735027e-01, 8.1649658e-01, -5.0417908e-17],
[-5.7735027e-01, -4.0824829e-01, -7.0710678e-01],
[-5.7735027e-01, -4.0824829e-01, 7.0710678e-01]])
y: array([[-5.7735027e-01, -5.0754703e-17, 8.1649658e-01],
[-5.7735027e-01, -7.0710678e-01, -4.0824829e-01],
[-5.7735027e-01, 7.0710678e-01, -4.0824829e-01]])
Exited with code exit status 1"><pre class="notranslate">Mismatched elements: 6 / 9 (66.7%)
Max absolute difference: 1.11535507
Max relative difference: 1.60871119e+16
x: array([[-5.7735027e-01, 8.1649658e-01, -5.0417908e-17],
[-5.7735027e-01, -4.0824829e-01, -7.0710678e-01],
[-5.7735027e-01, -4.0824829e-01, 7.0710678e-01]])
y: array([[-5.7735027e-01, -5.0754703e-17, 8.1649658e-01],
[-5.7735027e-01, -7.0710678e-01, -4.0824829e-01],
[-5.7735027e-01, 7.0710678e-01, -4.0824829e-01]])
Exited with code <span class="pl-c1">exit</span> status 1</pre></div>
<h3 dir="auto">Runtime information:</h3>
<p dir="auto">1.19.3<br>
3.9.13 (main, May 27 2022, 22:45:39)<br>
[GCC 9.4.0]</p>
<p dir="auto">Note: This behavior is also occurring with numpy 1.24.1</p>
<h3 dir="auto">Context for the issue:</h3>
<p dir="auto">The behavior is observed in CircleCI with the following info:<br>
Docker with Python using cimg/python:3.9.13<br>
Model name: Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz</p>
<p dir="auto">Branch featuring bug: <a href="https://github.com/lace/entente/tree/numpy-bug">https://github.com/lace/entente/tree/numpy-bug</a><br>
Failure in CI: <a href="https://app.circleci.com/pipelines/github/lace/entente/1829/workflows/8973da1a-38f4-46a3-8dc5-63a8a1e4ee17/jobs/5937" rel="nofollow">https://app.circleci.com/pipelines/github/lace/entente/1829/workflows/8973da1a-38f4-46a3-8dc5-63a8a1e4ee17/jobs/5937</a><br>
CI config: <a href="https://github.com/lace/entente/blob/numpy-bug/.circleci/config.yml#L18">https://github.com/lace/entente/blob/numpy-bug/.circleci/config.yml</a></p>
<p dir="auto">Not reproducible on MacOS or Linux native.<br>
Not reproducible on MacOS or Linux with same Docker image.<br>
Not reproducible in Numpy 1.19.2.</p> | <h3 dir="auto">Describe the issue:</h3>
<p dir="auto"><a href="https://numpy.org/devdocs/reference/generated/numpy.lib.format.html" rel="nofollow">NPZ files</a> are zip archives and may contain <em>duplicate</em> entries. While <a href="https://numpy.org/devdocs/reference/generated/numpy.savez.html" rel="nofollow">numpy.savez</a> prevents this by ensuring unique keys on the API level, it is easy to generate a .npz file with duplicate keys by other means, e.g. using <a href="https://docs.python.org/3/library/zipfile.html#zipfile-objects" rel="nofollow">zipfile.ZipFile</a>.</p>
<p dir="auto">When iterating over such a .npz file via <a href="https://github.com/numpy/numpy/blob/c37b6af5577584f6ab0a08a161d9d657741341ea/numpy/lib/npyio.py#L104">NpzFile.items()</a>, duplicate keys are yielded multiple times, but always with the <strong>last value stored</strong>. It is not possible to retrieve previous values stored under that key (at least not using the <code class="notranslate">NpzFile</code> API) although they are contained in the zip archive.</p>
<p dir="auto">I would expect one of these alternative behaviors for <code class="notranslate">NpzFile.items()</code>:</p>
<ol dir="auto">
<li>Yield a duplicate key only <em>once</em> (with the last value stored). This is consistent with the dictionary-like API of <code class="notranslate">NpzFile</code>, but discards content in the zip archive.</li>
<li>Yield the correct values stored with duplicate keys. This is consistent with the content of the zip archive, but somewhat at odds with the dictionary-like API.</li>
</ol>
<p dir="auto">If there is any interest, I can start contributing a PR for either behavior.</p>
<h3 dir="auto">Reproduce the code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from zipfile import ZipFile
import numpy as np
# Generate data.npz with duplicate keys
with ZipFile("data.npz", "w") as zf:
for a in ([1], [2, 2], [3, 3, 3]):
with zf.open("duplicate_key.npy", "w") as f:
np.save(f, a)
# Iterating over data.npz with NpzFile.items() yields the last value multiple times
for key, val in np.load("data.npz").items():
print(key, val)
# Output:
# duplicate_key [3 3 3]
# duplicate_key [3 3 3]
# duplicate_key [3 3 3]
# But all three original values are still contained in zip file
with ZipFile("data.npz", "r") as zf:
for info in zf.infolist():
with zf.open(info) as f:
print(info, np.load(f))
# Output:
# <ZipInfo filename='duplicate_key.npy' filemode='?rw-------' file_size=136> [1]
# <ZipInfo filename='duplicate_key.npy' filemode='?rw-------' file_size=144> [2 2]
# <ZipInfo filename='duplicate_key.npy' filemode='?rw-------' file_size=152> [3 3 3]"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">zipfile</span> <span class="pl-k">import</span> <span class="pl-v">ZipFile</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-c"># Generate data.npz with duplicate keys</span>
<span class="pl-k">with</span> <span class="pl-v">ZipFile</span>(<span class="pl-s">"data.npz"</span>, <span class="pl-s">"w"</span>) <span class="pl-k">as</span> <span class="pl-s1">zf</span>:
<span class="pl-k">for</span> <span class="pl-s1">a</span> <span class="pl-c1">in</span> ([<span class="pl-c1">1</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">2</span>], [<span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>]):
<span class="pl-k">with</span> <span class="pl-s1">zf</span>.<span class="pl-en">open</span>(<span class="pl-s">"duplicate_key.npy"</span>, <span class="pl-s">"w"</span>) <span class="pl-k">as</span> <span class="pl-s1">f</span>:
<span class="pl-s1">np</span>.<span class="pl-en">save</span>(<span class="pl-s1">f</span>, <span class="pl-s1">a</span>)
<span class="pl-c"># Iterating over data.npz with NpzFile.items() yields the last value multiple times</span>
<span class="pl-k">for</span> <span class="pl-s1">key</span>, <span class="pl-s1">val</span> <span class="pl-c1">in</span> <span class="pl-s1">np</span>.<span class="pl-en">load</span>(<span class="pl-s">"data.npz"</span>).<span class="pl-en">items</span>():
<span class="pl-en">print</span>(<span class="pl-s1">key</span>, <span class="pl-s1">val</span>)
<span class="pl-c"># Output:</span>
<span class="pl-c"># duplicate_key [3 3 3]</span>
<span class="pl-c"># duplicate_key [3 3 3]</span>
<span class="pl-c"># duplicate_key [3 3 3]</span>
<span class="pl-c"># But all three original values are still contained in zip file</span>
<span class="pl-k">with</span> <span class="pl-v">ZipFile</span>(<span class="pl-s">"data.npz"</span>, <span class="pl-s">"r"</span>) <span class="pl-k">as</span> <span class="pl-s1">zf</span>:
<span class="pl-k">for</span> <span class="pl-s1">info</span> <span class="pl-c1">in</span> <span class="pl-s1">zf</span>.<span class="pl-en">infolist</span>():
<span class="pl-k">with</span> <span class="pl-s1">zf</span>.<span class="pl-en">open</span>(<span class="pl-s1">info</span>) <span class="pl-k">as</span> <span class="pl-s1">f</span>:
<span class="pl-en">print</span>(<span class="pl-s1">info</span>, <span class="pl-s1">np</span>.<span class="pl-en">load</span>(<span class="pl-s1">f</span>))
<span class="pl-c"># Output:</span>
<span class="pl-c"># <ZipInfo filename='duplicate_key.npy' filemode='?rw-------' file_size=136> [1]</span>
<span class="pl-c"># <ZipInfo filename='duplicate_key.npy' filemode='?rw-------' file_size=144> [2 2]</span>
<span class="pl-c"># <ZipInfo filename='duplicate_key.npy' filemode='?rw-------' file_size=152> [3 3 3]</span></pre></div>
<h3 dir="auto">Error message:</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">NumPy/Python version information:</h3>
<p dir="auto">1.21.2 3.8.11 (default, Aug 3 2021, 15:09:35)<br>
[GCC 7.5.0]</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"> 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"> 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"> 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>
</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>
</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>
</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<h3 dir="auto">Actual Behavior</h3>
<h3 dir="auto">To Reproduce</h3>
<h3 dir="auto">Screenshots</h3>
<h3 dir="auto">Additional Information</h3> | <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.0.x , 7.0.x</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>macOS 10.14 , macos 10.15</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong><br>
*4.x.x</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">The function {browserwindow}.setContentProtection(true) , should make the app unrecordable for "Electron desktopCapturer" module.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">It does not work .</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">Make a simple blank app, setContentProtection of the browserWindow, capture the desktop stream using the desktopCapturer module and show it on a canvas.</p> | 1 |
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.0-beta (Visual Studio 2015 Community)</p>
<p dir="auto"><strong>Code</strong></p>
<p dir="auto">According to <a href="http://stackoverflow.com/questions/21803257/how-is-visual-studios-implicit-referencing-of-typescript-files-supposed-to-work" rel="nofollow">this StackOverflow question</a>, I have checked and double-checked that all files in question have been set, unset, and reset to <code class="notranslate">Build Action: TypeScriptCompile</code>. Code is arranged as follows:</p>
<blockquote>
<p dir="auto">src<br>
| - modules<br>
| | - config.d.ts<br>
| | - config.ts</p>
</blockquote>
<p dir="auto"><strong>config.d.ts</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Configuration {
debug?: boolean;
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Configuration</span> <span class="pl-kos">{</span>
<span class="pl-c1">debug</span>?: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>config.ts</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export var config: Configuration = { // "Cannot find name 'Configuration'."
debug: true
};"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">var</span> <span class="pl-s1">config</span>: <span class="pl-smi">Configuration</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c">// "Cannot find name 'Configuration'."</span>
<span class="pl-c1">debug</span>: <span class="pl-c1">true</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>tsconfig.json (for reference)</strong></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"rootDir": "src/",
"outDir": "dist/",
"target": "es5",
"module": "system",
"diagnostics": true,
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"noLib": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true
},
"exclude": [
"typings/main.d.ts",
"typings/main",
"node_modules"
]
}"><pre class="notranslate">{
<span class="pl-ent">"compilerOptions"</span>: {
<span class="pl-ent">"rootDir"</span>: <span class="pl-s"><span class="pl-pds">"</span>src/<span class="pl-pds">"</span></span>,
<span class="pl-ent">"outDir"</span>: <span class="pl-s"><span class="pl-pds">"</span>dist/<span class="pl-pds">"</span></span>,
<span class="pl-ent">"target"</span>: <span class="pl-s"><span class="pl-pds">"</span>es5<span class="pl-pds">"</span></span>,
<span class="pl-ent">"module"</span>: <span class="pl-s"><span class="pl-pds">"</span>system<span class="pl-pds">"</span></span>,
<span class="pl-ent">"diagnostics"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"declaration"</span>: <span class="pl-c1">false</span>,
<span class="pl-ent">"noImplicitAny"</span>: <span class="pl-c1">false</span>,
<span class="pl-ent">"removeComments"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"noLib"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"emitDecoratorMetadata"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"experimentalDecorators"</span>: <span class="pl-c1">true</span>
},
<span class="pl-ent">"exclude"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>typings/main.d.ts<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>typings/main<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>node_modules<span class="pl-pds">"</span></span>
]
}</pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
Visual Studio should discover the <code class="notranslate">d.ts</code> file and expose the interface to all other TypeScript modules.</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
Visual Studio does not expose the interface to any other module unless the reference is explicitly declared using <code class="notranslate">/// <reference path="config.d.ts" /></code>.</p> | <p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.9</p>
<p dir="auto">To reproduce use VSCode from Insider Channel (<a href="https://code.visualstudio.com/Download#insiders" rel="nofollow">https://code.visualstudio.com/Download#insiders</a>)</p>
<ul dir="auto">
<li>create workspace</li>
<li>create tsconfig.json with content</li>
</ul>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"module": "commonjs"
}
}"><pre class="notranslate">{
<span class="pl-ent">"compilerOptions"</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>
<ul dir="auto">
<li>create test.ts with content</li>
</ul>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A {
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span></pre></div>
<ul dir="auto">
<li>create folder libs</li>
<li>create folder libs\superLib</li>
<li>create file libs\superLib\lib.d.ts with content</li>
</ul>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export function foo();"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-s1">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<ul dir="auto">
<li>start VSCode</li>
<li>open test.ts</li>
<li>try to rename libs to libs2</li>
</ul>
<p dir="auto">Observer: you can't the directory is locked.</p>
<ul dir="auto">
<li>Use for example handle.exe from SysInternals or a process explorer to check who is holding a lock on the .\libs directory. It is the tsserver.</li>
</ul>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1931590/14202545/db08ec70-f7f8-11e5-83dc-d40104f63efc.png"><img src="https://cloud.githubusercontent.com/assets/1931590/14202545/db08ec70-f7f8-11e5-83dc-d40104f63efc.png" alt="capture" style="max-width: 100%;"></a></p> | 0 |
<h2 dir="auto">Bug Report</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I would like to work on a fix!</li>
</ul>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const babel = require('@babel/parser');
babel.parse(
'class Foo { get test() {} }',
{
plugins: ['estree', 'typescript']
}
);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">babel</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'@babel/parser'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">babel</span><span class="pl-kos">.</span><span class="pl-en">parse</span><span class="pl-kos">(</span>
<span class="pl-s">'class Foo { get test() {} }'</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-c1">plugins</span>: <span class="pl-kos">[</span><span class="pl-s">'estree'</span><span class="pl-kos">,</span> <span class="pl-s">'typescript'</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"><strong>Actual behaviour</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Thrown:
TypeError: Cannot read property '0' of undefined
at Object.getGetterSetterExpectedParamCount (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:7318:37)
at Object.checkGetterSetterParams (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:11022:29)
at Object.parseClassMemberWithIsStatic (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:12600:12)
at Object.parseClassMemberWithIsStatic (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:6851:11)
at Object.parseClassMember (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:12501:10)
at callParseClassMember (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:6815:13)
at Object.parseClassMember (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:6821:7)"><pre class="notranslate"><code class="notranslate">Thrown:
TypeError: Cannot read property '0' of undefined
at Object.getGetterSetterExpectedParamCount (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:7318:37)
at Object.checkGetterSetterParams (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:11022:29)
at Object.parseClassMemberWithIsStatic (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:12600:12)
at Object.parseClassMemberWithIsStatic (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:6851:11)
at Object.parseClassMember (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:12501:10)
at callParseClassMember (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:6815:13)
at Object.parseClassMember (/Users/bradzacher/github/typescript-eslint/packages/typescript-estree/node_modules/@babel/parser/lib/index.js:6821:7)
</code></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" System:
OS: macOS 10.15.7
Binaries:
Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm
npmPackages:
@babel/parser: ^7.12.5 => 7.12.5
@babel/types: ^7.12.6 => 7.12.6"><pre class="notranslate"><code class="notranslate"> System:
OS: macOS 10.15.7
Binaries:
Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm
npmPackages:
@babel/parser: ^7.12.5 => 7.12.5
@babel/types: ^7.12.6 => 7.12.6
</code></pre></div>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto"><strong>Additional context</strong></p> | <h2 dir="auto">Bug Report</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I would like to work on a fix!</li>
</ul>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">TypeError is <code class="notranslate">TypeError: Cannot read property '0' of undefined</code> is thrown.</p>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="({set [x](v) {}});"><pre class="notranslate"><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-k">set</span> <span class="pl-kos">[</span><span class="pl-s1">x</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-s1">v</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"><strong>Expected behavior</strong></p>
<p dir="auto">No TypeError is thrown.</p>
<p dir="auto"><strong>Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)</strong></p>
<p dir="auto">Use <code class="notranslate">@babel/parser</code> directly</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { parse } = require("@babel/parser");
const result = parse(`({set [x](v) {}});`, {
plugins: ["estree", "typescript"],
});"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> parse <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"@babel/parser"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-en">parse</span><span class="pl-kos">(</span><span class="pl-s">`({set [x](v) {}});`</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">plugins</span>: <span class="pl-kos">[</span><span class="pl-s">"estree"</span><span class="pl-kos">,</span> <span class="pl-s">"typescript"</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"><strong>Environment</strong></p>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto"><strong>Additional context</strong></p>
<p dir="auto">Probably this is a regression of 7.12</p> | 1 |
<p dir="auto">Running the following command<br>
<code class="notranslate">flutter create -akotlin --org="in.company.domain" flutter_app</code><br>
is problematic.</p>
<p dir="auto">MainActivity.kt is created with the following package<br>
package in.company.domain<br>
instead of<br>
package `in`.company.domain</p>
<p dir="auto">Which results in failed compilation</p> | <p dir="auto"><code class="notranslate">in</code> is a reserved keyword in kotlin, and thus we have to write package names like this -</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pagkage `in`.championswimmer.myapp"><pre class="notranslate"><code class="notranslate">pagkage `in`.championswimmer.myapp
</code></pre></div>
<p dir="auto">(Taking my example here, as I usually use 'in.championswimmer' as company domain.</p>
<p dir="auto">Android Studio escapes it when generating default project. Flutter does not.</p>
<p dir="auto">I believe other kotlin keywords need to be escaped similarly from the package name</p>
<p dir="auto">List of keywords to escape by language</p>
<h3 dir="auto">Kotlin</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">in</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">when</code></li>
</ul> | 1 |
<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>
<p dir="auto">Back in Electron 5 I reported issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="454833050" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/18733" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/18733/hovercard" href="https://github.com/electron/electron/issues/18733">#18733</a>. It was automatically closed lately, however it still affects Electron versions up to 11 (but not, as far as I can tell, version 12). Anyway the instructions said I should reopen it if it still affects a supported version, so here it is.</p>
<p dir="auto">Much discussion is on that thread. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dsanders11/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dsanders11">@dsanders11</a> diagnosed the problem there.</p>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>5 through 11 (not 12)</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Windows 10</li>
</ul>
</li>
<li><strong>Last known Working Electron versions:</strong>
<ul dir="auto">
<li>5.0.0.beta8 is OK, 5.0.0.beta9 crashes.</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">The following code, when run in a renderer process, should not crash.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let decoder = new TextDecoder("utf8");
let msg = "a".repeat(4096); // Exact minimum size that crashes for me, i.e. 4095 does not.
let buf = Buffer.from(msg);
decoder.decode(buf);"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">decoder</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">TextDecoder</span><span class="pl-kos">(</span><span class="pl-s">"utf8"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-s1">msg</span> <span class="pl-c1">=</span> <span class="pl-s">"a"</span><span class="pl-kos">.</span><span class="pl-en">repeat</span><span class="pl-kos">(</span><span class="pl-c1">4096</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Exact minimum size that crashes for me, i.e. 4095 does not.</span>
<span class="pl-k">let</span> <span class="pl-s1">buf</span> <span class="pl-c1">=</span> <span class="pl-v">Buffer</span><span class="pl-kos">.</span><span class="pl-en">from</span><span class="pl-kos">(</span><span class="pl-s1">msg</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">decoder</span><span class="pl-kos">.</span><span class="pl-en">decode</span><span class="pl-kos">(</span><span class="pl-s1">buf</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">It does crash in Electron 11, but not Electron 12.</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto"><a href="https://github.com/fohristiwhirl/electron_crash_test">https://github.com/fohristiwhirl/electron_crash_test</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone https://github.com/fohristiwhirl/electron_crash_test -b master
cd electron_crash_test
electron ."><pre class="notranslate"><code class="notranslate">git clone https://github.com/fohristiwhirl/electron_crash_test -b master
cd electron_crash_test
electron .
</code></pre></div> | <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>7.0.0</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Windows 8.1</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>3.0.3 (we're in process of upgrading from this version to the latest, so it is unclear as to when exactly the undesired behavior was introduced)</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Expecting no crash when the following code is executed:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const makeArray = (n, min = 1, max = Number.MAX_SAFE_INTEGER) => [...Array(n).keys()].map(i => (i + min) % max);
const encodeBase64 = (array) => btoa(String.fromCharCode(...array));
let buffer = Buffer.from(encodeBase64(makeArray(1024 * 4, 0, 256)), 'base64');
let blob = new Blob([buffer], { type: 'image/png' });"><pre class="notranslate"><code class="notranslate">const makeArray = (n, min = 1, max = Number.MAX_SAFE_INTEGER) => [...Array(n).keys()].map(i => (i + min) % max);
const encodeBase64 = (array) => btoa(String.fromCharCode(...array));
let buffer = Buffer.from(encodeBase64(makeArray(1024 * 4, 0, 256)), 'base64');
let blob = new Blob([buffer], { type: 'image/png' });
</code></pre></div>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The renderer process crashes while executing <code class="notranslate">new Blob([buffer], { type: 'image/png' })</code> statement. The Electron app window is blanked out, and if the Developer Tools is open, the following pop-up message is displayed: "DevTools was disconnected from the page". No Developer Tools Console messages. No messages in the OS console, either.</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">Clone the electron-quick-start repository, and insert the JavaScript code above into renderer.js file. Don't forget to set nodeIntegration = true for the main window, otherwise Buffer won't be found.</p>
<p dir="auto">Electron Fiddle gist of the same: <a href="https://gist.github.com/70e141736d51fb0a6936c110b6f7c9f5">https://gist.github.com/70e141736d51fb0a6936c110b6f7c9f5</a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">This behavior is related to <code class="notranslate">Buffer.from('...', 'base64')</code> - that is, Base64 decoding - because providing the Blob constructor a buffer created by other means seems to work fine.</p>
<p dir="auto">Also, the Base64-encoded string in the code above is just a simple way to reproduce the problem. The crash occurs when legitimate Base64-encoded images are processed as well.</p> | 1 |
<p dir="auto">Hi there, I come from a C# background and it has something great call Object Initializer. Which allows you to initialize an object inline, without specifying the object everytime.</p>
<p dir="auto">C# docs:<br>
<a href="https://msdn.microsoft.com/en-us/library/bb397680.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/bb397680.aspx</a></p>
<p dir="auto">I would be cool if the compiler could do something like this:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="new MyClass { Field1 = "ASD", Field2 = "QWE" };"><pre class="notranslate"><span class="pl-k">new</span> <span class="pl-v">MyClass</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-v">Field1</span> <span class="pl-c1">=</span> <span class="pl-s">"ASD"</span><span class="pl-kos">,</span> <span class="pl-v">Field2</span> <span class="pl-c1">=</span> <span class="pl-s">"QWE"</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> | <p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.7.5 / 1.8.0-beta / nightly (1.9.0-dev.20160217)</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
let foo = 'bar';
}
console.log(foo)
"><pre class="notranslate"><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-s">'bar'</span><span class="pl-kos">;</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">foo</span><span class="pl-kos">)</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong></p>
<p dir="auto">I would expect <code class="notranslate">let foo = 'bar';</code> to be emitted as <code class="notranslate">var foo_1 = 'bar';</code></p>
<p dir="auto">When running the emitted code I would expect to get a Reference Error for <code class="notranslate">foo</code></p>
<p dir="auto"><strong>Actual behavior:</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
var foo = 'bar';
}
console.log(foo);
"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-s">'bar'</span><span class="pl-kos">;</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">foo</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">There is no Reference Error in emitted code and <code class="notranslate">bar</code> is printed to the console.</p> | 0 |
<p dir="auto">Transferred from <a href="http://code.opencv.org/issues/3639" rel="nofollow">http://code.opencv.org/issues/3639</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="|| Alexander Cheparukhin on 2014-04-09 12:28
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty: Medium
|| PR:
|| Platform: None / None"><pre class="notranslate"><code class="notranslate">|| Alexander Cheparukhin on 2014-04-09 12:28
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty: Medium
|| PR:
|| Platform: None / None
</code></pre></div>
<h2 dir="auto">Alpha-dependent template matching (matchTemplate)</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Alpha channel support would be very useful in matchTemplate function, so that transparent pattern areas wouldn't affect the result. I've found the description of this problem on Stack Overflow:
http://stackoverflow.com/questions/12139381/alpha-dependent-template-matching"><pre class="notranslate"><code class="notranslate">Alpha channel support would be very useful in matchTemplate function, so that transparent pattern areas wouldn't affect the result. I've found the description of this problem on Stack Overflow:
http://stackoverflow.com/questions/12139381/alpha-dependent-template-matching
</code></pre></div>
<h2 dir="auto">History</h2>
<h5 dir="auto">Andrew Senin on 2014-05-05 14:05</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Alexander,
Thanks for your proposal. Since our resources are limited please consider contributing this feature and sending a pull request (http://code.opencv.org/projects/opencv/wiki/How_to_contribute). All your help is highly appreciated!
- Target version set to Next Hackathon
- Difficulty set to Medium
- Assignee set to Alexander Cheparukhin
- Status changed from New to Open
- Category set to imgproc, video"><pre class="notranslate"><code class="notranslate">Alexander,
Thanks for your proposal. Since our resources are limited please consider contributing this feature and sending a pull request (http://code.opencv.org/projects/opencv/wiki/How_to_contribute). All your help is highly appreciated!
- Target version set to Next Hackathon
- Difficulty set to Medium
- Assignee set to Alexander Cheparukhin
- Status changed from New to Open
- Category set to imgproc, video
</code></pre></div>
<h5 dir="auto">patrick kw on 2014-09-20 03:11</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Hi Alexander, Andrew,
awu has developed Alpha-dependent template matching for OpenCV. The source codes are available here: http://answers.opencv.org/question/16535/alpha-dependent-template-matching/.
Can you add these codes to OpenCV?
Thanks."><pre class="notranslate"><code class="notranslate">Hi Alexander, Andrew,
awu has developed Alpha-dependent template matching for OpenCV. The source codes are available here: http://answers.opencv.org/question/16535/alpha-dependent-template-matching/.
Can you add these codes to OpenCV?
Thanks.
</code></pre></div> | <p dir="auto">Transferred from <a href="http://code.opencv.org/issues/3926" rel="nofollow">http://code.opencv.org/issues/3926</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="|| Robby Longhorn on 2014-09-27 03:41
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty:
|| PR:
|| Platform: None / None"><pre class="notranslate"><code class="notranslate">|| Robby Longhorn on 2014-09-27 03:41
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty:
|| PR:
|| Platform: None / None
</code></pre></div>
<h2 dir="auto">matchTemplate() with mask or transparency</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="There are many people asking the same question and there is no answer.
Why does OpenCV not allow to search for a template using a mask or transparency.
A detailed description of the feature request with example images can be found here:
http://stackoverflow.com/questions/15459090/how-to-find-a-template-in-an-image-using-a-mask-or-transparency-with-opencv-an
For me it is incredible that this important functionality is not implemented in such a huge library!"><pre class="notranslate"><code class="notranslate">There are many people asking the same question and there is no answer.
Why does OpenCV not allow to search for a template using a mask or transparency.
A detailed description of the feature request with example images can be found here:
http://stackoverflow.com/questions/15459090/how-to-find-a-template-in-an-image-using-a-mask-or-transparency-with-opencv-an
For me it is incredible that this important functionality is not implemented in such a huge library!
</code></pre></div>
<h2 dir="auto">History</h2>
<h5 dir="auto">Robby Longhorn on 2014-09-28 23:13</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I found a very reasonable solution to the problem here:
I think OpenCV should implement something similar to this CUFFT code.
http://stackoverflow.com/questions/12139381/alpha-dependent-template-matching?lq=1
The code for that post can be found here:
http://pastebin.com/eZDRpmDm"><pre class="notranslate"><code class="notranslate">I found a very reasonable solution to the problem here:
I think OpenCV should implement something similar to this CUFFT code.
http://stackoverflow.com/questions/12139381/alpha-dependent-template-matching?lq=1
The code for that post can be found here:
http://pastebin.com/eZDRpmDm
</code></pre></div>
<h5 dir="auto">Vladislav Vinogradov on 2014-09-30 09:10</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Hello Robby,
Thank you for your report!
Unfortunately, we have a limited human resources.
Since you've already done investigation, could you please create a contribution with suggested code (http://code.opencv.org/projects/opencv/wiki/How_to_contribute)?
Your help will be highly appreciated!
- Priority changed from High to Normal
- Status changed from New to Open
- Category set to imgproc, video"><pre class="notranslate"><code class="notranslate">Hello Robby,
Thank you for your report!
Unfortunately, we have a limited human resources.
Since you've already done investigation, could you please create a contribution with suggested code (http://code.opencv.org/projects/opencv/wiki/How_to_contribute)?
Your help will be highly appreciated!
- Priority changed from High to Normal
- Status changed from New to Open
- Category set to imgproc, video
</code></pre></div>
<h5 dir="auto">Yan Wang on 2014-12-29 11:33</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I tried to implement it:
https://github.com/Itseez/opencv/pull/3554
Please help review this PR. Thanks
Vladislav Vinogradov wrote:
> Hello Robby,
>
> Thank you for your report!
>
> Unfortunately, we have a limited human resources.
> Since you've already done investigation, could you please create a contribution with suggested code (http://code.opencv.org/projects/opencv/wiki/How_to_contribute)?
> Your help will be highly appreciated!"><pre class="notranslate"><code class="notranslate">I tried to implement it:
https://github.com/Itseez/opencv/pull/3554
Please help review this PR. Thanks
Vladislav Vinogradov wrote:
> Hello Robby,
>
> Thank you for your report!
>
> Unfortunately, we have a limited human resources.
> Since you've already done investigation, could you please create a contribution with suggested code (http://code.opencv.org/projects/opencv/wiki/How_to_contribute)?
> Your help will be highly appreciated!
</code></pre></div> | 1 |
<p dir="auto">When trying to achieve this <strong>import functionality</strong> according to atomic design:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { Button, Avatar, ...etc } from '~/components/atoms'"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">Button</span><span class="pl-kos">,</span> <span class="pl-v">Avatar</span><span class="pl-kos">,</span> ...<span class="pl-s1">etc</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'~/components/atoms'</span></pre></div>
<p dir="auto">I use an <code class="notranslate">index.js</code> file @ <code class="notranslate">src/components/atoms/index.js</code> which contains this:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const req = require.context(".", true, /\.\/[^/]+\/index\.js$/);
req.keys().forEach(key => {
const componentName = key.replace(/^.+\/([^/]+)\/index\.js/, "$1");
module.exports[componentName] = req(key).default;
});"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">req</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">.</span><span class="pl-en">context</span><span class="pl-kos">(</span><span class="pl-s">"."</span><span class="pl-kos">,</span> <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">\.</span><span class="pl-cce">\/</span><span class="pl-kos">[</span>^/<span class="pl-kos">]</span><span class="pl-c1">+</span><span class="pl-cce">\/</span>index<span class="pl-cce">\.</span>js<span class="pl-cce">$</span><span class="pl-c1">/</span></span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-en">keys</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">forEach</span><span class="pl-kos">(</span><span class="pl-s1">key</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">componentName</span> <span class="pl-c1">=</span> <span class="pl-s1">key</span><span class="pl-kos">.</span><span class="pl-en">replace</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">^</span>.<span class="pl-c1">+</span><span class="pl-cce">\/</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-cce">\/</span>index<span class="pl-cce">\.</span>js<span class="pl-c1">/</span></span><span class="pl-kos">,</span> <span class="pl-s">"$1"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span><span class="pl-kos">[</span><span class="pl-s1">componentName</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">req</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">)</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><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>I know it looks crazy ha!</strong> All it does is go through all the components in the <code class="notranslate">src/components/atoms</code> dir and <strong>exports them</strong> so I don't have to do it manually (<em>because it gets annoyingly tedious when you have lots of components</em>) in the <code class="notranslate">index.js</code> file like:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Button from "./Button";
import Avatar from "./Avatar";
export { Avatar, Button };"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Button</span> <span class="pl-k">from</span> <span class="pl-s">"./Button"</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-v">Avatar</span> <span class="pl-k">from</span> <span class="pl-s">"./Avatar"</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-v">Avatar</span><span class="pl-kos">,</span> <span class="pl-v">Button</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<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>
<p dir="auto">Here are some similar issues that deal with absolute imports: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="193357737" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/342" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/342/hovercard" href="https://github.com/vercel/next.js/issues/342">#342</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="199714403" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/714" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/714/hovercard" href="https://github.com/vercel/next.js/issues/714">#714</a></p>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">I expect the components to resolve correctly.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">It is throwing a <code class="notranslate">TypeError: require.context is not a function</code> error.</p>
<p dir="auto">I expect this is due to the fact that <code class="notranslate">require.context</code> is <strong>not available in node</strong> because components are being server rendered.</p>
<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>2.0.0</td>
</tr>
<tr>
<td>node</td>
<td>9.1.0</td>
</tr>
<tr>
<td>OS</td>
<td>Ubuntu 17.10</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 62</td>
</tr>
</tbody>
</table> | <p dir="auto">When using <code class="notranslate"><Head></code> on a page, as well as specifying the <code class="notranslate"><title></code> in <code class="notranslate">_document.js</code> inside <code class="notranslate"><Head></code>, both create duplicate titles.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<head>
<title class="next-head">Homepage - Welcome</title>
<meta charset="utf-8" class="next-head">
<meta name="viewport" content="initial-scale=1.0, width=device-width" class="next-head>
<title>Homepage</title>
<link href="/static/styles/sanitize.css" rel="stylesheet">
</head>"><pre class="notranslate"><code class="notranslate"><head>
<title class="next-head">Homepage - Welcome</title>
<meta charset="utf-8" class="next-head">
<meta name="viewport" content="initial-scale=1.0, width=device-width" class="next-head>
<title>Homepage</title>
<link href="/static/styles/sanitize.css" rel="stylesheet">
</head>
</code></pre></div> | 0 |
<h3 dir="auto">Describe the workflow you want to enable</h3>
<p dir="auto">As a user of Scikit-learn, I want to be able to calculate the McFadden's pseudo R-squared for a binary logistic regression model for that we need log-likelihood and null log-likelihood.</p>
<h3 dir="auto">Describe your proposed solution</h3>
<p dir="auto">I use the following functions and I propose to add them in the library as well.</p>
<h3 dir="auto">For Log Likelihood -</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
from sklearn.linear_model import LogisticRegression
def log_likelihood(model, X, y):
"""Calculate the log-likelihood of a binary logistic regression model.
Parameters
----------
model : sklearn.linear_model.LogisticRegression
A trained binary logistic regression model.
X : array-like, shape (n_samples, n_features)
Feature matrix.
y : array-like, shape (n_samples,)
Binary class labels.
Returns
-------
log_likelihood : float
The log-likelihood of the model.
"""
# Get predicted probabilities
pred_probs = model.predict_proba(X)[:, 1]
# Calculate log-likelihood
log_likelihood = np.sum(y * np.log(pred_probs) + (1 - y) * np.log(1 - pred_probs))
return log_likelihood
"><pre class="notranslate"><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-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">linear_model</span> <span class="pl-k">import</span> <span class="pl-v">LogisticRegression</span>
<span class="pl-k">def</span> <span class="pl-en">log_likelihood</span>(<span class="pl-s1">model</span>, <span class="pl-v">X</span>, <span class="pl-s1">y</span>):
<span class="pl-s">"""Calculate the log-likelihood of a binary logistic regression model.</span>
<span class="pl-s"></span>
<span class="pl-s"> Parameters</span>
<span class="pl-s"> ----------</span>
<span class="pl-s"> model : sklearn.linear_model.LogisticRegression</span>
<span class="pl-s"> A trained binary logistic regression model.</span>
<span class="pl-s"> X : array-like, shape (n_samples, n_features)</span>
<span class="pl-s"> Feature matrix.</span>
<span class="pl-s"> y : array-like, shape (n_samples,)</span>
<span class="pl-s"> Binary class labels.</span>
<span class="pl-s"></span>
<span class="pl-s"> Returns</span>
<span class="pl-s"> -------</span>
<span class="pl-s"> log_likelihood : float</span>
<span class="pl-s"> The log-likelihood of the model.</span>
<span class="pl-s"> """</span>
<span class="pl-c"># Get predicted probabilities</span>
<span class="pl-s1">pred_probs</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-en">predict_proba</span>(<span class="pl-v">X</span>)[:, <span class="pl-c1">1</span>]
<span class="pl-c"># Calculate log-likelihood</span>
<span class="pl-s1">log_likelihood</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">sum</span>(<span class="pl-s1">y</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">log</span>(<span class="pl-s1">pred_probs</span>) <span class="pl-c1">+</span> (<span class="pl-c1">1</span> <span class="pl-c1">-</span> <span class="pl-s1">y</span>) <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">log</span>(<span class="pl-c1">1</span> <span class="pl-c1">-</span> <span class="pl-s1">pred_probs</span>))
<span class="pl-k">return</span> <span class="pl-s1">log_likelihood</span></pre></div>
<h3 dir="auto">For Null Log Likelihood -</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
from sklearn.metrics import log_loss
def null_log_likelihood(y):
"""Calculate the null log-likelihood of a binary logistic regression model.
Parameters
----------
y : array-like, shape (n_samples,)
Binary class labels.
Returns
-------
null_log_likelihood : float
The null log-likelihood of the model.
"""
# Calculate the proportion of positive class labels
p0 = y.mean()
# Create an array of predicted probabilities equal to the proportion of positive class labels
probs = p0 * np.ones_like(y)
# Calculate the null log-likelihood using the log_loss function from scikit-learn
null_log_likelihood = -log_loss(y, probs, normalize=False)
return null_log_likelihood
"><pre class="notranslate"><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-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">metrics</span> <span class="pl-k">import</span> <span class="pl-s1">log_loss</span>
<span class="pl-k">def</span> <span class="pl-en">null_log_likelihood</span>(<span class="pl-s1">y</span>):
<span class="pl-s">"""Calculate the null log-likelihood of a binary logistic regression model.</span>
<span class="pl-s"></span>
<span class="pl-s"> Parameters</span>
<span class="pl-s"> ----------</span>
<span class="pl-s"> y : array-like, shape (n_samples,)</span>
<span class="pl-s"> Binary class labels.</span>
<span class="pl-s"></span>
<span class="pl-s"> Returns</span>
<span class="pl-s"> -------</span>
<span class="pl-s"> null_log_likelihood : float</span>
<span class="pl-s"> The null log-likelihood of the model.</span>
<span class="pl-s"> """</span>
<span class="pl-c"># Calculate the proportion of positive class labels</span>
<span class="pl-s1">p0</span> <span class="pl-c1">=</span> <span class="pl-s1">y</span>.<span class="pl-en">mean</span>()
<span class="pl-c"># Create an array of predicted probabilities equal to the proportion of positive class labels</span>
<span class="pl-s1">probs</span> <span class="pl-c1">=</span> <span class="pl-s1">p0</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">ones_like</span>(<span class="pl-s1">y</span>)
<span class="pl-c"># Calculate the null log-likelihood using the log_loss function from scikit-learn</span>
<span class="pl-s1">null_log_likelihood</span> <span class="pl-c1">=</span> <span class="pl-c1">-</span><span class="pl-en">log_loss</span>(<span class="pl-s1">y</span>, <span class="pl-s1">probs</span>, <span class="pl-s1">normalize</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
<span class="pl-k">return</span> <span class="pl-s1">null_log_likelihood</span></pre></div>
<h3 dir="auto">Describe alternatives you've considered, if relevant</h3>
<p dir="auto">One alternative to adding these functions to Scikit-learn would be for users to use <a href="https://www.statsmodels.org/stable/about.html#about-statsmodels" rel="nofollow">statsmodels</a>.<br>
However, adding these functions to Scikit-learn would make it easier for users to calculate log-likelihood and null log-likelihood within the Scikit-learn ecosystem and would provide a standardized implementation.</p>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p> | <h3 dir="auto">Describe the workflow you want to enable</h3>
<p dir="auto">I'd like to evaluate models by "percentage of reduction in metric X", where X is:</p>
<ul dir="auto">
<li>LogLoss</li>
<li>absolute error</li>
<li>pinball loss</li>
</ul>
<p dir="auto">As <code class="notranslate">d2_tweedie_score</code> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="606786356" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/17036" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/17036/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/17036">#17036</a>, these are generalizations of the <code class="notranslate">r2_score</code>.</p>
<h3 dir="auto">Describe your proposed solution</h3>
<p dir="auto">Add</p>
<ul dir="auto">
<li><code class="notranslate">d2_log_loss_score</code></li>
<li><code class="notranslate">d2_absolute_error_score</code></li>
<li><code class="notranslate">d2_pinball_loss_score</code></li>
</ul>
<h3 dir="auto">Describe alternatives you've considered, if relevant</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="606786356" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/17036" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/17036/hovercard?comment_id=903939035&comment_type=issue_comment" href="https://github.com/scikit-learn/scikit-learn/pull/17036#issuecomment-903939035">#17036 (comment)</a>.</p> | 1 |
<p dir="auto"><a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.binom.html#scipy.stats.binom" rel="nofollow">scipy.stats.binom.sf</a> and <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.binom_test.html" rel="nofollow">scipy.stats.binom_test</a> returns incorrect values for large inputs. The bounds on the inputs is not documented, and similar functions in other libraries (e.g. R's <code class="notranslate">binom.test</code>) do not have this problem.</p>
<h4 dir="auto">Reproducing code example:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> np.seterr(all='warn')
{'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'}
>>> scipy.stats.binom_test(1e7, 2e7, 0.5, 'greater')
0.5094024848633918
>>> scipy.stats.binom_test(1e8, 2e8, 0.5, 'greater')
0.6860874231168742
>>> scipy.stats.binom_test(1e9, 2e9, 0.5, 'greater')
0.8854076875623922
>>> scipy.stats.binom_test(1e10, 2e10, 0.5, 'greater')
nan"><pre class="notranslate"><code class="notranslate">>>> np.seterr(all='warn')
{'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'}
>>> scipy.stats.binom_test(1e7, 2e7, 0.5, 'greater')
0.5094024848633918
>>> scipy.stats.binom_test(1e8, 2e8, 0.5, 'greater')
0.6860874231168742
>>> scipy.stats.binom_test(1e9, 2e9, 0.5, 'greater')
0.8854076875623922
>>> scipy.stats.binom_test(1e10, 2e10, 0.5, 'greater')
nan
</code></pre></div>
<h4 dir="auto">Error message:</h4>
<p dir="auto">None.</p>
<h4 dir="auto">Expected behaviour:</h4>
<p dir="auto">All calls in the repro example should return a value near 0.5. For example, in R:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="> binom.test(1e7, 2e7, 0.5, 'greater')$p.value
[1] 0.5000892
> binom.test(1e8, 2e8, 0.5, 'greater')$p.value
[1] 0.5000282
> binom.test(1e9, 2e9, 0.5, 'greater')$p.value
[1] 0.5000089
> binom.test(1e10, 2e10, 0.5, 'greater')$p.value
[1] 0.5000028"><pre class="notranslate"><code class="notranslate">> binom.test(1e7, 2e7, 0.5, 'greater')$p.value
[1] 0.5000892
> binom.test(1e8, 2e8, 0.5, 'greater')$p.value
[1] 0.5000282
> binom.test(1e9, 2e9, 0.5, 'greater')$p.value
[1] 0.5000089
> binom.test(1e10, 2e10, 0.5, 'greater')$p.value
[1] 0.5000028
</code></pre></div>
<h4 dir="auto">Notes:</h4>
<p dir="auto">Internally, for the "greater" alternative, scipy calls <code class="notranslate">binom.sf(x - 1, n, p)</code>, which then calls <code class="notranslate">scipy.special.bdtrc(floor(x), n, p)</code>. This forwards to <a href="http://www.netlib.org/cephes/doubldoc.html#bdtrc" rel="nofollow">Cephes' bdtrc</a>, according to scipy's docs.</p>
<p dir="auto">We can verify that the bug lies within <code class="notranslate">bdtrc</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> scipy.special.bdtrc(1e10, 2e10 - 1e10 + 1, 0.5)
nan"><pre class="notranslate"><code class="notranslate">>>> scipy.special.bdtrc(1e10, 2e10 - 1e10 + 1, 0.5)
nan
</code></pre></div>
<p dir="auto">Non-broken implementations of the regularized incomplete beta function (such as TensorFlow's <code class="notranslate">tf.math.betainc</code>) will return the expected value (0.5).</p>
<p dir="auto">This also affects anything else that calls <code class="notranslate">bdtrc</code>, including <code class="notranslate">binom.sf</code>. There may be a case that <code class="notranslate">bdtrc</code> is Working as Intended (because the documentation is explicit that it's just a wrapper for Cephes' buggy implementation), but I think for <code class="notranslate">binom.sf</code> and <code class="notranslate">binom_test</code> it's clear that there is at least a documentation bug if not an opportunity to make things better.</p>
<p dir="auto">I think there are 4 viable solutions, in what I think is most-preferred to least-preferred:</p>
<ol dir="auto">
<li>File a bug with Cephes and wait for them to fix it, documenting the breakage in the meantime.</li>
<li>Use a normal approximation in <code class="notranslate">binom.sf</code> when "k" and "n" are large (perhaps checking that "p" isn't too biased). Fortunately the circumstances when <code class="notranslate">bdtrc</code> breaks usually coincide with when this approximation is good. :)</li>
<li>Implement a regularized incomplete beta function within scipy that isn't broken, instead of using Cephes.</li>
<li>Claim this is Working as Intended, but document the limitation.</li>
</ol>
<p dir="auto">I'm happy to send Pull Requests given some direction about which of the choices above to go with.</p>
<h4 dir="auto">Scipy/Numpy/Python version information:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)
1.5.4 1.19.4 sys.version_info(major=3, minor=6, micro=8, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">>>> import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)
1.5.4 1.19.4 sys.version_info(major=3, minor=6, micro=8, releaselevel='final', serial=0)
</code></pre></div> | <p dir="auto">The following command correctly returns around 0.5.<br>
scipy.stats.binom.cdf(3000000, 10000000, .3)</p>
<p dir="auto">The probability that a binomial RV with p=0.3 is less than or equal to 3,000,000 in 10,000,000 draws is around 0.5.</p>
<p dir="auto">The same should be true for P(X<=30,000,000) in n=100,000,000 draws. (these numbers are 10 times higher than the preceding inputs)<br>
scipy.stats.binom.cdf(30000000, 100000000, .3)<br>
should return around 0.5, but it returns 0.57036.</p>
<p dir="auto">I also tested scipy.special.betainc, since that's what is used for calculating Binomial's CDF, and it exhibits the same problem.</p> | 1 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.XX]</li>
<li>Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p>
<p dir="auto">[https://github.com/your_profile/playwright_issue_title]</p>
<p dir="auto">or</p>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
globalSetup: require.resolve('./global-setup'),
use: {
testIdAttribute: 'data-test-id',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], },
},
});"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">globalSetup</span>: <span class="pl-en">require</span><span class="pl-kos">.</span><span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s">'./global-setup'</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span>
<span class="pl-c1">testIdAttribute</span>: <span class="pl-s">'data-test-id'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</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>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// global-setup.ts
import { chromium, expect } from '@playwright/test';
async function globalSetup() {
const browser = await chromium.launch();
const context = await browser.newContext();
const page = await context.newPage();
try {
await context.tracing.start({ screenshots: true, snapshots: true });
await page.setContent(
`<input id='checkbox' data-test-id="test" type='checkbox'></input>`
);
await expect(page.getByTestId('test')).toBeVisible(); //unable to find it
await context.tracing.stop({
path: './test-results/setup-trace.zip',
});
await browser.close();
} catch (error) {
await context.tracing.stop({
path: './test-results/failed-setup-trace.zip',
});
await browser.close();
throw error;
}
}
export default globalSetup;
"><pre class="notranslate"><span class="pl-c">// global-setup.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">chromium</span><span class="pl-kos">,</span> <span class="pl-s1">expect</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-en">globalSetup</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">browser</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">chromium</span><span class="pl-kos">.</span><span class="pl-en">launch</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">context</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">newContext</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-c1">tracing</span><span class="pl-kos">.</span><span class="pl-en">start</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">screenshots</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">snapshots</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">setContent</span><span class="pl-kos">(</span>
<span class="pl-s">`<input id='checkbox' data-test-id="test" type='checkbox'></input>`</span>
<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByTestId</span><span class="pl-kos">(</span><span class="pl-s">'test'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBeVisible</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">//unable to find it</span>
<span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-c1">tracing</span><span class="pl-kos">.</span><span class="pl-en">stop</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">path</span>: <span class="pl-s">'./test-results/setup-trace.zip'</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">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">close</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">catch</span> <span class="pl-kos">(</span><span class="pl-s1">error</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-c1">tracing</span><span class="pl-kos">.</span><span class="pl-en">stop</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">path</span>: <span class="pl-s">'./test-results/failed-setup-trace.zip'</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">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">throw</span> <span class="pl-s1">error</span><span class="pl-kos">;</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-s1">globalSetup</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>[Run the test]</li>
<li>[...]</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">The global setup should respect the testIdAttribute set in the config file.</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">The global setup does not pick up the testIdAttribute set in the config file.</p> | <p dir="auto">use case: in sapui5 applications, there's usually a duplicated invisible version of every element on the page, meaning that to interact with most fields we need to add additional logic to make sure it's getting the right selector:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const handle = (await page.querySelectorAll(selector).find(element => element.isVisible())
await page.click(handle)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">handle</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">querySelectorAll</span><span class="pl-kos">(</span><span class="pl-s1">selector</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">find</span><span class="pl-kos">(</span><span class="pl-s1">element</span> <span class="pl-c1">=></span> <span class="pl-s1">element</span><span class="pl-kos">.</span><span class="pl-en">isVisible</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-s1">handle</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">it would be nice if there was an option in the methods that take selectors to filter out invisible ones, ie:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="await page.click(selector, {includeInvisible: false})"><pre class="notranslate"><span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-s1">selector</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">includeInvisible</span>: <span class="pl-c1">false</span><span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">or alternatively, if <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1007324659" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/9153" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/9153/hovercard" href="https://github.com/microsoft/playwright/issues/9153">#9153</a> is implemented it would be as simple as adding <code class="notranslate">:not(:matches-css(display: none))</code> to the selector</p> | 0 |
<p dir="auto">Renaming a file inside of Atom (using the sidebar -- tree view -- and if this is a direct problem there I will move this ticket there) no longer renames the actual file but copies it to a new file with a new name, leaving the file file to be manually deleted. Is this expected behavior?</p> | <p dir="auto">Moving a file in the tree view causes an autosave.</p>
<p dir="auto">Refs <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="31598215" data-permission-text="Title is private" data-url="https://github.com/atom/tree-view/issues/123" data-hovercard-type="issue" data-hovercard-url="/atom/tree-view/issues/123/hovercard" href="https://github.com/atom/tree-view/issues/123">atom/tree-view#123</a></p> | 1 |
<p dir="auto">Hello,I don<code class="notranslate">t know what the problem it is? it can</code>t generate a new pb file.thank you.</p>
<p dir="auto">bazel-bin/tensorflow/tools/graph_transforms/transform_graph --in_graph=/media/long/data/android/PoseEstimationForMobile/release/cpm_model/model.pb --out_graph=/media/long/data/android/PoseEstimationForMobile/release/cpm_model/graph_opt1.pb --inputs=inputs/X --outputs=output/predict --transforms='strip_unused_nodes(type=float, shape="256*64") remove_nodes(op=Identity, op=CheckNumerics) fold_constants(ignore_errors=true) fold_batch_norms fold_old_batch_norms'<br>
2018-10-18 21:49:33.990823: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying strip_unused_nodes<br>
2018-10-18 21:49:33.991322: E tensorflow/tools/graph_transforms/transform_graph.cc:263] Input node output/predict not found in graph<br>
2018-10-18 21:49:33.991366: E tensorflow/tools/graph_transforms/transform_graph.cc:264] usage: bazel-bin/tensorflow/tools/graph_transforms/transform_graph<br>
Flags:<br>
--in_graph="" string input graph file name<br>
--out_graph="" string output graph file name<br>
--inputs="" string inputs<br>
--outputs="" string outputs<br>
--transforms="" string list of transforms<br>
--output_as_text=false bool whether to write the graph in text protobuf format</p>
<p dir="auto">Transforms are:<br>
add_default_attributes<br>
backport_concatv2<br>
backport_tensor_array_v3<br>
flatten_atrous_conv<br>
fold_batch_norms<br>
fold_constants<br>
fold_old_batch_norms<br>
freeze_requantization_ranges<br>
fuse_pad_and_conv<br>
fuse_remote_graph<br>
fuse_resize_and_conv<br>
fuse_resize_pad_and_conv<br>
insert_logging<br>
merge_duplicate_nodes<br>
obfuscate_names<br>
place_remote_graph_arguments<br>
quantize_nodes<br>
quantize_weights<br>
remove_attribute<br>
remove_control_dependencies<br>
remove_device<br>
remove_nodes<br>
rename_attribute<br>
rename_op<br>
rewrite_quantized_stripped_model_for_hexagon<br>
round_weights<br>
set_device<br>
sort_by_execution_order<br>
sparsify_gather<br>
strip_unused_nodes</p> | <h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System:<br>
OSX El Capitan 10.11.5</p>
<p dir="auto">Installed version of CUDA and cuDNN:<br>
N/A</p>
<p dir="auto">If installed from sources, provide the commit hash:<br>
<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/a4b7bb9a5dd2c021edcd3d68d326255c734d0ef0/hovercard" href="https://github.com/tensorflow/tensorflow/commit/a4b7bb9a5dd2c021edcd3d68d326255c734d0ef0"><tt>a4b7bb9</tt></a></p>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li><code class="notranslate">git clone --recursive https://github.com/tensorflow/models.git</code></li>
<li><code class="notranslate">cd models/syntaxnet/tensorflow</code></li>
<li><code class="notranslate">./configure</code></li>
<li><code class="notranslate">cd ..</code></li>
<li><code class="notranslate">bazel build syntaxnet/...</code></li>
</ol>
<h3 dir="auto">What have you tried?</h3>
<ol dir="auto">
<li>Confirmed that bazel version is 0.2.2</li>
<li>Confirmed that configure has been run</li>
</ol>
<h3 dir="auto">Logs or other output that would be helpful</h3>
<p dir="auto">(If logs are large, please upload as attachment).<br>
<code class="notranslate">INFO: Found 74 targets... ERROR: /private/var/tmp/_bazel_pberkman/64f225994fec6ff696f44dfe0caf6bfc/external/org_tensorflow/util/python/BUILD:14:1: Executing genrule @org_tensorflow//util/python:python_check failed: bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. ERROR: Cannot find 'external/org_tensorflow/util/python/python_lib'. Did you run configure?</code></p>
<p dir="auto">Seems that this issue is consistent with error <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="158861631" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/2703" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/2703/hovercard" href="https://github.com/tensorflow/tensorflow/issues/2703">#2703</a></p> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference"><pre class="notranslate"><code class="notranslate">java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
</code></pre></div>
<h1 dir="auto">ImageResizer.java line 48</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Fatal Exception: java.lang.RuntimeException
Failure delivering result ResultInfo{who=null, request=2342, result=-1, data=Intent { dat=content://com.google.android.apps.docs.storage/document/acc=1;doc=2 flg=0x1 }} to activity {id.tridee.mobile/id.tridee.mobile.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
android.app.ActivityThread.deliverResults (ActivityThread.java:4162)
android.app.ActivityThread.handleSendResult (ActivityThread.java:4205)
android.app.ActivityThread.-wrap20 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1572)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:163)
android.app.ActivityThread.main (ActivityThread.java:6221)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:904)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:794)
**Caused by java.lang.NullPointerException**
Attempt to invoke virtual method `'int android.graphics.Bitmap.getWidth()'` on a null object reference
`io.flutter.plugins.imagepicker.ImageResizer.resizedImage`
io.flutter.plugins.imagepicker.ImageResizer.resizedImage (ImageResizer.java:48)
io.flutter.plugins.imagepicker.ImageResizer.resizeImageIfNeeded (ImageResizer.java:37)
io.flutter.plugins.imagepicker.ImagePickerDelegate.handleResult (ImagePickerDelegate.java:262)
io.flutter.plugins.imagepicker.ImagePickerDelegate.handleChoosePictureResult (ImagePickerDelegate.java:230)
io.flutter.plugins.imagepicker.ImagePickerDelegate.onActivityResult (ImagePickerDelegate.java:217)
io.flutter.app.FlutterPluginRegistry.onActivityResult (FlutterPluginRegistry.java:194)
io.flutter.app.FlutterActivityDelegate.onActivityResult (FlutterActivityDelegate.java:139)
io.flutter.app.FlutterActivity.onActivityResult (FlutterActivity.java:128)
android.app.Activity.dispatchActivityResult (Activity.java:7128)
android.app.ActivityThread.deliverResults (ActivityThread.java:4158)
android.app.ActivityThread.handleSendResult (ActivityThread.java:4205)
android.app.ActivityThread.-wrap20 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1572)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:163)
android.app.ActivityThread.main (ActivityThread.java:6221)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:904)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:794)
# ImagePickerDelegate.java line 265
**Fatal Exception: java.lang.RuntimeException**
Unable to resume activity {id.tridee.mobile/id.tridee.mobile.MainActivity}: java.lang.RuntimeException: Failure delivering result `ResultInfo{who=null, request=2342, result=-1, data=Intent { dat=content://media/external/images/media/103134 (has extras) }} to activity {id.tridee.mobile/id.tridee.mobile.MainActivity}`: java.lang.IllegalStateException: Received images from picker that were not requested
android.app.ActivityThread.performResumeActivity
**Caused by java.lang.RuntimeException**
Failure delivering result `ResultInfo{who=null, request=2342, result=-1, data=Intent { dat=content://media/external/images/media/103134 (has extras) }}` to activity {id.tridee.mobile/id.tridee.mobile.MainActivity}: java.lang.IllegalStateException: Received images from picker that were not requested
android.app.ActivityThread.deliverResults
**Caused by java.lang.IllegalStateException**
Received images from picker that were not requested
io.flutter.plugins.imagepicker.ImagePickerDelegate.handleResult (ImagePickerDelegate.java:265)
io.flutter.plugins.imagepicker.ImagePickerDelegate.handleChoosePictureResult (ImagePickerDelegate.java:230)
io.flutter.plugins.imagepicker.ImagePickerDelegate.onActivityResult (ImagePickerDelegate.java:217)
io.flutter.app.FlutterPluginRegistry.onActivityResult (FlutterPluginRegistry.java:194)
io.flutter.app.FlutterActivityDelegate.onActivityResult (FlutterActivityDelegate.java:139)
io.flutter.app.FlutterActivity.onActivityResult (FlutterActivity.java:128)
android.app.Activity.dispatchActivityResult (Activity.java:5639)
android.app.ActivityThread.deliverResults (ActivityThread.java:3637)
android.app.ActivityThread.performResumeActivity (ActivityThread.java:3043)
android.app.ActivityThread.handleResumeActivity (ActivityThread.java:3085)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2498)
android.app.ActivityThread.access$800 (ActivityThread.java:166)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1283)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:136)
android.app.ActivityThread.main (ActivityThread.java:5590)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1280)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1096)
dalvik.system.NativeStart.main (NativeStart.java)"><pre class="notranslate"><code class="notranslate">Fatal Exception: java.lang.RuntimeException
Failure delivering result ResultInfo{who=null, request=2342, result=-1, data=Intent { dat=content://com.google.android.apps.docs.storage/document/acc=1;doc=2 flg=0x1 }} to activity {id.tridee.mobile/id.tridee.mobile.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
android.app.ActivityThread.deliverResults (ActivityThread.java:4162)
android.app.ActivityThread.handleSendResult (ActivityThread.java:4205)
android.app.ActivityThread.-wrap20 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1572)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:163)
android.app.ActivityThread.main (ActivityThread.java:6221)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:904)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:794)
**Caused by java.lang.NullPointerException**
Attempt to invoke virtual method `'int android.graphics.Bitmap.getWidth()'` on a null object reference
`io.flutter.plugins.imagepicker.ImageResizer.resizedImage`
io.flutter.plugins.imagepicker.ImageResizer.resizedImage (ImageResizer.java:48)
io.flutter.plugins.imagepicker.ImageResizer.resizeImageIfNeeded (ImageResizer.java:37)
io.flutter.plugins.imagepicker.ImagePickerDelegate.handleResult (ImagePickerDelegate.java:262)
io.flutter.plugins.imagepicker.ImagePickerDelegate.handleChoosePictureResult (ImagePickerDelegate.java:230)
io.flutter.plugins.imagepicker.ImagePickerDelegate.onActivityResult (ImagePickerDelegate.java:217)
io.flutter.app.FlutterPluginRegistry.onActivityResult (FlutterPluginRegistry.java:194)
io.flutter.app.FlutterActivityDelegate.onActivityResult (FlutterActivityDelegate.java:139)
io.flutter.app.FlutterActivity.onActivityResult (FlutterActivity.java:128)
android.app.Activity.dispatchActivityResult (Activity.java:7128)
android.app.ActivityThread.deliverResults (ActivityThread.java:4158)
android.app.ActivityThread.handleSendResult (ActivityThread.java:4205)
android.app.ActivityThread.-wrap20 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1572)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:163)
android.app.ActivityThread.main (ActivityThread.java:6221)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:904)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:794)
# ImagePickerDelegate.java line 265
**Fatal Exception: java.lang.RuntimeException**
Unable to resume activity {id.tridee.mobile/id.tridee.mobile.MainActivity}: java.lang.RuntimeException: Failure delivering result `ResultInfo{who=null, request=2342, result=-1, data=Intent { dat=content://media/external/images/media/103134 (has extras) }} to activity {id.tridee.mobile/id.tridee.mobile.MainActivity}`: java.lang.IllegalStateException: Received images from picker that were not requested
android.app.ActivityThread.performResumeActivity
**Caused by java.lang.RuntimeException**
Failure delivering result `ResultInfo{who=null, request=2342, result=-1, data=Intent { dat=content://media/external/images/media/103134 (has extras) }}` to activity {id.tridee.mobile/id.tridee.mobile.MainActivity}: java.lang.IllegalStateException: Received images from picker that were not requested
android.app.ActivityThread.deliverResults
**Caused by java.lang.IllegalStateException**
Received images from picker that were not requested
io.flutter.plugins.imagepicker.ImagePickerDelegate.handleResult (ImagePickerDelegate.java:265)
io.flutter.plugins.imagepicker.ImagePickerDelegate.handleChoosePictureResult (ImagePickerDelegate.java:230)
io.flutter.plugins.imagepicker.ImagePickerDelegate.onActivityResult (ImagePickerDelegate.java:217)
io.flutter.app.FlutterPluginRegistry.onActivityResult (FlutterPluginRegistry.java:194)
io.flutter.app.FlutterActivityDelegate.onActivityResult (FlutterActivityDelegate.java:139)
io.flutter.app.FlutterActivity.onActivityResult (FlutterActivity.java:128)
android.app.Activity.dispatchActivityResult (Activity.java:5639)
android.app.ActivityThread.deliverResults (ActivityThread.java:3637)
android.app.ActivityThread.performResumeActivity (ActivityThread.java:3043)
android.app.ActivityThread.handleResumeActivity (ActivityThread.java:3085)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2498)
android.app.ActivityThread.access$800 (ActivityThread.java:166)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1283)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:136)
android.app.ActivityThread.main (ActivityThread.java:5590)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1280)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1096)
dalvik.system.NativeStart.main (NativeStart.java)
</code></pre></div>
<h1 dir="auto">flutter doctor</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel master, v0.3.6-pre.68, on Linux, locale en_US.UTF-8)
• Flutter version 0.3.6-pre.68 at /home/putraxor/DEV/flutter
• Framework revision 1680e55c02 (30 hours ago), 2018-04-30 23:29:46 -0400
• Engine revision 613aae032f
• Dart version 2.0.0-dev.50.0.flutter-cd0c4e4fe1
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /home/putraxor/Android/Sdk
• Android NDK at /home/putraxor/Android/Sdk/ndk-bundle
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = /home/putraxor/Android/Sdk
• Java binary at: /home/putraxor/DEV/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] Android Studio (version 3.1)
• Android Studio at /home/putraxor/DEV/android-studio
• Flutter plugin version 23.2.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] IntelliJ IDEA Ultimate Edition (version 2017.2)
• IntelliJ at /home/putraxor/DEV/idea-IU-172.3757.52
• Flutter plugin version 21.2.2
• Dart plugin version 172.4343.25
[✓] VS Code (version 1.22.2)
• VS Code at /usr/share/code
• Dart Code extension version 2.12.0
[!] Connected devices
! No devices available"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel master, v0.3.6-pre.68, on Linux, locale en_US.UTF-8)
• Flutter version 0.3.6-pre.68 at /home/putraxor/DEV/flutter
• Framework revision 1680e55c02 (30 hours ago), 2018-04-30 23:29:46 -0400
• Engine revision 613aae032f
• Dart version 2.0.0-dev.50.0.flutter-cd0c4e4fe1
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /home/putraxor/Android/Sdk
• Android NDK at /home/putraxor/Android/Sdk/ndk-bundle
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = /home/putraxor/Android/Sdk
• Java binary at: /home/putraxor/DEV/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] Android Studio (version 3.1)
• Android Studio at /home/putraxor/DEV/android-studio
• Flutter plugin version 23.2.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] IntelliJ IDEA Ultimate Edition (version 2017.2)
• IntelliJ at /home/putraxor/DEV/idea-IU-172.3757.52
• Flutter plugin version 21.2.2
• Dart plugin version 172.4343.25
[✓] VS Code (version 1.22.2)
• VS Code at /usr/share/code
• Dart Code extension version 2.12.0
[!] Connected devices
! No devices available
</code></pre></div> | <p dir="auto">I am trying to embed a Flutter module into <strong>iOS</strong> app. But when I tap the button that will show the FlutterViewController, a blank screen shows up and this is printed on the console:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Failed to find assets path for "flutter_assets"
[VERBOSE-2:engine.cc(111)] Engine run configuration was invalid.
[VERBOSE-2:FlutterViewController.mm(462)] Could not launch engine with configuration.
flutter: Observatory listening on http://127.0.0.1:54632/"><pre class="notranslate"><code class="notranslate">Failed to find assets path for "flutter_assets"
[VERBOSE-2:engine.cc(111)] Engine run configuration was invalid.
[VERBOSE-2:FlutterViewController.mm(462)] Could not launch engine with configuration.
flutter: Observatory listening on http://127.0.0.1:54632/
</code></pre></div>
<ul dir="auto">
<li>I followed this tutorial <a href="https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps">https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps</a></li>
<li>I added a FLUTTER_ROOT to my build settings</li>
<li>This erros happens with FlutterViewController.</li>
<li>When using a FlutterAppDelegate, nothing happens (no blank screen, nothing).</li>
</ul>
<p dir="auto">Flutter doctor:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.14 18A391, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[✓] Android Studio (version 3.2)
[✓] IntelliJ IDEA Community Edition (version 2018.1.5)
[✓] Connected devices (1 available)
• No issues found!"><pre class="notranslate"><code class="notranslate">Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.14 18A391, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[✓] Android Studio (version 3.2)
[✓] IntelliJ IDEA Community Edition (version 2018.1.5)
[✓] Connected devices (1 available)
• No issues found!
</code></pre></div> | 0 |
<p dir="auto">We are getting unexpected names (they lack outer name scope) in <code class="notranslate">NamedOutputs</code> tuples added to collections using <code class="notranslate">tf.contrib.layers</code> <code class="notranslate">outputs_collections</code>. The following code demonstrates the issue:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import tensorflow as tf
from tensorflow.contrib import slim
with tf.name_scope("train"):
with slim.arg_scope([slim.fully_connected, slim.flatten],
outputs_collections=tf.GraphKeys.ACTIVATIONS):
ph = tf.placeholder(tf.float32, [2, 2])
fc = slim.fully_connected(ph, 10)
flat = slim.flatten(ph)
{print("name in tuple: ", no.name, ", tensor name:", no.outputs.name)
for no in tf.get_collection(tf.GraphKeys.ACTIVATIONS)}"><pre class="notranslate"><code class="notranslate">import tensorflow as tf
from tensorflow.contrib import slim
with tf.name_scope("train"):
with slim.arg_scope([slim.fully_connected, slim.flatten],
outputs_collections=tf.GraphKeys.ACTIVATIONS):
ph = tf.placeholder(tf.float32, [2, 2])
fc = slim.fully_connected(ph, 10)
flat = slim.flatten(ph)
{print("name in tuple: ", no.name, ", tensor name:", no.outputs.name)
for no in tf.get_collection(tf.GraphKeys.ACTIVATIONS)}
</code></pre></div>
<p dir="auto">The output is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="name in tuple: fully_connected , tensor name: train/fully_connected/Relu:0
name in tuple: train/Flatten , tensor name: train/Flatten/Reshape:0"><pre class="notranslate"><code class="notranslate">name in tuple: fully_connected , tensor name: train/fully_connected/Relu:0
name in tuple: train/Flatten , tensor name: train/Flatten/Reshape:0
</code></pre></div>
<p dir="auto">We have tracked the cause of this down in to <code class="notranslate">tf.contrib.layers</code>. For layers that use internal variables (fully_connected, conv2d, ...), final outputs are added to collections based on internal variable_scope name. Please see:</p>
<p dir="auto">tensorflow/tensorflow/contrib/layers/python/layers/layers.py lines 758, 835 (version 0.10, commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/1df3fb0b4ae5915364f09e233496e98a99a4a886/hovercard" href="https://github.com/tensorflow/tensorflow/commit/1df3fb0b4ae5915364f09e233496e98a99a4a886"><tt>1df3fb0</tt></a>)</p>
<p dir="auto">It is our understanding that activation names generally fall under name_scopes, which is consistent with actual op names in the output above.</p>
<p dir="auto">This issue makes it impossible to retrieve items from collections filtered down with a name scope, an approach that we are trying to use for decoupling op creation and summarizing. It seems a valid use-case.</p> | <h1 dir="auto">Problem description</h1>
<p dir="auto">TensorFlow version r0.10</p>
<p dir="auto">It seems to me that there is a bug with the outputs_collections in tensorflow/tensorflow/contrib/layers. When trying to add the outputs of the layers (say, conv2d) to the tf.GraphKeys.ACTIVATIONS collection, I run into errors with NamedOutputs such as the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...
Run summarize_activations() from tensorflow/tensorflow/contrib/layers/python/layers/summaries.py
...
/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/summaries.pyc in summarize_collection(collection, name_filter, summarizer)
160 if name_filter is None or re.match(name_filter, op.op.name):
161 tensors.append(op)
--> 162 return summarize_tensors(tensors, summarizer)
163
164
/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/summaries.pyc in summarize_tensors(tensors, summarizer)
150 def summarize_tensors(tensors, summarizer=summarize_tensor):
151 """Summarize a set of tensors."""
--> 152 return [summarizer(tensor) for tensor in tensors]
153
154
/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/summaries.pyc in summarize_tensor(tensor, tag)
135 """
136 # Skips string tensors and boolean tensors (not handled by the summaries).
--> 137 if (tensor.dtype.is_compatible_with(dtypes.string) or
138 tensor.dtype.base_dtype == dtypes.bool):
139 return None
AttributeError: 'NamedOutputs' object has no attribute 'dtype'"><pre class="notranslate"><code class="notranslate">...
Run summarize_activations() from tensorflow/tensorflow/contrib/layers/python/layers/summaries.py
...
/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/summaries.pyc in summarize_collection(collection, name_filter, summarizer)
160 if name_filter is None or re.match(name_filter, op.op.name):
161 tensors.append(op)
--> 162 return summarize_tensors(tensors, summarizer)
163
164
/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/summaries.pyc in summarize_tensors(tensors, summarizer)
150 def summarize_tensors(tensors, summarizer=summarize_tensor):
151 """Summarize a set of tensors."""
--> 152 return [summarizer(tensor) for tensor in tensors]
153
154
/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/summaries.pyc in summarize_tensor(tensor, tag)
135 """
136 # Skips string tensors and boolean tensors (not handled by the summaries).
--> 137 if (tensor.dtype.is_compatible_with(dtypes.string) or
138 tensor.dtype.base_dtype == dtypes.bool):
139 return None
AttributeError: 'NamedOutputs' object has no attribute 'dtype'
</code></pre></div>
<h1 dir="auto">Root of problem</h1>
<h2 dir="auto">README and code are not consistent</h2>
<p dir="auto">The readme (located at tensorflow/tensorflow/contrib/layers/README.md) indicates that "weights, biases, and activations (i.e., outputs) are, by default, added to the specified collections." They even show a piece of code such as <code class="notranslate">output_collections=(tf.GraphKeys.ACTIVATIONS,)</code>. However, looking into the code in tensorflow/tensorflow/contrib/layers/python/layers/layers.py it seems to me that there is nothing adding activations to the tf.GraphKeys.ACTIVATIONS collection. I believe one solution to this problem is to use the <code class="notranslate">_apply_activation</code> function already written in the file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def _apply_activation(y, activation_fn, output_collections):
if activation_fn:
y = activation_fn(y)
ops.add_to_collections(list(output_collections or []) +
[ops.GraphKeys.ACTIVATIONS], y)
return y"><pre class="notranslate"><code class="notranslate">def _apply_activation(y, activation_fn, output_collections):
if activation_fn:
y = activation_fn(y)
ops.add_to_collections(list(output_collections or []) +
[ops.GraphKeys.ACTIVATIONS], y)
return y
</code></pre></div>
<p dir="auto">instead of using only</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if activation_fn:
outputs = activation_fn(outputs)
return utils.collect_named_outputs(outputs_collections, sc.name, outputs)"><pre class="notranslate"><code class="notranslate">if activation_fn:
outputs = activation_fn(outputs)
return utils.collect_named_outputs(outputs_collections, sc.name, outputs)
</code></pre></div>
<h2 dir="auto">Code walkthrough</h2>
<p dir="auto">tensorflow/tensorflow/contrib/layers/python/layers/layers.py uses this line several times (such as in conv2d):<br>
<code class="notranslate">utils.collect_named_outputs(outputs_collections, sc, outputs)</code></p>
<p dir="auto">Opening tensorflow/tensorflow/contrib/layers/python/layers/utils.py we see that this ultimately calls:<br>
<code class="notranslate">ops.add_to_collections(collections, NamedOutputs(name, outputs))</code></p>
<p dir="auto">However, it seems to me that when using the summarize_activations function in <a href="https://github.com/tensorflow/tensorflow/blob/r0.10/tensorflow/contrib/layers/python/layers/summaries.py">https://github.com/tensorflow/tensorflow/blob/r0.10/tensorflow/contrib/layers/python/layers/summaries.py</a>, it expects the value to be <code class="notranslate">outputs</code> rather than <code class="notranslate">NamedOutputs(name, outputs)</code>. In other words, the summarize_activations function seems to expect something along the lines of:<br>
<code class="notranslate">ops.add_to_collections(collections, outputs)</code><br>
rather than<br>
<code class="notranslate">ops.add_to_collections(collections, NamedOutputs(name, outputs))</code></p>
<h3 dir="auto">Further description (not particularly informative if you are already familiar with the tensorflow repo)</h3>
<p dir="auto">If we look into what <code class="notranslate">ops.add_to_collections</code> is doing, we see that in tensorflow/tensorflow/python/framework/ops.py this ultimately calls:<br>
<code class="notranslate">self.add_to_collection(name, value)</code></p>
<p dir="auto"><code class="notranslate">add_to_collection(...)</code> is described in the same file as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" def add_to_collection(self, name, value):
"""Stores `value` in the collection with the given `name`.
Note that collections are not sets, so it is possible to add a value to
a collection several times.
Args:
name: The key for the collection. The `GraphKeys` class
contains many standard names for collections.
value: The value to add to the collection."><pre class="notranslate"><code class="notranslate"> def add_to_collection(self, name, value):
"""Stores `value` in the collection with the given `name`.
Note that collections are not sets, so it is possible to add a value to
a collection several times.
Args:
name: The key for the collection. The `GraphKeys` class
contains many standard names for collections.
value: The value to add to the collection.
</code></pre></div>
<p dir="auto">So, our <code class="notranslate">value</code> here is <code class="notranslate">value = NamedOutputs(name, outputs)</code> from earlier.</p>
<p dir="auto">However, if we look at the summarize_activations in tensorflow/tensorflow/contrib/layers/python/layers/summaries.py, we see that:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def summarize_activations(name_filter=None, summarizer=summarize_activation):
"""Summarize activations, using `summarize_activation` to summarize."""
return summarize_collection(ops.GraphKeys.ACTIVATIONS, name_filter,
summarizer)
def summarize_collection(collection, name_filter=None,
summarizer=summarize_tensor):
"""Summarize a graph collection of tensors, possibly filtered by name."""
tensors = []
for op in ops.get_collection(collection):
if name_filter is None or re.match(name_filter, op.op.name):
tensors.append(op)
return summarize_tensors(tensors, summarizer)"><pre class="notranslate"><code class="notranslate">def summarize_activations(name_filter=None, summarizer=summarize_activation):
"""Summarize activations, using `summarize_activation` to summarize."""
return summarize_collection(ops.GraphKeys.ACTIVATIONS, name_filter,
summarizer)
def summarize_collection(collection, name_filter=None,
summarizer=summarize_tensor):
"""Summarize a graph collection of tensors, possibly filtered by name."""
tensors = []
for op in ops.get_collection(collection):
if name_filter is None or re.match(name_filter, op.op.name):
tensors.append(op)
return summarize_tensors(tensors, summarizer)
</code></pre></div>
<p dir="auto">In other words, <code class="notranslate">summarize_collection(...)</code> expects the collection to contain tensors instead of NamedOutputs(name, outputs).</p> | 1 |
<p dir="auto">Is there a Window.cookies like node-webkit?</p> | <p dir="auto">Hello Everyone,</p>
<p dir="auto">I am a newbie to Electron (Atom-shell), Was figuring out the api provided in ATOM shell. While doing mock up codes. I was unable to find any api to retrieve cookies and delete specific cookies for domain.</p>
<p dir="auto">Am i missing something, can someone put me in a right direction.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Mac : ~/Library/Application Support/<appName>/Cookies i deleted all were gone.
windows : appData/<appName>/cookies
"><pre class="notranslate"><code class="notranslate">Mac : ~/Library/Application Support/<appName>/Cookies i deleted all were gone.
windows : appData/<appName>/cookies
</code></pre></div>
<p dir="auto">deletion will delete everything But is there any api to collect all Cookies and manage selective domains to delete them? or can we enable <a href="https://developer.chrome.com/extensions/cookies" rel="nofollow">https://developer.chrome.com/extensions/cookies</a> api</p>
<p dir="auto">BTW, I just love the architecture and way atom is working embedding CEF and Node</p>
<p dir="auto">Cheers!!!!!</p> | 1 |
<p dir="auto">A recent change to the DateTimeToStringTransformer (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/b20c5ca2efc92a99787340a7dff5455f0ceb38a9/hovercard" href="https://github.com/symfony/symfony/commit/b20c5ca2efc92a99787340a7dff5455f0ceb38a9"><tt>b20c5ca</tt></a>) now causes time values with AM/PM timestamps (H:i A) to fail in validation This is because the change now expects all time values to be in H:i:s datetime format whereas previously the system was more compatible with different formats.</p>
<p dir="auto">Works: 14:03:07</p>
<p dir="auto">Fails: 02:03:07 PM</p>
<p dir="auto">This specifically causes errors when using a datetime entity type.</p>
<p dir="auto">It seems that there are two possible ways to fix this issue. The first is to allow the DateTimeType to take in format as an option so users can specify different time formats instead of defaulting to H:i:s in all cases. The other would be to modify the DateTimeToStringTransformer so it is more resistant to failures like this, but could possibly cause the initial fix to break.</p>
<p dir="auto">Is there any other way to bypass this issue?</p> | <p dir="auto">Is there a way to use 12H format in Time Field?</p> | 1 |
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1647" rel="nofollow">http://projects.scipy.org/numpy/ticket/1647</a> on 2010-10-24 by trac user phaustus, assigned to unknown.</em></p>
<p dir="auto">Hi,</p>
<p dir="auto">Under numpy 1.4.1, the output of:</p>
<blockquote>
<p dir="auto">int32(array([0.]))</p>
</blockquote>
<p dir="auto">is simply "0", whereas under numpy 1.3.0, the output is<br>
"array([0], dtype=int32)". While the former is a number,<br>
the latter is an array. Interestingly, the output for</p>
<blockquote>
<p dir="auto">int32(array([0.,1.]))</p>
</blockquote>
<p dir="auto">and for</p>
<blockquote>
<p dir="auto">int32(array([]))</p>
</blockquote>
<p dir="auto">is the same in each version (i.e., both return arrays).</p>
<p dir="auto">I apologize if this has already been addressed. I did a search and found nothing.</p>
<p dir="auto">Cheers,</p>
<p dir="auto">Phaustus</p> | <p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/764" rel="nofollow">http://projects.scipy.org/numpy/ticket/764</a> on 2008-04-29 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/charris/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/charris">@charris</a>, assigned to unknown.</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: float32(array([[1]]))
Out[1]: array([[ 1.]], dtype=float32)
In [2]: float64(array([[1]]))
Out[2]: 1.0
In [3]: int64(array([[1]]))
Out[3]: array([[1]], dtype=int64)
In [4]: int32(array([[1]]))
Out[4]: 1"><pre class="notranslate"><code class="notranslate">In [1]: float32(array([[1]]))
Out[1]: array([[ 1.]], dtype=float32)
In [2]: float64(array([[1]]))
Out[2]: 1.0
In [3]: int64(array([[1]]))
Out[3]: array([[1]], dtype=int64)
In [4]: int32(array([[1]]))
Out[4]: 1
</code></pre></div>
<p dir="auto">But also</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [5]: float64([[1]])
Out[5]: array([[ 1.]])
In [6]: int32([[1]])
Out[6]: array([[1]])"><pre class="notranslate"><code class="notranslate">In [5]: float64([[1]])
Out[5]: array([[ 1.]])
In [6]: int32([[1]])
Out[6]: array([[1]])
</code></pre></div> | 1 |
<p dir="auto">Microsoft Windows [Version 10.0.15063]<br>
(c) 2017 Microsoft Corporation. All rights reserved.</p>
<p dir="auto">C:\Users\Dell>pip install scipy<br>
Collecting scipy<br>
Using cached scipy-0.19.1.tar.gz<br>
Building wheels for collected packages: scipy<br>
Running setup.py bdist_wheel for scipy ... error<br>
Complete output from command c:\users\dell\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;<strong>file</strong>='C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py';f=getattr(tokenize, 'open', open)(<strong>file</strong>);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, <strong>file</strong>, 'exec'))" bdist_wheel -d C:\Users\Dell\AppData\Local\Temp\tmp1l7vwfw7pip-wheel- --python-tag cp36:<br>
lapack_opt_info:<br>
lapack_mkl_info:<br>
libraries mkl_rt not found in ['c:\users\dell\appdata\local\programs\python\python36-32\lib', 'C:\', 'c:\users\dell\appdata\local\programs\python\python36-32\libs']<br>
NOT AVAILABLE</p>
<p dir="auto">openblas_lapack_info:<br>
libraries openblas not found in ['c:\users\dell\appdata\local\programs\python\python36-32\lib', 'C:\', 'c:\users\dell\appdata\local\programs\python\python36-32\libs']<br>
NOT AVAILABLE</p>
<p dir="auto">atlas_3_10_threads_info:<br>
Setting PTATLAS=ATLAS<br>
c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:1051: UserWarning: Specified path C:\projects\numpy-wheels\windows-wheel-builder\atlas-builds\atlas-3.10.1-sse2-32\lib is invalid.<br>
pre_dirs = system_info.get_paths(self, section, key)<br>
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'><br>
NOT AVAILABLE</p>
<p dir="auto">atlas_3_10_info:<br>
<class 'numpy.distutils.system_info.atlas_3_10_info'><br>
NOT AVAILABLE</p>
<p dir="auto">atlas_threads_info:<br>
Setting PTATLAS=ATLAS<br>
<class 'numpy.distutils.system_info.atlas_threads_info'><br>
NOT AVAILABLE</p>
<p dir="auto">atlas_info:<br>
<class 'numpy.distutils.system_info.atlas_info'><br>
NOT AVAILABLE</p>
<p dir="auto">c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:<br>
Atlas (<a href="http://math-atlas.sourceforge.net/" rel="nofollow">http://math-atlas.sourceforge.net/</a>) libraries not found.<br>
Directories to search for the libraries can be specified in the<br>
numpy/distutils/site.cfg file (section [atlas]) or by setting<br>
the ATLAS environment variable.<br>
self.calc_info()<br>
lapack_info:<br>
libraries lapack not found in ['c:\users\dell\appdata\local\programs\python\python36-32\lib', 'C:\', 'c:\users\dell\appdata\local\programs\python\python36-32\libs']<br>
NOT AVAILABLE</p>
<p dir="auto">c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:<br>
Lapack (<a href="http://www.netlib.org/lapack/" rel="nofollow">http://www.netlib.org/lapack/</a>) libraries not found.<br>
Directories to search for the libraries can be specified in the<br>
numpy/distutils/site.cfg file (section [lapack]) or by setting<br>
the LAPACK environment variable.<br>
self.calc_info()<br>
lapack_src_info:<br>
NOT AVAILABLE</p>
<p dir="auto">c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:<br>
Lapack (<a href="http://www.netlib.org/lapack/" rel="nofollow">http://www.netlib.org/lapack/</a>) sources not found.<br>
Directories to search for the sources can be specified in the<br>
numpy/distutils/site.cfg file (section [lapack_src]) or by setting<br>
the LAPACK_SRC environment variable.<br>
self.calc_info()<br>
NOT AVAILABLE</p>
<p dir="auto">Running from scipy source directory.<br>
non-existing path in 'scipy\integrate': 'quadpack.h'<br>
Traceback (most recent call last):<br>
File "", line 1, in <br>
File "C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py", line 416, in <br>
setup_package()<br>
File "C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py", line 412, in setup_package<br>
setup(**metadata)<br>
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\core.py", line 135, in setup<br>
config = configuration()<br>
File "C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py", line 336, in configuration<br>
config.add_subpackage('scipy')<br>
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage<br>
caller_level = 2)<br>
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage<br>
caller_level = caller_level + 1)<br>
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py<br>
config = setup_module.configuration(*args)<br>
File "scipy\setup.py", line 15, in configuration<br>
config.add_subpackage('linalg')<br>
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage<br>
caller_level = 2)<br>
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage<br>
caller_level = caller_level + 1)<br>
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py<br>
config = setup_module.configuration(*args)<br>
File "scipy\linalg\setup.py", line 20, in configuration<br>
raise NotFoundError('no lapack/blas resources found')<br>
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found</p>
<hr>
<p dir="auto">Failed building wheel for scipy<br>
Running setup.py clean for scipy<br>
Complete output from command c:\users\dell\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;<strong>file</strong>='C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py';f=getattr(tokenize, 'open', open)(<strong>file</strong>);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, <strong>file</strong>, 'exec'))" clean --all:</p>
<p dir="auto"><code class="notranslate">setup.py clean</code> is not supported, use one of the following instead:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)"><pre class="notranslate"><code class="notranslate">- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)
</code></pre></div>
<p dir="auto">Add <code class="notranslate">--force</code> to your command to use it anyway if you must (unsupported).</p>
<hr>
<p dir="auto">Failed cleaning build dir for scipy<br>
Failed to build scipy<br>
Installing collected packages: scipy<br>
Running setup.py install for scipy ... error<br>
Complete output from command c:\users\dell\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;<strong>file</strong>='C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py';f=getattr(tokenize, 'open', open)(<strong>file</strong>);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, <strong>file</strong>, 'exec'))" install --record C:\Users\Dell\AppData\Local\Temp\pip-hld1q3ns-record\install-record.txt --single-version-externally-managed --compile:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install scipy` (last SciPy release on PyPI)
lapack_opt_info:
lapack_mkl_info:
libraries mkl_rt not found in ['c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\libs']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:1051: UserWarning: Specified path C:\projects\numpy-wheels\windows-wheel-builder\atlas-builds\atlas-3.10.1-sse2-32\lib is invalid.
pre_dirs = system_info.get_paths(self, section, key)
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
lapack_info:
libraries lapack not found in ['c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\libs']
NOT AVAILABLE
c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
self.calc_info()
lapack_src_info:
NOT AVAILABLE
c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
self.calc_info()
NOT AVAILABLE
Running from scipy source directory.
non-existing path in 'scipy\\integrate': 'quadpack.h'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py", line 416, in <module>
setup_package()
File "C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py", line 412, in setup_package
setup(**metadata)
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\core.py", line 135, in setup
config = configuration()
File "C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py", line 336, in configuration
config.add_subpackage('scipy')
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
caller_level = 2)
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
caller_level = caller_level + 1)
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy\setup.py", line 15, in configuration
config.add_subpackage('linalg')
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
caller_level = 2)
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
caller_level = caller_level + 1)
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy\linalg\setup.py", line 20, in configuration
raise NotFoundError('no lapack/blas resources found')
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------"><pre class="notranslate"><code class="notranslate">Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install scipy` (last SciPy release on PyPI)
lapack_opt_info:
lapack_mkl_info:
libraries mkl_rt not found in ['c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\libs']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:1051: UserWarning: Specified path C:\projects\numpy-wheels\windows-wheel-builder\atlas-builds\atlas-3.10.1-sse2-32\lib is invalid.
pre_dirs = system_info.get_paths(self, section, key)
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
lapack_info:
libraries lapack not found in ['c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\programs\\python\\python36-32\\libs']
NOT AVAILABLE
c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
self.calc_info()
lapack_src_info:
NOT AVAILABLE
c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
self.calc_info()
NOT AVAILABLE
Running from scipy source directory.
non-existing path in 'scipy\\integrate': 'quadpack.h'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py", line 416, in <module>
setup_package()
File "C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py", line 412, in setup_package
setup(**metadata)
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\core.py", line 135, in setup
config = configuration()
File "C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py", line 336, in configuration
config.add_subpackage('scipy')
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
caller_level = 2)
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
caller_level = caller_level + 1)
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy\setup.py", line 15, in configuration
config.add_subpackage('linalg')
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
caller_level = 2)
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
caller_level = caller_level + 1)
File "c:\users\dell\appdata\local\programs\python\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy\linalg\setup.py", line 20, in configuration
raise NotFoundError('no lapack/blas resources found')
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------
</code></pre></div>
<p dir="auto">Command "c:\users\dell\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;<strong>file</strong>='C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\setup.py';f=getattr(tokenize, 'open', open)(<strong>file</strong>);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, <strong>file</strong>, 'exec'))" install --record C:\Users\Dell\AppData\Local\Temp\pip-hld1q3ns-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Dell\AppData\Local\Temp\pip-build-7txu6_5w\scipy\</p>
<p dir="auto">C:\Users\Dell></p> | <p dir="auto">It would be very helpful to have binary wheel packages for Windows platform.</p>
<p dir="auto">I think it might work to build those wheels using Appveyor service: <a href="http://www.appveyor.com/" rel="nofollow">http://www.appveyor.com/</a></p> | 1 |
<p dir="auto">I am following this tutorial <a href="http://www.bitfusion.io/2016/08/31/training-a-bird-classifier-with-tensorflow-and-tflearn/" rel="nofollow">http://www.bitfusion.io/2016/08/31/training-a-bird-classifier-with-tensorflow-and-tflearn/</a> I assume that training was done but the system was restarted so I can't verify if the 100 epochs were done. Can you please suggest fixes? Is this a tflearn and tensorflow version mismatch? What can be done?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mona@pascal:~/computer_vision/python_playground$ python infer.py test_images/
bird_african_fish_eagle.jpg bird_mount_bluebird.jpg not_a_bird_creativecommons_logo.jpg
bird_bullocks_oriole.jpg not_a_bird_airplane.jpg not_a_bird_stop_sign.jpg
mona@pascal:~/computer_vision/python_playground$ python infer.py test_images/not_a_bird_stop_sign.jpg
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties:
name: Tesla K40c
major: 3 minor: 5 memoryClockRate (GHz) 0.745
pciBusID 0000:03:00.0
Total memory: 11.92GiB
Free memory: 11.85GiB
W tensorflow/stream_executor/cuda/cuda_driver.cc:590] creating context when one is currently active; existing: 0x3771170
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 1 with properties:
name: Tesla K40c
major: 3 minor: 5 memoryClockRate (GHz) 0.745
pciBusID 0000:83:00.0
Total memory: 11.92GiB
Free memory: 11.85GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:777] Peer access not supported between device ordinals 0 and 1
I tensorflow/core/common_runtime/gpu/gpu_device.cc:777] Peer access not supported between device ordinals 1 and 0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 1
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y N
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 1: N Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Tesla K40c, pci bus id: 0000:03:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:1) -> (device: 1, name: Tesla K40c, pci bus id: 0000:83:00.0)
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tflearn/summaries.py:46 in get_summary.: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tflearn/summaries.py:46 in get_summary.: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tflearn/helpers/trainer.py:766 in create_summaries.: merge_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.merge.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tflearn/helpers/trainer.py:130 in __init__.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Tesla K40c, pci bus id: 0000:03:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:1) -> (device: 1, name: Tesla K40c, pci bus id: 0000:83:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Tesla K40c, pci bus id: 0000:03:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:1) -> (device: 1, name: Tesla K40c, pci bus id: 0000:83:00.0)
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tflearn/helpers/trainer.py:378 in restore.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
Traceback (most recent call last):
File "infer.py", line 44, in <module>
model.load("bird-classifier.tfl.ckpt-50912")
File "/usr/local/lib/python2.7/dist-packages/tflearn/models/dnn.py", line 227, in load
self.trainer.restore(model_file)
File "/usr/local/lib/python2.7/dist-packages/tflearn/helpers/trainer.py", line 379, in restore
self.restorer.restore(self.session, model_file)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1388, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 766, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 964, in _run
feed_dict_string, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1014, in _do_run
target_list, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
[[Node: save_1/RestoreV2_14 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save_1/Const_0, save_1/RestoreV2_14/tensor_names, save_1/RestoreV2_14/shape_and_slices)]]
[[Node: save_1/RestoreV2_21/_17 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_158_save_1/RestoreV2_21", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]
Caused by op u'save_1/RestoreV2_14', defined at:
File "infer.py", line 43, in <module>
model = tflearn.DNN(network, tensorboard_verbose=0, checkpoint_path='bird-classifier.tfl.ckpt')
File "/usr/local/lib/python2.7/dist-packages/tflearn/models/dnn.py", line 57, in __init__
session=session)
File "/usr/local/lib/python2.7/dist-packages/tflearn/helpers/trainer.py", line 125, in __init__
keep_checkpoint_every_n_hours=keep_checkpoint_every_n_hours)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1000, in __init__
self.build()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1030, in build
restore_sequentially=self._restore_sequentially)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 624, in build
restore_sequentially, reshape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 361, in _AddRestoreOps
tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 200, in restore_op
[spec.tensor.dtype])[0])
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 441, in restore_v2
dtypes=dtypes, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1128, in __init__
self._traceback = _extract_stack()
NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
[[Node: save_1/RestoreV2_14 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save_1/Const_0, save_1/RestoreV2_14/tensor_names, save_1/RestoreV2_14/shape_and_slices)]]
[[Node: save_1/RestoreV2_21/_17 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_158_save_1/RestoreV2_21", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]
[1]+ Killed python2 infer.py ${f} 2> /dev/null
mona@pascal:~/computer_vision/python_playground$ ls *50912(
-bash: syntax error near unexpected token `('
mona@pascal:~/computer_vision/python_playground$ ls *50912*
bird-classifier.tfl.ckpt-50912.data-00000-of-00001 bird-classifier.tfl.ckpt-50912.index bird-classifier.tfl.ckpt-50912.meta"><pre class="notranslate"><code class="notranslate">mona@pascal:~/computer_vision/python_playground$ python infer.py test_images/
bird_african_fish_eagle.jpg bird_mount_bluebird.jpg not_a_bird_creativecommons_logo.jpg
bird_bullocks_oriole.jpg not_a_bird_airplane.jpg not_a_bird_stop_sign.jpg
mona@pascal:~/computer_vision/python_playground$ python infer.py test_images/not_a_bird_stop_sign.jpg
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties:
name: Tesla K40c
major: 3 minor: 5 memoryClockRate (GHz) 0.745
pciBusID 0000:03:00.0
Total memory: 11.92GiB
Free memory: 11.85GiB
W tensorflow/stream_executor/cuda/cuda_driver.cc:590] creating context when one is currently active; existing: 0x3771170
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 1 with properties:
name: Tesla K40c
major: 3 minor: 5 memoryClockRate (GHz) 0.745
pciBusID 0000:83:00.0
Total memory: 11.92GiB
Free memory: 11.85GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:777] Peer access not supported between device ordinals 0 and 1
I tensorflow/core/common_runtime/gpu/gpu_device.cc:777] Peer access not supported between device ordinals 1 and 0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 1
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y N
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 1: N Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Tesla K40c, pci bus id: 0000:03:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:1) -> (device: 1, name: Tesla K40c, pci bus id: 0000:83:00.0)
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tflearn/summaries.py:46 in get_summary.: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tflearn/summaries.py:46 in get_summary.: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tflearn/helpers/trainer.py:766 in create_summaries.: merge_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.merge.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tflearn/helpers/trainer.py:130 in __init__.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Tesla K40c, pci bus id: 0000:03:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:1) -> (device: 1, name: Tesla K40c, pci bus id: 0000:83:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Tesla K40c, pci bus id: 0000:03:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:1) -> (device: 1, name: Tesla K40c, pci bus id: 0000:83:00.0)
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tflearn/helpers/trainer.py:378 in restore.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
W tensorflow/core/framework/op_kernel.cc:975] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
Traceback (most recent call last):
File "infer.py", line 44, in <module>
model.load("bird-classifier.tfl.ckpt-50912")
File "/usr/local/lib/python2.7/dist-packages/tflearn/models/dnn.py", line 227, in load
self.trainer.restore(model_file)
File "/usr/local/lib/python2.7/dist-packages/tflearn/helpers/trainer.py", line 379, in restore
self.restorer.restore(self.session, model_file)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1388, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 766, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 964, in _run
feed_dict_string, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1014, in _do_run
target_list, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
[[Node: save_1/RestoreV2_14 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save_1/Const_0, save_1/RestoreV2_14/tensor_names, save_1/RestoreV2_14/shape_and_slices)]]
[[Node: save_1/RestoreV2_21/_17 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_158_save_1/RestoreV2_21", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]
Caused by op u'save_1/RestoreV2_14', defined at:
File "infer.py", line 43, in <module>
model = tflearn.DNN(network, tensorboard_verbose=0, checkpoint_path='bird-classifier.tfl.ckpt')
File "/usr/local/lib/python2.7/dist-packages/tflearn/models/dnn.py", line 57, in __init__
session=session)
File "/usr/local/lib/python2.7/dist-packages/tflearn/helpers/trainer.py", line 125, in __init__
keep_checkpoint_every_n_hours=keep_checkpoint_every_n_hours)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1000, in __init__
self.build()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1030, in build
restore_sequentially=self._restore_sequentially)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 624, in build
restore_sequentially, reshape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 361, in _AddRestoreOps
tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 200, in restore_op
[spec.tensor.dtype])[0])
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 441, in restore_v2
dtypes=dtypes, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1128, in __init__
self._traceback = _extract_stack()
NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to find any matching files for bird-classifier.tfl.ckpt-50912
[[Node: save_1/RestoreV2_14 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save_1/Const_0, save_1/RestoreV2_14/tensor_names, save_1/RestoreV2_14/shape_and_slices)]]
[[Node: save_1/RestoreV2_21/_17 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_158_save_1/RestoreV2_21", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]
[1]+ Killed python2 infer.py ${f} 2> /dev/null
mona@pascal:~/computer_vision/python_playground$ ls *50912(
-bash: syntax error near unexpected token `('
mona@pascal:~/computer_vision/python_playground$ ls *50912*
bird-classifier.tfl.ckpt-50912.data-00000-of-00001 bird-classifier.tfl.ckpt-50912.index bird-classifier.tfl.ckpt-50912.meta
</code></pre></div>
<p dir="auto">Here are the dumped training files I have <a href="http://pastebin.com/9RF58yBB" rel="nofollow">http://pastebin.com/9RF58yBB</a></p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ uname -a ; lsb_release -a
Linux pascal 3.13.0-62-generic #102-Ubuntu SMP Tue Aug 11 14:29:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty"><pre class="notranslate"><code class="notranslate">$ uname -a ; lsb_release -a
Linux pascal 3.13.0-62-generic #102-Ubuntu SMP Tue Aug 11 14:29:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
</code></pre></div>
<p dir="auto">Installed version of CUDA and cuDNN:<br>
(please attach the output of <code class="notranslate">ls -l /path/to/cuda/lib/libcud*</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ls /usr/local/cuda-8.0/lib64/
libcublas_device.a libcudnn.so.5.1.10 libcuinj64.so.8.0.44 libcusparse.so.8.0.44 libnppicom.so libnppim.so libnppisu.so.8.0.44 libnvgraph.so.8.0 libOpenCL.so
libcublas.so libcudnn_static.a libculibos.a libcusparse_static.a libnppicom.so.8.0 libnppim.so.8.0 libnppitc.so libnvgraph.so.8.0.44 libOpenCL.so.1
libcublas.so.8.0 libcufft.so libcurand.so libnppc.so libnppicom.so.8.0.44 libnppim.so.8.0.44 libnppitc.so.8.0 libnvgraph_static.a libOpenCL.so.1.0
libcublas.so.8.0.45 libcufft.so.8.0 libcurand.so.8.0 libnppc.so.8.0 libnppidei.so libnppi.so libnppitc.so.8.0.44 libnvrtc-builtins.so libOpenCL.so.1.0.0
libcublas_static.a libcufft.so.8.0.44 libcurand.so.8.0.44 libnppc.so.8.0.44 libnppidei.so.8.0 libnppi.so.8.0 libnpps.so libnvrtc-builtins.so.8.0 stubs
libcudadevrt.a libcufft_static.a libcurand_static.a libnppc_static.a libnppidei.so.8.0.44 libnppi.so.8.0.44 libnpps.so.8.0 libnvrtc-builtins.so.8.0.44
libcudart.so libcufftw.so libcusolver.so libnppial.so libnppif.so libnppi_static.a libnpps.so.8.0.44 libnvrtc.so
libcudart.so.8.0 libcufftw.so.8.0 libcusolver.so.8.0 libnppial.so.8.0 libnppif.so.8.0 libnppist.so libnpps_static.a libnvrtc.so.8.0
libcudart.so.8.0.44 libcufftw.so.8.0.44 libcusolver.so.8.0.44 libnppial.so.8.0.44 libnppif.so.8.0.44 libnppist.so.8.0 libnvblas.so libnvrtc.so.8.0.44
libcudart_static.a libcufftw_static.a libcusolver_static.a libnppicc.so libnppig.so libnppist.so.8.0.44 libnvblas.so.8.0 libnvToolsExt.so
libcudnn.so libcuinj64.so libcusparse.so libnppicc.so.8.0 libnppig.so.8.0 libnppisu.so libnvblas.so.8.0.44 libnvToolsExt.so.1
libcudnn.so.5 libcuinj64.so.8.0 libcusparse.so.8.0 libnppicc.so.8.0.44 libnppig.so.8.0.44 libnppisu.so.8.0 libnvgraph.so libnvToolsExt.so.1.0.0"><pre class="notranslate"><code class="notranslate">$ ls /usr/local/cuda-8.0/lib64/
libcublas_device.a libcudnn.so.5.1.10 libcuinj64.so.8.0.44 libcusparse.so.8.0.44 libnppicom.so libnppim.so libnppisu.so.8.0.44 libnvgraph.so.8.0 libOpenCL.so
libcublas.so libcudnn_static.a libculibos.a libcusparse_static.a libnppicom.so.8.0 libnppim.so.8.0 libnppitc.so libnvgraph.so.8.0.44 libOpenCL.so.1
libcublas.so.8.0 libcufft.so libcurand.so libnppc.so libnppicom.so.8.0.44 libnppim.so.8.0.44 libnppitc.so.8.0 libnvgraph_static.a libOpenCL.so.1.0
libcublas.so.8.0.45 libcufft.so.8.0 libcurand.so.8.0 libnppc.so.8.0 libnppidei.so libnppi.so libnppitc.so.8.0.44 libnvrtc-builtins.so libOpenCL.so.1.0.0
libcublas_static.a libcufft.so.8.0.44 libcurand.so.8.0.44 libnppc.so.8.0.44 libnppidei.so.8.0 libnppi.so.8.0 libnpps.so libnvrtc-builtins.so.8.0 stubs
libcudadevrt.a libcufft_static.a libcurand_static.a libnppc_static.a libnppidei.so.8.0.44 libnppi.so.8.0.44 libnpps.so.8.0 libnvrtc-builtins.so.8.0.44
libcudart.so libcufftw.so libcusolver.so libnppial.so libnppif.so libnppi_static.a libnpps.so.8.0.44 libnvrtc.so
libcudart.so.8.0 libcufftw.so.8.0 libcusolver.so.8.0 libnppial.so.8.0 libnppif.so.8.0 libnppist.so libnpps_static.a libnvrtc.so.8.0
libcudart.so.8.0.44 libcufftw.so.8.0.44 libcusolver.so.8.0.44 libnppial.so.8.0.44 libnppif.so.8.0.44 libnppist.so.8.0 libnvblas.so libnvrtc.so.8.0.44
libcudart_static.a libcufftw_static.a libcusolver_static.a libnppicc.so libnppig.so libnppist.so.8.0.44 libnvblas.so.8.0 libnvToolsExt.so
libcudnn.so libcuinj64.so libcusparse.so libnppicc.so.8.0 libnppig.so.8.0 libnppisu.so libnvblas.so.8.0.44 libnvToolsExt.so.1
libcudnn.so.5 libcuinj64.so.8.0 libcusparse.so.8.0 libnppicc.so.8.0.44 libnppig.so.8.0.44 libnppisu.so.8.0 libnvgraph.so libnvToolsExt.so.1.0.0
</code></pre></div>
<p dir="auto">If installed from binary pip package, provide:</p>
<ol dir="auto">
<li>A link to the pip package you installed:</li>
<li>The output from <code class="notranslate">python -c "import tensorflow; print(tensorflow.__version__)"</code>.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -c "import tensorflow; print(tensorflow.__version__)"
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
0.12.1
"><pre class="notranslate"><code class="notranslate">$ python -c "import tensorflow; print(tensorflow.__version__)"
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
0.12.1
</code></pre></div>
<p dir="auto">If installed from source, provide</p>
<ol dir="auto">
<li>The commit hash (<code class="notranslate">git rev-parse HEAD</code>)</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mona@pascal:~/tf/tensorflow$ git rev-parse HEAD
156da397dc2e354baeac10804c5e9c1b3af8b7eb"><pre class="notranslate"><code class="notranslate">mona@pascal:~/tf/tensorflow$ git rev-parse HEAD
156da397dc2e354baeac10804c5e9c1b3af8b7eb
</code></pre></div>
<ol start="2" dir="auto">
<li>The output of <code class="notranslate">bazel version</code></li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ bazel version
...........................
Build label: 0.4.3
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Dec 22 12:31:25 2016 (1482409885)
Build timestamp: 1482409885
Build timestamp as int: 1482409885"><pre class="notranslate"><code class="notranslate">$ bazel version
...........................
Build label: 0.4.3
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Dec 22 12:31:25 2016 (1482409885)
Build timestamp: 1482409885
Build timestamp as int: 1482409885
</code></pre></div> | <p dir="auto">Please go to Stack Overflow for help and support:</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/tagged/tensorflow" rel="nofollow">https://stackoverflow.com/questions/tagged/tensorflow</a></p>
<p dir="auto">If you open a GitHub issue, here is our policy:</p>
<ol dir="auto">
<li>It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).</li>
<li>The form below must be filled out.</li>
<li>It shouldn't be a TensorBoard issue. Those go <a href="https://github.com/tensorflow/tensorboard/issues">here</a>.</li>
</ol>
<p dir="auto"><strong>Here's why we have that policy</strong>: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.</p>
<hr>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>:</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Ubuntu, <strong>CPU</strong></li>
<li><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>:</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary (pip install through anaconda)</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.8</li>
<li><strong>Python version</strong>: 3.6</li>
<li><strong>Bazel version (if compiling from source)</strong>:</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>:</li>
<li><strong>CUDA/cuDNN version</strong>:</li>
<li><strong>GPU model and memory</strong>:</li>
<li><strong>Exact command to reproduce</strong>:</li>
</ul>
<p dir="auto">You can collect some of this information using our environment capture script:</p>
<p dir="auto"><a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh</a></p>
<p dir="auto">You can obtain the TensorFlow version with</p>
<p dir="auto">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</p>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Hi, I want to covert a .pb model to .tflite one. The model is train with tensorflow object detection API. The input tensor shape is (None, None, None, 3) but it seems that tflite_convert doesn't support this kind of input.<br>
Source code / logs</p>
<p dir="auto">ValueError: None is only supported in the 1st dimension. Tensor 'image_tensor:0' has invalid shape '[None, None, None, 3]'.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pkulzc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pkulzc">@pkulzc</a> Do you think this error is caused because we don't provide the input shape for in the <a href="models/research/object_detection/export_inference_graph.py"></a> ? If so, should we edit this file and set the input shape (dimension of our pictures) ?</p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.</p> | 0 |
<p dir="auto">This issue to enumerate and track for 1.5 release the items needed to move the following @kubernetes/sig-scheduling features out of alpha/beta and into product:</p>
<p dir="auto">Taints and Tolerations<br>
Inter-pod Affinity and Anti-Affinity</p>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ConnorDoyle/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ConnorDoyle">@ConnorDoyle</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ingvagabund/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ingvagabund">@ingvagabund</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jayunit100/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jayunit100">@jayunit100</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/davidopp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/davidopp">@davidopp</a></p>
<p dir="auto">We should socialize the checklist of items here.</p> | <p dir="auto">Hey all, I’m looking to extend the default scheduler with a capability that I don’t think exists yet. I wanted to ask here just in case I'm duplicating work.</p>
<p dir="auto">My workload:<br>
A few services/forever pods, but a large number of terminating pods (not yet using the jobs object, but that’s the general idea). These jobs can run anywhere from 5 min to 3 days, and we pretty much always have more “requests” of the cluster than capacity (this is by design). We currently have a fairly hacky way of setting up a priority queue, where certain jobs are submitted to the cluster before others. The details of this hacky system are not that relevant for this discussion.</p>
<p dir="auto">The need:<br>
It is my task to rewrite this system to be more robust. While my use case in prod will be a more complicated and dynamic, a more or less FIFO queue is sufficient to discuss the scheduler code in question (as long as the priority of a job can be changed later, such as through an annotation on the pod).</p>
<p dir="auto">Wait, doesn't the scheduler already do this?<br>
Currently the default scheduler effectively does a for loop over all pods, which somewhat randomly selects pods to schedule in order. If it can't schedule a pod, it will move onto the next one. I don't really want to touch the logic of determining which <em>node</em> to schedule the pod on; I just want to modify which <em>pods</em> are selected to be scheduled. For my needs, the scheduler doesn't have to be lightning fast as long as it's reasonable.</p>
<p dir="auto">Gotchas<br>
Large request pods: It's possible that small pods can get blocked behind large pods in the queue. I have a straightforward way to overcome this, but that adds more complexity to this issue and I'd rather wait until later.</p>
<p dir="auto">relevant issues:<br>
Multiple schedulers (wip)<br>
<a href="https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/multiple-schedulers.md">https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/multiple-schedulers.md</a><br>
Dispatcher feature request<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="117595164" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/17430" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/17430/hovercard" href="https://github.com/kubernetes/kubernetes/pull/17430">#17430</a></p>
<p dir="auto">None of the above has been implemented, and frankly I'm ok with just extending my existing scheduler (and running all pods through this mechanism) until multiple schedulers are supported.</p>
<p dir="auto">relevant issue labels: area/scheduling</p>
<p dir="auto">relevant code:<br>
I believe all I have to do is implement this function differently:<br>
<a href="https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/scheduler/scheduler.go#L66">https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/scheduler/scheduler.go#L66</a><br>
Is that it or am I missing something? I am also unclear of where that actually is calculated...</p>
<p dir="auto">Can anyone give me a few pointers/suggestions and I'll code it up?<br>
Once I code it up, where should I contribute this back to? I'm sure I'm not the only one trying to schedule a ton of jobs on a cluster.</p> | 0 |
<p dir="auto">As reported in the three.js IRC channel:</p>
<p dir="auto">With the CanvasRenderer, If you create an object with SmoothShading and only specify a color (not texture), it is always white. This can be seen in the canvas_materials.html example file by changing the color of the ball with SmoothShading.</p> | <p dir="auto">you can't set the color of an element (faces or the whole object) when using SmoothShading.</p>
<p dir="auto">Reproduce the bug :</p>
<p dir="auto">get the provided sample code called : canvas_materials.html</p>
<p dir="auto">(line 75) where is defined the coloured (not mapped) SmoothShading Material, simply replace the color by what your want :<br>
ie : { material: new THREE.MeshLambertMaterial( { color: 0xff0000, shading: THREE.SmoothShading } ), overdraw: true, doubleSided: false },</p>
<p dir="auto">your color value have no effect :(</p> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">With the MySQL dialect it is currently possible to specify a collation for a VARCHAR column (as well as for TEXT and CHAR columns??).</p>
<p dir="auto">AFAIK that's not possible with the PostgreSQL dialect. That would be a nice feature to have, as the locale setting is set (in stone) when a Postgres database is created...</p>
<p dir="auto">I've just seen that someone requested the same feature for the SQLite dialect (bug <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384624241" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/2276" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/2276/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/2276">#2276</a>).<br>
So maybe that collation feature could be implemented in a more generic way inside SQLAlchemy?</p>
<p dir="auto">Thanks a lot!</p> | <p dir="auto">Currently the <code class="notranslate">AsyncEngine</code> implements just the methods <code class="notranslate">begin</code>, <code class="notranslate">connect</code> and <code class="notranslate">raw_connection</code>.</p>
<p dir="auto">It should probably implement also the other api of the engine 2.0. As support for inspection is missing.</p>
<p dir="auto">The api for the engine would be:</p>
<ul dir="auto">
<li>attr <code class="notranslate">uri</code>, <code class="notranslate">pool</code>, <code class="notranslate">dialect</code>, <code class="notranslate">engine</code>, <code class="notranslate">name</code>, <code class="notranslate">driver</code>, <code class="notranslate">echo</code></li>
<li>methods <code class="notranslate">clear_compiled_cache</code>, <code class="notranslate">update_execution_options</code>, <code class="notranslate">execution_options</code>, <code class="notranslate">get_execution_options</code>, <code class="notranslate">dispose</code></li>
</ul>
<p dir="auto">Also the <code class="notranslate">AsyncSession</code> has some part of the api missing (non complete list):</p>
<ul dir="auto">
<li>attr <code class="notranslate">bind</code>, <code class="notranslate">new</code>, <code class="notranslate">deleted</code></li>
<li>methods <code class="notranslate">get</code>, <code class="notranslate">delete</code></li>
</ul>
<p dir="auto">The same may apply to other <code class="notranslate">Async</code> classes that proxy the sync ones, like <code class="notranslate">AsyncConnection</code></p> | 0 |
<p dir="auto">Uncaught Error: spawn rubocop ENOENT</p>
<p dir="auto"><strong>Atom Version</strong>: 0.154.0<br>
<strong>System</strong>: Mac OS X 10.9.5<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>...</li>
<li>...</li>
</ol>
<h3 dir="auto">Stack Trace</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At events.js:85
Error: spawn rubocop ENOENT
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1051:32)
at child_process.js:1142:20
at process._tickCallback (node.js:378:11)
"><pre class="notranslate"><code class="notranslate">At events.js:85
Error: spawn rubocop ENOENT
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1051:32)
at child_process.js:1142:20
at process._tickCallback (node.js:378:11)
</code></pre></div> | <p dir="auto">Uncaught Error: spawn rubocop ENOENT</p>
<p dir="auto"><strong>Atom Version</strong>: 0.156.0<br>
<strong>System</strong>: Mac OS X 10.10.1<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>Install linter and linter-rubocop</li>
<li>Quit atom</li>
<li>Open atom, and open a project</li>
</ol>
<h3 dir="auto">Stack Trace</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At events.js:85
Error: spawn rubocop ENOENT
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1051:32)
at child_process.js:1142:20
at process._tickCallback (node.js:378:11)
"><pre class="notranslate"><code class="notranslate">At events.js:85
Error: spawn rubocop ENOENT
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1051:32)
at child_process.js:1142:20
at process._tickCallback (node.js:378:11)
</code></pre></div> | 1 |
<p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): ubuntu 16.04</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:</li>
<li>TensorFlow installed from (source or binary): source</li>
<li>TensorFlow version: 1.13.2 commit</li>
<li>Python version: 2.7</li>
<li>Installed using virtualenv? pip? conda?: pip</li>
<li>Bazel version (if compiling from source): 0.19.2</li>
<li>GCC/Compiler version (if compiling from source): 4.8.5</li>
<li>CUDA/cuDNN version: no</li>
<li>GPU model and memory: no</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
from tensorflow.python.tools.api.generator import doc_srcs
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 63, in <module>
from tensorflow.python.framework.framework_lib import * # pylint: disable=redefined-builtin
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/framework/framework_lib.py", line 52, in <module>
from tensorflow.python.framework.importer import import_graph_def
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/framework/importer.py", line 28, in <module>
from tensorflow.python.framework import function
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/framework/function.py", line 36, in <module>
from tensorflow.python.ops import resource_variable_ops
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/ops/resource_variable_ops.py", line 39, in <module>
from tensorflow.python.ops import variables
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/ops/variables.py", line 133, in <module>
"* `ONLY_FIRST_TOWER`: Deprecated alias for `ONLY_FIRST_REPLICA`.\n ")
AttributeError: attribute '__doc__' of 'type' objects is not writable
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps."><pre class="notranslate"><code class="notranslate"> File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
from tensorflow.python.tools.api.generator import doc_srcs
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 63, in <module>
from tensorflow.python.framework.framework_lib import * # pylint: disable=redefined-builtin
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/framework/framework_lib.py", line 52, in <module>
from tensorflow.python.framework.importer import import_graph_def
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/framework/importer.py", line 28, in <module>
from tensorflow.python.framework import function
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/framework/function.py", line 36, in <module>
from tensorflow.python.ops import resource_variable_ops
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/ops/resource_variable_ops.py", line 39, in <module>
from tensorflow.python.ops import variables
File "/home/p.patel/.cache/bazel/_bazel_root/1bd8cf0b6a86ac78985c768eb3530621/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1_tf_python_api_gen_v1.runfiles/org_tensorflow/tensorflow/python/ops/variables.py", line 133, in <module>
"* `ONLY_FIRST_TOWER`: Deprecated alias for `ONLY_FIRST_REPLICA`.\n ")
AttributeError: attribute '__doc__' of 'type' objects is not writable
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
</code></pre></div>
<p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong></p>
<p dir="auto">bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package</p>
<p dir="auto"><strong>Any other info / logs</strong><br>
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.</p> | <p dir="auto">Please go to Stack Overflow for help and support:</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/tagged/tensorflow" rel="nofollow">https://stackoverflow.com/questions/tagged/tensorflow</a></p>
<p dir="auto">If you open a GitHub issue, here is our policy:</p>
<ol dir="auto">
<li>It must be a bug or a feature request.</li>
<li>The form below must be filled out.</li>
<li>It shouldn't be a TensorBoard issue. Those go <a href="https://github.com/tensorflow/tensorboard/issues">here</a>.</li>
</ol>
<p dir="auto"><strong>Here's why we have that policy</strong>: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.</p>
<hr>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li>
<p dir="auto"><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>:</p>
</li>
<li>
<p dir="auto"><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>:<br>
Redhat</p>
</li>
<li>
<p dir="auto"><strong>TensorFlow installed from (source or binary)</strong>:<br>
source</p>
</li>
<li>
<p dir="auto"><strong>TensorFlow version (use command below)</strong>:<br>
1.0</p>
</li>
<li>
<p dir="auto"><strong>Python version</strong>:<br>
2.7.14</p>
</li>
<li>
<p dir="auto"><strong>Bazel version (if compiling from source)</strong>:</p>
</li>
<li>
<p dir="auto"><strong>GCC/Compiler version (if compiling from source)</strong>:<br>
4.8.5</p>
</li>
<li>
<p dir="auto"><strong>CUDA/cuDNN version</strong>:<br>
8/5</p>
</li>
<li>
<p dir="auto"><strong>GPU model and memory</strong>:</p>
</li>
<li>
<p dir="auto"><strong>Exact command to reproduce</strong>:</p>
</li>
</ul>
<p dir="auto">You can collect some of this information using our environment capture script:</p>
<p dir="auto"><a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh</a></p>
<p dir="auto">You can obtain the TensorFlow version with</p>
<p dir="auto">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</p>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.</p>
<p dir="auto">Getting the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: /home/amalik/tensorflow/tensorflow/tools/test/BUILD:81:1: Traceback (most recent call last):
File "/home/amalik/tensorflow/tensorflow/tools/test/BUILD", line 81
tf_cc_logged_benchmark(name = "cast_op_benchmark", target...")
File "/home/amalik/tensorflow/tensorflow/tools/test/performance.bzl", line 23, in tf_cc_logged_benchmark
list((set(tags) + set(["benchmark-tes..."])))
File "/home/amalik/tensorflow/tensorflow/tools/test/performance.bzl", line 23, in list
set(tags)
The `set` constructor for depsets is deprecated and will be removed. Please use the `depset` constructor instead. You can temporarily enable the deprecated `set` constructor by passing the flag --incompatible_disallow_set_constructor=false.
ERROR: package contains errors: tensorflow/tools/test.
ERROR: /home/amalik/tensorflow/tensorflow/tools/test/BUILD:86:1: Traceback (most recent call last):
File "/home/amalik/tensorflow/tensorflow/tools/test/BUILD", line 86
tf_py_logged_benchmark(name = "rnn_op_benchmark", target ...")
File "/home/amalik/tensorflow/tensorflow/tools/test/performance.bzl", line 52, in tf_py_logged_benchmark
tf_cc_logged_benchmark(name = name, target = target, benchm..., <2 more arguments>)
File "/home/amalik/tensorflow/tensorflow/tools/test/performance.bzl", line 23, in tf_cc_logged_benchmark
list((set(tags) + set(["benchmark-tes..."])))
File "/home/amalik/tensorflow/tensorflow/tools/test/performance.bzl", line 23, in list
set(tags)
The `set` constructor for depsets is deprecated and will be removed. Please use the `depset` constructor instead. You can temporarily enable the deprecated `set` constructor by passing the flag --incompatible_disallow_set_constructor=false.
ERROR: /home/amalik/tensorflow/tensorflow/core/kernels/BUILD:58:14: Traceback (most recent call last):
File "/home/amalik/tensorflow/tensorflow/core/kernels/BUILD", line 53
config_setting(name = "xsmm_backward", values = {..."})
File "/home/amalik/tensorflow/tensorflow/core/kernels/BUILD", line 58, in config_setting
{"define": "tensorflow_xsmm=1", "define": "tensorflow_xsmm_backward=1"}
Duplicated key "define" when creating dictionary.
ERROR: package contains errors: tensorflow/core/kernels.
ERROR: error loading package 'tensorflow/core/kernels': Package 'tensorflow/core/kernels' contains errors."><pre class="notranslate"><code class="notranslate">ERROR: /home/amalik/tensorflow/tensorflow/tools/test/BUILD:81:1: Traceback (most recent call last):
File "/home/amalik/tensorflow/tensorflow/tools/test/BUILD", line 81
tf_cc_logged_benchmark(name = "cast_op_benchmark", target...")
File "/home/amalik/tensorflow/tensorflow/tools/test/performance.bzl", line 23, in tf_cc_logged_benchmark
list((set(tags) + set(["benchmark-tes..."])))
File "/home/amalik/tensorflow/tensorflow/tools/test/performance.bzl", line 23, in list
set(tags)
The `set` constructor for depsets is deprecated and will be removed. Please use the `depset` constructor instead. You can temporarily enable the deprecated `set` constructor by passing the flag --incompatible_disallow_set_constructor=false.
ERROR: package contains errors: tensorflow/tools/test.
ERROR: /home/amalik/tensorflow/tensorflow/tools/test/BUILD:86:1: Traceback (most recent call last):
File "/home/amalik/tensorflow/tensorflow/tools/test/BUILD", line 86
tf_py_logged_benchmark(name = "rnn_op_benchmark", target ...")
File "/home/amalik/tensorflow/tensorflow/tools/test/performance.bzl", line 52, in tf_py_logged_benchmark
tf_cc_logged_benchmark(name = name, target = target, benchm..., <2 more arguments>)
File "/home/amalik/tensorflow/tensorflow/tools/test/performance.bzl", line 23, in tf_cc_logged_benchmark
list((set(tags) + set(["benchmark-tes..."])))
File "/home/amalik/tensorflow/tensorflow/tools/test/performance.bzl", line 23, in list
set(tags)
The `set` constructor for depsets is deprecated and will be removed. Please use the `depset` constructor instead. You can temporarily enable the deprecated `set` constructor by passing the flag --incompatible_disallow_set_constructor=false.
ERROR: /home/amalik/tensorflow/tensorflow/core/kernels/BUILD:58:14: Traceback (most recent call last):
File "/home/amalik/tensorflow/tensorflow/core/kernels/BUILD", line 53
config_setting(name = "xsmm_backward", values = {..."})
File "/home/amalik/tensorflow/tensorflow/core/kernels/BUILD", line 58, in config_setting
{"define": "tensorflow_xsmm=1", "define": "tensorflow_xsmm_backward=1"}
Duplicated key "define" when creating dictionary.
ERROR: package contains errors: tensorflow/core/kernels.
ERROR: error loading package 'tensorflow/core/kernels': Package 'tensorflow/core/kernels' contains errors.
</code></pre></div>
<p dir="auto">Note: Tried other plateforms but could get any reply. I am not sure its a bug or else. I apologize if I am using the wrong forum. I am trying to install tensorflow from source so I can use MPI</p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.</p> | 0 |
<p dir="auto">Please consider adding a class named table-fixedheader that can be applied to a table so that the body scrolls under fixed headers.</p>
<p dir="auto">See this JSFiddle for a working demo: <a href="http://jsfiddle.net/drueter/yqgB5/3/" rel="nofollow">http://jsfiddle.net/drueter/yqgB5/3/</a></p>
<p dir="auto">All that is needed:</p>
<div class="highlight highlight-source-css notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="table.table-fixedheader>tbody {
display: block;
}
table.table-fixedheader>tbody {
overflow-y: auto;
height: 50px; /*placeholder: override as needed*/
}
table.table-fixedheader>thead>tr>th, table.table-fixedheader>tbody>tr>td {
float: left;
width: 100px; /*placeholder: override as needed*/
}"><pre class="notranslate"><span class="pl-ent">table</span>.<span class="pl-c1">table-fixedheader</span><span class="pl-c1">></span><span class="pl-ent">tbody</span> {
<span class="pl-c1">display</span><span class="pl-kos">:</span> block;
}
<span class="pl-ent">table</span>.<span class="pl-c1">table-fixedheader</span><span class="pl-c1">></span><span class="pl-ent">tbody</span> {
<span class="pl-c1">overflow-y</span><span class="pl-kos">:</span> auto;
<span class="pl-c1">height</span><span class="pl-kos">:</span> <span class="pl-c1">50<span class="pl-smi">px</span></span>; <span class="pl-c">/*placeholder: override as needed*/</span>
}
<span class="pl-ent">table</span>.<span class="pl-c1">table-fixedheader</span><span class="pl-c1">></span><span class="pl-ent">thead</span><span class="pl-c1">></span><span class="pl-ent">tr</span><span class="pl-c1">></span><span class="pl-ent">th</span><span class="pl-kos">,</span> <span class="pl-ent">table</span>.<span class="pl-c1">table-fixedheader</span><span class="pl-c1">></span><span class="pl-ent">tbody</span><span class="pl-c1">></span><span class="pl-ent">tr</span><span class="pl-c1">></span><span class="pl-ent">td</span> {
<span class="pl-c1">float</span><span class="pl-kos">:</span> left;
<span class="pl-c1">width</span><span class="pl-kos">:</span> <span class="pl-c1">100<span class="pl-smi">px</span></span>; <span class="pl-c">/*placeholder: override as needed*/</span>
}</pre></div>
<p dir="auto">See comments in JSFiddle for usage notes. This seems to work well.</p> | <p dir="auto">Would be nice to have a simple way to have the headings of a table stay at the top of a table as you scroll the page. Think long list of employee data.</p>
<p dir="auto">Would be nice to have this integrated in so it's aware of the other fixed elements like the navbar and will adjust blocking accordingly.</p>
<p dir="auto">Maybe something like:<br>
<table class="table-fixed-header"><br>
<thead><br>
<tr><br>
or<br>
<table><br>
<thead class="fixed"><br>
<tr></p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/[email protected]" rel="nofollow">David J. M. Karlsen</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4456?redirect=false" rel="nofollow">SPR-4456</a></strong> and commented</p>
<p dir="auto">Please se attached class ApplicationContextReaderImpl.java .<br>
Testcase:<br>
We tried to get this class <code class="notranslate">@Autowired</code> into a consumer of the class (The consumer declares <code class="notranslate">@Autowired</code> on the interface).</p>
<p dir="auto">Observations:</p>
<ol dir="auto">
<li>If used as is - Spring finds no match (expecting 1 unique bean - finds none).</li>
<li>If it's not defined in the spring context as a <code class="notranslate">@Component</code> but defined in xml - it will be found!</li>
<li>If the inner Cache class is defined as a static class - autowiring ( 1) ) will succeed.</li>
</ol>
<p dir="auto">So this clearly has to be an autowiring bug.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.1</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/13637/ApplicationContextReaderImpl.java" rel="nofollow">ApplicationContextReaderImpl.java</a> (<em>8.46 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="398084522" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9003" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9003/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9003">#9003</a> component scanning incorrectly excludes classes (<em><strong>"duplicates"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=arnaud.nauwynck" rel="nofollow">Arnaud Nauwynck</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8531?redirect=false" rel="nofollow">SPR-8531</a></strong> and commented</p>
<p dir="auto">the META-INF/ is a hidden package for isolated ClassLoader, for example as osgi Netbeans plugins</p>
<p dir="auto">Suppose you want to use Spring in your netbeans plugins application, and your application in split into several plugins depending of each others, you can not start the ClassPathXmlApplicationContext, because it fails to validate xml files, as none of the META-INF/spring.handlers are seen by the ClassLoader of your plugin.</p>
<p dir="auto">Unfortunately, this resource name "META-INF/spring.handlers" is hard-coded in org.springframework.beans.factory.xml.PluggableSchemaResolver and the stack calling this constructor from ClassPathXmlApplicationContext is extremely difficult (impossible?) to customize so as to change the default value.</p>
<p dir="auto">Would it be possible to use another (additionnal) resource name than "META-INF/spring.handlers", for example "org/springframework/spring.handlers" ? A simple migration plan would be to search for both names, and simply concatenate results : no backward compatible problem, and no more problem with all these strange isolated ClassLoader such as osgi, Netbeans, JavaWebStart...</p>
<hr>
<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="398112498" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13015" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13015/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13015">#13015</a> Spring XSD validation fails in the presence of non-standard classloaders due to problems resolving "schema.handlers" etc. (<em><strong>"duplicates"</strong></em>)</li>
</ul> | 0 |
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br>
Bug.</p>
<p dir="auto"><strong>What is the current behavior?</strong><br>
Node throws an error when webpack runs.</p>
<p dir="auto"><a href="https://gist.github.com/onnozel/db6a5bae5960cac1c2c09a5c6a1f4577">Error log</a></p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto"><a href="https://gist.github.com/onnozel/2bf5ba5f7142278d62e6bb632d67b1e5">package.json</a></p>
<p dir="auto"><a href="https://gist.github.com/onnozel/2111622f2128ad58e7a756d9e308b532">webpack.config.js</a></p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
Webpack should run the build.</p>
<p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, Operating System and programming language.</strong><br>
[email protected]<br>
[email protected]<br>
Windows 7</p>
<p dir="auto">The build runs fine when using rc.3 or when using node >= 6.0.0</p> | <p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p>
<p dir="auto">bug</p>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".../node_modules/webpack/lib/SourceMapDevToolPlugin.js:158
Buffer.from(JSON.stringify(sourceMap)).toString("base64");
TypeError: this is not a typed array"><pre class="notranslate"><code class="notranslate">.../node_modules/webpack/lib/SourceMapDevToolPlugin.js:158
Buffer.from(JSON.stringify(sourceMap)).toString("base64");
TypeError: this is not a typed array
</code></pre></div>
<p dir="auto">this breaks my deploy</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto"><code class="notranslate">devtool: '#inline-source-map'</code> in node4?</p>
<p dir="auto"><strong>If this is a feature request, what is motivation or use case for changing the behavior?</strong></p>
<p dir="auto">In this commit <code class="notranslate">Buffer.from</code> is used, but it was introduced in node6<br>
<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/webpack/webpack/commit/7327ee608a040ec784cc251663be85c2aedac44c/hovercard" href="https://github.com/webpack/webpack/commit/7327ee608a040ec784cc251663be85c2aedac44c"><tt>7327ee6</tt></a></p>
<p dir="auto">Maybe create some ponyfill for that?</p> | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.