 onChange handler does not trigger in jsdom

What RMWC Version are you using [major.minor.patch]: 6.0.9

Name your build system [Webpack, Rollup...]: CRA 2.0

Describe the bug with as much detail as possible:

Select onChange has changed in 6.0 to a CustomEvent, where it was previously (in 5.7.2) a SyntheticEvent.
Things appear to work fine in browsers:
5.7.2: https://codesandbox.io/s/rmwc-572-select-events-kbvlz
6.0.9: https://codesandbox.io/s/rmwc-609-select-events-pbrw3 (note also that the inputRef= never returns a ref too)
however in jsDOM environments, any tests that rely on triggering 'change' fail.

What happened, and what was supposed to happen:

In a jest test, fireEvent.change(submitEl, ...) would trigger onChange in 5.7.2
In 6.0.x, it does not trigger onChange.
You can see a minimal repro here:
5.7.2 - tests pass: https://github.com/tstirrat/rmwc-select-change-event/tree/working-5.7.2
6.0.9 - test fails: https://github.com/tstirrat/rmwc-select-change-event (master branch)
Also note that in 6.0.9 the label is not enclosed in a <label>, so I had to do some weird getByText dom traversal.

I cannot find a way to sanely simulate a change event in jsdom tests btw.
I've tried Simlate.change.
I notice that in 6.0, CustomEvent type is onChange and not SyntheticEvent of change too.
I even tried fireEvent(element, new CustomEvent('onChange')) and this did nothing, too.

MDC rewrote the select (again) and changed the markup. Thank you for the repro’s, I’ll get these fixed and look into the onChange.

Great, for now I've kept select at 5.7.2 and the rest at 6.0.9 in our app

@tstirrat dug into this for a bit. It's caused by an issue that had to be worked around in Google's code. Effectively, material-components-web fires the onChange handler on init. This definitely is NOT what we want, since it is contrary to how standard selects behave in React. Because of this, I had to employ a workaround to prevent onChange events from happening immediately on mount.
For the time being, here is a workaround which just involves delaying your onChange event firing.
test('renders learn react link', (done) => {
  const onChange = jest.fn();
  const { container } = render(<Select onChange={onChange} />);

  const select = container.children[0].querySelector('select');

  act(() => {
    window.requestAnimationFrame(() => {
      fireEvent.change(select!);
      expect(onChange).toHaveBeenCalled();
      done();
    });
  });
});

Let me know if that works for you. Ideally I could fix this and make it behave exactly like a native select, but due to the complicated nature of the integration with material-components-web under the hood I don't know if it would be possible.

Thanks, I'll try that!

This workaround did work, thanks!

Unfortunately,  it's not completely working. I am using an async rAF delay to fire the event. this works, it fires the onChange. but in testing, it doesn't include the select's values:
    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "false"
    Received: "true"

    Number of calls: 1

      33 |
      34 |   expect(onChange).toHaveBeenCalledTimes(1);
    > 35 |   expect(onChange).toHaveBeenCalledWith('false');
         |                    ^
      36 | });
      37 |

      at Object.<anonymous> (src/App.test.js:35:20)

  console.log src/App.test.js:10
    onChange CustomEvent { isTrusted: [Getter] }.  <-------------- no (target|currentTarget).value

Test Suites: 1 failed, 1 total

Code updated here using the latest 6.0.14: https://github.com/tstirrat/rmwc-select-change-event

Using async firing:
  await act(() => {
    return new Promise((resolve) => {
      requestAnimationFrame(() => {
        fireEvent.change(select, {
          target: { value: 'false' },
        });
        resolve();
      });
    });
  });

  expect(onChange).toHaveBeenCalledTimes(1);
  expect(onChange).toHaveBeenCalledWith('false');

Well, I hate that you're having these issues. Did a little more investigating

Internally ,RMWC uses the "selectedIndex" property of the DOM event
I assumed that passing in the appropriate like so would have fixed the issue

await act(() => {
    return new Promise((resolve) => {
      requestAnimationFrame(() => {
        fireEvent.change(select, {
          currentTarget: { selectedIndex: 1 },
        });
        resolve();
      });
    });
  });

That doesn't appear to get us any closer, but it seems like anyone would have this exact same issue if they're using the select change in a unit test, so I'd really like to figure it out.

Thanks for investigating more. Yes I think it will surface with others too.

Perhaps a scope creep on this ticket, but I'm having issues with the onChange for the Select field too, but in MSIE11.
The target and customTarget props are not copied correctly into the CustomEvent in the emitFactory (here) when run in MSIE11.
This is really unfortunate as I need to have support for internet explorer 11, and this makes select fields useless in that environment.
I am polyfilling custom events, so I'm pretty confident that something is wrong with the references line.
Would really appreciate some help on this! 🙏

@astrofrans I'll be upgrading this library to the newest version of material-components-web in the near future. These maintenance upgrades are usually not that bad, except in the last 2 versions they have decided to continuously refactor the select. Not only is this maddening for me, it also causes more issues such as this. I can definitely look into the issue, but not before I have to re-rewrite the select again.


adding the filled version of the flask of knowledge to the wiki

The filled version is already covered in
https://github.com/Slimefun/Wiki/blob/master/pages/Flask-of-Knowledge.md
Is there some reason as to why this PR has been made?
On 6/4/22, JasperChaseTOQ @.***> wrote:

Reopened #213.
--
Reply to this email directly or view it on GitHub:
https://github.com/Slimefun/Wiki/pull/213#event-6742411235
You are receiving this because your review was requested.
Message ID: @.***>

oh i wanted to make a link from one of my addons recipes (in the addon wiki) to the filled flask of knowledge cause its used in one of the recipes and i only saw the regular flask of knowledge

You could PR to the Slimefun4 codebase to edit wiki.json to use the filled flask ID and point it towards the regular page.


update load replace logic

I have tested multiple times, including testing failures

with config instead of filename
Sending filename or reserver word (running-config.xml)
Sending bad data


New version of dcos-aws-cli.

Diffing package dcos-aws-cli revision 0 revision 1

Diffing File package.json:

Diffing File resource.json:
7c7
<           "contentHash":[ { "algo":"sha256", "value":"e9b29e4789c0c832fab8fbf0c5a5a5ee139a35f98dc83db7f565d911275bb046" } ],
---
>           "contentHash":[ { "algo":"sha256", "value":"26fdaf18531198ee44ba3797616733ed5b2f74c3a155bf9c5a8709b63741863a" } ],
9c9
<           "url":"https://github.com/dcos-labs/dcos-aws-cli/raw/master/artifacts/dcos-aws-cli-darwin"
---
>           "url":"https://github.com/dcos-labs/dcos-aws-cli/raw/0.2/artifacts/dcos-aws-cli-darwin"
14c14
<           "contentHash":[ { "algo":"sha256", "value":"4f8ceca30f62b163e5ebc9cb1aae11edf8e506b2ec82e3f232707fc402509880" } ],
---
>           "contentHash":[ { "algo":"sha256", "value":"f5741951e08a902a0e06b40107051253ee5b4957097b411af732af79f99d190d" } ],
16c16
<           "url":"https://github.com/dcos-labs/dcos-aws-cli/raw/master/artifacts/dcos-aws-cli-linux"
---
>           "url":"https://github.com/dcos-labs/dcos-aws-cli/raw/0.2/artifacts/dcos-aws-cli-linux"
21c21
<           "contentHash":[ { "algo":"sha256", "value":"f45a26c626d8abc05cec72442781dfd77818cb606f0f2dc064026a326342e9dc" } ],
---
>           "contentHash":[ { "algo":"sha256", "value":"5a8b2a6154f4af9c18c5e4629126d7db2f26a376cf0822d6105a027417d43250" } ],
23c23
<           "url":"https://github.com/dcos-labs/dcos-aws-cli/raw/master/artifacts/dcos-aws-cli.exe"
---
>           "url":"https://github.com/dcos-labs/dcos-aws-cli/raw/0.2/artifacts/dcos-aws-cli.exe"

examples PR: https://github.com/dcos/examples/pull/211


wip: RichExceptionChainRepr

Yanked most of __rich_console__ from Rich's Traceback class and adapted for pytest's ExceptionChainRepr.
I ignored locals for the time being, which I assume I can grab from reprlocals on each ReprEntry.
There's no testing other than the eye test and the code could stand to be cleaned up a bit as well. But! It's working.

This looks amazing 😍 great work!
About testing: not sure how we can approach testing in pytest-rich in general TBH. Any ideas?

For the time being, could we use a mark on failing tests so that you could manually test the terminal output for tracebacks without breaking CI?

Guess my implementation of _grab_err_msg needs some updating..

Yeah I guess somewhere there's a None that needs to be handled as text.

First pass at dealing with the error messages.
The original _grab_err_msg function couldn't deal with a plain assertion without a message, e.g. assert 0 vs assert 0, "Some failure". Fixed that and moved it to within the render_chain method for now.
Here are a few screenshots to show progress so far:

From my previously mentioned Django app, it works and looks a lot better:

This PR may be in a good spot to merge.
There are still improvments to be done:

I'm not 100% in love with how the error messages are displayed, could explore a richer way to output them
The code for RichExceptionChainRepr could probably stand to be cleaned up and refactored a bit
Along with the refactoring, documentation in docstrings would be useful for future contributors

I think those all could go in as separate issues with their own PRs, in order to avoid this PR's scope from expanding beyond richer exception highlighting.

Additional stray thoughts:

May want to rename the header from Traceback to something else (Failed Test Report?), since it's not an actual traceback it's a bit misleading for the header to say it is
Still need to include the reprlocals information from the ReprEntry somewhere

This PR may be in a good spot to merge.

Agreed, want to mark it as Ready for Review then?

Final tweaks, ready for review!

Areas for improvement:

pytest's TerminalReporter shows the entire test function being called, whereas since I adapted from rich's Traceback, RichReporter only shows the last 3 and next 3 lines from the failed line.

TerminalReporter puts the error messages right after the failed lines, whereas RichReporter puts them at the bottom. Switching away from rich's Syntax object would make this easier, as Syntax is apparently not designed to be composed in pieces as detailed by Will here.

Btw your detailed comments for follow ups should probably be moved to their own issues so we don't lose track of them. 👍

Added new issues on where to go from here:
#16
#17

When I ever thought about pytest+rich, this is the feature I had in mind.


error TS2688: Cannot find type definition file for 'node'.

Updated my project to angular 2.0.1
Updated typings to latest: npm run typings -- install dt~node --save --global
Updated angular2-modal to 2.0.0 (When I start the project, it was 2.0.0-beta13)

@dirtyvader angular2-modal doesn't require you to install typings.
I use @types

This error also appears in my project after reinstalling angula2-modal.
It was working fine before..
node_modules/angular2-modal/esm/models/errors.d.ts(1,1): error TS2688: Cannot find type definition file for 'node'.
node_modules/angular2-modal/esm/providers/modal.d.ts(1,1): error TS2688: Cannot find type definition file for 'node'.

I was using the<EMAIL_ADDRESS>with<EMAIL_ADDRESS>without any issue (except #207).
I updated my project with<EMAIL_ADDRESS>&<EMAIL_ADDRESS>for AoT compilation support.
I have now the same issue dirtyvader mentioned:
node_modules/angular2-modal/esm/models/errors.d.ts(1,1): error TS2688: Cannot find type definition file for 'node'.
node_modules/angular2-modal/esm/providers/modal.d.ts(1,1): error TS2688: Cannot find type definition file for 'node'.
Any idea?
Thx

Just adding more info above, I have replaced previous installed angular2-modal in the node_module. It works fine, however, as soon as I reinstall the angular2-modal, the error above appears again. I'm using 2.0.0-beta13

Can you each write the import method you use?webpack? SystemJS? Etc...

I use systemjs

I am using webpack, but I am having the same issue. No problem with the same configuration in beta 13.

SystemJS too. Settings not changed since it worked (angular 2.0.0 & angular2-modal beta 13)

Same here with Webpack. The same configuration worked with angular-2.0.0 and angular2-modal beta.13.

The error appears during transpilation process (running tsc):  "compilerOptions": {"target": "es5","module": "commonjs","moduleResolution": "node"

@shlomiassaf
The first line on both esm/models/errors.d.ts and esm/providers/modal.d.ts is /// <reference types="node" />.
Removing it removes the compilation problem.

I have a same bug with "angular2-modal": "^2.0.0-beta.13",:

node_modules/angular2-modal/esm/models/errors.d.ts(1,1): error TS2688: Cannot find type definition file for 'node'.
node_modules/angular2-modal/esm/providers/modal.d.ts(1,1): error TS2688: Cannot find type definition file for 'node'.

my package.json:
{
  "name": "admin-ui",
  "version": "1.0.0",
  "scripts": {
    "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
    "lite": "lite-server",
    "postinstall": "typings install",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "typings": "typings"
  },
  "license": "ISC",
  "dependencies": {
    "@angular/common": "~2.0.1",
    "@angular/compiler": "~2.0.1",
    "@angular/compiler-cli": "0.6.3",
    "@angular/core": "~2.0.1",
    "@angular/forms": "~2.0.1",
    "@angular/http": "~2.0.1",
    "@angular/platform-browser": "~2.0.1",
    "@angular/platform-browser-dynamic": "~2.0.1",
    "@angular/router": "~3.0.1",
    "@angular/upgrade": "~2.0.1",
    "core-js": "^2.4.1",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.12",
    "systemjs": "0.19.39",
    "zone.js": "^0.6.25",
    "angular2-in-memory-web-api": "0.0.21",

    "angular2-modal": "^2.0.0-beta.12",
    "bootstrap": "^3.3.7",
    "font-awesome": "^4.6.3",
    "jquery": "^3.1.1",
    "momentjs": "^1.1.17",
    "ng2-translate": "^2.5.0"
  },
  "devDependencies": {
    "concurrently": "^3.0.0",
    "tslint": "^3.15.1",
    "lite-server": "^2.2.0",
    "typescript": "^2.0.3",
    "typings": "^1.4.0"
  }
}

To me, you all have to migrate to typescript 2.0 remove the typings and import the @typing libs in your package.json.
I had this issue and it solved it.

@halonf Can you explain more about that ? I'm new to typescript and typings

@halfonf you should not have to use the node typings in the front-end since you are not running on node but in the browser.

@kisdaniel you have "angular2-modal": "^2.0.0-beta.12" so npm probably installed the v.2.0.0. Change it to "angular2-modal": "2.0.0-beta.13" and the problem should not be there anymore. Of course then you cannot use angular 2.0.1...

Hi guys
I'll issue a fix later today
Thanks

I am still getting the error.. Is it just me? (I am using beta-13)

can anyone explain which version is compatible with angular 2.0.1?
package.json
{
  "name": "fet-admin-ui",
  "version": "1.0.0",
  "scripts": {
    "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
    "lite": "lite-server",
    "postinstall": "typings install",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "typings": "typings"
  },
  "license": "ISC",
  "dependencies": {
    "@angular/common": "~2.0.1",
    "@angular/compiler": "~2.0.1",
    "@angular/compiler-cli": "0.6.3",
    "@angular/core": "~2.0.1",
    "@angular/forms": "~2.0.1",
    "@angular/http": "~2.0.1",
    "@angular/platform-browser": "~2.0.1",
    "@angular/platform-browser-dynamic": "~2.0.1",
    "@angular/router": "~3.0.1",
    "@angular/upgrade": "~2.0.1",
    "core-js": "^2.4.1",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.12",
    "systemjs": "0.19.39",
    "zone.js": "^0.6.25",
    "angular2-in-memory-web-api": "0.0.21",

    "angular2-modal": "^2.0.0",
    "bootstrap": "^3.3.7",
    "font-awesome": "^4.6.3",
    "jquery": "^3.1.1",
    "momentjs": "^1.1.17",
    "ng2-translate": "^2.5.0"
  },
  "devDependencies": {
    "concurrently": "^3.0.0",
    "tslint": "^3.15.1",
    "lite-server": "^2.2.0",
    "typescript": "^2.0.3",
    "typings": "^1.4.0"
  }
}

typings.json:
{
  "globalDependencies": {
    "core-js": "registry:dt/core-js#0.0.0+20160725163759",
    "jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
    "node": "registry:dt/node#6.0.0+20160909174046"
  }
}

tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  }
}

it has a same issue:
node_modules/angular2-modal/esm/models/errors.d.ts(1,1): error TS2688: Cannot find type definition file for 'node'.
node_modules/angular2-modal/esm/providers/modal.d.ts(1,1): error TS2688: Cannot find type definition file for 'node'.

trying to Migrate from Angular 2 to angular 4
Got these two errors now:
Build:Cannot Find type definition file for 'mocha'
Build:Cannot Find type definition file for 'node'

@Hassan121Cs don't use Mocha but I solved :

Build:Cannot Find type definition file for 'node'

By re-importing the specific @types/node package used by my project.
In my case : $ npm i -D<EMAIL_ADDRESS>Then modifing the variable at line 85
from : declare var module: NodeModule; to : declare var module: {id: string}; (causing an error)

add types in your tsconfig file
{
"compileOnSave": true,
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2016", "dom" ],
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"types": [      <<<=============================================
"node"
]
}
}

add types in your tsconfig file
{
"compileOnSave": true,
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2016", "dom" ],
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"types": [ <<<=============================================
"node"
]
}
}

This worked perfectly.  Thanks for the tip.

@parassachapara please triple quote code! with >   ` marks
https://guides.github.com/features/mastering-markdown/#examples


[求助/Help] it looks like a python issue，[Errno 2] No such file or directory: '/usr/bin/python': '/usr/bin/python'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error

TASK [common : install misc obsolete packages] *********************************
failed: [<IP_ADDRESS>] (item=yunion-qemu-2.12.1) => {"ansible_index_var": "item_index", "ansible_loop_var": "package_item", "changed": false, "item_index": 0, "module_stderr": "/tmp/ansible_ansible.legacy.yum_payload_pf62xpeb/ansible_ansible.legacy.yum_payload.zip/ansible/module_utils/urls.py:176: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.\nTraceback (most recent call last):\n  File \"<stdin>\", line 100, in <module>\n  File \"<stdin>\", line 92, in _ansiballz_main\n  File \"<stdin>\", line 41, in invoke_module\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_ansible.legacy.yum_payload_pf62xpeb/ansible_ansible.legacy.yum_payload.zip/ansible/modules/yum.py\", line 1728, in <module>\n  File \"/tmp/ansible_ansible.legacy.yum_payload_pf62xpeb/ansible_ansible.legacy.yum_payload.zip/ansible/modules/yum.py\", line 1724, in main\n  File \"/tmp/ansible_ansible.legacy.yum_payload_pf62xpeb/ansible_ansible.legacy.yum_payload.zip/ansible/modules/yum.py\", line 1604, in run\n  File \"/tmp/ansible_ansible.legacy.yum_payload_pf62xpeb/ansible_ansible.legacy.yum_payload.zip/ansible/module_utils/common/respawn.py\", line 43, in respawn_module\n  File \"/usr/lib64/python3.6/subprocess.py\", line 287, in call\n    with Popen(*popenargs, **kwargs) as p:\n  File \"/usr/lib64/python3.6/subprocess.py\", line 729, in __init__\n    restore_signals, start_new_session)\n  File \"/usr/lib64/python3.6/subprocess.py\", line 1364, in _execute_child\n    raise child_exception_type(errno_num, err_msg, err_filename)\nFileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/python': '/usr/bin/python'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "package_item": "yunion-qemu-2.12.1", "rc": 1}

I'm having an issue like this with my installation, it looks like a python issue
python is present in my server

got it. let me see.

It looks like the problem is a little less, but it still hasn't been solved, it looks like it's a python2 and python3 version problem
failed: [<IP_ADDRESS>] (item=yunion-qemu-2.12.1) => {"ansible_index_var": "item_index", "ansible_loop_var": "package_item", "changed": false, "item_index": 0, "msg": "The Python 2 bindings for rpm are needed for this module. If you require Python 3 support use the `dnf` Ansible module instead.. The Python 2 yum module is needed for this module. If you require Python 3 support use the `dnf` Ansible module instead.", "package_item": "yunion-qemu-2.12.1"}

@QiangQiangshiyanshi
remove any ansible that is installed by dnf/yum, then install ansible with pip:
dnf install -y python3-pip
python3 -m pip install -U pip; python3 -m pip install -U setuptools wheel && python3 -m pip install 'ansible<=9.0.0'

then run ocboot again.

Thanks


'tslib' does not provide an export named '__decorate'

import { __decorate, __metadata } from "tslib";
         ^^^^^^^^^^
SyntaxError: The requested module 'tslib' does not provide an export named '__decorate'

In esm mode, right?

maybe related? https://github.com/microsoft/tslib/issues/161

With index.mjs and tslib at both v1 or v2, I cannot reproduce this:
import { __decorate, __metadata } from "tslib";

console.log(__decorate);
console.log(__metadata);

Prints:
[Function: __decorate]
[Function: __metadata]


Wifi is either set to 40Mhz or 80Mhz, but wifi connection after the display is still 20Mhz！

Not a LuCI issue.


Set admin flag on existing memberships to true

All the existing memberships should have admin status, since we only
added memberships if users were admins of the repos.
Thus, we should preserve that state, otherwise all of the current repos
would say that they require admin permissions, until users re-sync.

Your logic seems sound to me. Any concerns with the migration taking long enough to lock the table while someone is enabling/disabling a repo? Membership.count # => 537029.
LGTM

Good point, @thorncp. We'll probably want to put it in maintenance mode when running this migration.


question : best way to manage multiple schemas

Hello,
I am using npoco for a project where I have the same tables in multiple schemas of the same database.
One I have found is redefining the classes
https://github.com/schotime/NPoco/issues/387
but this is not acceptable for me since I have a large number of schemas
I could redefine the database factory (thus creating a new connection)
https://github.com/schotime/NPoco/wiki/Fluent-Mappings-including-Conventional
but this would force me to create a new connection.
Is there a lighter way ?
Thanks and regards

You could define a base POCO and derive per schema POCOs and place the table attribute on the derived class.
public class BasePOCO {}
[TableName("schema1.poco")]
public class Schema1POCO : BasePOCO {}
[TableName("schema2.poco")]
public class Schema2POCO : BasePOCO {}


Unable to use OpenTelemetry.propagation.fields

Description of the bug
I'm implementing context propagation for aws_sdk instrumentation (for sqs / sns services). For that, I need to check how many fields are defined for the propagators (the propagated fields should be saved in the message attributes, which limited up to 10 attributes).
I found the method OpenTelemetry.propagation.fields that looks like what I'm searching for. When I use it I get the following error:
The issue
💥 opentelemetry-api-1.0.0/lib/opentelemetry/context/propagation/composite_text_map_propagator.rb:100:in `fields': stack level too deep (SystemStackError)

Link to fields method
I couldn't find any existing usage for OpenTelemetry.propagation.fields
I'm new in Ruby language, so I might missing something trivial 🤷

Share details about your runtime
Operating system details: MacOS
RUBY_ENGINE: "ruby"
RUBY_VERSION: "3.0.2"
RUBY_DESCRIPTION: "ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin19]"
Share a simplified reproduction if possible
require 'bundler/inline'

gemfile(true) do
  source 'https://rubygems.org'

  gem 'opentelemetry-instrumentation-net_http'
  gem 'opentelemetry-api'
  gem 'opentelemetry-sdk'
end

require 'opentelemetry-instrumentation-net_http'
require 'opentelemetry-api'
require 'opentelemetry-sdk'

OpenTelemetry::SDK.configure do |c|
  c.use 'OpenTelemetry::Instrumentation::Net::HTTP'
end

puts OpenTelemetry.propagation.fields

This is fields method. If I understand it correctly, it looks like it is calling itself recursively.

        # Returns the union of the propagation fields returned by the composed injectors
        # or propagators. If your carrier is reused, you should delete the fields returned
        # by this method before calling +inject+.
        #
        # @return [Array<String>] a list of fields that will be used by this propagator.
        def fields
          injectors = @injectors || @propagators
          injectors.flat_map(&fields).uniq
        end

@YanivD This is indeed confusing.
I'll have to take a closer look next week to see why it seems to be in a recursive loop that causes the stack overflow.
The method that you shared looks like it is from the Composite propagator, which is delegating to the injectors/propagators that it wraps. It should not include itself in that list of propagators. If that we're the case then we would see this same exact error in production at GitHub since we use composite propagators to interop between OpenTracing and OpenTelemtry context propagation.
Other instrumentation uses the composite propagator inject/extract method. If I understand your constraint, it's that SQS message headers are limited to 10 fields.
Is that correct? What happens if it exceeds the 10 fields?
That may be a problem for interoperability between systems that use OTTrace that create a separate key/value pair for Baggage attributes. Those fields are also dynamically generated based on the contents of the Context field, so you likely will not see them as "fields" if someone is using that propagator. 🤔
Looks like I'll have to take a look at the other implementations to see how they handle them.

Is that correct? What happens if it exceeds the 10 fields?

Correct.
When setting more than 10 message attributes,sqs.send_message method raise the following error:
Number of message attributes [12] exceeds the allowed maximum [10]. (Aws::SQS::Errors::InvalidParameterValue)
The sns.publish method finish without any error but the message never reach SNS service.

Those fields are also dynamically generated based on the contents of the Context field, so you likely will not see them as "fields" if someone is using that propagator

As I can see in TextMapPropagator, fields are predefined and cannot be changed dynamically.
What am I missing? How can I reproduce environment with dynamic Baggage attributes?

@YanivD this is the OTTrace text map propagator:
https://github.com/open-telemetry/opentelemetry-ruby/blob/main/propagator/ottrace/test/opentelemetry/propagator/ottrace/text_map_propagator_test.rb
It adds the baggage fields dynamically and does not expose the keys using the fields method.
Given the constraint of the headers I wonder if the AWS SQS context propagation should be transmitted through the message body like we do with ActiveJob. That would impact any other auto instrumentation but I figured I'd mention it as an alternative.
I imagine there is probably a constraint here to make it work with XRay as well but I'm not at all familiar with it.
This feels too much like a weird edge case where folks who use OTTrace and baggage with SQS would have run into this issue already. I don't think we should worry too much about supporting it other than writing some docs saying "sorry not supported" 😬
I do think the use case im concerned about though is if end users aren't able to add their own headers because tracing headers are taking up slots.
Has this conversation not come up before in other Language SDKs?


FastNMS on Ultralytics YOLOv3

@dbolya we've had a request from @Zzh-tju to implement FastNMS in https://github.com/ultralytics/yolov3 per https://github.com/ultralytics/yolov3/issues/679. Can you point us to the location in your code where the function is? Can we use it for boxes rather than masks?
We currently use multi-class torchvision.ops.boxes.batched_nms() (middle row) as a compromise between speed and accuracy. We apply it once per image (all classes at once), and see an inference speed of 49ms/img (inference + NMS) at 608 image size, conf_thresh=0.001 on a Tesla T4, giving us about 42.0/62.0<EMAIL_ADDRESS>on COCO2014. We do not do masks though, only boxes.
BTW, we also developed the merge nms method below, which is slower simply because it is implemented in python rather than C, but it may be possible to combine fast and merge together to get the best of both worlds.

NMS method
Times/img
Timemm:ss
mAP@0.5:0.95
<EMAIL_ADDRESS>

'vision_batched', multi_cls=False
46ms
3:50
41.2
60.8

'vision_batched', multi_cls=True
49ms
4:03
41.9
61.8

'merge', multi_cls=True
120ms
9:58
42.3
62.0

Looking at batched_nms, it looks like what we call cross_class NMS, but I'm not sure what that would make multi_cls=True.
Anyway, here's our implementation of Fast NMS:
https://github.com/dbolya/yolact/blob/092554ad707c2749631dfe545c8a953b2b3f4a68/layers/functions/detection.py#L137-L180
It works on boxes, so you can just ignore the mask stuff. The relevant inputs are boxes ([N, 4]) and scores ([N, num_classes]). The inputs and outputs should both be on the GPU (or whatever your fastest device is, and make sure nothing ever touches the CPU in this function), and we pass in all detections with > 0.05 confidence, but I don't think passing everything in will hurt performance much since we take the top 200 anyway. Also, read the big comment about the second threshold.
Most of the code is setup and postprocessing, the core of the algorithm is actually just:
     iou = jaccard(boxes, boxes)
     iou.triu_(diagonal=1)
     iou_max, _ = iou.max(dim=1)

     # Now just filter out the ones higher than the threshold
     keep = (iou_max <= iou_threshold)

which is what's in the paper.

@dbolya great thanks! torchvision.ops.boxes.batched_nms() just means that the function accepts multiple classes at once. torchvision has a seperate torchvision.ops.boxes.nms() function that only accepts single-class boxes, which you'd need to drop into a for c in classes: type of python loop.
We use BCE for class loss, not CE, so its possible that multiple classes may be above threshold for a given box in our repo. multi_cls=True means that we output multiple detections (same box, different classes) in this case. multi_cls=False means we only pick the very top class above threshold.

@dbolya @Zzh-tju I've imported the YOLACT FastNMS functions into ultralytics/yolov3, and get the following results. The times are for inference+NMS on the 5k COCO2014 val images using a Google Colab instance with Tesla T4.
fast_batched below is the YOLACT FastNMS. I call it batched because I only call it once per image (it handles all classes at once). It is faster than torchvision.ops.boxes.batched_nms(), but with a mAP penalty of about 0.3-0.4 unfortunately. It may be much faster than torchvision, its unclear from these tests, as the below operations are likely dominated by inference time rather than NMS time. When I have time I will rerun on a large GCP VM with 16 cores and a V100 for the best comparison metrics.

NMS method
Times/img
Timemm:ss
mAP@0.5:0.95
<EMAIL_ADDRESS>

'vision_batched'
49ms
4:03
41.9
61.8

'merge'
120ms
9:58
42.3
62.0

'fast_batched'
44ms
3:41
41.5
61.5

Very interesting, and yeah I'm guessing the situations where fast nms would offer a huge speed increase depend on the detector and the rest of the code. Maybe the setup and post processing is a little too bloated too.
Also, now that you mention it, I'm fairly sure I could create a fast merge nms that would be slightly worse than what you list there but almost a fast as fast NMS. This will have to wait until after a certain very close deadline tho >.>

Update: I discovered a majority of time in ultralytics/yolov3/test.py was spent building pycocotools JSON files for official mAPs. If I turn off this functionality (compute mAP only with internal repo code) I get the following much improved times for the 5k COCO2014 val images. Machine is a 12-vCPU V100 instance.
python3 test.py --weights yolov3-spp-ultralytics.pt --cfg yolov3-spp --img 608

NMS method
Timems/img
Timemm:ss
mAP@0.5:0.95
<EMAIL_ADDRESS>

'vision_batched' (default)
15.2 ms
1:16
41.9
61.8

'merge'
103 ms
8:35
42.3
62.0

'fast_batched'
14.6 ms
1:13
41.5
61.5

I get a 4% drop in time for a 1% drop in mAP, which isn't bad, though I suspect img-size reductions may yield slightly more favorable ratios. In any case, both implementations are much faster than python for loop nms used in merge. Merge simply creates new boxes using a weighted combination of the scores rather than deleting lower score boxes outright. It seems to provide a +0.4mAP bump, which might take fast nms back to the same mAP produced by vision_batched, but then we'd be back were we started unfortunately.

To further clarify the timing, I added profiling code to test.py that specifically tracks inference and NMS times in https://github.com/ultralytics/yolov3/commit/e482392161c30d4e4dbf4b4eebdb4672fcc6a134. This can be accessed with the --profile flag:
python3 test.py --weights yolov3-spp-ultralytics.pt --img 608 --conf 0.001 --profile

I ran with both default torchvision NMS and the yolact FastNMS, and actually saw a slight speed decrease with FastNMS:
Default: Profile results: 1.3/6.9/8.2 ms inference/NMS/total per image
FastNMS: Profile results: 1.3/7.1/8.4 ms inference/NMS/total per image
So perhaps the slight speed increase from FastNMS observed in the total test time is due simply to a reduced box count produced by this NMS method, which results in less postprocessing work during testing (mAP calculation etc.).
The other surprise was the great amount of total time spent on NMS vs inference. Even under the default settings 6.9/8.2 = 84% of the total. time is spent on NMS!

CORRECTION: My previous analysis was incorrect, it lacked the torch.cuda.synchronize()
operations necessary when profiling cuda operations. I've fixed this in https://github.com/ultralytics/yolov3/commit/1430a1e4083609ab197cf1947a12ab8692b20593. Corrected results, consistent across several runs:
python3 test.py --weights yolov3-spp-ultralytics.pt --img 608 --conf 0.001 --profile

Default: Profile results: 6.6/1.6/8.2 ms inference/NMS/total per image
FastNMS: Profile results: 6.6/1.9/8.5 ms inference/NMS/total per image
Conclusion is that inference uses most (80%) of the runtime in both cases, and that FastNMS appears to run slightly slower than torchvision.ops.boxes.batched_nms().

thanks, so it is carried out on one class, isn't is? e.g., cc_fast_NMS, collapse all the classes into 1. How about multi-class?

And how many boxes do you choose? (top n)

@Zzh-tju I imported the FastNMS code here. It's very clever, but unfortunately it seems to be a dead end, as it's slower and produces worse mAP than the default method.
https://github.com/ultralytics/yolov3/blob/8b6c8a53182b2415fd61459fc9a0ccbdef8dc904/utils/utils.py#L558-L568
I use all boxes above --conf threshold, I don't discard any boxes or put any upper limit on the number of boxes.
The times and tests above are for the usual 5000 image COCO val set using yolov3-spp-ultralytics.pt for all 80 classes. Everything is the exact same in the tests between the default output and the FastNMS output. You can reproduce by simply running
python3 test.py --weights yolov3-spp-ultralytics.pt --img 608 --conf 0.001 --profile

@Zzh-tju perhaps I'm not understanding the purpose of the top n boxes. I assumed this was a memory saver or speed enhancer, so I neglected to implement it as I saw no out of memory errors when running on full size COCO images, so I assumed all was well.
Is it possible that since I did not implement the top n boxes I'm not recreating FastNMS correctly? The code I have is very simple, I think it captures the core intention, which is the upper traingular iou matrix:
        # Batched NMS
        if batched:
            c = pred[:, 5] * 0 if agnostic else pred[:, 5]  # class-agnostic NMS
            boxes, scores = pred[:, :4].clone(), pred[:, 4]
            if method == 'vision_batch':
                i = torchvision.ops.boxes.batched_nms(boxes, scores, c, iou_thres)
            elif method == 'fast_batch':  # FastNMS from https://github.com/dbolya/yolact
                boxes += c.view(-1, 1) * max_wh  # seperate boxes by class
                iou = box_iou(boxes, boxes).triu_(diagonal=1)  # upper triangular iou matrix
                i = iou.max(dim=0)[0] < iou_thres

yeah, I mean your batch_nms is cross-class NMS, right? And I'm confused by your mention above what is the difference between multi_cls=True or False?
Do you mean YOLO provide a box with multi-label? And if set to False, it will be only one class for a  box. But the NMS for the two modes are cross class.  Since 'False' can be faster than 'True', I'm wonder the setting differences between the two.
Another question is how about doing NMS for each class? (Fast NMS vs traditional NMS)

@Zzh-tju it's very simple.

All classes are processed correctly, no matter the class count.
multi_cls allows more than one label per box.
FastNMS appears slower, and produces worse mAP regardless of class count or multi_cls

@glenn-jocher yeah, now I just want to know the speed when doing NMS for each class. For traditional NMS, it must do for a c loop, right? So I guess Fast NMS will be faster since it does once for all classes simultaneously.

@Zzh-tju the speeds provided are for NMS for all 80 COCO classes for each image: 1.6 ms per image for all classes. The batched methods do all classes simultaneously.

https://github.com/pytorch/vision/blob/b6f28ec1a8c5fdb8d01cc61946e8f87dddcfa830/torchvision/ops/boxes.py#L39
def batched_nms(boxes, scores, idxs, iou_threshold):
    # type: (Tensor, Tensor, Tensor, float)
    """
    Performs non-maximum suppression in a batched fashion.
    Each index value correspond to a category, and NMS
    will not be applied between elements of different categories.
    Parameters
    ----------
    boxes : Tensor[N, 4]
        boxes where NMS will be performed. They
        are expected to be in (x1, y1, x2, y2) format
    scores : Tensor[N]
        scores for each one of the boxes
    idxs : Tensor[N]
        indices of the categories for each one of the boxes.
    iou_threshold : float
        discards all overlapping boxes
        with IoU > iou_threshold
    Returns
    -------
    keep : Tensor
        int64 tensor with the indices of
        the elements that have been kept by NMS, sorted
        in decreasing order of scores
    """

I saw a new matrix nms.
https://arxiv.org/abs/2003.10152
https://github.com/aim-uofa/AdelaiDet/

@Gaondong yes I already tried to implement it, and was unable to reproduce their results.

@Gaondong yes I already tried to implement it, and was unable to reproduce their results.

Thanks.

@Gaondong see https://github.com/ultralytics/yolov3/issues/679#issuecomment-604164825
I used this code for Matrix (Soft) NMS:
            elif method == 'matrix':  # Matrix NMS from https://arxiv.org/abs/2003.10152
                iou = box_iou(boxes, boxes).triu_(diagonal=1)  # upper triangular iou matrix
                m = iou.max(0)[0].view(-1, 1)  # max values
                decay = torch.exp(-(iou ** 2 - m ** 2) / 0.5).min(0)[0]  # gauss with sigma=0.5
                scores *= decay
                i = torch.full((boxes.shape[0],), fill_value=1).bool()


Milestone2

This is the second milestone for the react calculator app is:

implement four components: App(the main one), Display, ButtonPanel and Button;
App will contain all the other components;
Display will render the result of the calculations(not yet implemented);
Button panel will contain all the buttons
Buttons are specific for every numbers and operator

Thanks @Torres-ssf

Thanks @Torres-ssf


Close KazooClient when stopping servers

When trying to reconnect, the client can block the servers from shutting down.

@jeanleonov I share your negative feelings towards those variables. Do you know of a way we could avoid using them?

https://ocd.appscale.com:8080/job/Daily Build/3962/


Remove moved docs

PR removes all the moved docs and updates main Readme file with the links to the new docs location - new readme.
We already moved all the docs to a documentation site - docs.codex.storage

File
New location
PR

docs/DownloadFlow.md
learn/download-flow
https://github.com/codex-storage/codex-docs/pull/29

Marketplace.md
learn/local-marketplace
https://github.com/codex-storage/codex-docs/pull/24

TwoClientTest.md
learn/local-two-client-test
https://github.com/codex-storage/codex-docs/pull/28

It was basically a copy/paste and in some cases with small adjustments. Please check mentioned PR's for more details.

It is nice to have all the docs next to the code, but on the other there should be one source of true. What I am a bit concerned about is that the docs in the new documentation portal may change to be more "end-user-oriented" while the version that could be kept next to the code in the nim-codex repo could be more technical.
So I am ok with approving it, but I would like to see what people working longer than me with this repo are saying...

I definitely agree with moving the docs folder, but I'm not sure if I like the removing of info's from the Readme. IMHO I would leave those info's there...

IMHO I would leave those info's there...

which one exactly?

Current readme
New readme
Current/new diff
Docs

### Environment variables
### Configuration file
### CLI Options
#### Logging

CLI Options are outdated and does not reflect all the switches support. Good thing here is that they are not updated so often. People usually do not care about it - #687. Especially if you would like to update some lines in the main readme and it leads to the 2 approvals and ~ 2:30 hours CI.
Now I use codex --help as a reference.
docs.codex.storage --> Codex • Docs --> Run - also not so long path.
Let me know and I can return just some chapters or everything updated.


docs(material/table): Correct checkbox label on select all checkbox

The example label for the select all/deselect all checkbox is reversed.  The select all state is labeled "deselect all" and vice versa.  This will correct those labels.

@dbosh88 There are some CircleCI failures for this PR

Just flakes for the integration tests, but youll want to fix the commit message to match the commit rules


[CP] [Stable] Cherry pick request for 0a20707e3f1084b85bcdcfb4035bdd150b90756f

Commit(s) to merge
0a20707e3f1084b85bcdcfb4035bdd150b90756f
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/336603
Issue Description
Fix JSON array parsing bug that causes seg fault when --coverage is used.
What is the fix
The fix changes the definition of end to point 1 past the end of the element, rather than the end of the element, which avoids the need for buggy look-ahead style lookups
Why cherry-pick
Flutter customers have hit this issue when using test coverage, the sympton of this bug is a hang in flutter test making it hard for the developers to figure out what went wrong.
Risk
low
Issue link(s)
https://github.com/flutter/flutter/issues/124145https://github.com/dart-lang/sdk/issues/53990
Extra Info
No response

//cc @liamappelbe @dnfield

LGTM

@a-siva this is the same as the previous cherry-pick.  Should one be to beta, or is this a dupe?

Sorry this is indeed a duplicate of the other one, will close it.


QR_Code_Generator Styling

Title and Issue number
Frontend Project "QR_Code_Generator" Improved Styling
Close #3706
Output
Before

After

Checklist:

[x] I have mentioned the issue number in my Pull Request.
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have created a helpful and easy to understand README.md

Hi @MohitGupta121
Kindly review this pull request.


Fix duplicate logs & backlogs on container restart

Connects to #187

Nothing needs to be done on "restart" event, because a "start" event always(?) follows it. A pumpLogs was being called on both restart and start, which caused duplicate entries after a restart.
Add support for a BACKLOGS environment variable:

Unless specified BACKLOGS=false, it will default to true for all other values, consistent with current behaviour;
BACKLOGS=false is equal to docker logs --tail=0

+1 for getting this merged. We start containers using cron every couple of minutes, so we get all the log history sent again on every single start.

Any news on this? It's really an issue for us, as we start containers every couple of minutes, and monitor the logs via Papertrail alerts. Once a string that would trigger an alert gets logged from the container, it will be logged again and again on each container start, resulting in the alert being triggered again and again... Any idea how we can prevent that? Thx!

@josegonzalez are we still looking at #209? Shall I rebase this PR, or abandon it?

@josegonzalez (cc @olivergrahl) this is rebased, tested in my Staging and Prod and looking good. Takes care of the backlog dump with BACKLOG=false. double pump was already fixed elsewhere.

merged in #280


Bug: regex not working

Describe the bug
BC-regex-note does not work on any regex combination, even those tested in online checkers and guaranteed to produce results. Control+S to refresh the index does not work (while setting to refresh on save is on), nor manually refreshing it by clicking the button.
Desktop (please complete the following information):

OS: win7

Additional context
Add any other context about the problem here.
plugin:breadcrumbs:18837 TypeError: Cannot read properties of null (reading 'test')
    at eval (plugin:breadcrumbs:16683:51)
    at Array.forEach (<anonymous>)
    at eval (plugin:breadcrumbs:16679:13)
    at Array.forEach (<anonymous>)
    at addRegexNotesToGraph (plugin:breadcrumbs:16670:16)
    at buildMainG (plugin:breadcrumbs:18818:5)
    at refreshIndex (plugin:breadcrumbs:18873:24)
    at HTMLButtonElement.click_handler (plugin:breadcrumbs:18967:43)

Throws typeError at line 18837 in plugin:breadcrumbs
files.forEach((file) => addNodesIfNot(mainG, [file.basename]));
    db.end2G("graphs inited", { mainG });
    return mainG;
  } catch (err) {
    (0, import_loglevel13.error)(err); // <---- here
    plugin.db.end2G();
    return mainG;

works on clean test vault

I've recently reimplemented regex-notes in V4. See here for more info about the changes: https://github.com/SkepticMystic/breadcrumbs/blob/master/V4.md. If you decide to upgrade to the beta, please give regex-notes a try and let me know if this is resolved.
See the README for info about regex-notes in V4: https://github.com/SkepticMystic/breadcrumbs/tree/master#regex-notes

Gonna consider this working in v4, after more testing


Provide option to remove or customize pr*- prefix

This would be nice to have.
I am naming my artifact something very specific and would like to remove this extra prefix added by the action.
Is this possible right now?

Hi, thanks for suggestion!
It was not possible. I've just tagged a new major release (v2) that implements it.
artifacts-dir option is now deprecated, and there is now new option artifacts-prefix. By default, that option is set to prNNN- (where NNN is PR number). You can set it to different string, including empty string.
Implemented in this commit: 1f58dc37e72cc351ec62c32186120c7baeeee955
See also #62.
Feel free to reopen issue if I'm missing something.


Added recommendation about internal URLs

https://github.com/MicrosoftDocs/microsoft-365-docs/issues/1794

Dear @JohanFreelancer9,
kindly do the copy editor review for this PR.
Dear @mypil, for your information
Thank you


Platform ecs codedeploy resources

This is looking good. It's unfortunate we have to do all this though custom resources but how you have it makes sense to me. I do want to bounce an idea off of you with this. You don't need to do it in the scope of this task. What do you think about updating this construct to generate the appspec.yml with the correct image and tags and uploading it to s3 to be reused? I'm curious how you envision that file to be updated.

I think that is something we want to do if possible.  I actually ran through some ways to do this in my head before and I kept thinking of an asset in a local directory that we zip up and deploy to the created s3 bucket using the BucketDeployment aws construct.  I think it's worth more discussion though and like you said in the scope of another task.


Modification of Antora UI templates

The antora UI is needing modified to better display the documentation. Below are some mockups. Details to follow.
With Contents Navigation

Without Contents Navigation

Specific details:

Insert current website-V2 header to float at top. Keep in mind that it may become fixed to the page in the future. Suggest locking it in place with a specific class that can be removed in the future so it would scroll with the page. Page background will match the header

whole page should scroll down.

Left side nav - smaller font size and default tree to open.

Contents - Separate from the page to its own area. if a page does not have contents, expand the main page area to fill the space.

Main section - the breadcrumb and traditional navigation will be at the top. we won't be using the edit icon next to the breadcrumb. At the bottom of the main section there will also be the traditional navigation and a subtle "edit this page" link

@joaquintides Can this be closed?

completed


[Code Change Request] Table - 5941 "Service Item component" - onModify trigger

Please change the code from ServItemComponent.Insert(); to ServItemComponent.Insert(True);

Thanks!
srinivas

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


refactor(stylus): use nesting wherever possible, simplify selectors

🔧 What does this fix? 🔧
Various fixes
🗒 Checklist 🗒

[x] I have read and followed Catppuccin's contributing guidelines.
[x] I have updated the version appropriately in the ==UserStyle== header of the catppuccin.user.css file.

could be worth leaving a comment on the codemirror stuff that if they ever update codemirror we can import that

Wdym?

could be worth leaving a comment on the codemirror stuff that if they ever update codemirror we can import that

Wdym?

we could import the codemirror port but that uses codemirror 5 i believe stylus uses codemirror 4.

could be worth leaving a comment on the codemirror stuff that if they ever update codemirror we can import that

Wdym?

we could import the codemirror port but that uses codemirror 5 i believe stylus uses codemirror 4.

What file do we import from there?

could be worth leaving a comment on the codemirror stuff that if they ever update codemirror we can import that

Wdym?

we could import the codemirror port but that uses codemirror 5 i believe stylus uses codemirror 4.

What file do we import from there? The compiled themes won't work here.

really? I thought this would work https://github.com/catppuccin/codemirror/blob/main/themes/mocha.css

could be worth leaving a comment on the codemirror stuff that if they ever update codemirror we can import that

Wdym?

we could import the codemirror port but that uses codemirror 5 i believe stylus uses codemirror 4.

What file do we import from there? The compiled themes won't work here.

really? I thought this would work<EMAIL_ADDRESS>
That has cm-s-ctp-mocha as the main selector, not cm-s-default. I do technically maintain Codemirror so I can try making a version selecting the default theme?


SQLAlchemy compatability

Was receiving pool_size errors when trying to import db using the python instructions (Linux).
Encountered the following error:
>>> import db Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "db.py", line 156, in <module>     Session = sessionmaker(bind=get_engine())   File "db.py", line 27, in get_engine     return create_engine(DB_ENGINE,pool_size=61)   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/__init__.py", line 386, in create_engine     return strategy.create(*args, **kwargs)   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 144, in create     engineclass.__name__)) TypeError: Invalid argument(s) 'pool_size' sent to create_engine(), using configuration SQLiteDialect_pysqlite/NullPool/Engine.  Please check that the keyword arguments are appropriate for this combination of components.
Fix: I found the following article that explains the problem --
http://stackoverflow.com/questions/15973481/sqlalchemy-pool-size-and-sqlite
Basically the issue happens to be with SQLAlchemy compatibility per version upgrades and after much digging I found out I had to change a line in db.py - Line 27
From:
return create_engine(DB_ENGINE,pool_size=config.GRID[0]*config.GRID[1]+5)
To:
return create_engine(DB_ENGINE)
Hope this helps somebody. This was an initial run. If people have old databases and are upgrading read the stackoverflow article carefully - I'm not a DB admin so wouldn't be able to provide feedback on that.

Your a champion AyalaJuan, thank you! This resolved the issue for me.

I just added that pool size yesterday to fix various other users problems.
And since the issue explains it the way to fix this for more users seems to:
return create_engine(DB_ENGINE,pool_size=config.GRID[0]*config.GRID[1]+5, poolclass=SingletonThreadPool)

Definitely more elegant than my way.
I admit I did not test it fully - it worked the other way and I ran with it =)
Thanks!


[WEEX-150] Implement AppShell for iOS.

This is the first patch for implementing AppShell for iOS.
Basically, this patch created a minimized appshell to demonstrate
the usage of Weex, the MainViewController contains a WeexSDKInstance
which loads a precompiled javascript page in bundlejs. It also
contains a WXImgLoaderProtocol implementation to facilitate the image
loading.

@cxfeng1 @acton393 PTAL, thanks

@jondong  It looks good. But I am concerning about how the Weex developers can add their own customization using appShell, maybe documentation is needed here.

@acton393 thanks for the feedback, that's right we need documentation, my plan is to implement appshell for both iOS and Android firstly, then announce them in mail list as well as adding documents for them, then remove the playground from Weex SDK at last. I'm wondering if this is the right chance to provide documentation with this PR because the feature is not quite ready yet. Anyway I can add the plan into the umbrella bug WEEX-149 to track the process. Is it sound good to you?

@acton393 PTAL again, thanks.


Fixes privacy modal not opening for tables

This PR fixes an error that prevented opening the privacy modal for the datasets.

Frontend tests were OK :+1: (details)

:+1:


Rerender child components when the parent changes this.props.isOpen

Instead of checking for this.isOpen !== props.isOpen, we need to check for this.props.isOpen !== props.isOpen, so that the parent component can close the menu by changing the isOpen prop.
(this.isOpen and this.props.isOpen can get out of sync.)

Hi @ndbroadbent. this.props.isOpen & this.isOpen can be out of sync, indeed. This happens because we need to mutate isOpen property every time when we toggle side menu. As you may know, it's a bad practice to mutate props, so we keep a local, props-driven value in the instance property.
Furthermore, we have componentWillReceiveProps that keeps an eye on this.props.isOpen, so I don't see a reason why we need to change this. Can you elaborate?

Closed due to lack of feedback. Feel free to re-open this PR answering the question above.

It would make more sense to have a single source of truth. We either keep the open state entirely in the side menu or we keep it entirely in the parent component, it's not generally recommended to copy props like it is.
It also requires you to call forceUpdate as it's set as a property of the side menu and not inside state, is there a reason why it isn't stored in the component state?


No separation between Formula, Value and Presentation Layer

Maybe I missed something, but I think the separation between the different layers of a spreadsheet is somewhat weak and should be improved:
In my understanding there are 3 Layers of a spreadsheet:

Formula Layer (obj.options.data?)

Contains the data that is entered by the User. So formulas and raw data.

Value Layer (obj.records[y][x].innerHTML??)

Contains the result of the formulas as numbers alongside the non-formula raw data

Presentation Layer (also obj.records[y][x].innerHTML!)

Applying Formatting to the Value Layer e.g. Number Formatting, Units, Colors...

In jexcel i couldn't find a separation between the Value and the Presentation Layer, though.
The getValue Function returns either (processedValue=false) obj.options.data[y][x], which is the Formula Layer or  (processedValue=true) obj.records[y][x].innerHTML, which is a mix of Value and Presentation Layer. I couldn't find another data structure that contains the formula results besides innerHTML. (Maybe I missed it?)
There is no real access to the value layer, which makes it a lot harder than it should be to do calculations with other Formula results, that are also styled.
If i have a formula that depends on a formula cell for which i applied special styling in innerHTML I first have to undo that styling/parse innerHTML in order to get the result of the formula in that cell back. This makes most of the formula functions not reusable, because they depend on the visual format of the cells that are used for their calculation.
I tried to show that in this jsfiddle.

Hello!
One way that we have gotten around this is by styling with css classes and
a separate css file. Then you don't have to use inline CSS.
That said, I think storing the results of formula execution in a JS Object
instead of just the DOM could help us to export those values to other web
components that depend on the JExcel data. So it would be a helpful feature
for us also!
Thanks,
Alex
On Mon, Feb 1, 2021, 9:40 AM MaPePeR<EMAIL_ADDRESS>wrote:

Maybe I missed something, but I think the separation between the different
layers of a spreadsheet is somewhat weak and should be improved:
In my understanding there are 3 Layers of a spreadsheet:

Formula Layer (obj.options.data?)

Contains the data that is entered by the User. So formulas and
raw data.

Value Layer (obj.records[y][x].innerHTML??)

Contains the result of the formulas as numbers alongside the
non-formula raw data

Presentation Layer (also obj.records[y][x].innerHTML!)

Applying Formatting to the Value Layer e.g. Number Formatting,
Units, Colors...

In jexcel i couldn't find a separation between the Value and the
Presentation Layer, though.
The getValue
https://github.com/jspreadsheet/jexcel/blob/1eed06da44293b6b24be0a99399a44415c40ea4e/src/js/jexcel.core.js#L2141-L2149
Function returns either (processedValue=false) obj.options.data[y][x],
which is the Formula Layer or (processedValue=true)
obj.records[y][x].innerHTML, which is a mix of Value and Presentation
Layer. I couldn't find another data structure that contains the formula
results besides innerHTML. (Maybe I missed it?)
There is no real access to the value layer, which makes it a lot harder
than it should be to do calculations with other Formula results, that are
also styled.
If i have a formula that depends on a formula cell for which i applied
special styling in innerHTML I first have to undo that styling/parse
innerHTML in order to get the result of the formula in that cell back.
This makes most of the formula functions not reusable, because they depend
on the visual format of the cells that are used for their calculation.
I tried to show that in this jsfiddle https://jsfiddle.net/rksfex5p/4/.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jspreadsheet/jexcel/issues/1306, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMOORAO3W23SEJYIEEBYD43S43KP3ANCNFSM4W5DFOIA
.

The new engine which is available from v7+ PRO distribution consider obj.records[y][x] as an object:
obj.records[y][x] = {
element: DOM,
x: x,
y: y,
v: value,
style: string
}
The benefits of this approach are:
a) smarter DOM management, where DOM only will be created when needed (lazyLoading, pagination). So, performance is much better.
b) The style is saved for when the DOM is created. And the processed value is available.
c) Keep the processed value available;
A second way to get the processed values, when cache: true, is via the following properties.
obj.A1
obj.A2
obj.C4
etc
We have plans to bring the new engine wider available in different distributions. We should announce some new things in the next few weeks. If you wish to add your email to our newsletter or send us an email I am happy to drop you a message.
<EMAIL_ADDRESS>Meanwhile, please feel free to test the PRO distribution free of any charge, commitment.
% npm install jexcel-pro
You can use this license code.
YjQzMzdlOTRiOGY3ZTQ0ZDQ4ZTI1YWU3MDFjMDI0ZWJmOTNjODA1NWFiZTRiNDJhNmRiYTJlZjkwODQ3N2IwMWRmNWRjYWUwZDViM2VhMmI3NzVjOTcwMzVlN2ZhODI1Y2EyMmE3NDI0ZmE0ZjVmNGQ2MWEzN2M3MTA4MThhMDUsZXlKdVlXMWxJam9pY0dGMWJDNW9iMlJsYkNJc0ltUmhkR1VpT2pFMk16SXdPVEkwTURBc0ltUnZiV0ZwYmlJNld5SnFjMlpwWkdSc1pTNXVaWFFpTENKcVpYaGpaV3d1Ym1WMElpd2lZMjlrWlhOaGJtUmliM2d1YVc4aUxDSnFjMmhsYkd3dWJtVjBJaXdpTVROemQyMHVZM05pTG1Gd2NDSXNJbXh2WTJGc2FHOXpkQ0pkTENKd2JHRnVJam9pTXlKOQ


Notepad_clone #29

Description
A short summary of what is included in your Pull Request.
Fixes #29
Replace issue_no in the above line, with the issue related to this PR.
Type of change
Choosing one or more options from the following as per the nature of your Pull request.

NOTE: These boxes can be checked using [X]

[ ] Bug fix (non-breaking change which fixes an issue)

[ ] New feature (non-breaking change which adds functionality)

[ ] Documentation Update

Checklist:
Please tick all the boxes that are fulfilled by your Pull Request.

[ ] I have named my files and folder, according to this project's guidelines.
[ ] My code follows the style guidelines of this project.
[ ] My Pull Request has a descriptive title. (not a vague title like Update index.md)
[ ] I have commented on my code, particularly in hard-to-understand areas.
[ ] I have created a helpful and easy to understand README.md, according to the given README_TEMPLATE.
[ ] I have included a requirements.txt file (if external libraries are required.)
[ ] My changes do not produce any warnings.
[ ] I have added a working sample/screenshot of the script.

Add a readme file and requirements.txt file please as per the repo guidelines.

@all-contributors please add @yuvraajnarula for code


Version 4.3.0 pt 2

Add Order support
Highlight.js updated to 11.6.0

Codecov Report

Merging #47 (6b6fb7a) into main (bb5dd81) will increase coverage by 0.02%.
The diff coverage is 96.87%.

@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
+ Coverage   93.66%   93.68%   +0.02%
==========================================
  Files          20       20
  Lines        3015     3042      +27
==========================================
+ Hits         2824     2850      +26
- Misses        191      192       +1

Flag
Coverage Δ

Apex
93.68% <96.87%> (+0.02%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...absActionPlans/main/default/classes/CanTheUser.cls
98.76% <ø> (ø)

...n/default/classes/ActionPlanCreationController.cls
92.51% <83.33%> (-0.09%)
:arrow_down:

...main/default/classes/ActionPlanCreateInvocable.cls
94.55% <100.00%> (-0.04%)
:arrow_down:

...ain/default/classes/ActionPlanDetailController.cls
92.59% <100.00%> (+0.21%)
:arrow_up:

...ult/classes/ActionPlansSectionHeaderController.cls
98.27% <100.00%> (ø)

.../main/default/classes/ActionPlansTestUtilities.cls
94.68% <100.00%> (+0.41%)
:arrow_up:

...lans/main/default/classes/ActionPlansUtilities.cls
94.32% <100.00%> (+0.07%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb5dd81...6b6fb7a. Read the comment docs.


Running as root

I have a request on how to run as root. I have Kali Linux 2019.1 on an HP 15 Beats Audio. (No Windows). I love this on my regular user, but I want to use this specifically for root user. Without messing up some scripts, is there a section I can just comment out the section that searches for root user? Like the tor as root?

Nevermind. I found it.
Commented out in cli.py
`#!/usr/bin/env python3
CLI directly called by running the howdy command
Import required modules
import sys
import os
import getpass
import argparse
import builtins
Try to get the original username (not "root") from shell
try:
user = os.getlogin()
except Exception:
user = os.environ.get("SUDO_USER")
If that fails, try to get the direct user
if user == "root" or user is None:
env_user = getpass.getuser().strip()
# If even that fails, error out
if env_user == "":
	print("Could not determine user, please use the --user flag")
	sys.exit(1)
else:
	user = env_user

Basic command setup
parser = argparse.ArgumentParser(description="Command line interface for Howdy face authentication.",
formatter_class=argparse.RawDescriptionHelpFormatter,
add_help=False,
prog="howdy",
epilog="For support please visit\nhttps://github.com/boltgolt/howdy")
Add an argument for the command
parser.add_argument("command",
help="The command option to execute, can be one of the following: add, clear, config, disable, list, remove or test.",
metavar="command",
choices=["add", "clear", "config", "disable", "list", "remove", "test"])
Add an argument for the extra arguments of diable and remove
parser.add_argument("argument",
help="Either 0 (enable) or 1 (disable) for the disable command, or the model ID for the remove command.",
nargs="?")
Add the user flag
parser.add_argument("-U", "--user",
default=user,
help="Set the user account to use.")
Add the -y flag
parser.add_argument("-y",
help="Skip all questions.",
action="store_true")
Overwrite the default help message so we can use a uppercase S
parser.add_argument("-h", "--help",
action="help",
default=argparse.SUPPRESS,
help="Show this help message and exit.")
If we only have 1 argument we print the help text
if len(sys.argv) < 2:
print("current active user: " + user + "\n")
parser.print_help()
sys.exit(0)
Parse all arguments above
args = parser.parse_args()
Save the args and user as builtins which can be accessed by the imports
builtins.howdy_args = args
builtins.howdy_user = args.user
Check if we have rootish rights
This is this far down the file so running the command for help is always possible
if os.getenv("SUDO_USER") is None:
print("Please run this command as root:\n")
print("\tsudo howdy " + " ".join(sys.argv[1:]))
sys.exit(1)
Beond this point the user can't change anymore, if we still have root as user we need to abort
#if args.user == "root":
print("Can't run howdy commands as root, please run this command with the --user flag")
sys.exit(1)
Execute the right command
if args.command == "add":
import cli.add
elif args.command == "clear":
import cli.clear
elif args.command == "config":
import cli.config
elif args.command == "disable":
import cli.disable
elif args.command == "list":
import cli.list
elif args.command == "remove":
import cli.remove
elif args.command == "test":
import cli.test
`

So, basically by commenting out the section
# Beond this point the user can't change anymore, if we still have root as user we need to abort
#if args.user == "root":
#	print("Can't run howdy commands as root, please run this command with the --user flag")
#	sys.exit(1)

in the cli.py file within the /lib/security/howdy/
we can then run as root.
Thanks anyway. I answered my own question.

I was writing the exact same thing, thanks for taking the time to figure it out yourself!


[fix][cms] #4251 event: event-ics-file html structure

Coverage increased (+0.06%) to 85.009% when pulling 15d0f0428ca8632c70135bf04745265e34f83fe1 on fix-download_ics_file into 3b6e350185c5be859066ee922eae22479ac27bbc on master.


Added Czech QWERTY layout for Pulse 15.

Data source: http://kbdlayout.info/kbdcz1
Note that traditionally CZ layout uses lowercase letters for diacritics and uppercase letters for regulars.
For comparison, here's the CZ layout (with an SK mix-in, the occasional 5th symbol on some keys) on a ThinkPad T490: http://xoft.cz/lenovo_cz_qwertz.jpg

Thanks for your contribution! :+1:


[improve][client] Avoid SingleThreadExecutor submit tasks recursively

Motivation
In the client, we use a lot of SingleThreadExecutor such as internalPinnedExecutor, In order to avoid SingleThreadExecutor submit tasks recursively leading to deadlock and unnecessary submission, I use ReentrantSingleThreadEventExecutor to improve it.
internalPinnedExecutor.execute(() -> {
// ....
internalPinnedExecutor.submit(() -> {
}).get();
// ....
});

Modifications
Use ReentrantSingleThreadEventExecutor instead of the normal SingleThreadExecutor.
Verifying this change

[ ] Make sure that the change passes the CI checks.

(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end deployment with large payloads (10MB)
Extended integration test for recovery after broker failure

Documentation

[ ] doc
[ ] doc-required
[x] doc-not-needed
[ ] doc-complete

Matching PR in forked repository
PR in forked repository: https://github.com/coderzc/pulsar/pull/31

The code above works well with the following outputs:

You can try the following code, and will not be able to work well:
final var executor = Executors.newSingleThreadExecutor();
executor.execute(() -> {
   final var latch = new CountDownLatch(1);
    executor.execute(() -> {
        System.out.println(Thread.currentThread().getName() + " 1");
        latch.countDown();
    });
    latch.await();
    System.out.println(Thread.currentThread().getName() + " 0");
});
executor.shutdown();

Generally, we should avoid any blocking operations in Pulsar's core code. This executor encourage users to write synchronous code if they have imported the Pulsar dependency. If an external system adopted this new executor and executed a blocking operation. Then once we removed this executor in future, the dead lock could occur in that external system.

Generally, we should avoid any blocking operations in Pulsar's core code. This executor encourage users to write synchronous code if they have imported the Pulsar dependency. If an external system adopted this new executor and executed a blocking operation. Then once we removed this executor in future, the dead lock could occur in that external system.

Agree, to avoid the users confusion, I decided to close the PR.


Question 39 solution isn't quite right

The given solution to the question:

Create a vector of size 10 with values ranging from 0 to 1, both excluded (★★☆)

Is the following code:
Z = np.linspace(0,1,11,endpoint=False)[1:]

However, this is slightly wrong. We are asked to produce a range of values, from 0-1, and exclude 0 and 1 themselves. The provided code, however, generates a list of values ranging from 0, to 0.90909091.
The value of Z, before we slice with [1:], is:
[0.         0.09090909 0.18181818 0.27272727 0.36363636 0.45454545
 0.54545455 0.63636364 0.72727273 0.81818182 0.90909091]

Instead, the code should be:
Z = np.linspace(0,1,11,endpoint=True)[1:-1]

Which produces Z with these values prior to slicing with [1:-1]:
[0.  0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. ]
This is a bit of a nitpick, and I may be missing something, I just thought I saw a small way to contribute to this project and went for it.

Let me know if I should create a PR.

I've been silly. The question asks for size 10, and the code I provided produces an array of size 11.
The actual correct code:
Z = np.linspace(0,1,10,endpoint=True)[1:-1]

https://github.com/rougier/numpy-100/pull/210

Thanks for your analysis. I think the current answer is correct given the question.


Swap failed, unable to redeem my BTC.

Swap failed at step 3 or 4, not really sure. Now i'm unable to redeem my BTC. Are my coins lost?
Im on MacOS. Tried the solution i read in other threads but wasn't able to make it work on MacOS (https://github.com/UnstoppableSwap/unstoppableswap-gui/issues/147#issuecomment-1647742247)
Steps to Reproduce
debug log.docx
Your Environment

Node version : UnstoppableSwap 0.5.3
Operating System and version :  Macbook Pro M1, MacOS Ventura

Please see this comment https://github.com/UnstoppableSwap/unstoppableswap-gui/issues/190#issuecomment-2018132638
Has your swap gone through?

Nope, unfortunately not. Keeps failing and says "cancel time lock has expired". Also failing when trying the option "attempt manual cancel and refund". Is there any solution to refund my btc?

Please upgrade to the latest pre-release version of the GUI and resuming the swap.
https://github.com/UnstoppableSwap/unstoppableswap-gui/releases/tag/v0.6.0

Which state is your swap in? Would you mind sharing the logs of your swap? Feel free tor redact what you like.

Nope, unfortunately not. Keeps failing and says "cancel time lock has expired". Also failing when trying the option "attempt manual cancel and refund". Is there any solution to refund my btc?

They will never reply you on here and they can’t do anything I almost lost about 10 ethereum few days ago thanks to blackhathacker who helped me recover my coins from the scammers  message him on telegram https://t.me/Blackhathacker110


Validate every step of course selection journey

Context
A candidate goes through steps to build up a course selection.
First they pick a course, then full time / part time, then one of many sites to study at.
If the candidate has already an open application for the course, they should be prevented from continuing along the course selection journey.
The candidate cannot naturally access the later steps if they have an open application, but if they have bookmarked the path of the later steps, they can access the step, try to submit the form and they trigger an exception.
This happens on the study site selection step and the study mode selection step.
It can also occur when the candidate chooses a course on Find and arrives to the FindCourseSelection step.
This PR redirects the candidate to the details page on the study mode and site steps.
Changes proposed in this pull request
Add reapplyable scope to ApplicationChoice.
Add DuplicateCourseRedirect concern that will check if the candidate can access the current step in the CourseSelectionWizard and redirect them to the DuplicateCourseSelection step.
Guidance to review
The back links!
Link to Trello card
Trello Ticket

 CA: Validate every step of course selection journey


How to build tesseract and leptonica DLLs

Hello!
I was trying to build the latest version of tesseract and leptonica DLLs to use with charlesw/tesseract but I can't find any guide online. Your steps use cppan, is this still working? because I'm not sure where to get cppan.
Can you help?
Thanks!

check this out
https://github.com/charlesw/tesseract-vs

so, that is the visual studio project build of the original tesseract library right?
btw, I got the solution : https://stackoverflow.com/questions/70956747/build-tesseract-as-dll-dynamic-link-library


Include IcoMoon selection.json for custom fonts

The package includes a number of custom fonts that were presumably created strictly for a pull request:

docker.woff
iconsxd.woff
tex.woff

There doesn't appear to be any one font for incorporating custom SVGs for icons that aren't present in the existing icon fonts. Consequently, people submitting pull requests probably feel obliged to create an entirely new font just for one glyph.
IcoMoon makes life easy by allowing its projects to be exported in flattened JSON files (selection.json, included in every generated download). One of these could be included in the repo, facilitating the addition of new SVGs (which would make submitting pull requests easier...)
That being said, it'd be nice to have the existing fonts collated into a single font file for easier management.

Right, done my bit.


add handling for voters2 table to get_account

Update to v1/chain/get_account
Voters table will be migrated to voters2 in future contract release. This update ensures calls to get_account in chain_plugin searches either the voters or voters2 table for reliable data until all nodes have had a chance to update.

Part of https://github.com/fioprotocol/fio.contracts/pull/33


[1.18.2 Fabric] - Incorrect gobber shield recipe

The basic shield tier for gobber is missing the required ingot for it's recipe:

I understand this may be outdatted version for this mod, but i hope it might be fixed, currently just OP shields from only 6 planks.

There are a number of fixes in the newer versions that I will be backporting soon. So hopefully this issue will be resolved


Dark-light-toggler

Dark-light mode toggler using react.js

I would like to make the dark-light toggler using React context. Please assign this issue to me under GSSOC 2024.

As I have done it earlier in my websites,can you please assign this issue to me ?? I will try to solve it as soon as possible.
I really want to contribute to it from GSSOC24

Ok working on this

Hi @Krish3914 @anuni03 Any work progress on this issue ??

Yes, I am working on it.
On Fri, 17 May, 2024, 1:30 am Ashutosh Kumar, @.***>
wrote:

Hi @Krish3914 https://github.com/Krish3914 @anuni03
https://github.com/anuni03 Any work progress on this issue ??
—
Reply to this email directly, view it on GitHub
https://github.com/ashutoshgithubs/iemhacks_DEV-G/issues/1#issuecomment-2116078656,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AZDV7X7RAWTRLEDJBQ5AQXLZCUF4NAVCNFSM6AAAAABHJS5F66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJWGA3TQNRVGY
.
You are receiving this because you were mentioned.Message ID:
@.***>


Using another LLM instead of Claude

I would like to use another LLM in this amazing application instead of Anthropic Claude.
I was thinking about Mixtral-8x7b-Groq as a LLM which has an insanely fast inference (because it runs in the cloud on specialized hardware, namely LPUs, Language Processing Units). Furthermore its intelligence is quite good I think.
So how would I have to change the code so that it uses Mixtral-8x7b-Groq as a LLM?

I think it would have some bits and bobs to update in a number of places that would become clear only once you started running tests and getting errors, but the main portion handling the llm calls is the def generate_and_process_text specifically:
with client.messages.stream(
        max_tokens=1024,
        messages=validated_history,
        system=system_message,
        model="claude-3-opus-20240229",
    ) as stream:
        for text in stream.text_stream:
            print(Fore.CYAN + text + Style.RESET_ALL, end="", flush=True)
            claude_response += text
            buffer += text

            # Check if buffer is ready to be chunked
            last_splitter_pos = max(buffer.rfind(splitter)
                                    for splitter in splitters)
            if len(buffer) >= min_chunk_size and last_splitter_pos != -1:
                chunk = buffer[:last_splitter_pos+1]
                buffer = buffer[last_splitter_pos+1:]

                # Queue this chunk for async TTS processing
                queue_chunk_for_processing(chunk)

that client is the anthropic LLM and would be swapped in with something like a call to another api or into a local model. I would love to see a local mixtral version of this from a token cost perspective! I think an LLM aspect that would really have potential gains would be in whatever LLM can begin streaming the tokens fastest... not necessarily the ones that finish replying fastest. I say that because once the downstream audio gets generating and playing the token streaming of even Claude opus is coming in faster than the voice audio is playing... so its just that first fewseconds between prompting the LLM and being able to get a usable streamed chunk of tokens sent over to elevenlabs would be the performance gain. I've actually just put some more thoughts on latency considerations at the bottom of the readme.
Thanks for the commend i love the idea of running a local LLM with this! And actually I think it would be sweet to replace elevenlabs with a local RVC implementation as well. It could be "Quill in a box".

big round of closing comments for my own organizational sanity, please shout to continue this convo!


build tensorrt-llm error without docker

my env is :
A5000-24G
cuda + cudnn: 12.2 + 8.9.7
driver: 515.57
when I build tensorrt-llm without docker, there are some errors:
my scripts are below:
export BUILD_WHEEL_ARGS="--clean --trt_root /usr/local/tensorrt"
python3 scripts/build_wheel.py ${BUILD_WHEEL_ARGS}
and some errors are below:
Killed
make[3]: *** [tensorrt_llm/kernels/CMakeFiles/kernels_src.dir/build.make:5867:  tensorrt_llm/kernels/CMakeFiles/kernels_src.dir/cutlass_kernels/int8_gemm/int8_gemm_bf16.cu.o] Error 137
make[3]: *** Waiting for unfinished jobs....
Killed
make[3]: *** [tensorrt_llm/kernels/CMakeFiles/kernels_src.dir/build.make:5880: ``tensorrt_llm/kernels/CMakeFiles/kernels_src.dir/cutlass_kernels/int8_gemm/int8_gemm_fp16.cu.o] Error 137
all log info is below:
log.log
can anybody help me?
Thanks!

@oreo-lp It will be not a trivial task to debug this, hence we provide the env. Can you please tell us why you prefer not to use docker? Thank you.

@oreo-lp It will be not a trivial task to debug this, hence we provide the env. Most of the time issues like these are stemmed from different lib versions that can simply be upgraded. Can you please tell us why you prefer not to use docker? Thank you.

Because I don't have access to a relevant GPU, my only option is to rent servers online. However, the servers available online use Docker containers, and it is not possible for me to install Docker within a Docker. Thank you.

@oreo-lp
Hi, we haven't made thorough validation with non-Docker environment for TensorRT-LLM.
In your environment, is it possible to use a customized docker image to start the server?
June


Update proxy sha to 6e116d5

Signed-off-by: Wayne Zhang<EMAIL_ADDRESS>

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: rshriram
If they are not already assigned, you can assign the PR to them by writing /assign @rshriram in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@qiwzhang: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
059f3954f39e0495b9285faea2b95d72a54ce9cd
link
/test istio-unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@qiwzhang: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
059f3954f39e0495b9285faea2b95d72a54ce9cd
link
/test istio-unit-tests

prow/istio-presubmit.sh
059f3954f39e0495b9285faea2b95d72a54ce9cd
link
/test istio-presubmit

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


Agent can see around walls

Hello,
the current Grid.process_vis is allowing the agent to see around walls if the wall is horizontal, relative to the agent.
This is due to the horizontal processing of the visible area cascading around the walled cells.
I have included an example of this light-curving vision and the tree node that shows how each cell mask is being activated (the first time)

I believe a potential fix of this is to use a sequence of beam emulations. it may be less computationally effective but does produce more accurate vision.  Code attached
def border(grid, agent_pos):
if hasattr(grid,"sett"): return grid.sett
grid.sett=[]
for j in range(0,grid.height):
grid.sett.append([0-agent_pos[0], j])
grid.sett.append([grid.width-1-agent_pos[0], j])
for i in range(1-agent_pos[0], grid.width-1-agent_pos[0]):
grid.sett.append([i, grid.height-1])
#print(sett)
return grid.sett
def process_vis(grid, agent_pos):
mask = np.zeros(shape=(grid.width, grid.height), dtype=np.bool)
mask[agent_pos[0], agent_pos[1]] = True
for b in grid.border(agent_pos):
angle=math.atan2(b[1],b[0])
#print(angle)
beam_range=1
while(True):
x,y = round(agent_pos[0]+beam_rangemath.cos(angle)), round(agent_pos[1]-beam_rangemath.sin(angle))
#print("-",x,y)
if(x<0 or x>= grid.width or y<0 or y>= grid.height):
break
mask[x,y]=True
cell = grid.get(x, y)
if cell and not cell.see_behind():
break
beam_range+=1
for j in range(0, grid.height):
for i in range(0, grid.width):
if not mask[i, j]:
grid.set(i, j, None)
return mask

Hi Phillip. I know it doesn't look realistic, but it's hard to realistically emulate the way 3D vision works in 2D. As it is, the agent can't see through closed doors, which I feel is generally good enough.


Let block-upgrade continue to work

FYI @hmusum @tokle

The previous change didn't work as expected. As
BlockUpgrade = element block-upgrade {
    BlockChange
}

means <block-upgrade><block-change>...</block-change></block-upgrade>

Ok, saw your comment. So, the schema change is needed. The code change doesn't hurt, so merging then.