text:
Major performance regression in Node.js 14

Here's a bit of history for you,
In 2016 I reported a performance issue with node::MakeCallback. I posted scientific measurements supporting my claim. Node.js people said that they knew things much better than I do and that there are no performance issues with node::MakeCallback.
Then of course they did find, and eventually fix this bug I reported, but by that time I had been permanently banned. So my first encounter with these Node.js people ended with me being permanently banned.
Now in 2020, I'm still banned, and they even ban my secondary account (@alexhultman-2fa), so I cannot contact them to submit bugs.
The issue here is that node::MakeCallback is the single most critical gateway for any native code (addon, or Node.js itself). It's the only Node.js function that is obligatory and has to be used. Everything else can be done with vanilla, native V8 calls.
As of Node.js 14, the difference between calling from native land to Node.js using node::MakeCallback and the vanilla V8 counterpart Local<Function>:Call is 28%. Prior to Node.js 14 (13, 12, 11, 10) this overhead used to be about 5% (after they fixed my initial bug report).
Now, recently I have measured a major drop introduced in Node.js 14 and forwards, and I've even reported a suspected commit that happened just in time for 14, and that majorly refactors the node::MakeCallback related code.
This issue report I did with my secondary account, but they quickly hid the report/question and banned that account as well.

So, because I know what I'm talking about when it comes to overhead of node::MakeCallback (it has been a nail in my eye for 5 years now), I need someone to report this issue to the Node.js people and drive the issue. I cannot do it, because I'm banned and they do not want my input.
Scientific facts
Just like always, I deal with science in everything I do. I do not make claims that have no scientific backing.
In Node.js 13, 12, 11, and 10 - we can benchmark a simple hello world program that is entirely bottlenecked by nothing other than node::MakeCallback. We know this because running the same program with EXPERIMENTAL_FASTCALL, which does nothing but swap node::MakeCallback with the vanilla V8 Local<Function>::Call counterpart, presents increasingly deviating results:
The results from Node.js 10, 11, 12, 13 with node::MakeCallback are roughly:
Running 10s test @ http://localhost:9001
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    81.12us   27.14us 425.00us   83.48%
    Req/Sec    61.50k     8.71k   83.21k    69.80%
  1235471 requests in 10.10s, 80.12MB read
Requests/sec: 122330.17
Transfer/sec:      7.93MB

And if we enable EXPERIMENTAL_FASTCALL (as described above) we see the following:
Running 10s test @ http://localhost:9001
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    77.06us   26.27us   1.40ms   85.54%
    Req/Sec    64.80k     7.25k   76.53k    62.38%
  1302500 requests in 10.10s, 84.47MB read
Requests/sec: 128960.00
Transfer/sec:      8.36MB

Which is not a big difference; node::MakeCallback had quite okay peformance prior to Node.js 14, only a minor 5% difference.
While with Node.js 14 they are:
Running 10s test @ http://localhost:9001
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   102.41us   32.61us 471.00us   86.56%
    Req/Sec    48.84k     5.70k   61.53k    69.31%
  981155 requests in 10.10s, 63.63MB read
Requests/sec:  97149.85
Transfer/sec:      6.30MB

Some 21% lower.
Enabling EXPERIMENTAL_FASTCALL for Node.js 14 (swapping the node::MakeCallback with vanilla V8 function calls as detailed above), we get the following:
Running 10s test @ http://localhost:9001
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    78.75us   24.94us 424.00us   85.03%
    Req/Sec    63.16k     7.83k   82.84k    61.39%
  1269292 requests in 10.10s, 82.31MB read
Requests/sec: 125678.17
Transfer/sec:      8.15MB

Which is roughly on par with what we had with Node.js 13, 12, 11, 10.
The conclusion is, by changing NOTHING AT ALL, except for swapping node::MakeCallback to vanilla V8 counterparts, we see a small increase in Node.js 10, 11, 12, 13 of 5%-10%.
With Node.js 14, the difference between the two are 28% - we now only see 97k req/sec vs the 122k we saw in prior Node.js versions.
This is a major performance regression, and we have clinically tested NOTHING BUT node::MakeCallback - that's the only single variable here, and results show great deviation -> leading to a conclusion recent code changes in Node.js regarding node::MakeCallback has resulted in major performance regressions.
I would like to see this fixed upstream at Node.js repos, but like explained I do not have the ability to instigate a conversation with these people.

I did some bisecting and found this kind of drop between v12.16.3 and v12.17.0 as well as between v13.8.0 and v13.9.0.
I also compiled an erly v14.0.0-pre version and it did not have the drop.
Doing a git diff between those tags brings up all kinds of changes to the callback mess.
The thing is, I did not know they backported these changes to old versions - this issue is not about v14 in particular, but it affects the entire Node.js lineup, that still get backported changes.
So the same drop in perf. you can see in later versions of v12, v13 and v14.
This makes it a lot more complicated to say when and where this change was made, and looking at the diff, it's clear that they change a lot of stuff in every single release. Even internal stuff that shouldn't need any changes at all, they edit that and make significant changes.
Therefore, it makes no sense for me to bother with this. I have no say in Node.js, they don't want me there, and if I would try and point fingers at what changes are stupid and what are not - they would kick me out in 2 seconds anyways because it doesn't fit their agenda.
Alright, that makes it simple. I have no say here, and I cannot fix what I don't control.

It really is a shame they take in people, that do a bunch of internal refactoring to fundamental things - with motivation that it "fixes" stuff and makes the code "better". They really should just stop, never touch anything internal, leave it be.
They really do believe that they are making the code better, and every single release it drops a few percentages here, a few there, and when you settle for mediocre, constantly lowering your standards slightly with every point release, you get worse and worse every day.
We used to be three digits, now we're two digits. And they talk about writing http-parsers in assembly... they are out of their mind. If you cannot even nail a function call, it won't matter the slightest. They're overfocusing on benchmarking C and assembly code and entirely give no fucks for the JavaScript code. Makes a lot of sense to micro-optimize handwritten assembly for a parser that can do 5 million req/sec, when you cannot even deliver 50k function calls a second.
Now we all have to swallow this drop across all versions of Node.js because there is no way you can refuse an update since there are so many security flaws in every release. And they make significant changes to fundamental internal stuff all the time.
It's staggering how much you can over-complicate a function call, while still believe that you make things better. It's micro optimization of things that don't matter, for the cost of things that actually do bottleneck the overall data flow.
Alright, I better stop before I pop an artery.

I’ll report it

I hope they can take this negative input without interpreting it as personal abuse for the sake of being evil. It's technical and scientific, nothing else.

We used to be three digits, now we're two digits

I ran helloworld benchmarks on one of these google compute C2 series "compute optimized" with 4 vCpu Ubuntu 20.04 Node v14.5.0 uWebSockets.js v18.3.0 which is what I use in production and get consistent 147k Req/Sec
./wrk -t2 -c10 -d10s http://127.0.0.1:3000
when you throw in some compute per request, I used a JWT cookie decode because all my requests have at least a JWT decode it brings it down to 28k Req/Sec
./wrk -t2 -c10 -d10s -s s.lua http://127.0.0.1:3000
using straight Node 14 (no uWS) gives 27k for helloworld and 17k for token decode
I tried switching to Node v12.18.2 got about the same results for all tests, possibly a bit faster but hard to say

@hst-m That's OT and irrelevant to this issue.

authors: alexhultman hst-m sirganya


text:
Getting original request url onopen

When a new websocket clients connect I pass url parameters in my request.  I can't find a way to access the original request uri, is there a way I can?

Look at example Upgrade. You get HTTP stuff in onupgrade

Alright thanks :)
I successfully moved my project from seasocks to uWebSockets now

source: gharchive/issue

authors: alexhultman azertyalex

repo: uNetworking/uWebSockets

license_type: permissive

license_source: bigquery


text:
Segmentation fault in the testsBin All the time

#0  0x00007f9c6b720b0b in std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x00007f9c6b720b0b in std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007f9c6bdfca0c in uWS::Hub::connect(std::string, void*, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > >, int, uWS::Group*)
() from /usr/lib/libuWS.so
#2  0x0000000000410c1d in testReceivePerformance() ()
#3  0x0000000000404789 in main ()

What platform is this on?

authors: ZDzhao alexhultman


text:
Create tools/processes to prevent npm and github from getting out of sync

We are often running into 2 related problems:

Sometimes code is merged into github dev or master branches without being published to NPM.  This means that there new code won't actually be available to other repos.
Sometimes code is published to NPM but not merged into github.  This means this code is likely to get clobbered on the next NPM publish, and is confusing when it comes time to debug.

We should come up with some script/tool/process to fix this.  Some ideas:

We could create post-commit scripts for each repo similar to https://github.com/freedomjs/freedom/blob/master/tools/releases.sh that run each time a commit occurs on github.  After each commit, it can check if the commit was to dev or master, and if so check if the NPM version matches the version in github (for example by comparing package.json files).  If they don't match we could try to automatically fix, or just send an alert email.  This should fix problem 1 above.
We could also create a pre-publish script in package.json that verifies you are only publishing from the dev or master branches.  This should fix problem 2.

FWIW, we've now got a pretty decent release process for uproxy-lib. I no longer worry about whether or when changes make it to NPM.

Closing as this is not a priority right now.

authors: dborkan jab trevj

repo: uProxy/uproxy

license_source: github-api


text:
Asynchronous verifyClient middleware causes client socket to hang up

I spent a pretty decent amount of time tracing this one down until I realized uWebSockets was the issue. It may have something to do with the fact that it's behind a SocketCluster setup, but it seems unlikely.

What operating system are you running?

Windows

What platform/language are you using?

Node.js

Are you using SSL, if so, how?

SSL is not part of the equation

To reproduce:

Run socketcluster create TestApp
Add a line in worker.js to add async handshake middleware, i.e.

  scServer.addMiddleware(scServer.MIDDLEWARE_HANDSHAKE, (req, next) => setImmediate(next));

This should result it the errors below in Chrome:

This issue is not present if ws is specified as the WebSocket backend for SocketCluster.

Thanks for reporting. This cannot be fixed currently, but depends on how nodejs camp decides to handle this. Probably it will never be fixed.

Well, good to know it's only Windows-specific. We're going to be deploying on Linux in production, so at least I should be able to use uWS there where performance matters. Thanks so much for looking further into this.
P.S. Though the whole situation really sucks, that splendid tag gave me a pretty good laugh.

Hey thanks for sticking around, I first thought this was just a simple js bug that could be fixed by anyone but yeah its a pretty central issue on Windows.

Fixed in 24ad90c689fef123675f7a8cf9145a6e9f851371 should be in v0.13.0

authors: alexhultman rockmacaca

repo: uWebSockets/uWebSockets


text:
🛑 guaca-soc is down

In 1627ccc, guaca-soc (https://aules.ccss.uab.cat/guacamole/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: guaca-soc is back up in 17017e7.

repo: uab-dtic/guacamole-uab-monitoring

license: MIT


text:
Weird initialisation of id

On my x86_64-slackware-linux-gnu, both GCC and CLang complain about the initialisation in id.c:
#ifndef _MSC_VER
  *self = (semver_id_t) {1};
#else

which is indeed weird; I do not know what the symbol _MSC_VER is.
By the way, why the field numeric is a char?  Being that the library uses C99, it may be more appropriate to use a bool?

The symbol _MSC_VER is defined by the compiler msvc on Windows, otherwise yes a bool can be used but stdbool.h come in recent version of the msvc compiler, a simple and cross platform tweak is
#if !defined(__cplusplus) && _MSC_VER && _MSC_VER < 1900
# define bool	unsigned char
# define true	1
# define false	0
# define __bool_true_false_are_defined	1
#else
# ifdef __cplusplus
#  include <cstdbool>
# else
#  include <stdbool.h>
# endif
#endif

So such initialisation is wrong when compiling on non-Windows platforms?

It's the opposite, indeed it's not wrong but not officially supported. What's the warning of both clan and gcc ?

GCC does this:
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../include -Wall -Wextra -pedantic -O3 -MT src/id.lo -MD -MP -MF src/.deps/id.Tpo -c ../src/id.c  -fPIC -DPIC -o src/.libs/id.o
../src/id.c: In function 'semver_id_ctor':
../src/id.c:40:3: warning: missing initializer for field 'num' of 'semver_id_t {aka struct semver_id_t}' [-Wmissing-field-initializers]
   *self = (semver_id_t) {1};
   ^
In file included from ../src/id.c:31:0:
../include/semver.h:53:7: note: 'num' declared here
   int num;
       ^

and clang does this:
libtool: compile:  clang -DHAVE_CONFIG_H -I. -I.. -I../src -I../include -Wall -Wextra -pedantic -O3 -MT src/id.lo -MD -MP -MF src/.deps/id.Tpo -c ../src/id.c  -fPIC -DPIC -o src/.libs/id.o
../src/id.c:40:27: warning: missing field 'num' initializer [-Wmissing-field-initializers]
  *self = (semver_id_t) {1};
                          ^
1 warning generated.

clang also complains about other similar initialisations.
IMHO you should just use the field-by-field initialisation on all the platforms.

The warning is relative to this missing initialized fields, you can disable it by compiling with -Wno-missing-field-initializers
It does not affect anything, I maybe should use calloc instead of malloc to avoid field initialization.

I am paranoid, so I try very hard to avoid the -Wno- options.  Is it all right if client code recycles an old data structure and some field is not reinitialised?  Also if the internal representation of the data is changed?

When setting something with {0}, the memory is all set to 0 recursively, even missing initialized fields.
Warnings on initializers are a plague. They are responsible for the fact that many people don't use default initializers where they could and should. Shame on gcc and Co that they enable this with -Wall.

authors: marcomaggi uael

repo: uael/sv

license: unlicense


text:
Cannot find module 'mkdirp' error

Ran npm install -g thrift2flow
Running thrift2flow throws this error:
Error: Cannot find module 'mkdirp'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/jonsadka/.nvm/versions/node/v8.12.0/lib/node_modules/thrift2flow/lib/index.js:24:15)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)

Running npm list -g --depth=0 shows that thirft2flow@0.5.3 is installed
NOTE: Tried on node 8.12.0 and node 6.10.3

FYI running npm install -g mkdirp@latest fixes the issue but seems like this should be added as to dependencies in the package.json

mkdirp is now a dependency (and I think has always been?), not a dev dependency.

this should be resolved

authors: jonsadka vicapow


text:
Add JSpecify checking for return statements

This pull request includes the following:

Check whether the return type of the method matches the type of the actual return statement for the generics for example:
 static A<@Nullable String> test() {            return new A<String>();    }
For the method return type, the type parameter is @Nullable String and the type of the type parameter of the actual return statement is NonNull. NullAway will report an error here.

@lazaroclapp I already did a few passes on this one.  It'd be great if you could take a look, when you have time

source: gharchive/pull-request

authors: NikitaAware msridhar

repo: uber/NullAway


text:
Integrate with Kubernetes

https://github.com/fabric8io/kubernetes-zipkin

I have prepared templates for all-in-one distribution https://github.com/pavolloffay/jaeger/commit/a67ac353428bdb0d2e524e2f42d04d2cbfe55d1d. It contains Kubernetes and OpenShift template.
If there is interest I can submit a PR.

I see two use cases which might demand two different sets of YAML files:

demo/quick start/development use case
production , PoC's, and more serious usage

For the first case, an all-in-one would suffice, as well as making use of the in memory storage.
For the production use case, it would be better to split the components into their own pods, as:

the UI might have different routing rules as the backend
the query service might need a different scaling as the collector
the agent might need to be deployed once per node

Additionally, there would be also a Cassandra pod, probably as a stateful set.

@jpkrohling I agree. The all-in-one is really just a playground app / Docker image, using in-memory store for spans. I am not sure how much it benefits from Kubernetes template. This issue is really about having a deployment framework to run Jaeger backend on K8s as a production setup, which includes

running agents on hosts (not sure if even possible with K8s)
running a cluster of collectors saving to Cassandra
running another cluster of query services behind a single url / LB.

I still see value in the Kubernetes/OpenShift templates for all-in-one, at least for now. This way, people can deploy it along with their applications.
We can eventually replace it with a more appropriate template, with each component on its own pod. We might need to complete some other tasks first, like ensuring that the individual components can indeed be built and executed individually.

running agents on hosts (not sure if even possible with K8s)

If you mean on "nodes", then yes: it can be done as a daemon set, which is a way of telling Kubernetes to run a specific pod on all nodes: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/

I still see value in the Kubernetes/OpenShift templates for all-in-one, at least for now. This way, people can deploy it along with their applications.

As long as it comes with a disclaimer about limited functionality of the in-memory storage. E.g. we may need to enhance it to bound the size of memory store & support TTL in case people decide to run this in production.

Should we close this https://github.com/jaegertracing/jaeger-kubernetes?

authors: jpkrohling pavolloffay yurishkuro

repo: uber/jaeger


text:
Code extraction

Ludiwg is a fantastic toolbox
How ever it would be amazing that the code or functions called while running can be extracted as a solid code , this will help users to develop their coding skills and maybe provide improvements in the long run ?

Thanks @atwahsz !
I'm not really sure what do you mean by "extracted". I guess what you mean is making Ludwig write the code of the model somewhere isntead of executing it. I'm not sure how that will improve things, it would be an additional level of indirection that would make testing things more complicated. Plus, if users want to learn by looking at how a model is built they can look at the code or even better put a breakpoint at the beginning of the build function and follow the trace to see how a model is built. I don't think generating code would make things easier.
In front of a strong argument i could change my mind :)

Ok then . What about automating model definition? Is there a way ?

Or is there a way defining a feature and the definition can only be used if the feature exists

For automatic model definition, I was thinking along the lines of a recommender, something where you provide the data and it suggests the types, but I didn't follow up on that a lot, because I believe specifying types is not that big of an issue for the user to be honest. And also, having to prioritize, this never made it to the top of the list.
Regarding the second question, if i get it correctly, that's how Ludwig already works. You have image encoders, set encoders, audio encoders among others, but if you specify a text input only, all the others, although available to you, are not going to be used. But maybe i'm misunderstanding what you are asking, please clarify with one example in case.

repo: uber/ludwig


text:
HMM model 2 broken

model 2 in the hmm example crashes with no error message when calling train_loss = elbo.loss(model, guide, sequences, lengths, args, include_prior=False) on cpu. the other models seem to work fine.

Can you please add steps to reproduce? It surprises me since all models should be tested via tests/test_examples.py

python examples/hmm.py --model 2 [-n 1]
@neerajprad verified that it works on pytorch master but breaks on release for both python 2 and 3.

The reason the tests do not fail is that the tests run truncated versions --truncate 10 and the error is not triggered when truncating. Reasons we run tests truncated include:

truncated tests run faster
until #1521 is merged, non-truncated tests will only pass on PyTorch 0.4 CPU (fail 0.4 GPU, 1.0 CPU, and 1.0 GPU)

authors: fritzo jpchen

repo: uber/pyro


text:
Embed dependencies that broke travis in the past

To make the testsuite more reliable we are embedding dependencies that broke travis in the past. This includes:

thrift-gen
The source of external dependencies, since godep broke the build at some point

Looks good. :+1:

@uber/ringpop any objections on merging this? It makes travis again -and hopefully in the future- not crash during its test run.

lgtm

authors: dansimau jwolski thanodnl

repo: uber/ringpop-go

license: mit


text:
Revert "Partition healing (#264) and "Periodical partition healing (#265)

This reverts commit 6c025bcc67bdeb1dd5b55269195a740f2e283fc5a and 02be5362b835be17c70f9af5fe418f230cf07af1.
Reason: those two commits are using a dev-dependency ('async') in production code.

lgtm

LGTM

authors: danielheller mennopruijssers severb

repo: uber/ringpop-node


text:
"/composer.phar": stat /composer.phar: no such file or directory

docker@boot2docker:~$ alias composer="docker run -i -t -v \$PWD:/srv ubermuda/composer"
docker@boot2docker:~$ composer create-project symfony/framework-standard-edition test
FATA[0000] Error response from daemon: Cannot start container 9ca9708bdb1f82c00d14809955f1ed9c57e1d95e8216484c6bce3a96a62b0231: exec: "/composer.phar": stat /composer.phar: no such file or directory

There is currently an SSL problem when installing Composer:
PHP Warning:  readfile(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in Command line code on line 1
PHP Warning:  readfile(): Failed to enable crypto in Command line code on line 1
PHP Warning:  readfile(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1

Therefore composer.phar not exist.

authors: cbeier romqin

repo: ubermuda/docker-composer


text:
Mqtt skeleton

Walking skeleton created for project.

Codecov Report

Merging #4 into master will decrease coverage by 1.54%.
The diff coverage is 48.45%.

@@             Coverage Diff              @@
##             master       #4      +/-   ##
============================================
- Coverage        50%   48.45%   -1.55%
- Complexity        2       14      +12
============================================
  Files             1        5       +4
  Lines             4       97      +93
  Branches          0        1       +1
============================================
+ Hits              2       47      +45
- Misses            2       50      +48

Impacted Files
Coverage Δ
Complexity Δ

...ava/fi/helsinki/btls/services/LocationService.java
0% <0%> (ø)
0 <0> (?)

...java/fi/helsinki/btls/domain/ObservationModel.java
0% <0%> (ø)
0 <0> (?)

...java/fi/helsinki/btls/utils/PropertiesHandler.java
100% <100%> (ø)
10 <10> (?)

...in/java/fi/helsinki/btls/domain/LocationModel.java
32% <32%> (ø)
2 <2> (?)

...in/java/fi/helsinki/btls/services/MqttService.java
75% <75%> (ø)
2 <2> (?)

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 5f27116...dd1d82c. Read the comment docs.

authors: Jhoneagle codecov-io

repo: ubikampus/Bluetooth-location-server


text:
'Avnei Hefetz' is an israli settlement city which is not coming in country 'IL' suggestions whereas 'Einav' is also an israli settlement city which is coming in country 'IL'  suggestions.

Short description
I was trying to do search location using react-geosuggest based on type cities. I need to list out the cities in Israel where The city 'Avnei Hefetz' is an israli settlement city and it is not coming in suggestion drop down whereas 'Einav' is also an israli settlement city which is coming in search drop-down suggestions.
Expected results
I need 'Avnei Hefetz' in search drop-down suggestions under country 'IL' (Israel) Is there any possible way?
Actual results
Avnei Hefetz is not listed in search drop-downs.

The suggestions are coming from the Google API. react-geosuggest has no influence on that.

authors: AishwaryaJayakumar plumdumpling

repo: ubilabs/react-geosuggest


text:
Refactor erc20 ubiquity

Resolves #644

Most of those issues have ready to copy/paste patches so there are guys who took the opportunity to self assign those issues which is ok in terms of how a market works but not really a pleasant UX for issue creator (or first time contributor in your case).

The next release of the bot is to offer direct compensation for issue creators so in the future this problem should be mitigated.

authors: eugenioclrc pavlovcik

repo: ubiquity/ubiquity-dollar


text:
Procedure to make ostree-image-signed work as expected

According to /etc/containers/policy.json, only, ghcr.io/ublue-os and some RedHat sources will verify the signing key of the containers, if I didn't manually add my repo to and my pubkey to it, it will just proceed it, I tried modify policy.json and add my pubkey to system, rpm-ostree will return following error:
error: Creating importer: Failed to invoke skopeo proxy method OpenImage: remote error: A signature was required, but no signature exists

It didn't say it is incorrect, it said it isn't exists, is is because I push my image to Docker Hub?
But when I manually run cosign verify, it said my container is valid.

Thanks, though I understand what you're saying, but I'm kinda give up, because I know how to protect my online and GitHub accounts, it should secure enough for me, I prefer to wait skopeo supports Sigstore's OIDC Token signing.

repo: ublue-os/image-template


text:
Label creation

Hi @LinxuanHu
We need to create at least 10 labels for our own project.

do you have any suggestion for the labels

yes add labels like: group discussion, high priority, check milestone

So editing former labels is counted as a new label or not?

there are several labels already there when we start, does it count to the 10 labels?

@poojashresthacode I think you need to add new labels.

there were 9 labels, so we need 19 in total?

Are we allowed to create labels other than the maintainer?

only maintainer can do that

So only the maintainer will get two points for this, right?

labels and milestones are shared project points, so i think once your group have created enough labels and milestones, every member in the group will get the same points

Yeah, you are right.

So only the maintainer will get two points for this, right?

It's a shared point. So, everyone gets that point, including the maintainer.


text:
How to increase the Microk8s Built-in Registry default limit of 20GB

With Microk8s latest version, how can we change the built-in registry default size limit of 20GB?
My colleague has posted to the forum with the same question.
If someone knowledgeable could please reply quickly here, or on the forum question, be very grateful. It's impacting our production env. so any pointers would help us a lot. We've been following the official docs here but it doesn't offer an answer to this question.
Thank you.

We noticed that in theory master branch seems to have support for this already:
microk8s.enable registry:size=30Gi
https://github.com/ubuntu/microk8s/pull/1024
But this command does not seem to do anything on latest snap (1.18). Could it be a result of the failing CI snap build  here?
very grateful for any support!

@bml1g12 @kinowarrior could you please get MIcroK8s from the latest stable channel?
sudo snap install microk8s --classic --channel=latest/stable

The size argument is available there.

@ktsakalozos - Thanks for your reply. Alas, we are already on latest/stable and have refreshed snap.  The command microk8s.enable registry:size=30Gi didn't do anything (kubectl get pv -A just displays 20GB).
Found an original issue for this here, where there were different options considered. Please can you confirm the right command to use.  In other words, what were you referring to when you stated The size argument is available there..  Thanks again, apologies for any oversight here.

You have the command right: microk8s.enable registry:size=30Gi
Could you please make sure the PVC is recreated with the new specs? This may mean you disable and re-enable the registry and the storage addons. If this is not possible, you may want to delete the PVC and re-enable the registry so the registry manifest is re-applied.

Excellent thanks very much, seems we needed to update from  v1.18.3  rev 1422 to   v1.18.3  rev 1443 (sudo snap refresh --channel latest/stable microk8s)
(detector) ben@ben-asus /media/DATA/gym_ai/EntranceCounterLabelingTool/benchmarkalgorithms (develop) $ kubectl get pv -A
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                               STORAGECLASS        REASON   AGE
pvc-83928ee7-d7ac-4d37-99e8-6425fbaf31bc   30Gi       RWX            Delete           Bound    container-registry/registry-claim   microk8s-hostpath            6m3s
(detector) ben@ben-asus /media/DATA/gym_ai/EntranceCounterLabelingTool/benchmarkalgorithms (develop) $ kubectl get pvc -A
NAMESPACE            NAME             STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS        AGE
container-registry   registry-claim   Bound    pvc-83928ee7-d7ac-4d37-99e8-6425fbaf31bc   30Gi       RWX            microk8s-hostpath   6m5s

authors: bml1g12 kinowarrior ktsakalozos


text:
Fixes on knative addon enable and tests

Fix bug in knative enable script. Consolidate istio and knative tests.

@olatheander here are the fixes on knative I got.

Merging this to unblock travis PR testing

@ktsakalozos Excellent fixes. Case closed it seems.

authors: ktsakalozos olatheander


text:
Publish Chisel3 sbt subprojects in a single jar

We'd like to publish all Chisel3 sbt subprojects in a single jar. It appeared that the initial attempt at this was working, but it was probably masked by the fact that the separately published jars were still around.
See #194

This seems to be the case now.

I disagree. We're still publishing 3 separate jars: coremacros,
chiselfrontend, and chisel3 with sbt 013.11
On Mon, Nov 21, 2016 at 2:05 PM, Richard Lin notifications@github.com
wrote:

Closed #208 https://github.com/ucb-bar/chisel3/issues/208.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ucb-bar/chisel3/issues/208#event-867311060, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGh1wNcyZu2NpgcZ_T0f0DYldLhkYZMiks5rAhWWgaJpZM4It5L-
.

The projects are being published separately, but it seems chisel3 includes everything that is in chiselfrontend and coremacros

The issue should be updated to "avoid publishing the coremacros and
chiselFrontend jars" since these no longer seem to be required.
On Mon, Nov 21, 2016 at 2:45 PM, Richard Lin notifications@github.com
wrote:

The projects are being published separately, but it seems chisel3 includes
everything that is in chiselfrontend and coremacros
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ucb-bar/chisel3/issues/208#issuecomment-262091742,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGh1wLOg6C803e2qopK7zgd6lLG5hssdks5rAh8agaJpZM4It5L-
.

Hopefully this issue is actually resolved now.


text:
fix SeqMem's read port creation

Unfortunately, 41674d5e130f64d7489fdb8583b8f4ad88b64aeb broke read enable inference for SeqMems in RemoveCHIRRTL of firrtl, and also broke inferReadWrite because port creation generates additional wires to truncate index bits. This will help firrtl correctly infer read enables for SeqMems.

@azidar is this the intended Firrtl behavior, i.e., that the address wire should be declared outside the when block, but the port should be declared within the when block?
If so, I agree this is the right fix.

Yes, this is the intended Firrtl behavior.

authors: aswaterman azidar donggyukim


text:
Improve VCS waves performance by using vlsi-mem-gen for SimAXIMem

Issue:
Dumping the SimAXIMem to waves degrades VCS performance, incurs a ~30 second startup penalty to VCS simulations, and generates >800MB .vpds. Ideally, we would be able to specify a flag in VCS to not dump memories above a certain size, or annotate the memory in Chisel/Firrtl as DoNotCollectWaves. The first solution is impossible, and the second requires too much re-engineering.
However, the SimAXIMem is larger than the fixed VCS memory dump size limit when it is generated as a unified memory, rather than a banked memory.
For name mem_ext depth 33554432 width 64 ports mwrite,read mask_gran 8, we should emit
reg [63:0] ram [33554431:0];

vs
reg [7:0] ram [0:33554431];
reg [7:0] ram_1 [0:33554431];
reg [7:0] ram_2 [0:33554431];
reg [7:0] ram_3 [0:33554431];
reg [7:0] ram_4 [0:33554431];
reg [7:0] ram_5 [0:33554431];
reg [7:0] ram_6 [0:33554431];
reg [7:0] ram_7 [0:33554431];

When simulating the combined ram, VCS will decide that it is too large to dump, ignoring it. The simulation will then startup instantly and generate small waveforms (~30M).
Solution
There are two workarounds for this.
The first is to generate a larger SimAXIMem with the WithExtMemSize mixin. This is undesirable since we shouldn't have to mess with the config to get good simulation performance.
The second is to use vlsi_mem_gen in rocketchip, which correctly generates the combined memory.
This PR attempts the second approach. I understand that vlsi_mem_gen is deprecated in favor of macrocompiler, but it should be fine to use that script only for simulated TestHarness memories?

[ ] PR and bump barstools, since it needs to support repl-seq-mem in the generateHarness phase.
[ ] Verify verisim still works

Closed since Colin's BigInt fixes will coincidentally resolve this

repo: ucb-bar/project-template


text:
Which version of detectron2 did you modify?

Thanks for release the code.
Could i ask you which version of detectron2 did you modify?

We modified the initial release of detectron2. The closest release version should detectron2 v0.1.

Feel free to reopen it if there is still an issue.

repo: ucbdrive/few-shot-object-detection


text:
[WIP] Prototype implementation of queue-per-model scheduler

This is a prototype implementation of the queue-per-model scheduler (design doc). This PR should not be as stands, but should instead be broken up into distinct components that can be merged individually.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/32/
Test FAILed.

jenkins test this please

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/34/
Test FAILed.

test this please

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/35/
Test FAILed.

The effort to implement this is documented in CLIPPER-91.

authors: AmplabJenkins dcrankshaw shaneknapp

repo: ucbrise/clipper


text:
Rewrite webgl box transformation interactive

Interactive in the graphics chapter.

Refer to issue #333

repo: uccser/cs-field-guide


text:
Lh/new datepicker

closes #697
using a different react datepicker + using date-fns instead of moment

@laholstege Creating and assigning a workstation, top is cutoff:

authors: jSylvestre laholstege

repo: ucdavis/Peaks


text:
Style All Search Bars

Django-Machina's default search bar styling is much nicer then the search bar styling that currently exists in the project. This issue aims to look into if it's practical to apply the Django-Machina styling search bar styling to all search bars.

After looking at how Django-Machina does its styling and looking into where that styling is coming from it is clear that it should be straight forward to implement that styling for the search bar in base.html.

The Django Machina styling was implemented into the search bar in base.html and a corresponding pull request was submitted.

https://github.com/uchicago-cs/chigame/pull/368

Closed after successfully merging and closing PR https://github.com/uchicago-cs/chigame/pull/368. Thanks to @joshuamonroe for reviewing the PR.

Issue Score: Excellent

repo: uchicago-cs/chigame


text:
6pm 4 created a Searched Terms page

Created a searched terms page with an empty table. The page is also linked to the navbar button under the admin pull-down menu.

LGTM

You made a comment "LGTM".  But this is not a code review.  Please see: https://ucsb-cs156.github.io/topics/pull_requests/ and scroll down to "Doing a Code Review".

I estimate this at 20 points.    Probably to get 20 points, it really ought to have a storybook.    But I'll suggest that you do a storybook for this component as a separate 10 point story.

authors: alonkatzcs phtcon


text:
Asignación de cuentas contables para las transacción de bajas y traslados

Se debe desarrollar el registro, la consulta y la edición de las cuentas contables para las clases para las transacciones de bajas y traslados, teniendo en cuenta que para el modulo de gestión contable se requiere el registro de esa movimientos para las transacciones, la issue debe cumplir con la siguientes requerimientos:

[ ] Realizar el desarrollo para el registro de las cuentas de naturaleza crédito y debito para las dos transacciones
[ ] Realizar el desarrollo para la consulta de las cuentas de naturaleza crédito y debito para las dos transacciones
[ ] Realizar el desarrollo para la edición  de las cuentas de naturaleza crédito y debito para las dos transacciones

Se empezó a abordar el Issue a las 8:44

En el CRUD de Movimientos (Kronos?) no hay registros (activos) para traslados ni bajas de Arka (registros cuyo acrónimo tenga "arka" en algún lado) - validar en la API store, por lo que se creó el PR udistrital/movimientos_crud#87
Por otro lado, en el CRUD de movimientos de Arka ya existe el movimiento... : (validar en la API store)
{
  "Id": 13,
  "Nombre": "Solicitud de Bajas",
  "Formato": "{ \"Funcionario\": \"number\", \"Ubicacion\": \"number\", \"Revisor\": \"number\", \"FechaVistoBueno\": \"string\", \"Elementos\": [ { \"Id\": \"number\", \"Soporte\": \"number\", \"TipoBaja\": \"number\", \"Observaciones\": \"string\" } ] }",
  "Descripcion": "Formato para realizar la solicitud de bajas de varios elementos",
  "CodigoAbreviacion": "SOL_BAJA",
  "NumeroOrden": 13,
  "FechaCreacion": "2020-09-30T10:38:04.328315Z",
  "FechaModificacion": "2020-09-30T10:38:04.328315Z",
  "Activo": true
}

... que se está usando en el módulo de bajas, por lo que solo hay que crear el registro para traslados

Mientras lo desarrollado en udistrital/movimientos_crud#87 se pasa a test, se simulan los datos:
diff --git a/src/app/pages/catalogo-bienes/registro-cuentas-catalogo/registro-cuentas-catalogo.component.ts b/src/app/pages/catalogo-bienes/registro-cuentas-catalogo/registro-cuentas-catalogo.component.ts
index 3018191..c01adb8 100644
--- a/src/app/pages/catalogo-bienes/registro-cuentas-catalogo/registro-cuentas-catalogo.component.ts
+++ b/src/app/pages/catalogo-bienes/registro-cuentas-catalogo/registro-cuentas-catalogo.component.ts
@@ -89,6 +89,28 @@ export class RegistroCuentasCatalogoComponent implements OnInit {

     this.catalogoElementosService.getTiposMovimientoKronos().subscribe((res: TipoMovimientoKronos[]) => {
       // console.log({res});
+      res.push(
+        {
+          Id: 32,
+          Nombre: 'Traslado',
+          Descripcion: 'Traslado de bienes y servicios de Arka II',
+          Acronimo: 'tr_arka',
+          Activo: true,
+          FechaCreacion: new Date('0001-01-01T00:00:00Z'),
+          FechaModificacion: new Date('0001-01-01T00:00:00Z'),
+          Parametros: '',
+        },
+        {
+          Id: 31,
+          Nombre: 'Baja',
+          Descripcion: 'Baja de bienes y servicios de Arka II',
+          Acronimo: 'b_arka',
+          Activo: true,
+          FechaCreacion: new Date('0001-01-01T00:00:00Z'),
+          FechaModificacion: new Date('0001-01-01T00:00:00Z'),
+          Parametros: '',
+        },
+      );
       const desglose = res.reduce((acc: TiposMovimiento[], val): TiposMovimiento[] => {
         const tipo = movimientos.find(mov => val.Descripcion.indexOf(mov.buscar) !== -1);
         const criterio = (t: TiposMovimiento) => tipo && (t.tipo === tipo.buscar);

De manera complementaria al movimiento para bajas que ya estaba disponible (arriba), se agregó en udistrital/movimientos_arka_crud#36 el movimiento para traslados, así:
{
  "Id": 19,
  "Nombre": "Provisional",
  "Formato": "{ \"acta_recibido_id\": \"number\", \"consecutivo\": \"string\",  \"documento_contable_id\": \"number\", \"contrato_id\": \"number\", \"vigencia_contrato\": \"number\" }",
  "Descripcion": "Formato para guardar una Entrada de Bienes Entregados de Manera Provisional",
  "CodigoAbreviacion": "EBEMP",
  "NumeroOrden": 20,
  "FechaCreacion": "2021-01-29T06:25:55.292672Z",
  "FechaModificacion": "2021-01-29T06:25:55.292672Z",
  "Activo": true
}

Queda pendiente confirmar si el formato de cada movimiento tiene todo lo que se necesita


text:
Update README to new Phoenix command

Quick doc fix to address #375. Including both versions of command for now since 1.3 is pretty new.

Welcome and thank you @david-wilson 👍

authors: david-wilson doomspork

repo: ueberauth/guardian


text:
Get ride of FOSUserBundle, how to achieve this?

Lets said I have a restful API open to the world and I don't want that, instead I want to secure the endpoint. This is part of my security.yml file:
access_control:
    - { path: ^/api/.*, role: IS_AUTHENTICATED_ANONYMOUSLY }

As you can see any can access the API so this area needs to be secured in somehow. My idea? By passing a parameter at the request header. Since my client is an iOs app then they need to take care of send that parameter when request any API endpoint. The parameter is named X-PDONE-SESSION-ID and basically it holds a PHP session. How I can protect the API? Any ideas using this bundle or any other ideas?

Solved by #22

authors: aequasi paquitodev

repo: uecode/api-key-bundle


text:
Buttons grid

Two buttons to toggle each type of grid. Sometimes it's really annoying to have both enable at same times.

This is cool.
One thing, can we use icons or any shorter text for the buttons? We're trying to keep the devtools as compact as we can, so they aren't in the way.

Yeah I was thinking about that, it's way too long. What about two icons like this?

This looks great!

Done!

Ok give me one seconde, I once again miss vertical and horizontal order...

Ok I fixed it!

authors: JeremDsgn birkir

repo: ueno-llc/starter-kit-universally


text:
Visualisation of the policy

Question ❓
Dear @AlejandroCN7,
Is there any way to visualise the policy in some way with sinergym? I want to visualise/explain the decisions the agent took in some states. I mainly use PPO and DQN.
Kind regards,
Michiel
Checklist

[x] I have read the documentation (required)
[x] I have checked that there is no similar issue in the repo (required)

:pencil: Please, don't forget to include more labels besides question if it is necessary.

Hi @MichielKempkens,
You can load the trained agent and execute it using Sinergym logger to get a CSV file of interactions between agent and environment. Then, you can visualize that information using matplotlib (for example). Take a look in 'scripts/load_agent.py' (you don't need to use that script if you don't want, but as example to see how to load a model).
Recently we have included WandB compability, see #306 (documentation updated too) in case you want to use it to monitor training data in real time or record evaluations there.

repo: ugr-sail/sinergym


text:
Incorrect handling of quotes inside multi-line strings.

The TOML file
x='''
""
'''

fails to parse correctly.
Test: import toml; toml.loads("x='''\n\"\"\n'''")
Expected: {'x': '""'}
Actual: {'x': '"""'}

To add to the above:
default_to_none = true
id = "govA-mandira-nirodhaH"

[description]
en = """
Portuguese viceroy De Noroha ordered - "No Hindu Temples should be erected in any territories of my King & temples shouldn't be repaired w/o my Permission."
"""

fails with
 File "/usr/lib/python3.9/site-packages/toml/decoder.py", line 362, in loads
    raise TomlDecodeError("Unterminated string found."
toml.decoder.TomlDecodeError: Unterminated string found. Reached end of file.

Related (with a workaround): https://github.com/uiri/toml/issues/284#issuecomment-841751348

It should be noted that both the actual result and the expected result in @yyny's example are wrong. Per the standard, opening triple quotes at the end of a line trim the first newline in the string value, but closing triple quotes do not trim the final newline.
Taking it as is, the Expected is {'x': '""\n'}. But in module version 0.10.2, the Actual is still: {'x': '"""'}

authors: eksortso vvasuki yyny

repo: uiri/toml


text:
fix diagnostics in hover when lsp_hover_max_lines > 0

I noticed when I had set the lsp_hover_max_lines option my diagnostics in hover were not showing, this change fixed it for me.

Good catch, thank you!

authors: mlvzk ul

repo: ul/kak-lsp

license: Unlicense


text:
Boolean for true/false values

🚀 Feature Request

For values that are true/false like if the device should save the setting on powerup, let's use a Boolean input so we don't have to parse a string and it's clearer to the user what should be given.
🔈 Motivation

Cleaner code and clarity in documentation
🛰 Alternatives

📎 Additional context

Verified to be clear in all three device files

authors: GraysonBellamy ULibrady

repo: ulfsri/pyAlicat


text:
Where is ulid.js

In the documentation says:
Browser

where is this ulid.js file?
How can I generate this file using the project files?

https://github.com/ulid/javascript/blob/master/package.json#L5

Made the docs clearer on this

authors: alizain andcuevas rogaldh

repo: ulid/javascript


text:
Transition to Jekyll

If we transition to Jekyll, we can support content management (somewhat) and more importantly we can implement an RSS feed from our site.  This would allow us to push announcements to all of our sites.  Challenges include getting everyone used to jekyll and cleaning up the config, but I believe the payoff will be worth it

linking to #13 here as it's relevant.
We might need to look into hosting our site at an actual domain if we want to take advantage of this. Our current setup is limited in what it can do. I could be wrong about this but we should loop @kennyhong in to confirm.
Do we have a domain? Does someone want to volunteer their AWS education credits to host the devclub site?

A member of the club who works in U of M's IST department mentioned that they could possibly get hosting for us.  Women In Computer Science also has hosting on the CS department's website.
We may be able to get free hosting on one of the University's servers, and then we may not need a domain.  UMSU is also looking at their own hosting solution, which @mardelmaduro asked about at the last ACE meeting

with that in mind we might not need to worry about #6

So the Jekyll branch is getting pretty outdated by now.  We should consider taking a day or two and doing another transition from the current master to jekyll, with the caveat that the process of making changes needs to be clear to .devNoobs
Other than that, we can also looks at the changes between the two versions and add them to the jekyll branch

You can rebase the branch onto master if you like. I don't know if it is worth merging this in until we figure out our hosting situation.

repo: umdevclub/devClub


text:
site: better responsive

支持一下响应式

+1

repo: umijs/father-doc


text:
typeings.d.ts 读取失败，无法扩展全局类型声明

tsconfig
{
  "compilerOptions": {
    "resolveJsonModule": true,
    "baseUrl": "./",
    "target": "es6",
    "moduleResolution": "node",
    "jsx": "preserve",
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noImplicitReturns": true,
    "suppressImplicitAnyIndexErrors": true,
    "declaration": true,
    "skipLibCheck": true,
    "paths": {
      "@@/*": [".umi/*"],
    }
  },
  "include": [
    "./typings.d.ts",
  ],
  "exclude": ["scripts/templates/*"]
}

typings.d.ts
declare global {
  interface Window {
    requestIdleCallback: (callback: () => void) => number;
    cancelIdleCallback: (id: number) => void;
  }
}

打包依然报错
src/components/form/index.tsx(521,22): error TS2339: Property 'cancelIdleCallback' does not exist on type 'Window & typeof globalThis'.
src/components/form/index.tsx(524,55): error TS2339: Property 'requestIdleCallback' does not exist on type 'Window & typeof globalThis'.

refer: https://github.com/umijs/father/issues/227#issuecomment-720928000

authors: PeachScript tolerance-go

repo: umijs/father


text:
Tâche 2 -- Joanie Birtz - Janic Fournel

Ajout dossier et readme.md pour tâche 2

Bon travail!👍

authors: OussamaSghaier janicf


text:
Polls: Voting issues.

[ ] 1. I vote from the feed and everything happens normally. But if I refresh the page, in the feed I do not see more result.

[x] 2. In addition anonymous voting is enabled. Statistics are well grayed out but I can still click and see it.

Then issue №1 appears only when Timeline cache is enabled. So, polls from Polls module should be loaded in Timeline using embed, the same as it was done for Attached Polls.

repo: unaio/una


text:
[SB8]: JS error for stories without text

error Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'languages') thrown for stories without textual component: https://develop.design-system.pages.dev/?path=/story/foundation-logos--pnud-logo-blue

Should be fixed now

@CalebLuster , I don't think so. It is probably an issue for other stories as well: https://post-sb8-upgrade-fixes.design-system.pages.dev/?path=/docs/foundation-typography-links--docs. Please scan through them to make sure the same treatment applied everywhere

Just made a commit to fix this, I forgot to reference the ticket in the commit but here is a link to it
https://github.com/undp/design-system/commit/e47cf0ccdba8fe4d9119221dd201de29a976a0e8

Yep, looks like it is gone, closing

authors: CalebLuster Jura

repo: undp/design-system


text:
autocomplete based on another field

Is it possible to filter the autocomplete based on another field?

Sorry but I'm not sure what you want to autocomplete.

My description was too short, let me add some context:
I have a model with two foreign keys. Based on the choice of the first foreign key, the second one should be filtered. Typical example: Nation / Region / City.
Thank you for your very fast answer :)

Unfortunately, this is not supported.

authors: lukasvinclav nicokant

repo: unfoldadmin/django-unfold


text:
Action with form example does not work

I am using django-unfold 0.29.1 with django 5.0.6
The example snippet under README Action with form example does not work.
@register(User)
class UserAdmin(ModelAdmin):
    actions_detail = ["change_detail_action_block"]
    form = SomeForm(request.POST or None)  # <<< WHERE DOES request COME FROM?

    @action(description=_("Detail"))
    def change_detail_action_block(self, request: HttpRequest, object_id: int) -> str:
        user = User.objects.get(pk=object_id)

        if request.method == "POST" and form.is_valid():
            # Do something with form data
            form.cleaned_data["note"]

            return redirect(
                reverse_lazy("admin:users_user_change", args=[object_id])
            )

        return render_to_string("some/template.html", {
            "form": form,
        })

The server does not start since there is no request in context, and I guess that line should go in change_detail_action_block.
After moving the line, I see another error when I click the action button.
AttributeError at /admin/example/post/1/change_detail_action_block/
'SafeString' object has no attribute 'has_header'
Request Method:	GET
Request URL:	http://127.0.0.1:8000/admin/example/post/1/change_detail_action_block/
Django Version:	5.0.6
Exception Type:	AttributeError
Exception Value:
'SafeString' object has no attribute 'has_header'
Exception Location:	/home/guanhao/pets/django-apps/.venv/lib/python3.11/site-packages/django/utils/cache.py, line 284, in patch_response_headers
Raised during:	unfold.decorators.inner
Python Executable:	/home/guanhao/pets/django-apps/.venv/bin/python
Python Version:	3.11.9
Python Path:
['/home/guanhao/pets/django-apps/reproduce',
 '/home/guanhao/.pyenv/versions/3.11.9/lib/python311.zip',
 '/home/guanhao/.pyenv/versions/3.11.9/lib/python3.11',
 '/home/guanhao/.pyenv/versions/3.11.9/lib/python3.11/lib-dynload',
 '/home/guanhao/pets/django-apps/.venv/lib/python3.11/site-packages']
Server time:	Sat, 29 Jun 2024 01:13:24 +0000

It seems the action function should return a response instead of the rendered string. So I changed it to
        return render(request, "some/template.html", {
            "form": form,
        })

When I view the form example this time, no error is displayed, and I can see a form with one field. However, I'm unsure if this matches the intended example. Additionally, the example snippet lacks some import statements, which makes it less straightforward to use compared to other examples that work with simple copy and paste.

Fixed #527

it still get same error after follow the document

authors: lukasvinclav raptium yswtrue


text:
🛑 SearXNG is down

In cd7a326, SearXNG (https://searxng.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: SearXNG is back up in d8ab176 after 24 minutes.

repo: unforest/uptime


text:
🛑 Libreddit is down

In 49916ac, Libreddit (https://libreddit.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Libreddit is back up in b218817 after 17 minutes.


text:
🛑 Nitter is down

In 584abbe, Nitter (https://nitter.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Nitter is back up in 1cc0198 after 15 minutes.


text:
🛑 Nitter is down

In a96909d, Nitter (https://nitter.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Nitter is back up in f0e3540 after 1 hour, 17 minutes.


text:
🛑 Rimgo is down

In ba198b3, Rimgo (https://rimgo.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Rimgo is back up in cf23c92 after 13 minutes.


text:
Update to Chromium 107.0.5304.121/122

This PR updates to Chromium 107.0.5304.121/122.
Change log
Blog post

Thanks for the fast approvals, I'll merge and tag when my build has finished

repo: ungoogled-software/ungoogled-chromium


text:
In wide format, account button is duplicated

Wide:

Slightly more narrow:

Ideally we de-duplicate and hide the account button which is in the footer. If that's difficult then remove from the header.

The login button will eventually be customizable content. #682
If there is content then the button appears correctly.

If there is content then the button appears correctly.

Doesn't the button show twice in the screenshot? Or maybe I'm misunderstanding?

Remove login button in header from 3 column view.
Add Login/user icon in the far right of the header in all views
Keep login button in footer
Search bar in 3 column view will be extended to login icon. - 3 and 2 column view headers will now look the same

Add Login/user icon in the far right of the header in all views

When the user is not logged in, this will be a button with the icon that is currently displayed on the "Profile" button.
When the user is logged in, this will be a disk with the user's first initial in the center, akin to how it looks for Google products.

repo: unicef/iogt


text:
Update nominee: modular-open-source-identity-plaform.json

Update nominee: modular-open-source-identity-plaform.json

@nathanbaleeta: it's not clear to me how this project can be categorized as a standard.
Can you please provide evidence towards this?

I took them by their word, since at the moment we only require evidence of existing repo for open source software. Kindly see what categories they selected.

authors: lacabra nathanbaleeta

repo: unicef/publicgoods-candidates


text:
"Override helm values" button overlaps with save button

See screenshots for two different screen sizes using chrome:

Thank you very much for your report!
Duplicates #252. Fix is included in the next release.

authors: SteinRobert buschNT

repo: unikubehq/frontend


text:
Extension not working

Getting error with dates
Error handling response: ReferenceError: moment is not defined
at chrome-extension://oamembonjndgangicfphlckkdmagpjlg/manager.js:78:25
at String.replace ()
at chrome-extension://oamembonjndgangicfphlckkdmagpjlg/manager.js:75:44
at Array.every ()
at chrome-extension://oamembonjndgangicfphlckkdmagpjlg/manager.js:42:18
at chrome-extension://oamembonjndgangicfphlckkdmagpjlg/manager.js:44:17
at Array.every ()
at chrome-extension://oamembonjndgangicfphlckkdmagpjlg/manager.js:42:18

same

till the time not get updated i rolledback to 0.3.2

fixed in 0.4.1

authors: amuagarwal ni1chigo2115 unintended


text:
Cognito User Groups Necessary for Unity-Sips-Test deployment

As a necessary prerequisite to getting https://github.com/unity-sds/unity-project-management/issues/71 done, we want to make sure some Cognito user groups are in place to support the Unity-Test and Unity-Sips-Test accounts.
Acceptance Criteria:

[ ] A documented convention for how the user group strings are composed.
[ ] The necessary Cognito User Groups are deployed to Unity-Test.   @ramesh-maddegoda will probably have to consult with the SPS Team, and ADS Teams, at a minimum, to figure out what these groups should be.
[ ] Some basic documentation exists, in Gitbook, describing what the groups are

Cognito User Group Standards
https://github.com/unity-sds/unity-cs/wiki/Cognito-User-Group-Standards

authors: galenatjpl ramesh-maddegoda

repo: unity-sds/unity-cs


text:
Do Rolling Check on Smoke Test after deploy

Instead of hard-coded 6 minutes in the MC run.sh script, do a rolling check.
If bootstrap doesn't complete within 6 minutes, the subsequent actions could fail.  For this check we would probably want to check that the load balancer is up and running before continuing on.

Hi @hargitayjpl , I saw this ticket, but I think you already have another plan and/or already did this. Can you please comment on the status of this?


text:
Put Management Console under the navbar

add a route for Mgmt Console under the navigation bar
do NOT add the Mgmt Console to the navigation menu
test/make sure that the Mgmt Console shows up under the navbar when you put the right URL into the location bar

Management console does work under the navigation bar

repo: unity-sds/unity-ui-infra


text:
Node 22: fs.Stats constructor is deprecated

For your information, this warning appears when running vitest in Node 22 environment:
(node:2057) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.

I managed to figure out that it comes from mlly being the dependency of vitest:
=> Found "mlly@1.6.1"
info Reasons this module exists
   - "vitest#local-pkg" depends on it
   - Hoisted from "vitest#local-pkg#mlly"
   - Hoisted from "vitest#local-pkg#pkg-types#mlly"

The exact statement causing the issue is not present in the source code of mlly, but is generated in its build/distribution by rollup:

Consider upgrading rollup and its relatives, or adjust the line of code that may lead to that statement in production.
There is also a duplication of rollup in your lock file:
https://github.com/unjs/mlly/blob/c282adb509cdb6a96343095504d6feeffd65217b/pnpm-lock.yaml#L2171-L2176

Same problem nuxt:
https://github.com/nuxt/nuxt/issues/26975

This is an upstream issue (https://github.com/wooorm/import-meta-resolve/issues/27) which is resolved in v4.1.0 of import-meta-resolve, but because mlly inline import-meta-resolve, it may take a little while for the fix to percolate downward.

Fix already merged via https://github.com/unjs/mlly/pull/249

https://github.com/unjs/mlly/releases/tag/v1.7.0

For nuxt users, you need a new nuxi release please followup via https://github.com/nuxt/cli/issues/405

authors: RobinTail danielroe pi0 srbarba

repo: unjs/mlly


text:
fix: default to node14 esbuild target

🔗 Linked issue
https://github.com/nuxt/framework/issues/4771
❓ Type of change

[ ] 📖 Documentation (updates to the documentation or readme)
[x] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
Context: https://github.com/nuxt/framework/issues/507
This sets esbuild target to currently minimum node version required for project, and removes the additional default set within the plugin.
https://esbuild.github.io/api/#target
📝 Checklist

[x] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

We might set the default to a fixed value to avoid unpredictable behavior.
It is also not solving linked issue. import.meta.url should be avoided regardless in runtime!

Yes, agreed that's a separate issue. But I don't see a downside to defaulting to minimum supported node version. (We could then override in specific presets, e.g. for Cloudflare.) What do you think of the change?

No. Node.js should not be esbuild target! It will make strange issues when bundled. Let's track universal import.meta support via #181

It is currently set to node12/esbuild2019. I think this should be changed.

It is always set to es2019. Migration to es2020 is a good idea but I need to investigate more to ensure there would be no breaking changes.
What is goal of this PR?

If you want to stay on es2019, then I think the changes this PR makes are more in the nature of a tweak than a change.
However, es2020 should be safe in node 14+. FWIW, I don't believe node14.16.0 uses node-specific APIs. It's just shorthand for the JS features supported in Node 14.16.0. (See here for details of the transforms.) What makes you think it would cause issues once bundled?

Migration from es2019 to es2020:

Removes optional chaining / nullish  coalescing transform. It can break some targets
Adds import.meta. It is not safe to use even within context of Node for purpose of import.meta.url. (therefore https://github.com/unjs/nitro/issues/181)

What else this change would solve?

repo: unjs/nitro


text:
docs(readme): use _data rather than data for raw requests

Following https://github.com/unjs/ofetch/pull/49 the README should be updated accordingly.

Thanks!

repo: unjs/ofetch


text:
fix: strip script output before logged JSON

🔗 Linked issue

❓ Type of change

[ ] 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
[x] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
The bcd tests now test console.dir, which causes them to log output as part of the test. This is causing the generated JSON to break and tests to fail, because currently we just naively write the script output to a JSON file. With this PR I've added a shell script that uses sed to strip anything from before a RUNTIME_DATA_START delimiter, menaing that anything printed during the test run itself is ignored.
📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

Good catch, thanks!
Do we perhaps want to have the runner script itself write the file rather than piping logging output to save a step?  LGTM though!

authors: ascorbic queengooborg

repo: unjs/runtime-compat


text:
聊天气泡bug

当英文字符过长的时候，字符会显示再气泡外

其实这个项目主要是供大家学习参考用，UI这块我并没有做太多的优化工作，我个人的业余时间的安排上也是有取舍的，所以我希望这个问题由您自己解决。我先说下出现这个问题的原因：你输入了一连串字符，这串字符并没有间隔和换行，而view组件对这种情况并不会自动换行，只会单行显示，所以文本太长的话，文本就溢出了。而解决这个问题的话，说简单也简单，说难也很难。简单的方式是，自己在生成用于渲染的消息对象时，判断content进行，插入换行符。而复杂的方法是，写一套算法，优化各种情况下的UI展示效果。我之前看过Android版微信在这方面的优化算法，这块的东西网上也应该可以搜索到，算法也是很复杂的。我精力有限，所以很抱歉了。

authors: sailorr unmagic

repo: unmagic/wechat-im


text:
Supporting math

Does Unoserver convert HTML with equations (MathML or LaTeX) to docx with editable equations?
Would this be possible?

Unoserver uses LibreOffice for converting, so that's entirely up to Libreoffice, and nothing we can support from our end.

authors: Opussci regebro

repo: unoconv/unoserver


text:
How i can get data from devices connected to ports (Principally MAC address) from a Switch

I am trying to get data from all devices (Clientes, APs, USW, Gateways) connected to ports (Principally MAC address)
I am itereting each port but the mac is empty (it shows a blank space)
in unifi controller webpage it shows the MAC, but i can't get it with the unpoller
can u help me?
Here is my code and output:

That's a picture of code, not actually code. It's also missing portions, so no one can use that to reproduce your behavior. Here's the same answer I provided on Discord before you posted this:

I'm not seeing anywhere in the code that messes with client mac addresses nor the mac addresses in the port tables. I suspect the API is not providing them. I get the same result as you.  The example in the repo shows how to loop each client. You can get the switch MAC and client MAC there.

This library just pulls the API data from your controller. I recommend pulling that data directly (curl), yourself, and inspecting it, so you know what's available.

This is the code, thank you very much for your help, how do I do what you told me? ( pulling all data directly)

You can use cURL to pull the data, the API endpoint links are in types.go, the device endpoint you're looking for is here: https://github.com/unpoller/unifi/blob/82e0d2cb4da1a28e0e057cc36dca38f5bd9ced56/types.go#L36
So if you wanted to pull from curl, you could go to the page in your browser, select a request to the API, select copy as curl and then tweak it a bit.
For example:
 curl 'https://127.0.0.18443/api/s/default/stat/device' -H 'User-Agent: Foo' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br' -H 'Referer: https://127.0.0.1:8443/manage/default/clients' -H 'X-Csrf-Token: <a token here>' -H 'Connection: keep-alive' -H 'Cookie: unifises=<a cookie here>' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -o - | gunzip

the -o - | gunzip does two things, one sends data to your terminal, then pipes it to gunzip, which is important since we're asking for gzip encoding (compressed data)
Now, the actual output of this endpoint does not contain the data you're looking for:
"port_table":
            [
                {
                    "aggregated_by": "<SOME VALUE/>",
                    "autoneg": "<SOME VALUE/>",
                    "bytes-r": "<SOME VALUE/>",
                    "enable": "<SOME VALUE/>",
                    "flowctrl_rx": "<SOME VALUE/>",
                    "flowctrl_tx": "<SOME VALUE/>",
                    "full_duplex": "<SOME VALUE/>",
                    "is_uplink": "<SOME VALUE/>",
                    "jumbo": "<SOME VALUE/>",
                    "masked": "<SOME VALUE/>",
                    "media": "<SOME VALUE/>",
                    "name": "Port <SOME VALUE/>",
                    "op_mode": "<SOME VALUE/>",
                    "port_idx": "<SOME VALUE/>",
                    "port_poe": "<SOME VALUE/>",
                    "portconf_id": "<SOME VALUE/>",
                    "rx_broadcast": "<SOME VALUE/>",
                    "rx_bytes": "<SOME VALUE/>",
                    "rx_bytes-r": "<SOME VALUE/>",
                    "rx_dropped": "<SOME VALUE/>",
                    "rx_errors": "<SOME VALUE/>",
                    "rx_multicast": "<SOME VALUE/>",
                    "rx_packets": "<SOME VALUE/>",
                    "speed": "<SOME VALUE/>",
                    "speed_caps": "<SOME VALUE/>",
                    "tx_broadcast": "<SOME VALUE/>",
                    "tx_bytes": "<SOME VALUE/>",
                    "tx_bytes-r": "<SOME VALUE/>",
                    "tx_dropped": "<SOME VALUE/>",
                    "tx_errors": "<SOME VALUE/>",
                    "tx_multicast": "<SOME VALUE/>",
                    "tx_packets": "<SOME VALUE/>",
                    "up": "<SOME VALUE/>",
                },

This is coming from a controller v6.5.55
To get the mapping you want, you'll need to combine the above data with the data from GetClients.  If it's wireless it could have both a ap_mac and sw_mac, wired clients should only have sw_mac. They also have a sw_port, you can then do a reverse lookup, or build a map of devices by their mac, and print the info you want.

This is the code, thank you very much for your help, how do I do what you told me? ( pulling all data directly)

Sorry I missed your question. Thank you to @wade-p for the detailed answer.
You can also run unifi-poller -c config.file -j d to print out devices, and unifi-poller -c config.file -j c to print out clients. This is a direct JSON dump from the controller as curl would do it. You just need to have a config file with your unifi username and password in it, so poller can handle the login and cookies.

this looks solved, closing this 👍

authors: davidnewhall pablofloreswittich platinummonkey wade-p

repo: unpoller/unifi


text:
[Map] DM-Phase Shifter

Hash: 6d5b7a47226f538092a81245caf825a09651400e
Current name: DM-Phase Shifter
According to the readmes the author of this map and of DM-Phase Shifter2 is "Dangerus" Dave O.

Updated both.

authors: OjitroC shrimpza

repo: unreal-archive/unreal-archive-data


text:
RoPE Scaling issues

Hey there,
Worked on this quite a lot yesterday with the help of GPT-4, but I'm having some issues with errors similar to the following:
Traceback (most recent call last):
  File "/mnt/c/Users/magda/OneDrive/Desktop/python_work/unsloth_finetuner.py", line 67, in <module>
    trainer.train()
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 1537, in train
    return inner_training_loop(
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 1854, in _inner_training_loop
    tr_loss_step = self.training_step(model, inputs)
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 2744, in training_step
    self.accelerator.backward(loss)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/accelerator.py", line 1903, in backward
    self.scaler.scale(loss).backward(**kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/_tensor.py", line 492, in backward
    torch.autograd.backward(
  File "/home/harry/.local/lib/python3.10/site-packages/torch/autograd/__init__.py", line 251, in backward
    Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
  File "/home/harry/.local/lib/python3.10/site-packages/torch/autograd/function.py", line 288, in apply
    return user_fn(self, *args)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/utils/checkpoint.py", line 288, in backward
    torch.autograd.backward(outputs_with_grad, args_with_grad)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/autograd/__init__.py", line 251, in backward
    Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
  File "/home/harry/.local/lib/python3.10/site-packages/torch/autograd/function.py", line 288, in apply
    return user_fn(self, *args)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/cuda/amp/autocast_mode.py", line 140, in decorate_bwd
    return bwd(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/kernels/fast_lora.py", line 291, in backward
    dX = torch.matmul(dQ, QW.t(), out = X)
RuntimeError: Expected out tensor to have dtype c10::Half, but got float instead

I'm running an RTX 3090 locally, for the record--I want to say CUDA 118. Downgraded Pytorch to 2.1.0 as well. Here's what the script is looking like right now. This is my first time trying to locally finetune, so I'm not sure if the args are wrong, or what, but any advice would be very much appreciated.
from unsloth import FastLlamaModel, FastMistralModel
import torch
max_seq_length = 4096 # Can change to any number <= 4096
HAS_BFLOAT16 = torch.cuda.is_bf16_supported()
dtype = torch.bfloat16 if HAS_BFLOAT16 else torch.float16
load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.

# Load Llama model
model, tokenizer = FastLlamaModel.from_pretrained(
    model_name = "unsloth/llama-2-7b", # Supports any llama model eg meta-llama/Llama-2-7b-hf
    max_seq_length = max_seq_length,
    dtype = dtype,
    load_in_4bit = load_in_4bit,
    token = "hf...", # use one if using gated models like meta-llama/Llama-2-7b-hf
)

# Do model patching and add fast LoRA weights
model = FastLlamaModel.get_peft_model(
    model,
    r = 16,
    target_modules = ["q_proj", "k_proj", "v_proj", "o_proj",
                      "gate_proj", "up_proj", "down_proj",],
    lora_alpha = 16,
    lora_dropout = 0, # Currently only supports dropout = 0
    bias = "none",    # Currently only supports bias = "none"
    use_gradient_checkpointing = True,
    random_state = 3407,
    max_seq_length = max_seq_length,
)

from transformers import Trainer, TrainingArguments
from datasets import load_dataset

dataset = load_dataset('json', data_files='processed_data.json', split='train')
# Tokenize the dataset
def tokenize_and_prepare_labels(examples):
    tokenized_inputs = tokenizer(examples['text'], padding='max_length', truncation=True, max_length=max_seq_length)
    # Shift the tokenized inputs to the right for the labels
    tokenized_inputs["labels"] = tokenized_inputs["input_ids"].copy()
    return tokenized_inputs

tokenized_dataset = dataset.map(tokenize_and_prepare_labels, batched=True)

# Define training arguments
training_args = TrainingArguments(
    output_dir='outputs',
    num_train_epochs=3,
    per_device_train_batch_size=8,
    warmup_steps=500,
    weight_decay=0.01,
    logging_dir='./logs',
    logging_steps=10,
    fp16=True,  # Enable mixed precision
)

# Initialize Trainer with the entire tokenized dataset
trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=tokenized_dataset,
    eval_dataset=None  # Set this to your evaluation dataset if you have one
)

print(f"Max sequence length: {max_seq_length}")
trainer.train()
print(f"Training done! Check outputs")

For the record, when I remove fp16 = True, it errors out a lot faster and gives a slight variation of the error:
RuntimeError: expected mat1 and mat2 to have the same dtype, but got: c10::BFloat16 != float

@hrhdegenetrix Instead of fp16 = True, since u have a RTX 3090 which supports bfloat16, replace fp16 = True with bf16 = True

@hrhdegenetrix Instead of fp16 = True, since u have a RTX 3090 which supports bfloat16, replace fp16 = True with bf16 = True

Thank you so much! That helped get me off the ground. Didn't seem to save (at least where I expected it to) but I'll figure that out later today. Before this is marked as close, could I get your help with this assertion error? I tried changing max sequence length to 8192, but wound up with this. Do I need to manually add a RoPE scaling dictionary as you mentioned to another user, or is there something else afoot here? Maybe I should try a different base model?
Traceback (most recent call last):
  File "/mnt/c/Users/magda/OneDrive/Desktop/python_work/unsloth_finetuner.py", line 69, in <module>
    trainer.train()
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 1537, in train
    return inner_training_loop(
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 1854, in _inner_training_loop
    tr_loss_step = self.training_step(model, inputs)
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 2735, in training_step
    loss = self.compute_loss(model, inputs)
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 2758, in compute_loss
    outputs = model(**inputs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/utils/operations.py", line 680, in forward
    return model_forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/utils/operations.py", line 668, in __call__
    return convert_to_fp32(self.model_forward(*args, **kwargs))
  File "/home/harry/.local/lib/python3.10/site-packages/torch/amp/autocast_mode.py", line 16, in decorate_autocast
    return func(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 579, in PeftModelForCausalLM_fast_forward
    return self.base_model(
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/peft/tuners/tuners_utils.py", line 103, in forward
    return self.model.forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = module._old_forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 521, in LlamaForCausalLM_fast_forward
    outputs = self.model(
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = module._old_forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 447, in LlamaModel_fast_forward
    layer_outputs = torch.utils.checkpoint.checkpoint(
  File "/home/harry/.local/lib/python3.10/site-packages/torch/_compile.py", line 24, in inner
    return torch._dynamo.disable(fn, recursive)(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 328, in _fn
    return fn(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/_dynamo/external_utils.py", line 17, in inner
    return fn(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/utils/checkpoint.py", line 451, in checkpoint
    return CheckpointFunction.apply(function, preserve, *args)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/autograd/function.py", line 539, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
  File "/home/harry/.local/lib/python3.10/site-packages/torch/utils/checkpoint.py", line 230, in forward
    outputs = run_function(*args)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 443, in custom_forward
    return module(*inputs, past_key_value, output_attentions, padding_mask=padding_mask)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = module._old_forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 305, in LlamaDecoderLayer_fast_forward
    hidden_states, self_attn_weights, present_key_value = self.self_attn(
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = module._old_forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 205, in LlamaAttention_fast_forward
    Q, K = fast_rope_embedding(Q, K, cos, sin)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/kernels/rope_embedding.py", line 126, in fast_rope_embedding
    Q = Fast_RoPE_Embedding.apply(Q.transpose(1, 2), cos, sin).transpose(1, 2)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/autograd/function.py", line 539, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/kernels/rope_embedding.py", line 77, in forward
    assert(seq_len <= cos.shape[0])
AssertionError

@hrhdegenetrix Ok that's weird - when you changed max_seq_length = 8192 did u put this in 2 places? Both in FastLlamaModel.from_pretrained and FastLlamaModel.get_peft_model
You should get the following warning message:
Unsloth: unsloth/llama-2-7b can only handle sequence lengths of of most 4096.
But with kaiokendev's RoPE scaling of 2.0, it can be magically be extended to 8192!

@hrhdegenetrix Ok that's weird - when you changed max_seq_length = 8192 did u put this in 2 places? Both in FastLlamaModel.from_pretrained and FastLlamaModel.get_peft_model
You should get the following warning message:
Unsloth: unsloth/llama-2-7b can only handle sequence lengths of of most 4096.
But with kaiokendev's RoPE scaling of 2.0, it can be magically be extended to 8192!

Yeah it's a weird one! It looks like I've got max_seq_length in 2 places for sure. And I do get the warning message, but then I get the traceback like so:
==((====))==  Unsloth: Fast Llama patching release 2023.12
   \\   /|    GPU: NVIDIA GeForce RTX 3090. Max memory: 24.0 GB
O^O/ \_/ \    CUDA compute capability = 8.6
\        /    Pytorch version: 2.1.0+cu121. CUDA Toolkit = 12.1
 "-____-"     bfloat16 = TRUE. Platform = Linux

Unsloth: unsloth/llama-2-7b can only handle sequence lengths of of most 4096.
But with kaiokendev's RoPE scaling of 2.0, it can be magically be extended to 8192!
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████| 3/3 [00:15<00:00,  5.06s/it]
Max sequence length: 8192
  0%|                                                                                | 0/234 [00:00<?, ?it/s]`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`...
Traceback (most recent call last):
  File "/mnt/c/Users/magda/OneDrive/Desktop/python_work/unsloth_finetuner.py", line 69, in <module>
    trainer.train()
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 1537, in train
    return inner_training_loop(
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 1854, in _inner_training_loop
    tr_loss_step = self.training_step(model, inputs)
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 2735, in training_step
    loss = self.compute_loss(model, inputs)
  File "/home/harry/.local/lib/python3.10/site-packages/transformers/trainer.py", line 2758, in compute_loss
    outputs = model(**inputs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/utils/operations.py", line 680, in forward
    return model_forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/utils/operations.py", line 668, in __call__
    return convert_to_fp32(self.model_forward(*args, **kwargs))
  File "/home/harry/.local/lib/python3.10/site-packages/torch/amp/autocast_mode.py", line 16, in decorate_autocast
    return func(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 579, in PeftModelForCausalLM_fast_forward
    return self.base_model(
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/peft/tuners/tuners_utils.py", line 103, in forward
    return self.model.forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = module._old_forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 521, in LlamaForCausalLM_fast_forward
    outputs = self.model(
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = module._old_forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 447, in LlamaModel_fast_forward
    layer_outputs = torch.utils.checkpoint.checkpoint(
  File "/home/harry/.local/lib/python3.10/site-packages/torch/_compile.py", line 24, in inner
    return torch._dynamo.disable(fn, recursive)(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 328, in _fn
    return fn(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/_dynamo/external_utils.py", line 17, in inner
    return fn(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/utils/checkpoint.py", line 451, in checkpoint
    return CheckpointFunction.apply(function, preserve, *args)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/autograd/function.py", line 539, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
  File "/home/harry/.local/lib/python3.10/site-packages/torch/utils/checkpoint.py", line 230, in forward
    outputs = run_function(*args)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 443, in custom_forward
    return module(*inputs, past_key_value, output_attentions, padding_mask=padding_mask)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = module._old_forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 305, in LlamaDecoderLayer_fast_forward
    hidden_states, self_attn_weights, present_key_value = self.self_attn(
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = module._old_forward(*args, **kwargs)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/models/llama.py", line 205, in LlamaAttention_fast_forward
    Q, K = fast_rope_embedding(Q, K, cos, sin)
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/kernels/rope_embedding.py", line 126, in fast_rope_embedding
    Q = Fast_RoPE_Embedding.apply(Q.transpose(1, 2), cos, sin).transpose(1, 2)
  File "/home/harry/.local/lib/python3.10/site-packages/torch/autograd/function.py", line 539, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
  File "/home/harry/.local/lib/python3.10/site-packages/unsloth/kernels/rope_embedding.py", line 77, in forward
    assert(seq_len <= cos.shape[0])
AssertionError
  0%|          | 0/234 [00:01<?, ?it/s]

@hrhdegenetrix Hmm I'll have to check my code on how I approached RoPE scaling - maybe I did it wrong oops.
For now, could it be possible for you to just try 4096 for now - I'll update Unsloth in a bit :)

@hrhdegenetrix Sorry on the delay - just updated Unsloth - would it be possible for you to update Unsloth and see if RoPE scaling works now? Thanks so much!

@hrhdegenetrix Sorry on the delay - just updated Unsloth - would it be possible for you to update Unsloth and see if RoPE scaling works now? Thanks so much!

Hey man! Merry Christmas and Happy New Year, thanks for working so hard during the holiday season. So, I updated Unsloth and then just to be sure I ended up doing a clean install of it. 4096 works, but 8192 gets hung up. You can see Map never completed; it just sat here looking like this with the GPU running but nothing happening for around an hour or so:
harry@LAPTOP-LH71K629:/mnt/c/Users/magda/OneDrive/Desktop/python_work$ python3 unsloth_finetuner.py
Current working directory: /mnt/c/Users/magda/OneDrive/Desktop/python_work
==((====))==  Unsloth: Fast Llama patching release 2023.12
   \\   /|    GPU: NVIDIA GeForce RTX 3090. Max memory: 24.0 GB
O^O/ \_/ \    CUDA capability = 8.6. Xformers = 0.0.22.post7. FA = True.
\        /    Pytorch version: 2.1.0+cu121. CUDA Toolkit = 12.1
 "-____-"     bfloat16 = TRUE. Platform = Linux

Unsloth: unsloth/llama-2-7b can only handle sequence lengths of at most 4096.
But with kaiokendev's RoPE scaling of 2.0, it can be magically be extended to 8192!
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████| 3/3 [00:15<00:00,  5.25s/it]
Unsloth 2023.12 patched 32 layers with 32 QKV layers, 32 O layers and 32 MLP layers.
Max sequence length: 8192
  0%|                                                                                | 0/348 [00:00<?, ?it/s]Unsloth: `use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`

No error this time, but no progress beyond this point.

@hrhdegenetrix Hey early HNY! Hmm ok ok hm I'll do more checking - sorry my fixes didn't fix it :(
I'll have to manaully create some long context datasets and see why Unsloth is getting stuck

So I tried it with max_seq_length=8192 so RoPE Scaling of 2 on Llama-2-7b. I manually editted the Alpaca dataset by ensuring I see 8000 spaces ie, and sampling the first 1% of examples:
if text.count(" ") < 8000:
            text = text * int(np.ceil(8000 / text.count(" ")))

Running the tokenizer on the first exampl ull get around 13,932 tokens, which is what we want (tokenizer will truncate this).
I ran the model, and it's super SLOW - the backward pass is notoriously taking loads of time - I'll have to check why, but it seems like the attention layer is the culprit since O(N^2) during the backward pass must really hurt Flash Attention.
Google Colab showing forward pass:

And the extremely painstakinly slow backward pass:

After a horribly 3 minutes and 36 seconds on bsz=2, ga=4, finally 1 step is completed... On 60 steps we need a crazy 3 hours:

My notebook: https://colab.research.google.com/drive/1TLI18PEeWXYR_4IeOx0wG-NvHYNBxdEW?usp=sharing

Hi @danielhanchen
My gpu can't use bf16, but it looks like bf16 supported?
==((====))==  Unsloth: Fast Llama patching release 2024.6
   \\   /|    GPU: NVIDIA GeForce RTX 4060 Ti. Max memory: 15.674 GB. Platform = Linux.
O^O/ \_/ \    Pytorch: 2.3.0. CUDA = 8.9. CUDA Toolkit = 12.1.
\        /    Bfloat16 = TRUE. Xformers = 0.0.26.post1. FA = False.
 "-____-"     Free Apache license: http://github.com/unslothai/unsloth

error:
  File "/home/shaobozhang/miniconda3/envs/unsloth_env/lib/python3.10/site-packages/unsloth/kernels/fast_lora.py", line 126, in backward
    dX = torch.matmul(df, upW.t(), out = X)
RuntimeError: Expected out tensor to have dtype c10::BFloat16, but got float instead

Thanks

@neru1234 Set fp16 = True and bf16 = False in the training args

authors: danielhanchen hrhdegenetrix neru1234

repo: unslothai/unsloth