host msc example crashes on the esp32s2

I have my esp32s2 running the host/msc example from the espTinyUSB 2.0.3 but it just keeps crashing on the host init:
When i decode the backtrace from the arduino ide it says:
Decoding stack results
0x4009173c: usb_host_install at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/usb/usb_host.c line 440
0x40082421: USBhost::init(bool) at C:\Users\Rens-U\Documents\Arduino\libraries\EspTinyUSB-master\src\host\common\usb_host.cpp line 62
0x40081f2f: setup() at C:\Users\Rens-U\Documents\Arduino\msc/msc.ino line 275
0x4008416e: loopTask(void*) at C:\Users\Rens-U\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32\main.cpp line 42

@chegewara any idea why "esp_err_t err = usb_host_install(&config); " from the usb_host.cpp library keeps failing the install?

At the time ive been working on usb host espressif still worked on the component.
Looks like something changed in esp-idf.
Maybe try to test with arduino-esp32 v2.0.2?
Im not saying it will work, or you should switch to that version, but worth to test.
I am currently not working or updating this library, as it is not popular, especially host part, and i am busy with full time job.

I think that they might have changed something since then.
I first tried with the arduino-esp version of esptinyusb (max version v2.0.0 possible) and the adafruit tinyusb library, but both failed to even compile the arduino IDE v1.8.18.
Only after i downloaded the master branch and added the zip library i got the code to compile, but sadly that crashed while running.
Is there a workaround to init the host and read from a usb drive?

Oh sorry my bad, i installed the version in boards manager and stil crashes but i am not able to decode it this time.
I did get some warning while compiling, but not sure if they can cause the esp32s2 to crash.
C:\Users\..\Arduino\msc\msc.ino: In function 'void inquiry_cb(usb_transfer_t*)':
C:\Users\..\Arduino\msc\msc.ino:59:33: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     device->mount(MOUNT_POINT, 0);
                                 ^
C:\Users\..\Arduino\msc\msc.ino:60:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     device->mount(MOUNT_POINT1, 1);
                                  ^
C:\Users\..\Arduino\msc\msc.ino: In function 'void read_test(int)':
C:\Users\..\Arduino\msc\msc.ino:46:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 #define MOUNT_POINT "/msc"
                     ^~~~~~
C:\Users\..\Arduino\msc\msc.ino:136:13: note: in expansion of macro 'MOUNT_POINT'
     mount = MOUNT_POINT;
             ^~~~~~~~~~~
C:\Users\..\Arduino\msc\msc.ino:46:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 #define MOUNT_POINT "/msc"
                     ^~~~~~
C:\Users\Rens\OneDrive\Documenten\Arduino\msc\msc.ino:140:13: note: in expansion of macro 'MOUNT_POINT'
     mount = MOUNT_POINT;
             ^~~~~~~~~~~
C:\Users\..\Arduino\msc\msc.ino:167:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   char* dirpath = "/msc/";
                   ^~~~~~~
In file included from C:\Users\..\Arduino\libraries\EspTinyUSB-master\src\device\msc\flashdisk.cpp:1:
C:\Users\..\Arduino\libraries\EspTinyUSB-master\src/flashdisk.h:15:28: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     bool init(char* path = "/fatfs",char* label = NULL);
                            ^~~~~~~~

The tinyusb-master branch indeed builds without an issue for with the arduino-esp32 v2.0.3 and v2.0.2.
Only when you try running it and opening the serial console in the arduino ide you can see the esp32s2 rebooting the whole time.
I enables the firmware msc and dfu on boot flags.
ELF file SHA256:<PHONE_NUMBER>000000

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x3 (RTC_SW_SYS_RST),boot:0xb (SPI_FAST_FLASH_BOOT)
Saved PC:0x4002640d
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x510
load:0x4004c000,len:0xa50
load:0x40050000,len:0x28bc
entry 0x4004c18c
[   560][D][esp32-hal-tinyusb.c:580] tinyusb_enable_interface(): Interface MSC enabled
[   680][D][FirmwareMSC.cpp:94] msc_update_get_required_disk_sectors(): APP size: 358128 (700 sectors)
[   680][D][FirmwareMSC.cpp:100] msc_update_get_required_disk_sectors(): OTA size: 1310720 (2560 sectors)
[   687][D][FirmwareMSC.cpp:113] msc_update_get_required_disk_sectors(): USING FAT12
[   695][D][FirmwareMSC.cpp:116] msc_update_get_required_disk_sectors(): FAT sector size: 512
[   703][D][FirmwareMSC.cpp:117] msc_update_get_required_disk_sectors(): FAT data sectors: 3276
[   711][D][FirmwareMSC.cpp:118] msc_update_get_required_disk_sectors(): FAT table sectors: 10
[   720][D][FirmwareMSC.cpp:119] msc_update_get_required_disk_sectors(): FAT total sectors: 3288 (1644KB)
[   729][D][esp32-hal-tinyusb.c:580] tinyusb_enable_interface(): Interface DFU enabled
[   737][D][esp32-hal-tinyusb.c:441] tinyusb_load_enabled_interfaces(): Load Done: iStarting up
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400954b8  PS      : 0x00060a30  A0      : 0x80082ebf  A1      : 0x3ffce440
A2      : 0x3ffc3fcc  A3      : 0x3ffc2f68  A4      : 0x3ffc7544  A5      : 0x00000000
A6      : 0x00000000  A7      : 0x3ffc755c  A8      : 0x80095473  A9      : 0x3ffce420
A10     : 0x3ffc75fc  A11     : 0x00000000  A12     : 0x00000005  A13     : 0x00000044
A14     : 0x3ffc7680  A15     : 0x3ffc3fd0  SAR     : 0x0000001c  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000018  LBEG    : 0x00000005  LEND    : 0x00000044  LCOUNT  : 0x4002758d

Backtrace:0x400954b5:0x3ffce4400x40082ebc:0x3ffce460 0x400826b5:0x3ffce4b0 0x40085d06:0x3ffce4f0

Decoding stack results
0x400954b5: _buffer_fill at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/usb/hcd.c line 2126
0x40082ebc: USBmscDevice::registerCallbacks(msc_transfer_cb_t) at C:\Users\..\Arduino\libraries\EspTinyUSB-master\src\host\msc\usb_msc.cpp line 309
0x400826b5: tud_suspend_cb(bool) at C:\Users\..\Arduino\libraries\EspTinyUSB-master\src\esptinyusb.cpp line 312
0x40085d06: FirmwareMSC::begin() at C:\Users\..\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32\FirmwareMSC.cpp line 94

Did you disable all USB settings in Tools menu?
All are for espressif tinyUSB device and are not compatible with this library.

No i enabled them in the tools menu.
This is the configuration of my tools menu

Is it better to set them in the program itself or does the tools menu also work?

Again, they are for tinyUSB device and will collide with USB host and USB device from this library.
All should be disabled.

Ah oke, didn't knew that. Thank you for that! I disabled them all and now the code does not crash anymore.
But the example does not work for me yet. i inserted the usb drive after startup with a readme.txt file on it is just does nothing, not sure if i am doing something wrong or something else. My serial console is behaving a little weird atm and does not show any commands from the setup function.

Could the warnings cause the program to not read the usb drive ?

There may be some bugs, but code works more or less:
14:15:34.708 -> [  4663][I][msc.ino:86] client_event_callback(): device speed: USB_SPEED_FULL, device address: 1, max ep_ctrl size: 64, config: 1
14:15:34.741 -> EP num: 1/2, len: 32, address: 0x81, EP max size: 64, dir: IN
14:15:34.741 -> EP num: 2/2, len: 32, address: 0x02, EP max size: 64, dir: OUT
14:15:34.741 -> capacity_cb: block_size: 512, block_count: 120127487
14:15:34.741 -> inquiry_cb
14:15:34.741 -> [  4689][E][msc.ino:216] write_test(): Failed to open file for writing
14:15:34.741 -> [  4694][E][msc.ino:145] read_test(): Failed to open file
14:15:34.774 -> [  4699][E][msc.ino:183] read_test(): Failed to stat dir : /msc

It is not what i would expect and i have to investigate why, but works.

ah oke, that's to bad. Could this be due to the warning with the msc name that the arduino ide gives out? And is there maybe a workaround to acces the data on the usb drive?

Oke thank you in advance for looking into it. Hope you'll find it.

Its something strange, because it is working when Log level is set to Info.

I changed msc example to use printf instead of ESP_LOGI and it works, so it was my bad during tests.
MSC host works good with master branch of this library and v2.0.3 arduino-esp32.

After playing a bit i made a PoC code to update firmware from pendrive:
02:23:08.770 -> ESP-ROM:esp32s2-rc4-20191025
02:23:08.770 -> Build:Oct 25 2019
02:23:08.770 -> rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
02:23:08.803 -> SPIWP:0xee
02:23:08.803 -> mode:DIO, clock div:1
02:23:08.803 -> load:0x3ffe6100,len:0x524
02:23:08.803 -> load:0x4004c000,len:0xa50
02:23:08.803 -> load:0x40050000,len:0x28cc
02:23:08.803 -> entry 0x4004c18c
02:23:08.935 -> [   605][E][ota.ino:10] partitionInfo(): Starting OTA example
02:23:08.935 -> [   605][E][ota.ino:23] partitionInfo(): Running partition type 0 subtype 16 (offset 0x00010000)
02:23:08.935 -> [   607][E][ota.ino:28] partitionInfo(): Writing to partition subtype 17 at offset 0x1f0000
02:23:09.332 -> [   990][I][update.ino:43] client_event_callback(): device speed: USB_SPEED_FULL, device address: 1, max ep_ctrl size: 64, config: 1
02:23:09.332 -> EP num: 1/2, len: 32, address: 0x81, EP max size: 64, dir: IN
02:23:09.332 -> EP num: 2/2, len: 32, address: 0x02, EP max size: 64, dir: OUT
02:23:09.332 -> inquiry_cb
02:23:09.365 -> /msc/firmware.bin
02:23:09.365 -> [  1045][E][ota.ino:10] partitionInfo(): Starting OTA example
02:23:09.365 -> [  1046][E][ota.ino:23] partitionInfo(): Running partition type 0 subtype 16 (offset 0x00010000)
02:23:09.365 -> [  1048][E][ota.ino:28] partitionInfo(): Writing to partition subtype 17 at offset 0x1f0000
02:23:09.398 -> [  1056][E][ota.ino:35] partitionInfo(): New firmware version: heads/idf-release/v4.4-0-gaa783
02:23:09.398 -> [  1065][E][ota.ino:40] partitionInfo(): Running firmware version: heads/idf-release/v4.4-0-gaa783
02:23:09.398 -> [  1074][E][ota.ino:73] otaBegin(): esp_ota_begin succeeded
02:23:19.325 -> [ 10989][E][ota.ino:92] otaEnd(): Prepare to restart system!
02:23:19.325 ->
02:23:19.325 ->
02:23:19.325 -> file size: 407616
02:23:20.318 -> ESP-ROM:esp32s2-rc4-20191025
02:23:20.318 -> Build:Oct 25 2019
02:23:20.318 -> rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
02:23:20.318 -> Saved PC:0x400263d9
02:23:20.318 -> SPIWP:0xee
02:23:20.318 -> mode:DIO, clock div:1
02:23:20.318 -> load:0x3ffe6100,len:0x524
02:23:20.318 -> load:0x4004c000,len:0xa50
02:23:20.318 -> load:0x40050000,len:0x28cc
02:23:20.318 -> entry 0x4004c18c
02:23:20.451 -> [   605][E][ota.ino:10] partitionInfo(): Starting OTA example
02:23:20.451 -> [   605][E][ota.ino:23] partitionInfo(): Running partition type 0 subtype 17 (offset 0x001f000


Prettier: don't quote new lines in strings

Fixes #2281.
I unquote \n from JSON.stringify, but keep everything else quoted (e.g. \t).

Oops, I should've used replaceAll. This replaces only the first \n.


Consider using nuspec XSD during pushed package validation in gallery

This would give us much more strict validation and probably cover a lot of oddball cases.
Some open questions:

What version of the XSD? Latest version of client?
The XSD has some things that only make sense at pack time, e.g. <files> element.
Will the error messages be good enough for the web UI?
How does this fit into PC to PR issues?

/cc @rrelyea @skofman1 @rohit21agrawal

From https://github.com/NuGet/NuGetGallery/pull/5750#discussion_r178650284.

IMO the correct approach for input validation is to define what is allowed, instead of what is not allowed.

Yes, I agree. However, we need to analyze all of the metadata currently being pushed by package authors (and is being accepted) to make sure we are not breaking some scenarios we actually may care about.


Custom Array.prototype interfering with for..in loops

Hello,
I am not able to render any vector tiles on the map (altough they are valid, i checked them on another system), I found out that the custom Array-property that i am using is interfering with the for..in loop that is iterating over vector tiles.
Assume the following function:
// concat two arrays
Array.prototype.extend = function (source) {
    source.forEach(function (el) { this.push(el); }, this);
};

As the for..in loop in javascript checks the entire prototype chain of an object being iterated, these can cause errors when iterating over arrays with custom properties, see example below:
// inside renderStyle-function
for (var t in this.renderable_tiles) {
                var tile = this.renderable_tiles[t];

// tile is undefined when the loop reaches the "extend" property => crash
                if (tile.meshes[style] == null) {
                    continue;
                }

Below are some workarounds that i used:

checking with hasOwnProperty

for (var t in this.renderable_tiles) {
                if (!this.renderable_tiles.hasOwnProperty(t)) continue;
                var tile = this.renderable_tiles[t];
                ...

using a normal for loop

for (var i = 0; i < this.renderable_tiles; i++) {
                var tile = this.renderable_tiles[i];
                ...

Object.keys

Object.keys(this.renderable_tiles).forEach(funtion(key) {
                var tile = this.renderable_tiles[key];
                ...

forEach

this.renderable_tiles.forEach(function(rec) {
              ...

Google Chrome 51.0.2704.103 m
tangram v0.8.2
Other frameworks used: Ext.Js 6.0.2

Thanks - uses of for..in loops for arrays here are unintentional, probably leftover from those being objects in a previous implementation. We will take a look at updating.

This is fixed in https://github.com/tangrams/tangram/commit/394bc5be7ff984ea1c70173a56b1ec480679d32a, and will be included in the next patch release, v0.9.1. I will close this issue when that release is out.

Thank you

This has been released to production in v0.9.1


Sending an attachment with subject line text only sends the attachment

This happens with no text in the main body and with a space in the main body. Haven't tested with text in the main body

Issue created by BlueBubbles Bot in the BlueBubbles commnity on behalf of @CSab6482 in #android-support.

https://user-images.githubusercontent.com/53708281/171073057-0250a261-7b2a-4d85-9aa2-2395e330643b.mp4


Jinghan/fix API Export

This PR does:

check FeatureNames are all valid features for Export
add LIMIT for offline method Export

This error message looks a bit strange :thinking:
Message: invalid feature names, expected [account.state hello.world], got [account.state]

This error message looks a bit strange 🤔
Message: invalid feature names, expected [account.state hello.world], got [account.state]

@wfxr good point, I changed error handling, could take a second look!

@jinghancc LGTM!


Typo: Replace "Bodega" with "Boutique"

I think these are meant to say "Boutique" instead of "Bodega"?

Thank you very much Jesse!


Where is the code?

Why the code is only in edgetpu_api_1.9.2.tar.gz and the repo is empty?

This repo is meant only as a way to track and release binaries of the EdgeTPU drivers. The source code for the driver is not released.


Add new module shardingsphere-sql-rewriter

Changes proposed in this pull request:

Add new module shardingsphere-sql-rewriter
Add sub modules shardingsphere-sql-rewriter-engine and shardingsphere-sql-rewriter-test
Decouple sharding and rewriter

Pull Request Test Coverage Report for Build 1158

36 of 113 (31.86%)  changed or added relevant lines in 26 files are covered.
28 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.9%) to 67.343%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sql/rewriter/sharding/parameter/ShardingParameterRewriterBuilder.java
2
3
66.67%

shardingsphere-sql-rewriter/shardingsphere-sql-rewriter-test/src/main/java/org/apache/shardingsphere/sql/rewriter/parameterized/loader/RewriteAssertionsRootEntityLoader.java
0
1
0.0%

shardingsphere-sql-rewriter/shardingsphere-sql-rewriter-engine/src/main/java/org/apache/shardingsphere/sql/rewriter/context/SQLRewriteContext.java
2
4
50.0%

sharding-core/sharding-core-entry/src/main/java/org/apache/shardingsphere/core/BaseShardingEngine.java
4
7
57.14%

shardingsphere-sql-rewriter/shardingsphere-sql-rewriter-engine/src/main/java/org/apache/shardingsphere/sql/rewriter/sql/token/generator/SQLTokenGenerators.java
0
3
0.0%

sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/jdbc/wrapper/PreparedStatementExecutorWrapper.java
0
4
0.0%

sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/jdbc/wrapper/StatementExecutorWrapper.java
0
4
0.0%

shardingsphere-sql-rewriter/shardingsphere-sql-rewriter-engine/src/main/java/org/apache/shardingsphere/sql/rewriter/sql/token/pojo/generic/InsertValuesToken.java
0
6
0.0%

shardingsphere-sql-rewriter/shardingsphere-sql-rewriter-test/src/main/java/org/apache/shardingsphere/sql/rewriter/parameterized/engine/parameter/SQLRewriteEngineTestParameters.java
0
6
0.0%

shardingsphere-sql-rewriter/shardingsphere-sql-rewriter-engine/src/main/java/org/apache/shardingsphere/sql/rewriter/sql/token/pojo/generic/InsertValue.java
0
15
0.0%

Files with Coverage Reduction
New Missed Lines
%

sharding-orchestration/sharding-orchestration-reg/sharding-orchestration-reg-zookeeper-curator/src/main/java/org/apache/shardingsphere/orchestration/reg/zookeeper/curator/CuratorZookeeperRegistryCenter.java
28
18.64%

Totals

Change from base Build 612:
-0.9%

Covered Lines:
11315

Relevant Lines:
16802

💛  - Coveralls


add ability to remotely configure log levels

Acceptance Criteria:

we have useful debug logs in the xmidt-agent code
by default log level is error
we can send a wrp.message to the device to change the log level

closing, I believe this is completed


Shows 404 error on browser refresh

Hi, browser shows 404 error if it is refreshed on any route which is handled at Front-End level. I know one solution is to handle this situation is at server level, by redirecting to / and then routes will be calculated at FE. But I want to handle this issue at Front-End level, how react-router does.

Hm ... I'm not sure that even react-router will handle that. If you don't forward all the requests to your index file then you are not opening a page that contains Navigo. The 404 Not found is the proper response from your server. Or in other words without a server-side forwarding to a single file you can't make a client-side routing works.

Right, my bad, you have to handle that case via webpack in dev-server by changing historyApiFallback flag to true.


Disable observability-bundle

Disable  observability-bundle #102

I'd prefer to remove it entirely than having more logic to decide which apps get installed.

+1 , I don't see reason why we should have an apps that are not installed, that feels weird

fine with me

@fiunchinho


Getting This Error while trying to export my model.

I was trying to export my model today, and a couple problems popped up and, I have no idea what to do, looking for help on it.
Error:
Python: Traceback (most recent call last):
File "C:\Users\alexs\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\cats-blender-plugin-0-19-0\tools\importer.py", line 880, in execute
bpy.ops.cats_importer.display_error('INVOKE_DEFAULT')
File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\modules\bpy\ops.py", line 130, in call
ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Python: Traceback (most recent call last):
File "C:\Users\alexs\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\cats-blender-plugin-0-19-0\tools\importer.py", line 966, in invoke
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 6.1)
TypeError: WindowManager.invoke_props_dialog(): error with keyword argument "width" -  Function.width expected an int type, not float
location: C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\modules\bpy\ops.py:130
location: :-1

did you find a fix?
im also having this issue.

Im getting the same error myself

me too

I'm also getting this same error...

same here... was work a month ago -_-'

Switch to blender 2.93, or switch to blender 3.0 with CATS dev version

See https://github.com/absolute-quantum/cats-blender-plugin/issues/379


Features/debug db

Allow HDF5 to store all data (including model predictions and UQ) to enable debugging.

It looks good to me. Quick question @koparasy : if we have all HDF5 in a separate file, should we also move RMQ details into its own file?

Yes we should. It is not a top priority though. The basedb file was getting pretty big to "handle". When we have modifications on RMQ we can push it on another file.


Create a Node.js Application on Web App Repo?

The repo on the Get Started Node.JS page doesn't exist? Is this it?
git clone https://github.com/Azure-Samples/nodejs-docs-hello-world - this repo doesn't exist?

Apologize. I just made that repo public. Thanks for reporting.


test: Wait for analysis to be performed before asserting finding counts

:tada: This PR is included in version 0.52.2 :tada:
The release is available on:

v0.52.2
GitHub release

Your semantic-release bot :package::rocket:


Improve extras/sntp -- Issue #562

Primary change is correcting the missing scaling of the microseconds calculation
Resolves #562
Other changes address:

Capture RTC count before any logging
No "obligatory" printf() logging
Change logged message to show:

adjustment about to be made in seconds
time since last SNTP update
ratio of the two as ppm
"cal" value (raw as int, as before)

Initialize "cal" value from sdk_system_rtc_clock_cali_proc()

I'm more than happy to squash this, or split into mutiple commits

As I "peel the onion" on the SNTP implementation, it looks like there are other issues to resolve as well. I'm planning on rebasing this into two commits

Resolve calculation error
Improve logging
so that various portions could be cherry-picked, if appropriate.

86fa1ad represents the compiler flag
I tried rebasing into a functional-correctness commit and a debug-output commit and wasn't completely successful. I could give it another try, or just go ahead and squash this entire thing if you choose to accept it.
The new LWIP drop of #554 seems to contain a near rewrite of the LWIP SNTP code that now seems to:

Consider RTT in setting time
Handle broadcast NTP
Accept NTP server from DHCP

Rather than reinvent the wheel on the obsolete LWIP core of extras/sntp, I'm going to continue development off a merge between master and #554.


ECONNREFUSED error occured

refs https://github.com/tako-black/learnyoureact/issues/22#issuecomment-153124021
Can I fix by this code?
https://gist.github.com/martinheidegger/a7cf754d91f847c29965
I will try.

learnyoureact の package.json に　"babel": "^5.8.23" を追加すると、solution.js が動作しました。
エラーが発生しましたけど..

回答内容:  ""

想定回答:  "SyntaxError: Unexpected reserved word"

回答内容:  "
Hello, world!"

想定回答:  "    at exports.runInThisContext (vm.js:53:16)"

回答内容:  ""

想定回答:  "    at Module._compile (module.js:414:25)"

回答内容:

想定回答:  "    at Object.require.extensions.(anonymous function) [as .jsx] (/Users/kusanagi/.nvm/versions/node/v4.2.2/lib/node_modules/learnyoureact/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:214:7)"

I get the same error as xanagi too.

I think I can fix by changing like https://github.com/workshopper/learnyounode/commit/d583db654de953b988561a9601170ec6a4927b74
I will do tonight.

@xanagi
@peterlazar1993
Thank you for your comment!
I changed some codes.
I think it will work correctly.
Could you use v0.10.0-patched and give feedback to me?
If the version work correctly, I will merge to master.

Hi @kohei-takata,
I tried your change of code here:
https://github.com/kohei-takata/learnyoureact/blob/fix_timeout_bug/exercises/hello_react/exercise.js
And now the test seems to run, but I'm getting an error from the results:
$learnyoureact verify program.js
✗ ?exercises.HELLO_REACT.fail.connection || common.exercise.fail.connection?

Your submission results compared to the expected:

────────────────────────────────────────────────────────────────────────────────

1.  ACTUAL:    "<!DOCTYPE html>"
1.  EXPECTED:  ""

2.  ACTUAL:    "
Hello, world!
"
2.  EXPECTED:

────────────────────────────────────────────────────────────────────────────────

✗ Submission results did not match expected!

# FAIL

Your solution to HELLO_REACT didn't pass.

I got the same result as @scottnash.

@scottnath
@xanagi
Thanks for trying.
I'll try to fix again.

@scottnath
@xanagi
How is this?
https://github.com/kohei-takata/learnyoureact/blob/fix_timeout_bug/exercises/hello_react/exercise.js

@kohei-takata
These are the results I got:
run
<!DOCTYPE html>

Hello, world!
%

verify
✗ ?exercises.HELLO_REACT.fail.connection || common.exercise.fail.connection?

Your submission results compared to the expected:

────────────────────────────────────────────────────────────────────────────────

1.  ACTUAL:    "<!DOCTYPE html>"
1.  EXPECTED:  ""

────────────────────────────────────────────────────────────────────────────────

✗ Submission results did not match expected!

# FAIL

Your solution to HELLO_REACT didn't pass. Try again!

So, it seems the fail.connection says it's still failing on finding the second port.

@kohei-takata
I got the completely same result as @scottnath.
It seems that the solution child process fails at 'require('babel/register')' in solution.js.
I added the following lines to learnyoureact/node_modules/workshopper-exercise/execute.js around line 90.
this.solutionChild.stderr.on('data', function(data){
  console.log('----------');
  console.log(data.toString());
  console.log('----------');
});

The output of verify was
$ learnyoureact verify program.js
----------
module.js:339
    throw err;
    ^

Error: Cannot find module 'babel/register'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/Users/kusanagi/.nodebrew/node/v4.2.2/lib/node_modules/learnyoureact/exercises/hello_react/solution/solution.js:9:1)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)

----------
✗ ?exercises.HELLO_REACT.fail.connection || common.exercise.fail.connection?

Your submission results compared to the expected:

────────────────────────────────────────────────────────────────────────────────

1.  ACTUAL:    "<!DOCTYPE html>"
1.  EXPECTED:  ""

2.  ACTUAL:    "
Hello, world!
"
2.  EXPECTED:

────────────────────────────────────────────────────────────────────────────────

✗ Submission results did not match expected!

# FAIL

Your solution to HELLO_REACT didn't pass. Try again!

@scottnath
@xanagi
This bug seems to be fixed by https://github.com/babel/babel/issues/1889.
I will make a PR #75.
After testing, I will merge that to master.
Anyway, thanks for your testing and reporting.

@kohei-takata confirmed fix. thank you.

@scottnath
I'm glad to hear that.
Thank you for your report! :smile:

@kohei-takata
I confirmed fix too.
Thanks!

@xanagi
I'm glad to hear that!
Thanks for your comment :smiley:


PAC with claim

updated and renamed TOTPUtils parser to PACUtils #125
implemented #124
OperationDetail endpoint /api/auth/token/app/operation/detail
OperationClaim endpoint /api/auth/token/app/operation/detail/claim

2 things:
we should add the PACUtils to the documentation (to the section https://github.com/wultra/mtoken-sdk-ios/blob/develop/docs/Using-Operations-Service.md#totp-wmtproximitycheck)
create a new pull request to releases/1.7.x branch with just WMTPACUtils changes so we can support it with the old 1.4.0 server.


Add benchmark option

(this is how i realised my other idea for a PR, using a regular array instead of associative and indexing in at SIZE * i + j, was not actually faster)

i feel like it's a bit out of scope as of now, will definitely considere it if i end up improving the performances by a noticeable amount though :+1:


Sort EnvironmentTreeItem children

Fixes https://github.com/microsoft/vscode-azurestaticwebapps/issues/371

Here's the new order:


DisruptorCommandBus has a CommandResult of null

User the disruptor command bus I get the CommandResult is Null
This is the Demo
Env

AxonFrameworkVersion: 4.1.1
JDK:Java8

Thanks for filing this bug @e-sen. I've tested this out locally as well and ended up to the same conclusion as you've described.
I'll ensure we'll fix this issue ASAP.

@smcvb Thanks,Waiting for your good news .  :-)
Use the external Command Handlers , Because I want use the common service out of Aggregate.
such as
interface CommonService {

    fun currentTimeMillis(): Long

    fun generateIdentifier(): String

}

@Component
class UserCommandHandler(
        val repository: Repository<User>,
        val commonService:CommonService
) {

    @CommandHandler
    fun handle(command: CreateUserCommand): String {
        repository.newInstance {
            User(userId = command.userId, time = commonService.currentTimeMillis())
        }
        return command.userId
    }

}

if I @Autowired In the Aggregate
@Aggregate
class User {

    @AggregateIdentifier
    lateinit var userId: String

    @JsonIgnore
    @Transient
    @Autowired
    lateinit var commonService:CommonService

    constructor()

    constructor(userId: String) {
        AggregateLifecycle.apply(UserCreatedEvent(userId = userId, time = commonService.currentTimeMillis()))
    }

    @EventHandler
    fun on(event: UserCreatedEvent) {
        this.userId = event.userId
    }

}

That will get error commonService not init ~


Account accessible even after Password change

The app allows access to account (logged in with old password) even after password was changed

ForkHub only uses your password to create an access token when you first login. Your password is never stored or used again.
If you want to revoke access to the app, you can simply remove the token from https://github.com/settings/tokens


Security Patches after EOL?

AngularJS is in LTS mode
We are no longer accepting changes that are not critical bug fixes into this project.
See https://blog.angular.io/stable-angularjs-and-long-term-support-7e077635ee9c for more detail.

I'm submitting a ...

[ ] regression from 1.7.0
[ ] security issue
[ ] issue caused by a new browser version
[x] other

Current behavior:

Expected / new behavior:

N/A
Minimal reproduction of the problem with instructions:

N/A
AngularJS version: 1.7.x

N/A
Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView | Opera XX ]

N/A
Anything else:

I know the guidelines say to submit questions to stack overflow but this is a direct question for the current maintainers of the AngularJS framework and the community.
As we all know, AngularJS is reaching EOL at the end of June 2021. With that, my understanding is that the AngularJS team won't support the framework anymore, including fixing security vulnerabilities.
As I work for a Large Corporation(™) I have the pleasure of being required to maintain various compliance standards. One of these states that we cannot use any library or framework that is no longer maintained. In our use case, it means that we only need to ensure that security patches are applied in order to maintain our compliance standing.
What I wanted to know is whether or not there were any plans for this project to be handed over to another entity for security updates. I understand that this is open source and that folks can fork the project, but I wanted to understand my options (as we have about 200k lines of code leveraging AngularJS).
I know that for other things, like Python 2, there are companies offering support contracts past the EOL date that can be purchased for enterprise usage. Is this something that is going to happen for AngularJS or will we be able to maintain the framework past EOL for free?
Thanks again, and apologies for filing this in the wrong place.

I think the angularjs is better than angular,hope some organization continue  to support angularjs.

+1

Personally, I love AngularJS, it's been my framework of choice for a while (there's a simplicity to it that is not replicated in Angular IMHO) - plus, it has a wide variety of plugins which not all have been replaced with angular versions.
That said, it's going to be rough going to stick with it, like python2, authors will drop support for their plugins, and the framework will fall out of date, I think most corporate settings will have to have migration plans either to upgrade their projects or move their customers to other applications/services and in some cases they may have to discontinue support for things they're providing now.
Fortunately 2021 gives you some time, but I think regardless of what people feel about the framework, EOL has a fairly predicable outcome and the only other option will be if someone can make a business supporting and patching AngularJS they way Python2 companies like ActiveState are attempting, but it's a gamble that a company or companies can make a viable businesses supporting AngularJS.

+1

There is now an offering to support security patches to AngularJS after the LTS is over. You can find out more here: angularjs.xlts.dev. It was introduced at ng-conf: Hardwired this year.

There is now an offering to support security patches to AngularJS after the LTS is over. You can find out more here: angularjs.xlts.dev. It was introduced at ng-conf: Hardwired this year.

There is now an offering to support security patches to AngularJS after the LTS is over.

They want money 👎

Can anyone explain what versions are currently in support?
https://docs.angularjs.org/misc/version-support-status#blog-post only mentions 1.2x and 1.8, is 1.4 still receiving security patches and in support until July 2021?

Can anyone explain what versions are currently in support?
https://docs.angularjs.org/misc/version-support-status#blog-post only mentions 1.2x and 1.8, is 1.4 still receiving security patches and in support until July 2021?

Only versions listed there are supported in any way. 1.4 is not supported.

Can anyone explain what versions are currently in support?
https://docs.angularjs.org/misc/version-support-status#blog-post only mentions 1.2x and 1.8, is 1.4 still receiving security patches and in support until July 2021?

Only versions listed there are supported in any way. 1.4 is not supported.

Thanks, that was my assumption given their omission but wanted to check.

You're not alone!
I'm sure there are people willing to maintain this open source project for free. Why the Angular team wouldn't let users take over officially?
It's a beautiful project, which has been transformative for the entire Web development community (much like jQuery). It still has thousands of projects relying on it. And these projects are not going to be migrated to Angular2/4/5/6/7/8 (they would have done so already).
If the Angular team is really going to give up on AngularJS, we need them to coordinate the takeover effort so that another team can officially maintain the project.

Why the Angular team wouldn't let users take over officially?

...It's open source? You can certainly fork the project...? This has happened with many other widely-adopted OSS projects such as MariaDB (fork of MySQL), Crossroads I/O (fork of ZeroMQ), etc.
As for XLTS.dev wanting money for security fixes of AngularJS post-EOL.... what is wrong with experts being compensated for their work...? I'm struggling to see the issue there.

If the Angular team is really going to give up on AngularJS, we need them to coordinate the takeover effort so that another team can officially maintain the project.

So far no one has approached the Angular team with a proposal to take over and run this project.

@noahlz While I'm 100% with you on compensating people for their work, I hope you realize that having to pay for security fixes contradicts principles of both open source and security?
Also, having multiple forks of the repo with various minor updates and security fixes is just going to create uncertainty in the community of developers relying on this (awesome) framework.
I guess at some point the documentation site is going to be taken down as well, so do we need to archive that as well, just in case?

I hope you realize that having to pay for security fixes contradicts principles of both open source and security?

Where in Open Source manifestos etc. does it say that when the core committers behind a project declare it End of Life that they should continue to provide critical security fixes for free?  It's...end of life.
XLTS.dev is going to fork AngularJS and provide security fixes past end of life...They are asking to be compensated for this effort.  I'm struggling to find a problem with being paid for labor.
If another person / team wants to fork AngularJS and provide the same CVE fixes for free ... I'm sure the community would be very excited for that!

I guess at some point the documentation site is going to be taken down as well, so do we need to archive that as well, just in case?

There are no plans to take down this site - but if someone wanted to commit to transferring control of the whole project to them, then I would expect they would then be on the hook for hosting the documentation.
The good news is that it is very easy to generate and host the documentation locally. The following should do it:
git clone https://github.com/angular/angular.js
cd angular.js
yarn
yarn grunt package
yarn grunt webserver

Then you can access the docs at localhost:8000/build/docs

Geez @noahlz! What percentage of the thousands of developers using AngularJS will subscribe to this maintenance service? My guess: a small fraction. The rest will either migrate to Vue.js (and pray it doesn't go the same route), or simply keep unpatched AngularJS (because of lack of knowledge, lack of will, lack of expertise, lack of time, etc.), with vulnerabilities well documented for "bad guys" to use it.
IMO Google could have taken over officially (and subcontracted to XLTS if they don't have the resources to do it internally). But I'm not going to keep deluding myself here: looks like the end of the road for AngularJS. 😥

https://angular.io/guide/upgrade
The economics of Open Source are certainly something!

@bertysentry, take a look at the the facts:

Angular 2 first release candidate was published in May 2016.
AngularJS author, Google, annouced in January 2018 that AngularJS will enter a 3 year Long Term Support period (e.g. end-of-life in 3 years, there was an extension to December 31 2021 due to Covid-19).

So as I see it, Google published a newer version 5+ years ago. (warning No.1 to anyone who uses Angular 1.X AKA AngularJS)
In addition, they told the entire community that in 2021 AngularJS will enter its EOL (warning No.2)
That's how open source works and the author did its best to prompt about it years in advance.
So I don't see anything wrong here. applications which still depends on out-of-dated libraries should take that into consideration and act accordingly years in advance, or fork\pay to any experts if they decide to still depend on that library.
You just said it: EOL (end-of-life) is exactly the end of the road for AngularJS.
Nothing wrong here 🤷♂

@AlonBe I know the story of Angular 2: it was no longer Google, it was a fresh reboot, they started from scratch, and AngularJS users didn't like it. There was no migration path and the ecosystem was weak. Angular itself saw major breaking changes later on.
You guys are right though: nobody paid nothing to Google for AngularJS, therefore they owe us nothing at all. So they did nothing wrong, and I'm thankful they created this excellent UI framework and provided it for free to anyone.
I just wish Google would take a page from Microsoft's book: years after the official extended end-of-life of Windows XP, Microsoft still provided critical security patches to the venerable OS. Just because it would make the overall Internet safer (and because people were pointing their finger at them).
Now, long life to VueJS.

Any plan to have an open-source version with security issues after EOL? That would be very good for the thousands of applications still using angularJs


Use XOR for integers that are always 1 or 0

This is more efficient than using the ! operator on older platforms.

@michaelrsweet All Done!

Any updates @michaelrsweet

@michaelrsweet All fixed!

@michaelrsweet All fixed! Can we please merge this?


Syntax for accessing records via query

giving the indices
add_index :action_text_rich_texts,              [:record_type, :record_id, :name, :locale]

and assuming a context of exporting a set of translated record_ids, what is the proper syntax for querying/accessing the table for such an array?  struggled a bit with this for basic mobility
I believ it evolves from:
Mobility::Activerecord::StringTranslation
Mobility::Activerecord::TextTranslation
to
Mobility::Backends::ActionText::PlainTextTranslation
Mobility::Backends::ActionText::RichTextTranslation
?
Assuming klass.translatable_content column, how does one call a method, say
truncate(klass.translatable_content column, length: 200)

?

Hi @dvodvo, thanks for writing in. Once you've set up Mobility and Action Text, your translated Action Text should be accessible using the standard Mobility APIs, e.g. record.content. A DB index is suggested to ensure fast access to the records and (optionally) to enforce uniqueness, but it doesn't impact the way to read/write attributes using the Mobility API.
If you have further questions, please feel free to reopen with code which allows to reproduce your issue.


Add preferences panel back and give players the option to change installation path

Should give a workaround to players with non-english characters in their usernames and allow them to play.

Clicking on 'Select' here will bring up a folder picker dialogue:

Fixes #5
Haven't tested on Windows and I don't have a Mac to test on either, but it works great on Linux.
Couple things to stub your toe on with this:

StationHub crashes if you set it to a path with other folder in it due to the way installations are saved, the path will be checked before being used but if someone puts it in there after it will cause a crash. Planning on just re-writing this logic because its a mess, so this should go away in the future. This bug isn't new, if you go to the installations folder now and add some folder with a random name it will crash, this just makes it more likely to happen.
You MUST restart StationHub after changing the installation path, due to the same mess as the above issue.

I'm going to leave that one check failing for now, there is still some cleanup and testing I need to do for this but I need some sleep first.

Tested in a Windows VM, looks to be working fine there.

looks great and works great as well in my test.


Canonicalize cggi.lut2 and cggi.lut3 as cggi.lut_lincomb

This is mainly for duplicate code removal.
This requires adding lowerings for cggi.lut_lincomb everywhere we have lowerings for lut2, lut3, removing the lowerings for lut2, lut3, and ensuring --canonicalize is run to apply the canonicalization rules.

would you want to keep the parameter 2, 3 as an attribute on lincomb ?

I don't think the attribute is necessary at all, because lut_lincomb has variadic operands.

should this issue be considered closed ?

Yes, if you put a phrase like "Fixes #708" in the PR description it will automatically close the issue. Looks like the magic "Fixes" was not included: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests

OK – thanks for the tip
From: Jeremy Kun @.>
Date: Friday, August 16, 2024 at 9:21 AM
To: google/heir @.>
Cc: Muthu Annamalai @.>, Comment @.>
Subject: [EXTERNAL] Re: [google/heir] Canonicalize cggi.lut2 and cggi.lut3 as cggi.lut_lincomb (Issue #708)
Yes, if you put a phrase like "Fixes #708https://github.com/google/heir/issues/708" in the PR description it will automatically close the issue. Looks like the magic "Fixes" was not included: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requestshttps://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
—
Reply to this email directly, view it on GitHubhttps://github.com/google/heir/issues/708#issuecomment-2293794521, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APGLTDE6PWAXE7NUOBQTCZLZRYRGNAVCNFSM6AAAAABITFOCAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTG44TINJSGE.
You are receiving this because you commented.Message ID: @.***>


Attachment storage

What's this Pull Request do?
Secure file storage, prefixes for stored files and autodeletion of files on attachment deletion
What has been changed?

[x] Secure file storage: files can be stored at custom location because media/ is almost always is served by server and you might not want all your confidential attachments to be served for just everybody.
[x] Prefixes or 24 random symbols for stored files because instead of filesystem email message can have multiple files with the same name attached.
[x] Autodeletion of files deleted or changed attachments, because you should not store confidential data. And you might not want to bloat your filesystem with obsolete files.

Any background context you want to provide?
Screenshots
GitHub issues
#80

also there is a little flaw, I will fix it soon, please do not accept this request until then.

Should be better now

I'll need a few days to test this out and everything, thanks for the PR.

Tomorrow I have to go for few days, I'll be back by Monday.


Added Font size preferences

Hi Guys!
I've worked on implementing font size preference, hope you like it.
If you have any recommendation or improvement I will be happy to read you 😄

Hey 👋
Thanks a lot for your PR. 😊
Can you add Gif in the Description?

Of course 😃

Lol, I mean of the feature.

I should have guessed :satisfied:

Any improvement?


update to use psr\container

Coverage remained the same at 100.0% when pulling ad4ac91447f0029fd536bb1246a72a84b390d1df on basz:psr into dc0bd9f3379e426537f1e19d55cb440b6851820a on prooph:master.


GraalJS performance with yarn install

We're noticing a significant performance difference between stock nodejs and graal's nodejs when used with yarn.
with graal nodejs:
$ rm -rf node_modules
$ node --version:graalvm
GraalVM Polyglot Engine Version 19.0.0
GraalVM Home /Users/kommen/Applications/graalvm-ce-19.0.0/Contents/Home
  Installed Languages:
    JavaScript version 19.0.0
    LLVM       version 19.0.0
  Installed Tools:
    CPU Sampler             version 0.4.0
    CPU Tracer              version 0.3.0
    Heap Allocation Monitor version 0.1.0
    Chrome Inspector        version 0.1
    Memory Tracer           version 0.2
$ time yarn install
yarn install v1.16.0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
✨  Done in 83.90s.
yarn install  177.77s user 23.90s system 235% cpu 1:25.74 total

With stock nodejs:
$ rm -rf node_modules
$ node --version
v12.1.0
$ time yarn install
yarn install v1.16.0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
✨  Done in 7.05s.
yarn install  6.73s user 9.71s system 226% cpu 7.253 total

This is on an MacBook Pro (15-inch, 2017) 2,8 GHz Intel Core i7.
These are the package.json and yarn.lock files I used to reproduce:
testcase.zip

Hi @kommen
thanks for trying out GraalVM and our JavaScript/Node.js implementation. I am happy to see that, aside from performance, it is working for you.
We are aware that our implementation can sometimes be slower, especially around warmup. The difference to the original Node.js implementation should be much smaller (or even non-existent) for longer-running applications. Applications that run for a short time - like yarn or npm - are our worst-case scenario unfortunately. We are working on improvements in that area and try to be faster in future releases.
Thanks for providing your example files, we'll try to see if there is something in particular we can optimize for.
Best,
Christian

I confirm that - using yarn is painfully slow (minutes instead of seconds)

@wirthi in TruffleRuby I think a similar scenario was encountered for installing gems (bundle install ...) . Performance was significantly improved by enabling the --engine.Mode=latency flags which essentially limits the inlining depth (to one ???) . This allows compilation to complete and for the package install to proceed.
Is this the case with graaljs? If not how would we be able to set this flag for npm . The example (Dockerfile) script that I would like to include the --engine.Mode=latency for is
ENV PATH=/opt/graalvm-ce-java8-20.1.0/jre/languages/js/bin:$PATH
RUN npm install yarn -g
COPY package.json yarn.lock ./
RUN yarn install && yarn cache clean

@eregon anything to add?

Looks like it already happens https://github.com/graalvm/graaljs/search?q=engine.mode%3Dlatency&unscoped_q=engine.mode%3Dlatency


Enable squashing and use PR title/body as commit message

Just received the following error message from the workflow:
Pull request has only one commit and it's not semantic; this may lead to a non-semantic commit in the base branch (see https://github.community/t/how-to-change-the-default-squash-merge-commit-message/1155). Amend the commit message to match the pull request title, or add another commit.

What do you think about activating the squash mode and use the PR title/body as commit message? This can be configured in the settings of the project.
This way there is no error message shown if you have one commit in a branch only.

Hey @kayman-mk thanks for the suggestion.
Squash mode is an option we can use for some PRs, no problem.
I think the workflow action won't know about these settings and would still fail if a commit is non-semantic.
I think what is needed is a pre-commit check for semantic commit messages. This would also run in the workflow so would be a way to make sure commits are semantic (not just PR title). When a PR is created it uses the commit message for the title, so that would be a solution.
 So pre-commit can help with each commit.
There is a scenario where we could have 2+ semantic commits in the same PR, and don't want to squash because we want to see all changes in the changelog. PR title might only have the message from 1 commit.
What do you think?
(Aside: I am trying to get this module to a point where we can use it to create a template for our org, as our current template is out of date. Automated changelog is a feature I want to add, which can come from semantic commits. I want to ask Hashicorp if we can add the changelog to the Terraform cloud UI, see changes by version, etc...)

Thanks @kayman-mk
I tried to find & test some tools that can manage semantic commits better, but didn't immediately find anything.
It seems the best approach is as you suggested; use squash-merge with the gitlab setting. And the person doing the merge is responsible for defining the final commit message.
It's a pity there isn't a better (automated) way to manage it but for now, it will work.


Implement cluster feature endpoints

Implement the Endpoint layer (using go-kit) based on #2077

done in #2090


Garbled circuit investigation

Garbled circuit is an important tool in the multi-party computation researchers toolkit. It allows any function to computed in an encrypted setting. We want to start investigating deeper into how these could be integrated into tf-encrypted.
We know we can hook into a established garbled circuit library to take advantage of the circuit compilation and the protocol (including oblivious transfer). But there are a few open questions:

Vectorization of the input to the circuit and output to the circuit.
Is it feasible to send large binary data (the circuit) using the tensorflow distributed computing interface? Can we just store binary data in a tensor? Related issue (https://github.com/mortendahl/tf-encrypted/issues/66).
Point the garbled circuit protocol to use the gRPC connections already established between the tensorflow cluster.

As a first step it would be very valuable to dig deep into some of the existing garbled circuit frameworks:
https://github.com/spaceships/fancy-garbling
https://github.com/encryptogroup/ABY
https://github.com/samee/obliv-c

FYI several people at the PPML workshop seemed to prefer this one https://github.com/emp-toolkit over ABY and OblivC (waiting for confirmation)

Finished up the investigation into the different frameworks listed here. Basic findings were that it would be pretty difficult to integrate any of these frameworks into tf-encrypted/tensorflow as custom operations. emp-toolkit was definitely the winner here. It appeared to be the fastest plus provide the most flexible API and simplest implementation. fancy-garbled might provide some benefits in the future but it is still quite new and actively being developed for building something with that right now would not be feasible.
Another route to go with this is implementing a garbling circuit framework from scratch. This might be the best way to tackle this as integrating/maintaining one of the frameworks might be just as much work.
All in all integrating garbling circuits would be big task that would take quite a bit of planning. If there is any interest feel free to contact me with questions!

Closing issue


updated the hover effect #299

I have updated the hover effect as suggested

Bug in mobile view

Bug in mobile view

I just added the style to the class navbar-nav.  I haven't changed anything in the main.js.

I just added the style to the class navbar-nav.  I haven't changed anything in the main.js.

I just added the style to the class navbar-nav. I haven't changed anything in the main.js.

I know, I pointed this out so that you can work on another PR related to this

I just added the style to the class navbar-nav. I haven't changed anything in the main.js.

I know, I pointed this out so that you can work on another PR related to this

Sir should I create an issue regarding the hamburger problem or is the issue already created?

Sir should I create an issue regarding the hamburger problem or is the issue already created?

Sir should I create an issue regarding the hamburger problem or is the issue already created?

Yes!

Sir should I create an issue regarding the hamburger problem or is the issue already created?

Yes!


Setting up debugging

From https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger.md

•Requires .NET Core rc3-23829 or newer. These are daily builds of .NET Core that can be downloaded from the https://www.myget.org/F/dotnet-core/api/v3/index.json nuget feed. These are really daily builds of .NET Core and associated tools. So please continue if you want to dig in and have fun playing with new bits. But don't expect to go to production with those.

I am using  aspnetcirelease feed.  Does the above mean core debugging wont be available in rc2.
What are the practical steps for the above.
Another article I read misses this step.
Damian git cloned the project from https://github.com/aspnet/cli-samples
But when I try to debug HelloMvc I hit my breakpoint but get no variable info in the left hand panes at all.

@mikes-gh: sorry things are rather confusing at the moment since RC2 isn't quite out yet. The instructions in the master branch are directed at the version of the C# extension which is in the VS Code gallery. This version works with the version of the CLI on the .NET CLI getting-started page. If you want to use cli-samples, then you should follow these instructions: http://aka.ms/vscclrdogfood.

@gregg-miskelly I have downloaded the latest cli already.
I have followed those instructions
If I have other cli installed is that the issue?

@mikes-gh sorry I read the first part of your bug and thought you were running into mismatch problems (we have had a lot of those :)).

c:\Users\mikes\Repos\cli-samples\HelloMvc>dotnet --info
.NET Command Line Tools (1.0.0-rc2-002543)

Product Information:
 Version:     1.0.0-rc2-002543
 Commit Sha:  38d0c28a1e

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.1.7601
 OS Platform: Windows
 RID:         win7-x64

c:\Users\mikes\Repos\cli-samples\HelloMvc>

I already had 2543 so issue still stands.
I have insider vscode 1.1.0
I have c# plugin 1.0.4 rc2
My launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/HelloMvc.dll",
            "args": [],
            "cwd": "${workspaceRoot}",
            "stopAtEntry": false
        },
        {
            "name": ".NET Core Launch (web)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/HelloMvc.dll",
            "args": [],
            "cwd": "${workspaceRoot}",
            "stopAtEntry": false,
            "launchBrowser": {
                "enabled": true,
                "args": "${auto-detect-url}",
                "windows": {
                    "command": "cmd.exe",
                    "args": "/C start ${auto-detect-url}"
                },
                "osx": {
                    "command": "open"
                },
                "linux": {
                    "command": "xdg-open"
                }
            }
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processName": "<example>"
        }
    ]
}

My Tasks.json
{
    "version": "0.1.0",
    "command": "dotnet",
    "isShellCommand": true,
    "args": [],
    "tasks": [
        {
            "taskName": "build",
            "args": [],
            "isBuildCommand": true,
            "problemMatcher": "$msCompile"
        }
    ]
}

I wasn't able to reproduce this problem. However, I am hoping that the fix for #173 addresses this as well. I will let you know once we have a release with that fix so you can see if that helps.

Now DNX is no longer.
https://github.com/aspnet/Home/issues/1426
I was wondering what the status of this was.  I know I'm on the bleeding edge and need to expect issues, but at the moment I have no IDE options with aspnetcirelease.

So 173, which I hope is the same as this, is fixed in our post-RC2 builds. We plan to push that out shortly after RC2. In the mean time you may be able to work around it (and confirm/deny my theory with) --
cd %USERPROFILE%.vscode\extensions\ms-vscode.csharp-1.0.5-rc2
Open %USERPROFILE%.vscode\extensions\ms-vscode.csharp-1.0.5-rc2\out\coreclr-debug\main.js in your favorite editor
Go to line 251
Add --
    "System.IO.MemoryMappedFiles": "4.0.0-rc2-24027",
rmdir /s /q coreclr-debug\debugAdapters
Restart VS Code
Wait for the debugger download to complete
Verify that coreclr-debug\debugAdapters\System.IO.MemoryMappedFiles.dll exits
Hopefully you will find this works now. If not, I will send you more instructions on sending us a log of the problem.

I have this path
%USERPROFILE%.vscode-insiders\extensions\ms-vscode.csharp-1.0.4-rc2
Is that right?

If you are using the 1.0.4 version of the extension, you may need to slightly adjust the line number, but otherwise - yup.

Followed these instructions..  System.IO.MemoryMappedFiles.dll does exist but the problem remains the same so I think its different from 173

@mikes-gh: Thanks! In that case can you gather a debugger log for us to look at: https://github.com/OmniSharp/omnisharp-vscode/wiki/Enabling-C%23-debugger-logging

@gregg-miskelly
Sorry for delay long weekend here.
Here is the log.
cs-debug.log.txt

@mikes-gh Thanks! I can see the problem from this. This is an issue with our expression evaluator on Win7.

Here are the details for future searches
ExceptionType="System.DllNotFoundException"
Stack:
McgInterop.rometadata_dll_PInvokes.MetaDataGetDispenser(Guid* rclsid, Guid* riid, IntPtr* ppv)
McgInterop.rometadata_dll.MetaDataGetDispenser(Guid& rclsid, Guid& riid, IntPtr& ppv)
System.Reflection.Adds.MetadataDispenser.NativeCoreSystemMethods.MetaDataGetDispenser(Guid& rclsid, Guid& riid, IntPtr& ppv)\r\n   at System.Reflection.Adds.MetadataDispenser.GetDispenserShim()
System.Reflection.Adds.MetadataDispenser.OpenFromMemoryPe(IntPtr& rawMemory, Int32 size, Object memoryOwner)
System.Reflection.Adds.MetadataDispenser.OpenFromByteArray(Byte[] data)
Microsoft.VisualStudio.VIL.VisualStudioHost.VilTypeSystem.GetIntrinsicAssemblyBytesPtr(UInt32& size)
Microsoft.VisualStudio.Debugger.EntryPoint.IDkmClrIntrinsicAssemblyProvider_GetIntrinsicAssemblyMetaDataBytesPtr(IntPtr pvClassInfo, IntPtr ClrRuntimeInstance, UInt32& Size, IntPtr& MetaDataPtr)

HResult="0x80131524

This should now be fixed. Install from https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.1.4 for the fix. We hope to post this to the extension gallery soon.


feat(demo): Fix island bug, refactor demo SCSS

Close #327

Fix the bug in List Demo by only styling dc-island that are directly under a f-item-preview
Add a mixin (dc-demo-element) that can be reused to turn invisible elements blue in the demo instead of respecifying the same styling several times to different selectors
Remove the _grid demo partial and put the selectors there in _exceptions

@dami-gg Here's the fix to the demo issue

:+1:

👍


Put back Node 10

When AWS Lambda (Zeit Now) will support it.

Yay https://aws.amazon.com/about-aws/whats-new/2019/05/aws_lambda_adds_support_for_node_js_v10/

Sunsetting.


*sql backup (local) for k3s

What kind of request is this (question/bug/enhancement/feature request):
RFE
Feature:
ability to periodically backup sql database locally
after thats in place, we'll want s3 uploads to remotely house them.

In Rancher Docs, need the following updates:

Rancher K3s HA install needs to call out that backups should be enabled on the backend database.
Upgrades of Rancher HA clusters should include taking a backup of the backend database, and call that out specifically.

In the backing up a cluster and restoring a cluster section of the docs, we should include information for Rancher + K3s.


load fail Error with https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js

hi sir, it's me
i use this in China , today i  get an error

指向“https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js”的

Thanks for letting us know about this. This is a duplicate of https://github.com/exceptionless/Exceptionless.UI/issues/195 and has been implemented via a pr. Can you please follow this issue.


How To load *.3tz

What happened?
I have a *.3tz file. How can I load it with CesiumJS?

Reproduction steps

...
Sandcastle example
No response
Environment
Browser:
CesiumJS Version:
Operating System:

This was also asked (and answered) in the forum at https://community.cesium.com/t/how-to-load-3tz/37419/2

thanks

thanks


Do not change scene on save when debugging

Fix https://github.com/godotengine/godot/issues/33409 https://github.com/godotengine/godot/issues/47861
Aka: Do not update scene tree dock when node edited outside of it
It would be incredible to get this in 3.3, but seeing as we're already in RC8 that is unlikely. Just saying this would save dozens of peoples' sanity when they're already in their most dangerous place: debugging

Reproduction (Thanks for suggesting, KoBeWi)

Add this code to any node:

  func _process(delta):
  	pass

Start debugging scene
Select any canvas item in the scene
Switch back to script tab
Save

It would be incredible to get this in 3.3, but seeing as we're already in RC8 that is unlikely. Just saying this would save dozens of peoples' sanity when they're already in their most dangerous place: debugging

Yes for 3.3-stable it's too risky, but it can likely make its way into 3.4 and 3.3.1.

Any chance this fixes #47861 too?
Also some steps to reproduce the issue reliably would be useful for testing the PR. I myself encountered this few times, but I don't know how to reproduce.

Any chance this fixes #47861 too?
Also some steps to reproduce the issue reliably would be useful for testing the PR. I myself encountered this few times, but I don't know how to reproduce, so difficult to say if the fix even works.

Add this code to any node:

  func _process(delta):
  	pass

Start debugging scene
Select any node in the scene
Switch back to script tab
Save

The steps don't work for me :/

The steps don't work for me :/

I elaborated that the selected node must be a CanvasItem.

Thanks!

Cherry-picked for 3.4.

Cherry-picked for 3.3.3.


release 3.0 causes brick

device wont update OTA. causes update boot loop after updating. Logs say it wasn't tested before releasing.

Do not update to 3.0, It is not ready yet, I added it for my internal testing. That is why I did not broadcast on discord to update like every other release


Object subscription

Is it possible via react package or do I have to use the js and implement myself?

Closing cause I read the docs...
The client is not subscribing to anything it is all backend's job.


Do you really guys calculate the gates values in LSTM?

Hello guys, I was checking at the code in the classes BasicLSTMCell  as well as LSTMCell and I don't see you use formulas to get the values of the gates (output, input and forget) is this procedure you guys use really valid (since gates have their own calculation)?
in the _linear method (which you use) I just see matmul, concat and some functions from variable_scope.py However if you did it in another way, I would like to know it.

I think this question is better suited to StackOverflow unless you determine that there's a specific bug that needs to be addressed.


Add bios for the Brain Encoding session

Adds IB and AP's bios and couple of objectives for the second part of the sesion

LGTM! Thanks a lot.


Support for retrieving the list of supported functions and symbols

Is your feature request related to a problem? Please describe.
I'm currently implementing some basic autocomplete for KaTeX in an app of mine, by basically scraping the support table for supported \.* names and autocompleting those within the app.
The "problem" is that I seem to be using 33 dependencies (just cheerio and its dependencies) just for scraping that page, and I'd like to find a cleaner/simpler solution.
Is there some nicer way of getting that list of functions and symbols?
Describe the solution you'd like:
I'm thinking potentially some APIs could be added for this, but they would feel a bit out of place, KaTeX's API seems pretty minimal.
Maybe there's already some way to retrieve the internal list from KaTeX itself without requiring additional APIs? That would be ideal because it would also spare me the ~10kb needed to list all those functions and symbols somewhere.
Maybe there's some other file in this repo that lists them all that's easier to scrape? mapping.pl seems the closest that I can see, but I'm not sure if it lists all of them.
Link to or name of a (La)TeX package that provides the same feature:
N/A
Describe alternatives you've considered:
Keep scraping the support table.
Additional context:
N/A

As a test, I tried exporting these as katex.__functions, katex.__macros, and katex.__functions and then you could do this:

That would work for me 👍

What is your use-case for this? Detecting usage of KaTeX?

Basically just providing some useful autocomplete when people write:
```katex
\|<- cursor here
```

Ah yes, autocomplete is a good motivation. Would a simple katex.getBuiltins() that returns a computed array of all functions/macros/symbols? (Not sure whether it should include .filter(x => x.startsWith('\\')... The list is 2774 long without it, and includes some Unicode characters like 𝕜 and 𝘆.)

Yes that should be more than fine for my use case too 👍


Adiciona Context para controlar exibição da Bag

Adiciona Context para controlar exibição da Bag
Bag é aberta ao adiciona um item ao carrinho
Adiciona animação ao abrir bag
Ajustes de fontes e focus

Codecov Report

Merging #20 into master will decrease coverage by 0.78%.
The diff coverage is 89.74%.

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
- Coverage   94.03%   93.25%   -0.79%
==========================================
  Files          18       19       +1
  Lines         218      252      +34
  Branches       56       60       +4
==========================================
+ Hits          205      235      +30
- Misses         12       16       +4
  Partials        1        1

Impacted Files
Coverage Δ

src/components/BagItem/BagItem.js
88.88% <ø> (ø)

src/components/NumberSelect/NumberSelect.js
100.00% <ø> (ø)

src/components/Step/Step.js
100.00% <ø> (ø)

src/context/BagDisplayContext.js
86.36% <86.36%> (ø)

src/components/Bag/Bag.js
96.00% <90.00%> (-4.00%)
:arrow_down:

src/components/Button/Button.js
100.00% <100.00%> (ø)

src/components/ProductCard/ProductCard.js
95.00% <100.00%> (+0.55%)
: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 c81c46a...55d310b. Read the comment docs.


Expected trailing dimension of mat1 to be divisible by 16 but got mat1 shape

I wrote a toy training loop to get something going with fp8 and ran into this padding related issue. I managed to solve it by just replacing a single line in my code by texts = ["Example text input 1 bla bla bla bla bla bla bla bla bla.", "Example text input 2.", "Example text input 3."] but it took me about 10 min to hunt down. I figure this is some performance related assert for tensor cores in which case padding feels like it makes sense
After that I now have a functioning hello world example with the loss going down
Epoch 1, Step 1, Loss: 8.910361289978027
Epoch 1, Step 2, Loss: 4.616391658782959
Epoch 2, Step 1, Loss: 2.377967119216919
Epoch 2, Step 2, Loss: 1.4298633337020874
Epoch 3, Step 1, Loss: 1.5666098594665527
Epoch 3, Step 2, Loss: 0.8038766384124756

Error
ao<EMAIL_ADDRESS>~/float8_experimental/test (main)]$ HF_TOKEN="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" python fp8.py
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00,  1.32it/s]
[rank0]: Traceback (most recent call last):
[rank0]:   File "/home/marksaroufim/float8_experimental/test/fp8.py", line 62, in <module>
[rank0]:     loss.backward()
[rank0]:   File "/home/marksaroufim/anaconda3/envs/ao/lib/python3.10/site-packages/torch/_tensor.py", line 521, in backward
[rank0]:     torch.autograd.backward(
[rank0]:   File "/home/marksaroufim/anaconda3/envs/ao/lib/python3.10/site-packages/torch/autograd/__init__.py", line 289, in backward
[rank0]:     _engine_run_backward(
[rank0]:   File "/home/marksaroufim/anaconda3/envs/ao/lib/python3.10/site-packages/torch/autograd/graph.py", line 768, in _engine_run_backward
[rank0]:     return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
[rank0]:   File "/home/marksaroufim/float8_experimental/float8_experimental/float8_tensor.py", line 297, in __torch_dispatch__
[rank0]:     return FLOAT8_OPS_TABLE[func](func, args, kwargs)
[rank0]:   File "/home/marksaroufim/float8_experimental/float8_experimental/float8_ops.py", line 151, in float8_mm
[rank0]:     tensor_out, amax = addmm_float8_unwrapped(
[rank0]:   File "/home/marksaroufim/float8_experimental/float8_experimental/float8_python_api.py", line 55, in addmm_float8_unwrapped
[rank0]:     output, output_amax = torch._scaled_mm(
[rank0]: RuntimeError: Expected trailing dimension of mat1 to be divisible by 16 but got mat1 shape: (32000x14.
[rank0]:[W612 11:03:16.562113367 ProcessGroupNCCL.cpp:1158] Warning: WARNING: process group has NOT been destroyed before we destruct ProcessGroupNCCL. On normal program exit, the application should call destroy_process_group to ensure that any pending NCCL operations have finished in this process. In rare cases this process can exit before this point and block the progress of another member of the process group. This constraint has always been present,  but this warning has only been added since PyTorch 2.4 (function operator())
(ao<EMAIL_ADDRESS>~/float8_experimental/test (main)]$

Code
import torch
from torch.utils.data import DataLoader
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-hf")
tokenizer.pad_token = tokenizer.eos_token
model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf").to("cuda:7")

# Convert all torch.nn.Linear modules to Float8DynamicLinear
from float8_experimental.float8_linear_utils import swap_linear_with_float8_linear
from float8_experimental.float8_dynamic_linear import Float8DynamicLinear
swap_linear_with_float8_linear(model, Float8DynamicLinear)

# Wrap model with Fully Sharded Data Parallel (FSDP)
import torch.distributed as dist
from torch.distributed.fsdp import FullyShardedDataParallel as FSDP
import os
os.environ['MASTER_ADDR'] = 'localhost'
os.environ['MASTER_PORT'] = '12355'
os.environ['WORLD_SIZE'] = '1'
os.environ['RANK'] = '0'

dist.init_process_group(backend='nccl', init_method='env://')

# model = FSDP(model, use_orig_params=True)

# optionally compile the model
# model = torch.compile(model)

# Prepare your dataset and dataloader (customize this part as needed)
class TextDataset(torch.utils.data.Dataset):
    def __init__(self, texts, tokenizer):
        self.encodings = tokenizer(texts, return_tensors='pt', padding=True, truncation=True, max_length=512)

    def __getitem__(self, idx):
        return {key: val[idx] for key, val in self.encodings.items()}

    def __len__(self):
        return len(self.encodings.input_ids)

# Example text data
texts = ["Example text input 1.", "Example text input 2.", "Example text input 3."]
dataset = TextDataset(texts, tokenizer)
dataloader = DataLoader(dataset, batch_size=2)

# Set up the optimizer
optimizer = torch.optim.Adam(model.parameters(), lr=5e-5)

# Training loop
model.train()
for epoch in range(3):  # Loop over the dataset multiple times
    for i, batch in enumerate(dataloader):
        inputs = {k: v.to(model.device) for k, v in batch.items()}

        # Forward pass
        outputs = model(**inputs, labels=inputs['input_ids'])
        loss = outputs.loss

        # Backward and optimize
        optimizer.zero_grad()
        loss.backward()
        optimizer.step()

        print(f'Epoch {epoch + 1}, Step {i + 1}, Loss: {loss.item()}')

# Save the fine-tuned model
model.save_pretrained("./fine_tuned_model")

print("Training complete!")

agreed, we should at the very least document this upfront, and look into if a good padding implementation is viable.

I made this small util a very long time ago, let me retry with your example

With the changes in that PR and using SGD
import torch
from torch.utils.data import DataLoader
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-hf")
tokenizer.pad_token = tokenizer.eos_token
model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf").to("cuda")

# Convert all torch.nn.Linear modules to Float8DynamicLinear
from float8_experimental.float8_linear_utils import swap_linear_with_float8_linear
from float8_experimental.float8_dynamic_linear import Float8DynamicLinear

import float8_experimental
float8_experimental.config.pad_inner_dim = True

swap_linear_with_float8_linear(model, Float8DynamicLinear)

# Wrap model with Fully Sharded Data Parallel (FSDP)
import torch.distributed as dist
from torch.distributed.fsdp import FullyShardedDataParallel as FSDP
import os
os.environ['MASTER_ADDR'] = 'localhost'
os.environ['MASTER_PORT'] = '12355'
os.environ['WORLD_SIZE'] = '1'
os.environ['RANK'] = '0'

dist.init_process_group(backend='nccl', init_method='env://')

# model = FSDP(model, use_orig_params=True)

# optionally compile the model
# model = torch.compile(model)

# Prepare your dataset and dataloader (customize this part as needed)
class TextDataset(torch.utils.data.Dataset):
    def __init__(self, texts, tokenizer):
        self.encodings = tokenizer(texts, return_tensors='pt', padding=True, truncation=True, max_length=512)

    def __getitem__(self, idx):
        return {key: val[idx] for key, val in self.encodings.items()}

    def __len__(self):
        return len(self.encodings.input_ids)

# Example text data
texts = ["Example text input 1.", "Example text input 2.", "Example text input 3."]
dataset = TextDataset(texts, tokenizer)
dataloader = DataLoader(dataset, batch_size=2)

# Set up the optimizer
# optimizer = torch.optim.Adam(model.parameters(), lr=5e-5)
optimizer = torch.optim.SGD(model.parameters(), lr=5e-4)

# Training loop
model.train()
for epoch in range(3):  # Loop over the dataset multiple times
    for i, batch in enumerate(dataloader):
        inputs = {k: v.to(model.device) for k, v in batch.items()}

        # Forward pass
        outputs = model(**inputs, labels=inputs['input_ids'])
        loss = outputs.loss

        # Backward and optimize
        optimizer.zero_grad()
        loss.backward()
        optimizer.step()

        print(f'Epoch {epoch + 1}, Step {i + 1}, Loss: {loss.item()}')

# Save the fine-tuned model
model.save_pretrained("./fine_tuned_model")

print("Training complete!")

All works, that being said we have a fuse "scaled_mm" things in flight and need to add a few more tests

https://github.com/pytorch/ao/issues/571


Create a wiki

It would be nice to have a wiki for new users to be able to fully use all the features in papernet

duplicate of #13


feat(mlflow): Update Mlflow, API server, pyfunc server and batch predictor

Description
This PR is the second part (2 out of 3) of a series of PRs to update the version of Mlflow used by Merlin (to 1.26.1*). These changes are:

Update the version of Mlflow used in the Merlin SDK and publish it to PyPI
Update

the Merlin pyfunc server and batch predictor to use the updated Merlin SDK version released in step 1 and publish them to PyPI
the Merlin API server to ensure that requests sent to Mlflow reflect the update API endpoint contracts
the Mlflow image so that it's built using version 1.26.1

Update the default pyfunc server and batch predictor version in the Merlin SDK and publish its new version to PyPI

Main Modifications

.github/workflows/external.yml - Updated the CICD job to release a new version of the Mlflow image
api/mlflow/mlflow.go - Added a header in all requests sent to the Mlflow server from the Merlin API server because it's now required
api/mlflow/response.go - Changed the data type of certain fields in Mlflow's responses sent to Merlin
mlflow/Dockerfile - Updated Dockerfile of the Mlflow server with newer dependencies
python/batch-predictor/requirements.txt - Updated the requirements file with a newer version of the SDK which requires version 1.26.1 of Mlflow
python/pyfunc-server/requirements.txt - Updated the requirements file with a newer version of the SDK which requires version 1.26.1 of Mlflow

Tests

Checklist

[x] Added PR label
[ ] Added unit test, integration, and/or e2e tests
[x] Tested locally
[ ] Updated documentation
[ ] Update Swagger spec if the PR introduce API changes
[ ] Regenerated Golang and Python client if the PR introduces API changes

Release Notes

NONE

Thanks a lot for the quick review! :D I'll merge this soon!


Update to scala 2.13 (Issue #216)

I made some small progress towards https://github.com/47deg/fetch/issues/216 but from some of your custom plugins this dependency is coming from that can't be resolved for 2.13
org.spire-math:kind-projector_2.13:0.9.9

I fixed it in the sbt file of the project but it's still there. Do you think you can upgrade your base library first or can we remove this dependency? @purrgrammer
PS: Sorry for the reformatting, I have scalafmt on by default.

Thanks @bijancn for your time.
If you rebase against master, I've just merged https://github.com/47deg/fetch/pull/218, which should fix the kind-projector issue.

So I think I got everything working :)

Thanks a lot @bijancn :heart:

@bijancn just a comment: your commits don't have your email associated so Github doesn't link them to your account. If that's ok with you I can merge it right away.

Let me fix that :)

Damnit. That is somehow harder than the fix itself... I'll create a new PR I think

Okay I think I managed to migrate the changes over with the correct email :) https://github.com/47deg/fetch/pull/219


Try again: Type-checking ExternalPtr<T> by downcasting..

This is an alternative to #852. This is clearly a more convoluted approach, but it seems to be the approach that Rust prefers.
This PR currently does not pass CI. It fundamentally changes how ExternalPtr<T> works. And there were assumptions about this in #[extendr]-impl, that needs to be adjusted. Done.

I finally see the issue here. We always thought of ExternalPtr as a facility for #[extendr]-impl, but ExternalPtr needs the type-checking to stand on its own. Let me show the example that illustrates this. Imagine you've got these two functions
https://github.com/extendr/extendr/blob/caf485e27ddfffff5e1cc228d97d49faff8f395a/tests/extendrtests/src/rust/src/externalptr.rs#L92-L100
And one may accidentally use this
 externalptr_numeric <- create_numeric_externalptr(as.numeric(1:10))
 sum_integer_externalptr(externalptr_numeric)

I'm unsure what happens today, unfortunately. I suspect we do not error, before using this information,
in which then a panic ensues unpredictably.

This compiles and runs well in {b64} this permits the use of ExternalPtr<Engine> as a function argument instead of Robj previously there would be a messy panic.


Can't load 'miracles'

I've installed reality 0.0.5, gem list reports that it is installed. The following happens when I try to follow the README:
waltd$ irb
2.4.6 :001 > require 'reality'
 => true
2.4.6 :002 > require 'reality/miracles'
LoadError: cannot load such file -- reality/miracles
	from /Users/waltd/.rvm/rubies/ruby-2.4.6/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:117:in `require'
	from /Users/waltd/.rvm/rubies/ruby-2.4.6/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:117:in `require'
	from (irb):2
	from /Users/waltd/.rvm/rubies/ruby-2.4.6/bin/irb:11:in `<main>'

This is a well-working Ruby environment, where I've done a ton of Rails dev work without issue or error. Any suggestions to debug this?

Hey, unfortunately, Reality is a kind of weird state (huge refactoring/rewrite started, but then I don't have time to continue). Examples with "miracles" (in current README) work with prototype gem version 0.1.0.alpha3, while 0.5.0's README is in the other branch: https://github.com/molybdenum-99/reality/tree/old-prototype-branch


Remove redundant error check

Description:
Send() did superfluous error checking. This PR removes it.
Breaking changes:
None.
New features:
None.
Fixes:

[x] Linter warning.

PR status:

[ ] Version bumped
[ ] Change-log updated

Thanks @abrander


API: Rename plan_tools

[Ugh -- my local github CLI is confused and originally published a description for an unrelated PR here. Sorry for the noise.]
This moves plan_tools -> simulators, replaces it with a shim, and adds a test to ensure the old imports work.
DO NOT MERGE -- pending more discussion on what to name the functions themselves.
Closes #721

For people following via email: my local CLI got confused and re-published a description for an unrelated PR. See GitHub for correct PR title and description.

Codecov Report

Merging #730 into master will decrease coverage by <.01%.
The diff coverage is 55.17%.

@@            Coverage Diff             @@
##           master     #730      +/-   ##
==========================================
- Coverage   84.49%   84.49%   -0.01%
==========================================
  Files          17       18       +1
  Lines        4522     4533      +11
==========================================
+ Hits         3821     3830       +9
- Misses        701      703       +2

Impacted Files
Coverage Δ

bluesky/simulators.py
51.02% <51.02%> (ø)

bluesky/plan_tools.py
81.81% <77.77%> (+30.79%)
: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 3cd5806...70ee053. Read the comment docs.

Once hints are merged (#720) we can make plot_raster_path smarter and N-dimensional.


How to Enable ECDH?

I tried configuring secp256k1 with ./configure --enable-experimental --enable-module-ecdh and building that.  Still within secp256k1-py, secp256k1.HAS_ECDH is False.  What am I doing wrong?
~/projects/secp256k1-py$ SECP_BUNDLED_EXPERIMENTAL=1 INCLUDE_DIR=/usr/local/include LIB_DIR=/usr/local/lib pip install . --no-binary :all:

I am tripped up on this as well. I have definitely built with --enable-module-ecdh for the .so, however upon calling the function I am getting:
File "/home/jarret/.local/lib/python3.7/site-packages/secp256k1/__init__.py", line 307, in ecdh
    raise Exception("secp256k1_ecdh not enabled")
Exception: secp256k1_ecdh not enabled

I was able to get it running successfully by pointing pip3 to a clone of this repo like so:
 pip3 install ~/git/secp256k1-py/

That was able to find the secp256k1_ecdh linking symbol in my libsecp256k1.so in LD_LIBRARY_PATH and now HAS_ECDH evaluates to True.