Difference to the original implementation of the KL loss

Hi,
I think there is a slight discrepancy to the original implementation of the calculation of the KL loss. Here, each prior state used in the KL loss is calculated from the previous prior state.
https://github.com/ku2482/slac.pytorch/blob/d68f42582180d38735496a24cddbf0523726973d/slac/network/latent.py#L263-L266
In the original implementation, it seems like each prior state is calculated from the previous posterior state (see https://github.com/alexlee-gk/slac/blob/14a366e6a098165318a3b90fc50ff7e353cd43b4/slac/agents/slac/model_distribution_network.py#L287-L288).
This is also more consistent with the loss defined in equation 6 of the SLAC paper where zt is drawn from the posterior distribution q.
Best regards,
Jan

Hi @JanS97
Actually, I calculated samples from prior distributions here, which should be consistent with the paper.
I haven't read the original impl well, but I think it corresponds to this part.
https://github.com/ku2482/slac.pytorch/blob/d68f42582180d38735496a24cddbf0523726973d/slac/network/latent.py#L191-L210
Does it make sense?
Thanks.

Hi,
if you have a close look at lines 287-288 of the code snippet that you linked, you will see that the posterior states latent2_posterior_samples are fed into latent1_prior(). In your implementation, you always feed the last prior state into z1_prior().
Best regards,
Jan

Hi,  thank you for your response!
SLAC uses the same distribution for prior and posterior of z2. (original impl)
https://github.com/ku2482/slac.pytorch/blob/d68f42582180d38735496a24cddbf0523726973d/slac/network/latent.py#L156-L167
I'm sorry that my implementation is confusing, however it seems correct.
Anyway, thanks ;)

Hi,
I am aware that the z2 distribution is shared between the prior and posterior. However, latent2_prior_samples is still different from the prior since the z1 that is used as input for the z2 distribution is sampled according to the posterior distribution.
I tried to visualize the difference below. Note that I removed the actions for simplicity.

I hope that this makes it a bit clearer.

@JanS97
Sorry for responding so late.
I realized what you were talking about.
We need to calculate the loss in the 1 step, not in the sequence of actual distributions.
I modified the code in this commit (I'm evaluating now).
Could you please check if this is what you talked about?
Anyway, I really appreciate your advise.

Yes, this is what I meant. Thanks for fixing it.


fix list workspace for publish at data storage

Description

fix list workspace for publish at data storage
fix show csv file header when downloading chart data

Related Issue :
How Has This Been Tested?

When publishing workspaces at data storage management, check whether inactive workspaces are not visible.
Save table as csv file at chart and check the header.

Need additional checks?
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] I have read the CONTRIBUTING document.
[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have added tests to cover my changes.

Additional Context

run build
deploy to 2


Required minimum Node.js bump for Azure SDK

Minimum Node.js version may be incorrect
This issue was created because the following file has been flagged with an out-of-date version number for Node.js: sdk/cognitiveservices/cognitiveservices-newssearch/README.md
Required Fix: The Azure SDK now supports a minimum Node.js version of LTS (long term support).
Please fix this file to indicate LTS support and remove the specific version number it currently references found on line 6. If you find your code sample no longer works when moving up to the LTS version, please log an issue against the specific Azure SDK at https://github.com/azure/azure-sdk-for-js.
Required Exception If you can't change this file to support the minimum LTS of Node.js, please comment on this issue with the reason and details so we can refine our file search.


isomorphism

would you add node-XMLHttpRequest as a dependency if we marked it as 'false' in the browser field?
would make xhr nicely isomorphic w/o any overhead in the browser bundle

I'm not sure about that...
xhr is supposed to be a replacement for request in browserify etc. and making it isomorphic seems to defeat that purpose.
@Raynos what do you think about this idea?

:-1: browser and node http are different beasts.
Never should they merge. Write your own isomorphic library that wraps xhr and request

making it isomorphic seems to defeat that purpose.
request browserifies to 0.8MB, this comes through small, which is really nice. adding the isomorphism wont change that.
Never should they merge.
disagree

browser and node http are different beasts

yea, unhandled errors from the network don't necessarily stop an app's runtime/callstack in the browser

well, im assuming we are sticking with XHR's behavior, and so the onus to behave in node as it does in the browser is a concern upstream in node-XMLHttpRequest

@kumavis
it seems to me you didn't get what xhr is for. Xhr is the replacement for request if you want to browserify your code. Most of the features will work the same.
Check how xhr is used in ampersand-sync (start in package.json)

I actually just assumed that this would work in node or the browser. Fine that it doesn't, but a note in the readme that says this client-side only might be helpful.

How about the first line of readme updated in 2014 by Max Ogden? ;)
https://github.com/Raynos/xhr/commit/b56b23ac30e1f265ba3c98bf767a36e3c15661f6
But to make sure this confusion never happens again, I'm going to explicitly state that xhr is designed as a replacement for request from nodejs.

@naugtur Sweet. Yep I read that as ' this is designed so it works with browerify'. Like lodash or immutable or promise all 'work' with browserify.
Maybe I'm just a little simple :).

yup. I've used it in one project recently


Guidance: Support for Other Graphing Libraries

I'm working on a production systems with some dependencies on non-Plotly JS based charting systems. After reading @jonmmease 's post from a while ago, and seeing the success this project has had, I thought Kaleido might be a good alternative to our current approach (headless browser controlled by Phantom JS).
I wanted to understand the long term goal of this project. If I were wanting to support something like chartist, D3, highcharts, amCharts, or morris.js, is the appropriate action to either:

Open an PR that adds additional scopes to the main kaleido project.
Fork Kaleido and focus support another lib there under a different pypi name.
Some other path forward.

Hi @cgdeboer, I'm not with Plotly anymore and not using Kaleido actively.  That said, I do still think the project has a lot of promise for use cases like you mention.  I won't have bandwidth to do much development or maintenance myself, but I'd be happy to review PRs if you'd like to go that direction.
I'd also cc @alexcjohnson for the current Plotly perspective on the future of the project.

Thanks for your interest in Kaleido. We are currently working on an overhaul that might address your issue - we hope to have news in a few weeks and will post an update then. Thanks - @gvwilson


qt6.6.0编译报错

In file included from D:/Qt/6.6.0/msvc2019_64/include/QtCore/6.6.0/QtCore/private/qthread_p.h:20,
from D:/Qt/6.6.0/msvc2019_64/include/QtGui/6.6.0/QtGui/private/qguiapplication_p.h:29,
from E:/c++/framelesshelper/src/core/utils_win.cpp:49:
D:/Qt/6.6.0/msvc2019_64/mkspecs/win32-msvc/qplatformdefs.h:102:13: error: conflicting declaration 'typedef int mode_t'
102 | typedef int mode_t;
|             ^~~~~~
In file included from D:/Qt/Tools/mingw1120_64/x86_64-w64-mingw32/include/pthread.h:64,
from D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:35,
from D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/x86_64-w64-mingw32/bits/gthr.h:148,
from D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/bits/atomic_wait.h:38,
from D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/bits/atomic_base.h:41,
from D:/Qt/Tools/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/atomic:41,
from D:/Qt/6.6.0/msvc2019_64/include/QtCore/qatomic_cxx11.h:9,
from D:/Qt/6.6.0/msvc2019_64/include/QtCore/qbasicatomic.h:8,
from D:/Qt/6.6.0/msvc2019_64/include/QtCore/qatomic.h:8,

你是不是QtCreator哪里搞坏了？你的Qt明明是MSVC的包，为什么又引用了mingw的头文件？这俩东西不能这样混用


Updated the lock files

Not sure why nobody is updating these but it changes whenever I build.

What version of npm did you do this with? If we're going to do it, we should do it at the latest version or they're just going to keep bouncing around. Looks like the latest is 6.3.0. I ran the restore with that build and get a completely different diff from you (though they are still out of date).
Also, everybody should update their NPM version to the latest (cc @BrennanConroy @mikaelm12) because that's what gets us in this situation ;).

Also it's important to know what can cause this file to change:

A change in NPM version that includes new lock file content
Addition/modification of a dependency in package.json
Release of a new version of a dependency if that version becomes the new match for our condition in package.json (i.e. if we reference ^1.0.0 and a new patch release is made). NPM selects the highest matching version of packages rather than the lowest (which NuGet uses)

Done!


There should be no bias term in Project 4 Softmax and Neural Network

Students do not need to include bias term in their softmax and neural network models, and we are going to fix this in the instruction.

Besides, the computation of gradient descent should let students know

I have fixed the issue with this commit: https://github.com/tonyyxliu/CSC4005-2023Fall/commit/352bf6a016f98238cf3eccbd5df1737d7ca8ada2


Use stable selection of primary vs verify

By basing the selection on the name rather than the ROWID, we avoid items
being missed because of differences in database ordering.

Coverage increased (+0.9%) to 89.407% when pulling bcad568eb86844d921a2b9850df4e46280a0c85d on stable_shard into d4356146a772c398b66978c390973f5b759ce6f6 on master.

As an FYI, i ran this algorithm over /usr/share/dict and here is the histogram of % 10:
...   for w in f.readlines():
...     l[hnum(w.strip()) % 10] += 1
...
>>> l
[23738, 23684, 23832, 23424, 23630, 23383, 23622, 23592, 23623, 23360]

@mdegerne also, cool! Thanks for confirming it's uniform :)

I don't understand how the new function to hash the object names doesn't get covered, but I don't see that as a blocker.


some confusion about cudnn batch norm

@piiswrong hey, I am trying to finetune a pretrained Residual Network model.
And I define my symbol as
bn = mx.symbol.BatchNorm(data=data, name="bn")
And I am using CUDA 8.0 + CUDNN v5 + GTX1080, as the codes in batch_norm.cu
`#if MXNET_USE_CUDNN == 1 && CUDNN_MAJOR >= 5
return new CuDNNBatchNormOp(param);
else
return new BatchNormOp(param);
endif`
It will use cudnn bn by default, so I am just wondering how it can acquire the moving_inv_var in cudnn_batch_norm-inl.h because there are only moving_var params in the pretrained model, and after serveral epochs, there are still moving_var but not the moving_inv_var params saved in new finetuned models.
Could you explain to me a little bit how this works. Thanks.

You have to use the non-cudnn version of BN if you want to use old pretrained model. Try to return new BatchNormOp(param); directly.

@winstywang Thanks for your answer.
I have tried both. Using cudnn version of BN is ok while using the non-cudnn BN seems can't converge. And there are no moving_inv_var params in models trained by using cudnn BN.
How could these be?
Thank you so much!!

I see your question. This is caused by the behavior change of BN layer from cudnn v4 to v5. In v4, it uses inv var, however in v5 it changes to var. So the moving_inv_var is only for cudnn v4, it is not used in current batch_norm.cu

@winstywang Thank you so much!!

This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!


Allow passing hf config args with openai server

Hi,
Is there a specific reason for why can't we allow passing of args from the openai server to the HF config class, there are very reasonable use cases where i would want to override the existing args in a config while running the model dynamically though the server.
reference line
simply allowing *args in the openai server that are passed to this while loading the model, i believe there are internal checks for failing if anything configured is wrong anyway.
supported documentation in the transformers library:
        >>> # Change some config attributes when loading a pretrained config.
        >>> config = AutoConfig.from_pretrained("bert-base-uncased", output_attentions=True, foo=False)
        >>> config.output_attentions
        True

I believe there's no fundamental reason to this. Contribution welcomed! I would say you can add this to ModelConfig class and pass it through EngineArgs.

I will take a look at this

Anyone has news about that? I want to use --dtype, but it doesn't work

@mrPsycox —dtype is supported in vllm, please take a look at the engine args on vllm docs

Thanks @Aakash-kaushik , I found the issue. Passing --dtype need to be in first args of the command, not in the last.
This works for me:
  docker run --gpus all -p 8000:8000 ghcr.io/mistralai/mistral-src/vllm:latest \
                   --host <IP_ADDRESS> \
                   --model mistralai/Mixtral-8x7B-Instruct-v0.1 \
                   --dtype half \
                   --tensor-parallel-size $SKYPILOT_NUM_GPUS_PER_NODE

I would love to see this as well

@Aakash-kaushik @mrPsycox  @timbmg @K-Mistele
Please take a look at my PR and let me know if it serves your purpose.
As @DarkLight1337 noted in my PR (#5836) , what exactly do you want to accomplish using this feature that cannot otherwise be done via vLLM args? (If we don't have any situation that results in different vLLM output, what is the point of enabling this?)
Once you get back to me, I'll write a test that covers that case.

Hi guys, just bumping this in case it's still relevant. Maybe not so much passing hf config.json args at request-time, but being able to set them for the OpenAI compatible server without having to dig into the model's cache directory would be super useful.
Some examples of where this would be applicable include configuring Qwen models and llama models' RoPE scaling:
Processing Long Texts
The current config.json is set for context length up to 32,768 tokens. To handle extensive inputs exceeding 32,768 tokens, we utilize [YaRN](https://arxiv.org/abs/2309.00071), a technique for enhancing model length extrapolation, ensuring optimal performance on lengthy texts.

For supported frameworks, you could add the following to config.json to enable YaRN:

{
  ...,
  "rope_scaling": {
    "factor": 4.0,
    "original_max_position_embeddings": 32768,
    "type": "yarn"
  }
}

For deployment, we recommend using vLLM. Please refer to our [Documentation](https://qwen.readthedocs.io/en/latest/deployment/vllm.html) for usage if you are not familar with vLLM. Presently, vLLM only supports static YARN, which means the scaling factor remains constant regardless of input length, potentially impacting performance on shorter texts. We advise adding the rope_scaling configuration only when processing long contexts is required.

Maybe this is already implemented somewhere else?

I propose a similar feature in #5205


About 1,000 blueprints freeze and crash.

In the latest version of the 5.3 engine compiled by myself, after refreshing all nodes and about 1,000 blueprints, the editor got stuck and crashed.

Sorry about the crashing. My plugin loading so many blueprints probably is stretching the resources of your computer too far. Attempting to fix that would involve a deep dive into Unreal Engine's memory management system. That is beyond the scope of this project.
You could try to limit the amount of blueprints being refreshed by right-clicking a specific folder in the Content Browser and using "Refresh Blueprints" from there. Or consider excluding some of your blueprint paths in the plugin's settings.

这是来自QQ邮箱的假期自动回复邮件。你好，我最近正在休假中，无法亲自回复你的邮件。我将在假期结束后，尽快给你回复。


Loaded samples aren't normalized and calculated loss is very large?

In the code, loaded samples seem only to substract mean but not to be normalized, which leads to very large loss. Why not normalize the samples?

The VGG model I used was converted from Caffe, which was trained without std normalization.


404 page not found

$ docker run -it -d -p 8080:8080 -e HOST=ucp-controller-540dd7c4.east1a.prod -e constraint:node==ucp-controller-540dd7c4.east1a.prod -v /var/run/docker.sock:/var/run/docker.sock manomarks/visualizer
10:50 $ docker logs -f 960f0ab11bd8
npm info it worked if it ends with ok
npm info using<EMAIL_ADDRESS>npm info using<EMAIL_ADDRESS>npm info prestart<EMAIL_ADDRESS>npm info start<EMAIL_ADDRESS>
<EMAIL_ADDRESS>start /app
node server.js

undefined:1
404 page not found
^
SyntaxError: Unexpected token p
at Object.parse (native)
at IncomingMessage. (/app/server.js:49:36)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:893:12)
at doNTCallback2 (node.js:430:9)
at process._tickCallback (node.js:344:17)
npm info<EMAIL_ADDRESS>Failed to exec start script
npm ERR! Linux 3.10.0-327.18.2.el7.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.1.2
npm ERR! npm  v2.14.4
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>start script 'node server.js'.
npm ERR! This is most likely a problem with the swarmVisualizer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls swarmVisualizer
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /app/npm-debug.log

Sorry bug is really old, so I'm closing it. Please reopen if still an issue


Auto-complete list fails in VSCode when typing fast

extension version: v0.2.853 and v0.3.884
rustc version: 1.57.0
VSCode: 1.63.2
Windows 10
Once the auto-completion list has popped up once and I continue to type faster than the list can be updated, the list often either disappears or returns "No suggestions.". The list does work correctly as long as I type slow enough so that the list has time to update the results for every new letter.
When the list disappears it is possible to force it to reappear by pressing Ctrl + space, but if it has started to report "No suggestions" that does not help to restore the suggestions.
Example below: typing the letters "g" "n" at the end of "align" with a pause between keeps the list populated, but typing the two letters fast causes it to fail.

.

Duplicates https://github.com/rust-analyzer/rust-analyzer/issues/7560 and https://github.com/rust-analyzer/rust-analyzer/issues/10187

Duplicates https://github.com/rust-analyzer/rust-analyzer/issues/7560 and https://github.com/rust-analyzer/rust-analyzer/issues/10187


Ouestion/issue

When I make a new project in the blynk app it requires me to choose the Hardware Model, what effect does that ultimately have, do I need to choose the hardware node-red is running on ?
For example my current project was originally set-up to control a ESP8266 (with a couple of  relays and a few sensors) so the hardware choice was setup as ESP8266 however now I reconfigured it so blynk talks to node-red which talks to mqtt which talks to the ESP it all work fine, but on some occasions like first connection in a morning blink cannot connect and says ESP8266 offline - actually the ESP is online, mqtt is on line and node-red is online its the blynk nodes that show no connection.
Would changing the hardware choice to Raspberry pi2 make a difference to this problem ?
Toshi

i use generic device
as far as i know the device type only defines the analog and digital pins availability, it shouldn t matter much as we are using only virtual pins really.

Hmmm yes I understand we essentially use just the virtual pins in node-red-contrib-blynk but your response leaves me wondering if, by choosing Raspberry pi2 (the hardware running node-red), the Blynk app would see the pi's digital pins and connect as opposed to the current situation were it fails to connect.!
I will try it later, when I have some time and report back.

please try. techinically i am running the full node library in the node, and as far as i remember they say they auto detect the hardware, so you might be onto something, making gpio work would be an added bonus to all this :)

OK so I did the test, conclusion : it makes no difference choosing raspberry pi 2 ... other than giving 64 virtual pins which I guess is a bonus, one thing I notice, since the blynk update everything became more stable

Oh I spoke to soon although the blynk app has 64 virtual pins available node-red-contrib-blynk can only access upto v31 the rest say node incorrectly configured.

added fix for virtual pins higher than 31 in
<EMAIL_ADDRESS>cheers

Hi Tzapu
Just a really small thing (no big deal as I know your busy) so put it on the back burner for future release, when I set blynk to raspberry pi 2 I can access 64 virtual pins, thank you for added support for pins higher than 31 and it works as far as virtual pin 63, but if I try to use virtual pin 64 I get ... node incorrectly configured.

aren t they from 0 to 63 ? is there a pin 64 in the app?

yep surprisingly in the app you can choose v0 to v64 .. thinking about it you would have thought it would have been 0 to 31 like 32 pins or 0 to 63 like 64 pins, maybe its a blynk app error, anyway in reality I don't plan to use 65 virtual pins in one app,  I am using currently 46 so no problem for me.


Provide a convent API for form-urlencoded

Currently, we have to call url:encode multiple times to do form-urlencoded. Please provide a convent api to do following.
string payload = "From=" + check url:encode(FROM_NO, "utf-8") +
                 "&To=" + check url:encode(req.phoneNo, "utf-8") +
                 "&Body=" + check url:encode(body, "utf-8");

Came up during https://github.com/ballerina-guides/enterprise-integration-patterns/pull/75/files#r1326856694
We need to fix the pattern after this is implemented.


code after 'break' statement is not removed, before terser plugin.

Feature request
Thx for this awesome library.
First of all, I don't know is this a bug or just not implemented yet.
This is my mini repo to reproduce this problem. The webpack version I used is 5.38.1
In index.ts, I'm trying to load the dependencies dynamically in order to get small bundle size.
export const treeShakingTestAsync = async () => {
    console.log('treeShakingTestAsync');
    //  Be replaced with 'false' by DefinePlugin
    if (__MOBILE__) {
        const { Baz } = await import(/* webpackChunkName: "bundle_mobile" */'./mobile');
        console.log(Baz);
    } else {
        const { foo } = await import(/* webpackChunkName: "bundle_pc" */ './pc');
        console.log(foo);
    }

};

pc.ts and mobile.ts both use some of the code from a common module.
// pc.ts
export { bar , foo } from './lib-modules';

// mobile.ts
export { Baz } from './lib-modules';

lib-modules.ts mimics a large esm package index file.
// lib-modules
export function foo() { console.log('FuncFoo') };
export function bar() {
    console.log('FuncFoo')
};
export class Baz {
    private c = 'ClassBaz'
}

In the webpack config , everything is default, except turning minimizer off to see what webpack does before passing to terser.
and bundle the pseudo package lib-modules in to one bundle.
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
module.exports = {
  entry: './src/treeshaking-test.ts',
  mode: 'production',
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        use: 'ts-loader',
        exclude: /node_modules/,
      },
    ],
  },
  optimization: {
    minimize: false,
    splitChunks: {
      chunks: 'async',
      minSize: 20000,
      minRemainingSize: 0,
      minChunks: 1,
      maxAsyncRequests: 30,
      maxInitialRequests: 30,
      enforceSizeThreshold: 50000,
      cacheGroups: {
        defaultVendors: {
          test: /[\\/]node_modules[\\/]/,
          priority: -10,
          reuseExistingChunk: true,
        },
        default: {
          minChunks: 2,
          priority: -20,
          reuseExistingChunk: true,
        },
        test: {
          test: /lib-modules/,
          name: 'bundle-lib-modules',
          priority: 101,
          chunks: 'all',
          enforce: true,
        },
      },
    },
  },
  resolve: {
    extensions: ['.tsx', '.ts', '.js'],
  },
  plugins: [
    new webpack.DefinePlugin({
      __TEST__: true
    }),
    new HtmlWebpackPlugin(),
  ],
  output: {
    path: path.resolve(__dirname, 'dist'),
    clean: true
  },
};

The result is perfect, webpack removed the dead code block in bracket after "false"  before involvement of SplitchunkPlugin or TerserPlugin.
Baz is not in the output.
/* unused harmony export treeShakingTestAsync */
const treeShakingTestAsync = async () => {
    console.log('treeShakingTestAsync');
    if (false) {}
    else {
        const { foo } = await Promise.all(/* import() | bundle_pc */[__webpack_require__.e(910), __webpack_require__.e(941)]).then(__webpack_require__.bind(__webpack_require__, 422));
        console.log(foo);
    }
};

But when I add a babel-loader after ts-loader for polyfills
the code get transpiled to
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
var treeShakingTestAsync = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
    var _yield$import, Baz, _yield$import2, foo;
    return _regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            console.log('treeShakingTestAsync');
            if (true) {
              _context.next = 9;
              break;
            }
            _context.next = 4;
            return Promise.all(/* import() | bundle_mobile */[__webpack_require__.e(910), __webpack_require__.e(593)]).then(__webpack_require__.bind(__webpack_require__, 657));
          case 4:
            _yield$import = _context.sent;
            Baz = _yield$import.Baz;
            console.log(Baz);
            _context.next = 14;
            break;
          case 9:
            _context.next = 11;
            return Promise.all(/* import() | bundle_pc */[__webpack_require__.e(910), __webpack_require__.e(941)]).then(__webpack_require__.bind(__webpack_require__, 395));
          case 11:
            _yield$import2 = _context.sent;
            foo = _yield$import2.foo;
            console.log(foo);
          case 14:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  }));
  return function treeShakingTestAsync() {
    return _ref.apply(this, arguments);
  };
}()));

Although, case 4 can never be reached, it still remains in the source code, cause module mobile and its dependencies being bundled, which leads to huge bundle size in real world.

What is the expected behavior?
Baz is not in the output
What is motivation or use case for adding/changing the behavior?
smaller bundle size
How should this be implemented in your opinion?
There is an export part in the vendors bundle.
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Kb": () => (/* binding */ bar),
/* harmony export */   "Mu": () => (/* binding */ Baz),
/* harmony export */   "RN": () => (/* binding */ foo)
/* harmony export */ });

Clearly, dead code removal would not being working.  webpack seems removed all code block after the 'false' statement before compilation 'sealed'. Could you do the same for 'break' statement that never could be reached?
@sokra @alexander-akait
Are you willing to work on this yourself?
yes
But I am not familiar with webpack's compilation process, is there any docs could help?
Also I also wondering , there seems be a nuance in 'tree-shaking'(things not be in included, or 'rolled up') and 'dead code removal', Is there any doc elaborate on this subject?

I think the best place for it is terser repo, but it is hard to implement (dce is the most diffucult part), that is why you faced with it and looks like terser is not implement it, try to rewrite:
async function foo() {
        const { Baz } = await import(/* webpackChunkName: "bundle_mobile" */'./mobile');
        console.log(Baz);
}

async function bar() {
       const { foo } = await import(/* webpackChunkName: "bundle_pc" */ './pc');
        console.log(foo);
}

export const treeShakingTestAsync = async () => {
    console.log('treeShakingTestAsync');
    //  Be replaced with 'false' by DefinePlugin
    if (__MOBILE__) {
        await foo();
    } else {
       await bar();
    }
};

I test async import before. It seems it could not be shaken #16271 #14800.
May I ask why do you think the best place for it is terser repo? Webpack seems already has done some elimination work before let terser handles it. For example , for the original code I posted, all code after "false" is already removed, so chunk "bundle_mobile" not be added to chunk graph in the first place. Isn't get removed on purpose? Does splitchunk happens before terser? Even terser plugin can eliminate it, wouldn't it be too late, cause "Baz" is already added to binding part in the vendors chunk and terser plugin only works on chunk level. Why some code is already removed before terser? Why code after "break" statement cannot be part of it?

Because it is DCE (dead code elimination), it is not a part of webpack, webpack just says false/undefined or remove usage (+ import/export) and then terser remove everything which was not used

https://github.com/webpack/webpack/issues/14800 is for import destrucation and remove unsed imports

I think the best place for it is terser repo, but it is hard to implement (dce is the most diffucult part), that is why you faced with it and looks like terser is not implement it, try to rewrite:
async function foo() {
        const { Baz } = await import(/* webpackChunkName: "bundle_mobile" */'./mobile');
        console.log(Baz);
}

async function bar() {
       const { foo } = await import(/* webpackChunkName: "bundle_pc" */ './pc');
        console.log(foo);
}

export const treeShakingTestAsync = async () => {
    console.log('treeShakingTestAsync');
    //  Be replaced with 'false' by DefinePlugin
    if (__MOBILE__) {
        await foo();
    } else {
       await bar();
    }
};

I changed the demo into the code above
which cause  the  entry function became this.(skip all irrelevant part)
var treeShakingTestAsync = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
    return _regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            console.log('treeShakingTestAsync');
            if (true) {
              _context.next = 6;
              break;
            }
            _context.next = 4;
            return foo();
          case 4:
            _context.next = 8;
            break;
          case 6:
            _context.next = 8;
            return bar();
          case 8:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  }));
  return function treeShakingTestAsync() {
    return _ref.apply(this, arguments);
  };

As you can see, both foo and bar still remains
  return _foo.apply(this, arguments);
}
function _foo() {
  _foo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
    var _yield$import, Baz;
    return _regeneratorRuntime().wrap(function _callee2$(_context2) {
      while (1) {
        switch (_context2.prev = _context2.next) {
          case 0:
            _context2.next = 2;
            return Promise.all(/* import() | bundle_mobile */[__webpack_require__.e(910), __webpack_require__.e(593)]).then(__webpack_require__.bind(__webpack_require__, 657));
          case 2:
            _yield$import = _context2.sent;
            Baz = _yield$import.Baz;
            console.log(Baz);
          case 5:
          case "end":
            return _context2.stop();
        }
      }
    }, _callee2);
  }));
  return _foo.apply(this, arguments);
}
function bar() {
  return _bar.apply(this, arguments);
}
function _bar() {
  _bar = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
    var _yield$import2, foo;
    return _regeneratorRuntime().wrap(function _callee3$(_context3) {
      while (1) {
        switch (_context3.prev = _context3.next) {
          case 0:
            _context3.next = 2;
            return Promise.all(/* import() | bundle_pc */[__webpack_require__.e(910), __webpack_require__.e(941)]).then(__webpack_require__.bind(__webpack_require__, 395));
          case 2:
            _yield$import2 = _context3.sent;
            foo = _yield$import2.foo;
            console.log(foo);
          case 5:
          case "end":
            return _context3.stop();
        }
      }
    }, _callee3);
  }));
  return _bar.apply(this, arguments);
}

which lead to bundle_mobile still exists and  Baz still get bundled in 'bundle-lib-modules'

Yeah, code is complex, seems like it is impossible, can you try to switch on swc instead terser - https://github.com/webpack-contrib/terser-webpack-plugin#swc, just for tests

Sorry for not being able to express myself more clearly(not a native speaker).
If I understand it  correctly

bundle_mobile is added to the chunk graph first

then splitchunk take in place,

which cause 'bundle-lib-modules'(the vendors chunk contains Baz) being added.

Terser happens last , in chunk level
So  terser or any other minimize tool cannot do anything, cause Baz is reference by the "binding" part

"use strict";
(self["webpackChunkgetting_started_using_a_configuration"] = self["webpackChunkgetting_started_using_a_configuration"] || []).push([[910],{

/***/ 253:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Kb": () => (/* binding */ bar),
/* harmony export */   "Mu": () => (/* binding */ Baz),
/* harmony export */   "RN": () => (/* binding */ foo)
/* harmony export */ });
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function foo() {
  console.log('FuncFoo');
}
;
function bar() {
  console.log('FuncFoo');
}
;
var Baz = /*#__PURE__*/_createClass(function Baz() {
  _classCallCheck(this, Baz);
  this.c = 'ClassBaz';
});

/***/ })

}]);

@icy0307 Do you use foo or bar in other places? Maybe you can create small repo and I will look

https://github.com/icy0307/webpack-mini-repo @alexander-akait

Because it is DCE (dead code elimination), it is not a part of webpack, webpack just says false/undefined/etc or remove usage (+ import/export) and then terser remove everything which was not used, i.e. do DCE
You can see in my repo , I turned off 'minimize' completely, anything in the comes after the 'false' if statement, is already been removed before. (I even add a debugger in terser's entry , it has not been called if minimizer has been turned off)

var __webpack_exports__ = {};
/* unused harmony export treeShakingTestAsync */
const treeShakingTestAsync = async () => {
    console.log('treeShakingTestAsync');
    // @ts-ignore
    if (false) {}
    else {
        const { foo } = await Promise.all(/* import() | bundle_pc */[__webpack_require__.e(910), __webpack_require__.e(941)]).then(__webpack_require__.bind(__webpack_require__, 422));
        console.log(foo);
    }
};

So I guess this removal part is not performed by minimizer. Am I misunderstanding something? @alexander-akait

Sorry it is out of scope webpack at all, I said above, after babel you have:
var treeShakingTestAsync = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
    var _yield$import, Baz, _yield$import2, _foo;
    return _regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            console.log('treeShakingTestAsync');
            // @ts-ignore
            if (!foo) {
              _context.next = 9;
              break;
            }
            _context.next = 4;
            return Promise.all(/* import() | bundle_mobile */[__webpack_require__.e(910), __webpack_require__.e(593)]).then(__webpack_require__.bind(__webpack_require__, 657));
          case 4:
            _yield$import = _context.sent;
            Baz = _yield$import.Baz;
            console.log(Baz);
            _context.next = 14;
            break;
          case 9:
            _context.next = 11;
            return Promise.all(/* import() | bundle_pc */[__webpack_require__.e(910), __webpack_require__.e(941)]).then(__webpack_require__.bind(__webpack_require__, 395));
          case 11:
            _yield$import2 = _context.sent;
            _foo = _yield$import2.foo;
            console.log(_foo);
          case 14:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  }));
  return function treeShakingTestAsync() {
    return _ref.apply(this, arguments);
  };
}()));

i.e.
// @ts-ignore
if (!__MOBILE__) {
  _context.next = 9;
  break;
}

if you set __MOBILE__: false it will be removed by webpack.
We handle code after loaders, and code after babel is complex and is not optimized for evalator (this is static analizator to check expressions and other code on false/undefined/etc and drop them, it is not design for wokring with dynamic stuff - i.e. variables/closures/ etc) to undestand unused exprenssions, it is AST based optimization, here is very complex optimization with dynamic stuff (i.e. _context) and should be handle by minifier or other tools.
Solutions:

AST terser/swc/etc minifiers to implement such complex optimization
ask babel to change code generation, here (https://github.com/babel/babel/pull/7076/) is a intresing idea to change it on Promise
Change your code on (i.e. no babel complex output)

export const treeShakingTestAsync = () => {
    console.log('treeShakingTestAsync');
    // @ts-ignore
    if (__MOBILE__) {
        Promise.resolve().then(() => import(/* webpackChunkName: "bundle_mobile" */'./mobile')).then((loadded) => {
            console.log(loadded.Baz);
        })

    } else {
        Promise.resolve().then(() => import(/* webpackChunkName: "bundle_pc" */ './pc')).then((loadded) => {
            console.log(loadded.foo);
        })
    }

};

Sorry we can't do something here. Babel output non statical analizable code, so we can't drop more branches as you want, anyway I think babel can optimize own output and avoid generate weird if (true) in such cases

Thanks for the detailed explanation!

Solution 3 seems to be quick workaround. But I am actually work in a huge code base, even It could be done automatically,  I doubt the this solution could be accepted by my team for readability concerns. It basically tells people do not use dynamic import after expression or in generator function in our project.
Terser or any other minifier probably would never implement this due to its complexity. But Even if terser do implement this, terser plugin happens last, isn't Baz already has been bundled?

We handle code after loaders

Would it be possible and rational to run a custom loader before babel loader , simply to drop this code(trunoff mangle just compress)?
And just out of curiosity, where is this webpack's analizator the drop code in source code?

As for solution2 you mentioned aboved. I got some trouble to understand what is behind the scenes. It seems this solution is from  performance perspective, But why it is faster this way?

tslib  handles the generator the same way babel does. So  is adding a custom loader to remove the code in advance a better solution? @alexander-akait

Would it be possible and rational to run a custom loader before babel loader , simply to drop this code(trunoff mangle just compress)?

No it is impossible, but you can do it, you can keep code in ES latest and use ESM modues and when you need old browser support run babel on webpack generated code, it is good solutions when you need really old browser suppport (or you need something special after bundling), you can create plugin or just use CLI
So tree-shaking will work and you will have support of old browsers.
Sorry, we are statical analizator, you want to handle dynamic case, it is out of scope webpack and require a lot of complex logic (not sure bundle should do it at all).

Thank you! @alexander-akait
I understand that is it out of scope now.
I just wonder why something like terser-loader is not correct?
Why it is impossible to remove some of the code before any loaders? Why webpack choose to do handle code after loader?

What I am suggesting is to wrong terser twice.
The first time as loader that runs before all js loaders, only to drop the code.
The second time as  terser plugin to work on bundle level?

Why can't run code elimination before all javascript loader one more time as well?

Because loader generate extra code and we need handle it - loader can add more import/require, more code, webpack stuff and etc, we have special syntax to run loader before/after (you can found it in docs), but it will not solve your problem and creates more problems

Feel free to feedback


Generalize and speed up the tensor! macro

Hello,
The pull request contains a number of minor adjustments to the tensor! macro that

make it work with a trailing semicolon,
make it work with a trailing comma, and
make it count rows at compile time.

Regards,
Ivan

Great work. Thanks for contributing!
I definitely agree it should support trailing commas/semi-colons.


GOAL: Performance Improvements

This work includes:
a.	1000 single-item submissions per minute (1e6 per 16 hr day)
b.	Handle this load for 16 hours without failures
c.	Explore multi-threading issues
d.	Database tuning to support certain slow queries

Closing this epic out because 2674 is now more up to date.


Added Diagnostic and Diagnosticf.

Resolves #3.
These produce diagnostic output, as defined by the TAP spec.
I thought it was worth having both, as otherwise my code tends to be littered with fmt.Sprintf() inside t.Diagnostic().

On Wed, Jan 04, 2017 at 04:58:28PM -0800, Simon Guest wrote:

These produce diagnostic output, as defined by the TAP spec.

Spec reference 1.
Is it worth checking to ensure that the message/format string contains
no newlines?  Or inserting leading ‘#’ and stripping any trailing
newline as needed?

OK, that's a good idea.  Give me a few minutes ...

What you have in f9cf6d76 looks good to me, but this still needs a Makefile entry.

e740b6b looks good to me.
The only other thing I can think of would be to have test/diagnostic/main.go write the Diagnostic calls to an internal buffer and have a wrapper harness which compares that output with the expected value.  You can do that since b2acfdc with:
func main() {
  buf := new(bytes.Buffer)
  t1 := tap.New()
  t1.Header(4)
  t2 := tap.New()
  t2.Writer = buf
  t2.Header(1)

  buf.Reset()
  t2.Diagnostic("expecting all to be well")
  t1.Ok(buf.String() == "# expecting all to be well\n", "Diagnostic correctly formats a single line")

  buf.Reset()
  t2.Diagnosticf("here's some perfectly magical output: %d %s 0x%X.", 6, "abracadabra", 28)
  t1.Ok(buf.String() == "# here's some perfectly magical output: 6 abracadabra 0x1C.\n", "Diagnosticf correctly formats a single line")

  buf.Reset()
  t2.Diagnostic("some\nmultiline\ntext\n")
  t1.Ok(buf.String() == "# some\n# multiline\n# text\n", "Diagnostic correctly formats multiple lines")

  buf.Reset()
  t2.Diagnosticf("%d lines\n%s multiline\ntext", 3, "more")
  t1.Ok(buf.String() == "# 3 lines\n# more multiline\n# text\n", "Diagnosticf correctly formats multiple lines")

  t2.Pass("all good")
}

Hi, I don't think that's worth the effort, sorry.  I hope you will take the pull request anyway.  :-)

On Thu, Jan 05, 2017 at 02:08:05PM -0800, Simon Guest wrote:

Hi, I don't think that's worth the effort, sorry.  I hope you will
take the pull request anyway.  :-)

I'm just the peanut gallery, not a maintainer ;).

You're welcome.  Thanks for merging it.


Email template fixes

@ mention of reviewers
@Didayolo
A brief description of the purpose of the changes contained in this PR.

Codabench logo was not working in the emails, now fixed
Slight changes to the email text
Unsubscribe link removed because we don't have unsubscribe functionality

Issues this PR resolves

#1566

A checklist for hand testing
We need to deploy this change on codabench test for testing
Checklist

[x] Code review by me
[ ] Hand tested by me
[x] I'm proud of my work
[x] Code review by reviewer
[ ] Hand tested by reviewer
[x] CircleCi tests are passing
[ ] Ready to merge

@ihsaan-ullah Thanks for the PR. Why do we have for each email template a .html file and a .txt file with the same content?

I missed some email templates. Now all ara changed

@ihsaan-ullah Thanks for the PR. Why do we have for each email template a .html file and a .txt file with the same content?

For some reason, both txt and html files are used to send the emails
https://github.com/codalab/codabench/blob/a37139a96d7f2beb169b40e9e322453545be5673/src/utils/email.py#L9

@ihsaan-ullah Deployed on codabench-test.lri.fr

Emails sent to participants are working. For some reason I am not receiving admin emails (sent to organizers)

We can improve the email design in the future


Dev

init

Hi there folks.
Looks like you're experimenting with some eegnb experiment variants with different stimuli.
This is super awesome.
Two notes for you to consider:

FYI if you are planning to submit a pull request and do development in general then our development branch for eegnb is the develop branch. So I suggest you work on a fork of that branch for new things you would like to be incorporated into the main library. develop is merged to master every few months with a handful of updates once we have confirmed they are reasonably stable.

Regarding the stimuli - not sure if you have specific hypotheses and interests in pictures of mountains per se - but if your main aim is to explore different stimulus types, then I have a suggestion: there are several excellent experiments in the ERP-CORE library that we would love to port over to eeg-notebooks. For example faces vs. scrambled faces using the stimuli here (browse to N170/N170 all data and scripts/Stimuli for the image files). Just a suggestion, in case of interest. We would be VERY happy with some PRs porting ERP-CORE experiments.


Feature request: add caption text to send-image command

very usefull script. Thanks.

would be great if one could add a caption text when posting images ie.

$ npx mudslide send-image me /tmp/test.jpg 'caption text to image'
or
$ npx mudslide send-image me /tmp/test.jpg send-image-text 'caption text to image'
otherwise loving it!

Hi @lightaffaire
There was already an option for that, but undocumented. I've updated the Readme.
Thanks for the feedback!


WXWork: 机器人不定时报超时问题，紧急帮忙处理下

Please make sure you have read the Wechaty Puppet Service: WXWork from Wechaty Official Website before you continue writting this issue.
Question
GError: 1 CANCELLED: Call cancelled
at callErrorFromStatus (/home/zycfc/dist/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
at Object.onReceiveStatus (/home/zycfc/dist/node_modules/@grpc/grpc-js/build/src/client.js:351:73)
at Object.onReceiveStatus (/home/zycfc/dist/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
at /home/zycfc/dist/node_modules/@grpc/grpc-js/build/src/resolving-call.js:94:78
at processTicksAndRejections (node:internal/process/task_queues:78:11)
for call at
at ServiceClientImpl.makeServerStreamRequest (/home/zycfc/dist/node_modules/@grpc/grpc-js/build/src/client.js:334:34)
at ServiceClientImpl.event (/home/zycfc/dist/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
at GrpcManager.startStream (file:///home/zycfc/dist/node_modules/wechaty-puppet-service/dist/esm/src/client/grpc-manager.js:232:41)
at GrpcManager.start (file:///home/zycfc/dist/node_modules/wechaty-puppet-service/dist/esm/src/client/grpc-manager.js:121:20)
at async PuppetService.onStart (file:///home/zycfc/dist/node_modules/wechaty-puppet-service/dist/esm/src/client/puppet-service.js:110:9)
at async PuppetService.start (file:///home/zycfc/dist/node_modules/state-switch/dist/esm/src/service-ctl/service-ctl.js:62:17)
at async PuppetService.start (file:///home/zycfc/dist/node_modules/wechaty-puppet/dist/esm/src/mixins/service-mixin.js:18:13)
at async PuppetService.start (file:///home/zycfc/dist/node_modules/wechaty-puppet/dist/esm/src/mixins/ready-mixin.js:13:13)
at async WechatyImpl.start (file:///home/zycfc/dist/node_modules/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:48:21)
at async WechatyImpl.start (file:///home/zycfc/dist/node_modules/state-switch/dist/esm/src/service-ctl/service-ctl.js:55:21) {
code: 1,
details: 'Call cancelled'
}
09:41:18 WARN PuppetWatchdogAgent start() reset() reason: {"data":"regular heartbeat","timeoutMilliseconds":60000}
GError: WatchdogAgent reset: lastFood: "{"data":"regular heartbeat","timeoutMilliseconds":60000}"
at Watchdog.reset (file:///home/zycfc/dist/node_modules/wechaty-puppet/dist/esm/src/agents/watchdog-agent.js:45:39)
at Watchdog.emit (node:events:390:28)
at Timeout._onTimeout (file:///home/zycfc/dist/node_modules/watchdog/dist/esm/src/watchdog.js:81:18)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7) {
code: 2,

尝试重连即可恢复


Repeated group-by field in "Detect HTML Help Renamed search"

The group-by field Processes.original_file_name is repeated. This causes the search to fail.
See here

Thank you @my2ndhead . We'll get this out this week.


Starting subprocess failed: init

I'm using flatpak MPV, is it because of that?

Seems plausible; I expect the mpv flatpak does not include notify-send. I suppose there could be a configuration setting for the notify-send program to run so that you could do something with host-spawn.


Package is not compatible with Python 3.8

Hi there 😄
I have been successfully using aspect_based_sentiment_analysis==2.0.2 on Python 3.8.5. However, I am unable to install the newer version 2.0.3 with pip because the required Python version is pinned to 3.7.
Is this intentional or should the package also support newer versions of Python?
Thanks very much for your help - it is appreciated! 👍🏼

Sorry @rspiewak47! For some reason I thought you were one of the owners. My apologies!

Okay, since there's a fix for this, is there any idea when this PR will be accepted?

you can always fork it, make your changes and install from your own repo
with pip git+your_repo_here/package_name.git
On Thu, Dec 2, 2021 at 4:26 PM Matteo Bronkhorst @.***>
wrote:

Okay, since there's a fix for this, is there any idea when this PR will be
accepted?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ScalaConsultants/Aspect-Based-Sentiment-Analysis/issues/59#issuecomment-984675782,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AASJXA65KASOKO6MAEHJL53UO56ZJANCNFSM5B2GLBYA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.


Add backdrop-filter data.

Note that the spec for this is in the Editors Draft phase - I couldn't see an 'ed' state for the status so I've made it 'wd'. Is that the done thing?
If merged will fix #1555

Thanks! Generally I consider editors drafts as unofficial, so "unoff" is the appropriate value to use. But I'll go ahead and take care of that.

Ah cool good to know - will remember that in the future :)


Use a monospaced font

If we used a monospace font then it would mean that successive lines of code line up. It could be really useful for audio patterns and the like.

I did consider some monospaced fonts before picking our current font (Maven Pro) but they didn't fit from a style perspective and I thought it wasn't a big deal.
But I think we might have a "theming" discussion soon - I see at least four main styles:

"from the future" style which is what we have now in the environment. Sort of slick.
"playful" style, which is the one of the website. Primary colors and Google-like whitespace.
"cutsie", which could be cool for kids. The turtle would look like a turtle, and the font could be comic sans. Because kids want ponies. What the heck I might want ponies too.
"high-tech" which would be "terminal from the 70s" colours, monospaced fonts and vi bindings.

We could start with a "themes" menu or a "gear/settings" menu where one could choose theme...

So I have actually been thinking about something along those lines. Though
actually less about style and more about features. So there's a beginner
mode for learning and teaching, but also a 'high performance' mode, where
more stuff is turned on.
Agree that it would be worth while having a discussion around this sort of
stuff
Guy
On 21 Jun 2015 16:52, "Davide Della Casa"<EMAIL_ADDRESS>wrote:

I did consider some monospaced fonts before picking our current font
(Maven Pro) but they didn't fit from a style perspective and I thought it
wasn't a big deal.
But I think we might have a "theming" discussion soon - I see at least
four main styles:

"from the future" style which is what we have now in the
environment. Sort of slick.
"playful" style, which is the one of the website. Primary colors and
Google-like whitespace.
"cutsie", which could be cool for kids. The turtle would look like a
turtle, and the font could be comic sans. Because kids want ponies. What
the heck I might want ponies too.
"high-tech" which would be "terminal from the 70s" colours,
monospaced fonts and vi bindings.

We could start with a "themes" menu or a "gear/settings" menu where one
could choose theme...
—
Reply to this email directly or view it on GitHub
https://github.com/davidedc/livecodelab/issues/256#issuecomment-113916207
.


I can't connect my Mapple Mini to the Arduino

I have a maple mini stm32f103CBT6 and I'm trying to connect it to the Arduino but an error always appears, I followed the entire Rogerclark tutorial,I'm a layman and this is my first time trying to use these boards
If I made a mistake in any other part of the tutorial please tell me, the maple appears as a USB serial device (com13)
the error in question is
maple_loader v0.1
Resetting to bootloader via DTR pulse
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007110b5db, pid=664, tid=8048
#
# JRE version: OpenJDK Runtime Environment Temurin-21.0.1+12 (21.0.1+12) (build 21.0.1+12-LTS)
# Java VM: OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (21.0.1+12-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C  [jSSC-2.8_x86_64.dll+0xb5db]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\xfly\Documents\Arduino\hardware\Arduino_STM32\tools\win\hs_err_pid664.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

@pumassaurorex can you upload the C:\Users\xfly\Documents\Arduino\hardware\Arduino_STM32\tools\win\hs_err_pid664.log file?
Also the JSSC library is at version 2.9.5 you might want to try upgrading from the 2.8 version you have.

I ended up managing to pass the code, I used maple for some time and soon after it started to present this problem, it turns on but it doesn't seem to recognize it, and then you move your hand under it, it stays with the light fixed, on top in any of the poles it doesn't do this, only underneath or on the PCB at the bottom
https://github.com/adoptium/adoptium-support/assets/97665703/4bf2c0bd-7a99-43ba-b31d-f8a381c05879


Interactive window debugging doesn't handle multi-line statements.

Debug either one of these cells:
# %%
print(
    'test'
)
print(
    'me'
)

# %%
print (
    'hello',
    'a+b'
)
print ('goodbye')

It will end up opening the temp file and basically just doesn't work.

Upgrade to 1.0.0b7 of debugpy.


create readOnly anonymous user for argocd

[x] setup DNS record for build.f5labs.dev
[x] enable web access for https://build.f5labs.dev
[ ] enable anonymous or guest readonly access to argocd ui

build.f5labs.dev is pointing to correct server build.

dig build.f5labs.dev
; <<>> DiG 9.18.15 <<>> build.f5labs.dev
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47736
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;build.f5labs.dev.              IN      A
;; ANSWER SECTION:
build.f5labs.dev.       30      IN      CNAME   scanme.f5labs.dev.
scanme.f5labs.dev.      30      IN      A       <IP_ADDRESS>
;; Query time: 78 msec
;; SERVER: 2001:4860:4860::8888#53(2001:4860:4860::8888) (UDP)
;; WHEN: Sat Jun 03 10:50:46 AEST 2023
;; MSG SIZE  rcvd: 82

https://build.f5labs.dev/ now accessible after https://github.com/apcj-f5/hapi.f5labs.dev/commit/cf63d50e37f966463dc61a82e1a0df6a245c0f77 fixes redirect loop issue.

proposed id/pwd:
id: f5labs.dev
pwd: f5labs.dev
--
aim is to have argo shown to people as part of demo, so it matters little if we 'expose' the id/pwd on github as that is the point.

Added anonymous user with readonly permissions via https://github.com/apcj-f5/hapi.f5labs.dev/commit/4461874b312116a8d3752e2054139e93062b0766. Landing page now shows ArgoCD applications without logging in.


Invalid WCDMA reports

When multiple WCDMA towers are recorded in the same report, only the first tower is valid:
[
  {
    "age": 9215,
    "asu": 96,
    "cellId": 177013648,
    "locationAreaCode": 37265,
    "mobileCountryCode": 505,
    "mobileNetworkCode": 2,
    "primaryScramblingCode": 194,
    "radioType": "wcdma",
    "serving": 0,
    "signalStrength": -24
  },
  {
    "age": 9215,
    "asu": 96,
    "cellId": 23,
    "mobileCountryCode": 0,
    "mobileNetworkCode": 0,
    "primaryScramblingCode": 231,
    "radioType": "wcdma",
    "serving": 0,
    "signalStrength": -24
  },
  ...
]

locationAreaCode is missing
network and country codes are set to 0

I've noticed that my phone only seems to find exactly 1 or 32 wcdma cell towers. This does not occur when only 1 cell tower is recorded.

I'm able to reproduce this at home by forcing my phone to use 3G in settings.

Cell tower data depends a lot on your device and operating system. It seems that many devices only give the full set of values for the first cell tower
Unfortunately there's not much that can be done about this. Cell towers without useful data (i.e. at least MCC, MNC and cell ID) could be filtered out. We could also use data from the first cell tower to fill the missing values in other cell towers, if we can assume that all cell towers in the report belong to the same network

Now I've managed to get a WCDMA tower without a cell id, without any other cell towers to fill missing values from:
  "cellTowers": [
    {
      "age": 6452,
      "asu": 96,
      "locationAreaCode": 37265,
      "mobileCountryCode": 505,
      "mobileNetworkCode": 2,
      "primaryScramblingCode": 223,
      "radioType": "wcdma",
      "serving": 0,
      "signalStrength": -24
    }
  ],

I'm pretty confident that this was observed when I made a call.
Given that this is more of a device/OS and data cleaning issue, I think I'll close this.


mat/prodcut.go invalid link in the comment

I found an invalid link in the comment within the Product() function when attempting to implement the more efficient algorithm.
https://github.com/gonum/gonum/blob/219257751c13c784917a3e62f5023a04675d6535/mat/product.go#L21

I may have that paper somewhere. I'll look on the weekend.

I was unable to find the paper (the work station I was working on when this was written has long since been retired). However, I have found this: https://en.wikipedia.org/wiki/Talk%3AMatrix_chain_multiplication, which does refer to the article and (due to JofCIS not being available), quotes the algorithm. If you have access to IEEE or know someone who does, then that would probably be the best path forward, or if you know someone at a university with access to JofCIS.
For future reference, the title of the paper, which I should have included, is "An Efficient Algorithm for Chain Multiplication of Dense Matrices and Its Computer Implementation", Journal of Computational Information Systems 10: 10 (2014) 4299–4306, Daxin ZHU, Yingjie WU, and Xiaodong WANG.


Detect hall enc inconsistency

fix #24

encoder A/B swapped connection:
Error: The driver of motor_id 0 returned ERROR_HALL_ENC

encoder A/B swapped connection + unplug encoder and hall connector:
Error: The driver of motor_id 0 returned ERROR_HALL_SEQ ERROR_HALL_ENC

wrong encoder resolution parameter (correct: 400, present: 500)
Error: The driver of motor_id 1 returned ERROR_HALL_ENC


lib: tidy up module declarations

This was bothering me as I was doing something else
Organize these in some sane manner:

Non-feature-gated modules, sorted
Then feature-gated modules, grouped and sorted by feature name

Signed-off-by: John Eckersberg<EMAIL_ADDRESS>

I kinda wish we didn't have to tack the #[cfg(feature = "install")] bit over and over again, but afaict you'd have to pull in something like cfg_if and that's overkill for such a minor annoyance.


conf: Support kirkstone base

Feel free to create a kirkstone branch from this
Relate-to: https://github.com/meta-homeassistant/meta-homeassistant/pull/57#
Forwarded: https://github.com/meta-homeassistant/meta-homeassistant/pulls?q=author%3Arzr
Signed-off-by: Philippe Coval<EMAIL_ADDRESS>

@rzr Thank you for the MR. I will do a separate kirstone branch soon. See https://github.com/meta-homeassistant/meta-homeassistant/tree/kirkstone-dev for the work in progress version


How to save Stream videos CSV report?

I want to export the Stream videos to a CSV file. When I run the below script the results are displayed in the command prompt. How to export the results to the CSV file.
https://pnp.github.io/script-samples/stream-report-videos/README.html?tabs=pnpps2

At the start of the PnP PowerShell Alternative sample you can adjust the parameter OutputCsvFileName  to true. That should output your result to a CSV file.
For example: If save the script to a new file named example.ps1. When you want to execute it and change the parameter OutputCsvFileName to true you could run the following command: .\example1.ps1  -OutputCsvFileName $true. This should execute the script and generate you a CSV file.
Hope this helps.

At the start of the PnP PowerShell Alternative sample you can adjust the parameter OutputCsvFileName to true. That should output your result to a CSV file.
For example: If save the script to a new file named example.ps1. When you want to execute it and change the parameter OutputCsvFileName to true you could run the following command: .\example1.ps1 -OutputCsvFileName $true. This should execute the script and generate you a CSV file.
Hope this helps.

@Jwaegebaert, Thank you very much for the tip. Everything is working as expected.

At the start of the PnP PowerShell Alternative sample you can adjust the parameter OutputCsvFileName to true. That should output your result to a CSV file.
For example: If save the script to a new file named example.ps1. When you want to execute it and change the parameter OutputCsvFileName to true you could run the following command: .\example1.ps1 -OutputCsvFileName $true. This should execute the script and generate you a CSV file.
Hope this helps.

@Jwaegebaert, Thank you very much for the tip. Everything is working as expected.

@Jwaegebaert, Is it possible to use the session already open for login purpose?

@rajaseg, could you please clarify what you mean with an already open session?

@rajaseg, could you please clarify what you mean with an already open session?

@Jwaegebaert, When we run the script, it will pop up the login screen for Microsoft Stream? Is it possible to use the session If I already connected to Microsoft Stream?

Not to my knowledge. Maybe @teamneroblanco can give more insight towards your question.

Not to my knowledge. Maybe @teamneroblanco can give more insight towards your question.

@teamneroblanco, can you give your insight on the issue?


Pool byte[] in RemoteRenderer

Over ~30 seconds of 30 clients clicking around
Before:

After:

🆙 📅

@aspnet-hello triage https://dev.azure.com/dnceng/public/_build/results?buildId=270561&view=ms.vss-test-web.build-test-results-tab&runId=7434236&paneView=debug&resultId=100093

This comment was made automatically. If there is a problem contact<EMAIL_ADDRESS>I've triaged the above build. I've created/commented on the following issue(s)
https://github.com/aspnet/AspNetCore-Internal/issues/2836


Got a strange exception since some versions ago, don't know what is causing it

TypeError: Cannot read property '2' of null
    at Object.init (esgst.js:100)
    at Object.loadFeatures (esgst.js:1)
    at async a (esgst.js:100)

Unfortunately that doesn't help. I'll add an extra log to the next version that should help.

Please check the console log for more details.


CI: add a job that makes sure that the files in /dist/* are in sync with the source files (such as /index.js)

@mpdude @sebastiankugler This makes sure that PR authors don't forget to update dist/ when making a PR.

Bump @mpdude @sebastiankugler


Lots of Warnings in the Build

There's quite a lot of warnings in the build - I'm not sure if any of them are serious or not
build.txt

I'll take care of the loader warnings.

Looks like a lot of these are glslang, which is in a different repo but I can take care of the V-LaVL ones.  Thanks!

Yes, I should have mentioned that.  You should submit the glslang warnings in their GitHub

Loader changes committed: f2d7e5451a695a9230867f64e281d7f09df831b5

I've got some PRs on the glslang repo. That should fix all but one of the warnings from GCC. The last warning is interesting. As far as I can tell, it's a GCC bug. It's getting confused by an operator| overload and treating a constant in the header incorrectly. There are some workarounds, but they feel contentious. As such, I'm inclined to leave it be. I'm going to close this issue. Thanks!


[Bug] page.goto: net::ERR_UNSAFE_PORT when running on port other than 6006

Describe the bug
If i run the test-runner on port 6000, i get an error from Chromium.
 page.goto: net::ERR_UNSAFE_PORT at http://localhost:6000/iframe.html\n' +
    '    =========================== logs ===========================\n' +
    '    navigating to "http://localhost:6000/iframe.html", waiting until "load"\n' +
    '    ============================================================\n' +

I run the test-runner as follows:
npx start-server-and-test 'http-server --silent --port 6000 dist/storybook/shared-pipes' 'http://localhost:6000/' 'test-storybook --url http://localhost:6000 --index-json --config-dir libs/shared/pipes/.storybook'
Screenshots and/or logs
at defaultPrepare (node_modules/@storybook/test-runner/dist/cjs/setup-page.js:27:14)
      at setupPage (node_modules/@storybook/test-runner/dist/cjs/setup-page.js:79:11)
      at CustomEnvironment.setup (node_modules/@storybook/test-runner/playwright/custom-environment.js:9:5)

Environment

OS: [e.g. iOS] Linux, WSL
Node.js version: [e.g. v12.17.0] v18.14.1
NPM version: [e.g. 6.14.4]  v9.3.1
Browser (if applicable): [e.g. chrome, safari]   Chrome
Browser version (if applicable): [e.g. 22]
Device (if applicable): [e.g. iPhone6] Windows 11 , WSL

Additional context
N/A

Hey @work933k thanks for opening this issue.
Amongst many other ports, Chrome determines that port 6000 is unsafe, so even just running Storybook wouldn't work (at least it does not for me). This is purely a Chrome issue, which is used by Playwright, which is what the test-runner uses.
Unfortunately there's nothing we can do, but you can change the port to be anything else, as long as it does not match the port from the list I mentioned previously. Thanks once again, I'll close this issue.


Add ct_server_public_key flag

ct will fail to upload if you do not specify a public key for the log server.

(1) Can you please squash the commits together?
(2) When you fill in the CLA I think there's somewhere you can put down your github username so it gets linked to you. Can you make sure the author / github username match in the CLA and this change? That's the only reason I can imagine why googlebot is unhappy.

There are commits here by two different GitHub usernames, I think the system only supports one username per person?
When squashing, if you use your @iangcarroll account, this should fix this problem, I think.

Ah, forgot about this. It appears my git was configured with the wrong username, thus triggering googlebot.
I'll squash them shortly.

That branch is messed up from my bad rebase. Just going to create a new PR...


GIF Animation

Does this plugin support animated GIFs? Doesn't seem to state so within the documentation.

Yes, https://github.com/imagemin/imagemin-gifsicle supports animated GIFs.


updated student API to check for existence of makefile and added unit…

… tests for it

1 test failed on my IDE for FileService -> testGetFileNameWithExtension. Also, the Exception class MakefileNotFoundException only tests 1 method out of 3. Let's add those as well. Aside from that, everything looks good!

The FileService test was already failing due to the environment issue with Windows using \ instead of /. It's still passing in the github build.
and thanks, I'll add more testing for the MakefileNotFoundException


build ktrain model with tensorflow 2.1.0 kera version 2.3.1

I am trying to build a model with ktrain. Howver, I received the following errors:
import ktrain
from ktrain import text

WARNING:tensorflow:From c:\users\chth\anaconda3\envs\kg\lib\site-packages\tensorflow_core\python\compat\v2_compat.py:88: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
Using DISABLE_V2_BEHAVIOR with TensorFlow
using Keras version: 2.2.4-tf

model = text.sequence_tagger('bilstm-crf', preproc)

pretrained word2vec word embeddings will be used with bilstm-crf
Loading pretrained word vectors...this may take a few moments...
Done.
WARNING:tensorflow:From c:\users\chth\anaconda3\envs\kg\lib\site-packages\tensorflow_core\python\keras\initializers.py:119: calling RandomUniform.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From c:\users\chth\anaconda3\envs\kg\lib\site-packages\tensorflow_core\python\ops\resource_variable_ops.py:1635: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
WARNING:tensorflow:From c:\users\chth\anaconda3\envs\kg\lib\site-packages\tensorflow_core\python\ops\init_ops.py:97: calling GlorotUniform.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From c:\users\chth\anaconda3\envs\kg\lib\site-packages\tensorflow_core\python\ops\init_ops.py:97: calling Orthogonal.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From c:\users\chth\anaconda3\envs\kg\lib\site-packages\tensorflow_core\python\ops\init_ops.py:97: calling Zeros.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:AutoGraph could not transform <bound method CRF.viterbi_decoding of <ktrain.text.ner.anago.layers.CRF object at 0x000002E483BAF508>> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output.
Cause: LIVE_VARS_IN
WARNING: AutoGraph could not transform <bound method CRF.viterbi_decoding of <ktrain.text.ner.anago.layers.CRF object at 0x000002E483BAF508>> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output.
Cause: LIVE_VARS_IN

learner.fit(1e-3, 1)

WARNING:tensorflow:From c:\users\chth\anaconda3\envs\kg\lib\site-packages\ktrain\core.py:1185: Model.fit_generator (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.
Instructions for updating:
Please use Model.fit, which supports generators.

@CH0102NG Can you please share colab link or simple standalone code to reproduce the issue in our environment,it helps us localizing the issue faster.Thanks!

Hi, sorry I forgot to update. I have managed to resolve the issue by upgrading my ktrain to version 0.10.0 and shutting down another jupyter notebook that was also using cuda. Thanks so much for response:)

@CH0102NG  Closing this issue as it was resolved.Thanks!


Bring 0.19.0 rc fixes to main.

This allows us to get those critical fixes on main. Cherrypicked few commits.

Done @yeya24  (:


Fix small typo in pooling_ops_test

(not related to pull req #1868)

Can one of the admins verify this patch?

Can one of the admins verify this patch?

yep, updated

Thanks!  @tensorflow-jenkins test this please

somehow we killed jenkins, going to wait for it to restart to try again.

test this please


MobileNetEdgeTPU-V2 final model to be used

The links that were shared earlier has different files:
Link1: https://tfhub.dev/google/edgetpu/vision/mobilenet-edgetpu-v2/l/1
Link2: https://drive.google.com/file/d/1--A9EI8Ntr_Q5CH0WblFvUctVI_6VkcR/view?usp=sharing
The TF model shared in Link2 has the dimensions fixed to 1x224x224x3.
The TF model shared in Link1 has the dimensions fixed to ?x224x224x3.
As per the description in the slide  Link 2 must have been extracted from Link1. But need confirmation on the final model. I think the one with dynamic batch would be be better.

Agree that we should support dynamic batch size for offline.

Agree that we should support dynamic batch size for offline.
Actually, I think the official one is from https://github.com/tensorflow/models/tree/master/official/projects/edgetpu/vision#edgetpu-optimized-vision-models

Hi,
I checked this link. The TF version of the MobileNetEdgeTPUv2-L shared here is the checkpoint. And the tflite version shared in link is a fixed 1 batch model only.
I think the tfhub model shared in the slide (link 1 in my comment in this issue) should be good to use.

Agree that we should support dynamic batch size for offline.
Actually, I think the official one is from https://github.com/tensorflow/models/tree/master/official/projects/edgetpu/vision#edgetpu-optimized-vision-models

Hi,
I checked this link. The TF version of the MobileNetEdgeTPUv2-L shared here is the checkpoint. And the tflite version shared in link is a fixed 1 batch model only.
I think the tfhub model shared in the slide (link 1 in my comment in this issue) should be good to use.

Yes. the TF version is the checkpoint. But I thinks it's the original source. To get frozen pb or saved_model, you have to clone the repo and export the model to use the checkpoints / weights.
Nope, the TFLite model does support dynamic batch size. When I run it with benchmark_model --graph=...  --use_nnapi=1 --input_layer=input --input_layer_shape=n,224,224,3, where n > 1, I can get expected results on Pixel and MTK devices.

Agree that we should support dynamic batch size for offline.
Actually, I think the official one is from https://github.com/tensorflow/models/tree/master/official/projects/edgetpu/vision#edgetpu-optimized-vision-models

Hi,
I checked this link. The TF version of the MobileNetEdgeTPUv2-L shared here is the checkpoint. And the tflite version shared in link is a fixed 1 batch model only.
I think the tfhub model shared in the slide (link 1 in my comment in this issue) should be good to use.

Yes. the TF version is the checkpoint. But I thinks it's the original source. To get frozen pb or saved_model, you have to clone the repo and export the model to use the checkpoints / weights.
Nope, the TFLite model does support dynamic batch size. When I run it with benchmark_model --graph=... --use_nnapi=1 --input_layer=input --input_layer_shape=n,224,224,3, where n > 1, I can get expected results on Pixel and MTK devices.

when i use this tflite model, somehow it doesn't work for us.
Is it ok to use the saved model from link 1?

It was discussed in the meeting today that it's ok to use Link 1 as well.
We may need to save a copy of this model in github.com/mlcommons/mobile_open as well.

It was discussed in the meeting today that it's ok to use Link 1 as well. We may need to save a copy of this model in github.com/mlcommons/mobile_open as well.

Agree. Let's send PR to mobile_open or mobile_models

The tfhub link now redirects to kaggle... but the downloadable model is the same.

I can't create a PR for the model.
@anhappdev can you please help for it?

I can't create a PR for the model. @anhappdev can you please help for it?

Can you show a screenshot of the error?

No technical issues as such... Its more of a licensing issue.
For me to download the model and then upload to mlcommons repo will require more approvals.

We chose another model. Close this for now.


Gml 1664 agent refactor

Not sure if we want to merge before LLM perf report... need to get actions back up and running for that.


FlutterView crash with a descprition of CALayer position contains NaN

Steps to Reproduce
git clone https://github.com/klaus01/iOS_Flutter.git
cd iOS_Flutter/my_flutter
flutter pub get
cd ..
pod install
open iOS_Flutter.xcworkspace
Add flutterVC as childController of a custom controller
Expected results: flutter displayed with position {0, 0}
Actual results: flutter displayed with position {inf, inf}

After add the code below, this crash is fixed

I doubt there is a bug in flutterview initwithframe, and initial value probally {inf, inf},can you figure out why this happened?

@daselangzhuang1989
I cloned your repo and followed your steps, but getting below error while running pod install:
dhs@Dhss-MacBook-Pro iOS_Flutter % pod install

[!] Invalid `Podfile` file: cannot load such file -- ./my_flutter/.ios/Flutter/podhelper.rb.

 #  from /Users/dhs/Documents/NCFlutter/iOS_Flutter/Podfile:5
 #  -------------------------------------------
 #  flutter_application_path = './my_flutter/'
 >  load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
 #
 #  -------------------------------------------
dhs@Dhss-MacBook-Pro iOS_Flutter %

Also, can you provide flutter doctor -v and details around how to Add flutterVC as childController of a custom controller

@daselangzhuang1989
I cloned your repo and followed your steps, but getting below error while running pod install:
dhs@Dhss-MacBook-Pro iOS_Flutter % pod install

[!] Invalid `Podfile` file: cannot load such file -- ./my_flutter/.ios/Flutter/podhelper.rb.

 #  from /Users/dhs/Documents/NCFlutter/iOS_Flutter/Podfile:5
 #  -------------------------------------------
 #  flutter_application_path = './my_flutter/'
 >  load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
 #
 #  -------------------------------------------
dhs@Dhss-MacBook-Pro iOS_Flutter %

Also, can you provide flutter doctor -v and details around how to Add flutterVC as childController of a custom controller

Mee too.
UncaughtException=>CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [-inf nan]' =>CoreFoundation=>___exceptionPreprocess

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.

try set FlutterViewController.view.frame = CGRectMake(0,0,0,0)
the origin value is (inf,inf,0,0)
@daselangzhuang1989


Add children to the props for @types/react@18

In relation to React props should not do anything special with children and DefinitelyTyped have updated the react types to v18
https://github.com/DefinitelyTyped/DefinitelyTyped/issues/59802

Any update here? No way to switch to React 18 without this fix

Can we get this merged?

I am unfortunately not an admin on this project anymore, so I am unable to bypass a broken CI check

Any update on this ? it would be nice if could merge this PR.

Any updates on when this will be merged?


add basic tests

What's this PR do?
add basic tests to this plugin
Where should the reviewer start?
under spec/ directory
How should this be manually tested?
 $ rspec

Any background context you want to provide?
Test code allows us to make changes to code quickly. I know it works now because I've run the tests, when I make the changes I need to make, I need to get the tests working again. This saves hours. :smiley_cat:
What are the relevant tickets?
#3
Questions:

Is this an appropriate testing?
If I have a mistake, forgive me and tell me how to be a perfect. I will learn it :' :smile:

Looking good @tjnet . Will take a more closer look and let you know..
@stevecrozz any thoughts?

@arthurnn thanks for the reminder. yes this does look good. the first few tests that just assert the right constants are returned seem a bit silly, but I don't have a better idea and they do at least exercise the right code.
The only change I'd suggest is very minor. I would add: --require spec_helper to .rspec and remove the require from the spec file. But I'm good with this either way.

@stevecrozz @arthurnn thanks for your review!
I'll fix it later.

The only change I'd suggest is very minor. I would add: --require spec_helper to .rspec and remove the require from the spec file. But I'm good with this either way.

I fixed it . Thank you for your review. :smiley_cat:

merci!

thank you for your feedback and suggestions!


chore(deps): upgrade dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-main" workflow

Codecov Report

Merging #551 (67cf685) into main (083c8bd) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #551   +/-   ##
=======================================
  Coverage   95.69%   95.69%
=======================================
  Files           1        1
  Lines         395      395
  Branches       53       53
=======================================
  Hits          378      378
  Misses         17       17

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.