fasthttp "adapter" / "converter" example needed for faster testing / debug

i am converting from fasthttp and using fasthttp reverse proxy, however would like to slowly transition to hertz completely BUT possible to provide a "converter" / "adaptor" solution from fasthttp to hertz and vice versa?
e.g.
		fasthttpserver := &fasthttp.Server{
			Handler: ProxyHandler,
		}

how do i match ctx.Request and ctx.Response to the below?
rationale, fasthttp doesnt hv http2, i'm testing http2 on production server just to see if it works first before slowly migrating other parts to hertz.
pls help in this will speed up dev testing and help improve the speed of adoption faster from fasthttp conversion.
thx!
    h := server.New(server.WithHostPorts(":443"), server.WithALPN(true), server.WithTLS(tlsCfg))
    h.Get("/", func(c context.Context, ctx *app.RequestContext) {
         //how do i route to func ProxyHandler(ctx *fasthttp.RequestCtx) {} already written in fasthttp?
    }
    h.POST("/", func(c context.Context, ctx *app.RequestContext) {
         //how do i route to func ProxyHandler(ctx *fasthttp.RequestCtx) {} already written in fasthttp?
    })
    //actually same goes for everything just to convert "hertz ctx" to "fasthttp's ctx"

    h.Spin()

It is recommended to build directly with hertz's api.
Translation means one more overhead, which has a lot of pressure on both performance and memory

yes i understand. but for the purpose of testing can u pls provide instructions on how to "convert"?
e.g.
net/http -> fasthttp conversion table:

All the pseudocode below assumes w, r and ctx have these types:
  var (
  	w http.ResponseWriter
  	r *http.Request
  	ctx *fasthttp.RequestCtx
  )
r.Body -> [ctx.PostBody()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.PostBody)
r.URL.Path -> [ctx.Path()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.Path)
r.URL -> [ctx.URI()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.URI)
r.Method -> [ctx.Method()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.Method)
r.Header -> [ctx.Request.Header](https://godoc.org/github.com/valyala/fasthttp#RequestHeader)
r.Header.Get() -> [ctx.Request.Header.Peek()](https://godoc.org/github.com/valyala/fasthttp#RequestHeader.Peek)
r.Host -> [ctx.Host()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.Host)
r.Form -> [ctx.QueryArgs()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.QueryArgs) + [ctx.PostArgs()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.PostArgs)
r.PostForm -> [ctx.PostArgs()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.PostArgs)
r.FormValue() -> [ctx.FormValue()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.FormValue)
r.FormFile() -> [ctx.FormFile()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.FormFile)
r.MultipartForm -> [ctx.MultipartForm()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.MultipartForm)
r.RemoteAddr -> [ctx.RemoteAddr()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.RemoteAddr)
r.RequestURI -> [ctx.RequestURI()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.RequestURI)
r.TLS -> [ctx.IsTLS()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.IsTLS)
r.Cookie() -> [ctx.Request.Header.Cookie()](https://godoc.org/github.com/valyala/fasthttp#RequestHeader.Cookie)
r.Referer() -> [ctx.Referer()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.Referer)
r.UserAgent() -> [ctx.UserAgent()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.UserAgent)
w.Header() -> [ctx.Response.Header](https://godoc.org/github.com/valyala/fasthttp#ResponseHeader)
w.Header().Set() -> [ctx.Response.Header.Set()](https://godoc.org/github.com/valyala/fasthttp#ResponseHeader.Set)
w.Header().Set("Content-Type") -> [ctx.SetContentType()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.SetContentType)
w.Header().Set("Set-Cookie") -> [ctx.Response.Header.SetCookie()](https://godoc.org/github.com/valyala/fasthttp#ResponseHeader.SetCookie)
w.Write() -> [ctx.Write()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.Write), [ctx.SetBody()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.SetBody), [ctx.SetBodyStream()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.SetBodyStream), [ctx.SetBodyStreamWriter()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.SetBodyStreamWriter)
w.WriteHeader() -> [ctx.SetStatusCode()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.SetStatusCode)
w.(http.Hijacker).Hijack() -> [ctx.Hijack()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.Hijack)
http.Error() -> [ctx.Error()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.Error)
http.FileServer() -> [fasthttp.FSHandler()](https://godoc.org/github.com/valyala/fasthttp#FSHandler), [fasthttp.FS](https://godoc.org/github.com/valyala/fasthttp#FS)
http.ServeFile() -> [fasthttp.ServeFile()](https://godoc.org/github.com/valyala/fasthttp#ServeFile)
http.Redirect() -> [ctx.Redirect()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.Redirect)
http.NotFound() -> [ctx.NotFound()](https://godoc.org/github.com/valyala/fasthttp#RequestCtx.NotFound)
http.StripPrefix() -> [fasthttp.PathRewriteFunc](https://godoc.org/github.com/valyala/fasthttp#PathRewriteFunc)

Thanks for reminding🙏, actually we are currently doing this kind of migration guide - first stage: help Gin/FastHTTP projects.
May you offer some progress of this job❤? @li-jin-gou

i think i can help do the translation but can u just help chk if all directions of migration from fasthttp will be about the same as hertz or any edge case?
i only have one area i think not sure.
ctx.Hijack() <- will this be the same too?

i think i can help do the translation but can u just help chk if all directions of migration from fasthttp will be about the same as hertz or any edge case? i only have one area i think not sure. ctx.Hijack() <- will this be the same too?

Yes, I've recently been working on automating the migration of users from fasthttp/gin to hertz, and the API interface is still being sorted out.

ok. i will try to update all instances then. thx. will inform if i found any issues of compatibility. do mention how i can contribute to this "api" compatibility issue.
keep up the great work!

We can add lark as a friend for easy communication!

one last question before i close this comment,
how do i route map to fasthttp for quick testing first.
i'm using .Any() <- is this the best way for routing anything / everything?
can u give a quick guidance / thumbs up? coz if it's up to me i will do...
ctxTemp := &fasthttp.RequestCtx{}
	h.Any("/", func(ctx context.Context, c *app.RequestContext) {
               	//c.VisitAll //??? <-- req header (i will figure this out if there's a visitall fasthttp equivalent in hertz)
	        //for (k,v) {
	            //ctxTemp.Request.SetHeaderKV(k,v)
                 //}
                    //ProxyHandler(ctxTemp) // <- i would do it this way to copy all essential hertz req to fasthttp req

                    //but how do i map response and output?

                    //ctxTemp.VisitAll (
                                 //c.Resp.SetHeader(
                       )

                       //how to return anything from fasthttp equivalent? ... that's where i am kind of stuck here.
		//c.String(consts.StatusOK, "any")
	})

//func ProxyHandler(ctx *fasthttp.RequestCtx) {}

It's true.

@li-jin-gou
can u give an idea how to return the response from fasthttp to hertz?
because most i see is c.String(consts.StatusOK, "body") // <- is this the way? so c.Response have to be mapped too? right?

It is recommended to build directly with hertz's api.
Translation means one more overhead, which has a lot of pressure on both performance and memory.

PATL @wzekin

cc #420

One issue has been followed up.


Add gitattributes to prevent file formatting

Add .gitattributes file to prevent file formatting in Windows platform

Codecov Report

Merging #7229 (92e2a07) into master (9cecbc3) will decrease coverage by 0.24%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #7229      +/-   ##
============================================
- Coverage     59.97%   59.72%   -0.25%
- Complexity      288      289       +1
============================================
  Files          1004     1004
  Lines         39976    39976
  Branches       5905     5905
============================================
- Hits          23974    23877      -97
- Misses        13311    13382      +71
- Partials       2691     2717      +26

Impacted Files
Coverage Δ
Complexity Δ

...ng/transport/dispatcher/all/AllChannelHandler.java
62.06% <0.00%> (-27.59%)
0.00% <0.00%> (ø%)

...bo/config/event/listener/LoggingEventListener.java
37.50% <0.00%> (-25.00%)
0.00% <0.00%> (ø%)

...dubbo/common/status/support/LoadStatusChecker.java
50.00% <0.00%> (-16.67%)
0.00% <0.00%> (ø%)

...ng/transport/dispatcher/WrappedChannelHandler.java
47.82% <0.00%> (-15.22%)
0.00% <0.00%> (ø%)

...dubbo/remoting/exchange/support/DefaultFuture.java
75.22% <0.00%> (-12.39%)
0.00% <0.00%> (ø%)

...va/org/apache/dubbo/remoting/TimeoutException.java
22.22% <0.00%> (-11.12%)
0.00% <0.00%> (ø%)

...ava/org/apache/dubbo/config/DubboShutdownHook.java
63.82% <0.00%> (-10.64%)
0.00% <0.00%> (ø%)

.../apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java
62.06% <0.00%> (-10.35%)
0.00% <0.00%> (ø%)

.../remoting/transport/netty4/NettyClientHandler.java
57.62% <0.00%> (-10.17%)
0.00% <0.00%> (ø%)

...apache/dubbo/common/config/ConfigurationUtils.java
53.12% <0.00%> (-6.25%)
0.00% <0.00%> (ø%)

... and 24 more

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 9cecbc3...66f2420. Read the comment docs.


Running out of memory in colab

I'm going through and running your training setup on a google colab netbook but when I get to this section it keeps crashing:
trainer = MultiGPUTrainer('trainer', make_model,
                          TrainerClass=FixedOrderTrainer, sampler_opts=dict(samples_per_line=1),
                          optimizer_opts=dict(base_lr=1.4e-3, warmup_time=16000))

sometimes this causes the crash:
sess.run(tf.global_variables_initializer())
This is the error message:
ResourceExhaustedError: OOM when allocating tensor with shape[512,769954] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
	 [[node trainer/worker_0/trainer_mod/trainer/worker_0/mod/logits/W/Adam/Assign (defined at /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py:1748) ]]

I have tried restarting the runtime many times without change. I also tried setting the GPU count to 1.  But it still runs out of memory.
Do you have any ideas how I can work around this?
Cheers, Fred

Hello! We originally trained the model on 8 GPUs with a lot more GPU memory on each GPU than is available in Colab. Consider using just the FixedOrderTrainer without going multi-GPU (Colab only allows using 1 GPU per notebook). Does this fix the issue?

Thank you I'll try that too.
I managed to get it to start training but it was very slow going on the Colab so I gave up. It would have taken a few weeks I think.
I'm just going to go and do some basic tutorials that I have found and go from there, to get a better basic understanding of this stuff.


Sensolytics example file

Hi,
I tried to add a first example for our measurement data, but I was not allowed to upload a branch to the code to create a pull request. Might not be necessary anyway, as the reason was mainly to see if the format can be read by the participating systems. I add the readme and eln file here, let me know if we can/should change anything...
sensolytics.zip

Still on the learning path with github etc., never did a fork of an existing project until now. PR is there now, we will evaluate the metadata possibility...


Slow Search / Draw on Large Database (2M Rows)

Summary of problem or feature request
I was testing a new system that has more than 2 million rows. When searching with datatable it took 10 seconds to find results and I was using Query Builder and only one column was searchable. To solve this issue I set "searching" => false and add a manual search filter, which cut the loading time to 0.006 - 1 second.
Then I added a JOIN in my query and my new loading time hit a new record high of 30 seconds for 10 results. I specified every column name to reduce the query execution time.
Finally, I fixed it by removing JOIN query and manipulating the JSON data.

I collected  the query result from the JSON data
Then I extracted user_id in an array and using that collected user names and insert them into the query result.

Now my hacked JOIN query (is not a join query) executes in 124ms for 10 results and 174ms for 100 results.
My question is how can I make this process easy and fast without doing stupid hacks?

SELECT payments.*, `users`.`name` FROM `payments` JOIN `users` ON `payments`.`user_id` = `users`.`id` LIMIT 10

Query took 0.0008 seconds
SELECT payments.*, `users`.`name` FROM `payments` JOIN `users` ON `payments`.`user_id` = `users`.`id` LIMIT 100

Query took 0.0018 seconds
SELECT count(`payments`.`id`) as total FROM `payments` JOIN `users` ON `payments`.`user_id` = `users`.`id`

Query took 1.7467 seconds.
SELECT count(`payments`.`id`) as total FROM `payments`

Query took 0.0002 seconds.

Performance depends on every project but it will greatly improved if you will be able to optimize your query.
Anyways, I just released https://github.com/yajra/laravel-datatables/releases/tag/v9.18.0 which aims to improve the count performance. Try updating and hope it for works for your case. Thanks!


Google Page speed and ghost-url.min.js

Hi.
I have question how to move file:
/shared/ghost-url.min.js
To footer to make quicker page speed on google test. I got issue if this file block rendering and need to move to footer.
Thanks for any advice.
Technical details:

Ghost Version: 0.11.7
Node Version: 6.10.0
Database: MySQL

For questions, please use our slack channel in future. This file is part of the Public API beta, you can remove it by disabling the beta.


Add another test for headers' size limit

@swankjesse corporate Jesse is moving in on your territory!


upgrading boto

this feels a bit questionable, we have to burn minutes on each build doing installs then, the min dep specification here should be trumping caches.

trying to go through the tox docs on this, if i do a pip install -r requirements-dev.txt on the command line it works fine, why it fails through tox is perplexing.

still trying to figure this out.


convert_to_openai_function drops description for each parameter

System Info
The description attribute of the function parameters described in our Pydantic v2 model are missing in the output of convert_to_openai_function because it does not recognize Pydantic v2 BaseModel as a valid v1 BaseModel.
https://github.com/langchain-ai/langchain/blob/16399fd61d7744c529cca46464489e467b4b7741/libs/langchain/langchain/chains/openai_functions/base.py#L156-L161
Who can help?
No response
Information

[ ] The official example notebooks/scripts
[X] My own modified scripts

Related Components

[X] LLMs/Chat Models
[ ] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[ ] Agents / Agent Executors
[ ] Tools / Toolkits
[ ] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction
from langchain.chains.openai_functions.base import convert_to_openai_function
from pydantic.v1 import BaseModel as BaseModelV1, Field as FieldV1
from pydantic import BaseModel as BaseModelV2, Field as FieldV2

class FuncV1(BaseModelV1):
  "Pydantic v1 model."
  output: str = FieldV1(description="A output text")

class FuncV2(BaseModelV2):
  "Pydantic v2 model."
  output: str = FieldV2(description="A output text")

print(convert_to_openai_function(FuncV1))
{'name': 'FuncV1', 'description': 'Pydantic v1 model.', 'parameters': {'title': 'FuncV1', 'description': 'Pydantic v1 model.', 'type': 'object', 'properties': {'output': {'title': 'Output', 'description': 'A output text', 'type': 'string'}}, 'required': ['output']}}

print(convert_to_openai_function(FuncV2))
{'name': 'FuncV2', 'description': 'Pydantic v2 model.', 'parameters': {'type': 'object', 'properties': {'output': {'type': 'string'}}, 'required': ['output']}}

Expected behavior
Add description attribute appeared in Pydantic v2 model.

I think this is a similar problem.
I'm running this notebook https://github.com/Ryota-Kawamura/Functions-Tools-and-Agents-with-LangChain/blob/main/L4-tagging-and-extraction-student.ipynb
If you scrolled down the example at the bottom (extracting titles and authors), only authors will be extracted. I'm using: convert_to_openai_function instead of convert_pydantic_to_openai_function (but same results when I tested both)
from langchain_core.utils.function_calling import convert_to_openai_function
convert_to_openai_function(Info) outputs:
{'name': 'Info',
 'description': 'Information to extract',
 'parameters': {'type': 'object',
  'properties': {'papers': {'type': 'array',
    'items': {'description': 'Information about papers mentioned.',
     'type': 'object',
     'properties': {'author': {'type': 'string'}},
     'required': ['title']}}},
  'required': ['papers']}}

If I edited the output as:
openai_function_manual = {
    "name": "Info",
    "description": "Information to extract",
    "parameters": {
        "type": "object",
        "properties": {
            "papers": {
                "type": "array",
                "items": {
                    "description": "Information about papers mentioned.",
                    "type": "object",
                    "properties": {
                        "title": {"type": "string"},
                        "author": {"type": "string"},
                    },
                    "required": ["title", "author"],
                },
            }
        },
        "required": ["papers"],
    },
}

then the results will be correct with both titles and authors. here is the new notebook: https://github.com/jeremy886/LearnLangChain24/blob/main/L4-tagging-and-extraction-student.ipynb

agree.
convert_pydantic_to_openai_function(Tagging)
would include the descriptions. If you use this, you get a deprecation warning and are advised to use
convert_pydantic_to_openai_function(Tagging)
this does not include per field descriptons
convert_pydantic_to_openai_function(Tagging) output
{'name': 'Tagging',
 'description': 'Tag the piece of text with particular info.',
 'parameters': {'type': 'object',
  'properties': {'sentiment': {'type': 'string'},
   'technical_issue': {'type': 'string'},
   'instruction_issue': {'type': 'string'}},
  'required': ['sentiment', 'technical_issue', 'instruction_issue']}}

while
convert_pydantic_to_openai_function(Tagging) output is:
{'name': 'Tagging',
 'description': 'Tag the piece of text with particular info.',
 'parameters': {'properties': {'sentiment': {'description': 'sentiment of text, importantly should be one of exactly  `pos`, `neg`, or `neutral` only',
    'type': 'string'},
   'technical_issue': {'description': "If the text describes a technical problem or suggestion, include a summary of the issue in this field otherwise 'none' ",
    'type': 'string'},
   'instruction_issue': {'descrption': "If the text describes an instruction problem with the course, include a summary of the issue in this fieled, otherwise 'none'",
    'type': 'string'}},
  'required': ['sentiment', 'technical_issue', 'instruction_issue'],
  'type': 'object'}}

all langchain methods working with pydantic objects expect them to be instantiated using langchain_core.pydantic_v1 instead of bare pydantic. This is so that we can support pydantic v1 and v2.
when defining a pydantic object you should do so with
from langchain_core.pydantic_v1 import BaseModel, Field

class Func(BaseModel):
  output: str = Field(description="A output text")

See here for more on pydantic compatibility

IMO the document should say "pydantic v2 is incompatible with the current langchain." if you don't fix it at the moment.

IMO the document should say "pydantic v2 is incompatible with the current langchain" if you don't fix it at the moment.

that suggests you can't have pydantic v2 installed, which isn't the case. we do say "Internally LangChain will continue to use V1" but we could make that more prominent, maybe move it to the top?

As of langchain>=0.0.267, LangChain will allow users to install either Pydantic V1 or V2.

Pydantic V2 is not supported yet, so this statement is misleading.

As of langchain>=0.0.267, LangChain will allow users to install either Pydantic V1 or V2.

Pydantic V2 is not supported yet, so this statement is misleading.

What do you mean by "Pydantic V2 is not supported"? To me that means you can't have it installed, which isn't the case. Perhaps would be more precise to say "Full Pydantic V2 functionality is not supported"?


Update to Cats 0.5.0

[Current coverage][cc-pull] is 78.55%

Merging [#279][cc-pull] into [master][cc-base-branch] will increase coverage by -2.89%

@@           master       #279   diff @@
========================================
  Files          60        119     +59
  Lines        1838       1902     +64
  Methods         0       1754   +1754
  Branches      196         82    -114
========================================
- Hits         1497       1494      -3
- Misses        341        408     +67
  Partials        0          0

2 files (not in diff) in ...ala/io/circe/numbers were modified. more
3 files (not in diff) in ...ala/io/circe/jackson were modified. more
2 files (not in diff) in ...ala/io/circe/generic were modified. more
9 files (not in diff) in .../main/scala/io/circe were modified. more

Misses +2
Hits -2

2 files (not in diff) in ...a/io/circe/streaming were created. more
2 files (not in diff) in ...scala/io/circe/spray were created. more
5 files (not in diff) in ...cala/io/circe/optics were created. more
2 files (not in diff) in ...ala/io/circe/numbers were created. more
2 files (not in diff) in .../scala/io/circe/jawn were created. more
7 files (not in diff) in ...ala/io/circe/jackson were created. more

Powered by Codecov. Last updated by 21b70a9
[cc-base-branch]: https://codecov.io/gh/travisbrown/circe/branch/master?src=pr
[cc-pull]: https://codecov.io/gh/travisbrown/circe/pull/279?src=pr


Fix ValidatePostInit for IPv6-only + tunnel

This fixes a check in ValidatePostInit in tunnel mode where it would error on not having a v4 host address. This adds a check if a v6 host address was found.
Fix Cilium startup for IPv6 only and routingMode=tunnel

/test

I believe this is intended - we don't have IPv6 tunnel support, the outer headers are always IPv4.

In that case i'd close it, i could not find any documentation to confirm this so it was confusing.

In that case i'd close it, i could not find any documentation to confirm this so it was confusing.

https://github.com/cilium/cilium/issues/17240 might be your best :grin:.


Add AzureAD oauth for application registrations

PR Description
Adding the existing prometheus application registration for oauth on Azure
Which issue(s) this PR fixes

Fixes #2150
Notes to the Reviewer
PR Checklist

[x] CHANGELOG.md updated
[x] Documentation added
[x] Tests updated
[x] Config converters updated

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Still requires better validation https://github.com/grafana/alloy/blob/ba66b2ae1df5967343d99f7e026aa51f2013b2ca/internal/component/prometheus/remotewrite/types.go#L327


TS1005: typescript parse error

Describe the bug

Expected behavior
import type { ParamItems } from './formatter/Params';
Actual behavior
import { type ParamItems } from './formatter/Params';
Usage

How are you calling / using the library? npm library
What SQL language(s) does this apply to? sql
Which SQL Formatter version are you using? 10.0.0

Just released sql-formatter 10.1.0, which should eliminate this issue.
However, you should also consider upgrading TypeScript. TypeScript 4.5, which supports this syntax, was released about a year ago.


[otbn] Improve co-simulation performance

The combined OTBN top-level RTL simulation with model running in step has fairly poor performance (around 3 kHz on my machine), it would be good if this can improved. For reference Ibex without tracing running in simple system can run at around 200 kHz on my machine. With the co-simulation model we may not be able to reach these speeds but we should look at what we can do to get some improvements.

Block-level simulations are mostly done over VCS, where we use ~90% of cycles in VCS and only ~10% in the ISS. Maybe that's slightly inflating the VCS numbers (because of stalls waiting for context switches), but it suggests we won't get a massive speed-up in block-level sims whatever we do.
Chip-level simulations are barely affected by the OTBN / ISS stuff, it seems.
@GregAC: Do you think there's still benefit in digging into this? If not, maybe we should close it?

Let's close it


PyTorch quantized weights support

mnist_linear_static_quantized.zip

mnist_linear_dynamic_quantized.zip

mnist_linear_static_quantized.zip

mnist_linear_dynamic_quantized.zip

mnist_linear_static_quantized.zip

mnist_linear_dynamic_quantized.zip


JavaScript

JavaScript
User Story
As a boot camp student,
I want the prework notes to be structured on a webpage
So that I can easily find and read the information
Acceptance Criteria
GIVEN a Prework Study Guide website
WHEN I view the study guide
I want the prework notes to be structured on a webpage
So that I can easily find and read the information

Completed


Fix install

Codecov Report

Merging #2900 into dev will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##              dev    #2900      +/-   ##
==========================================
- Coverage   95.46%   95.46%   -0.01%
==========================================
  Files          73       73
  Lines       13951    13965      +14
==========================================
+ Hits        13319    13332      +13
- Misses        632      633       +1

Impacted Files
Coverage Δ

qiita_db/meta_util.py
89.78% <100%> (-0.37%)
:arrow_down:

qiita_db/test/test_meta_util.py
99.14% <100%> (+0.05%)
:arrow_up:

Continue to review full report at Codecov.

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

Thanks @yotohoshi !


Is there a way to clean HTTP cache and app data?

Is there a convenient way to clean HTTP cache and application data like service workers, cookies, etc.? I couldn't find anything related in the docs.

Every browser launch starts with clean HTTP cache and without any cookies. Is it enough?
let browser = await puppeteer.launch(); // no cache, no cookies!

Note: the 0.9.0 version has a bug that might result in browser launches re-using the old cache. This should be fixed on tip-of-tree.

Every browser launch starts with clean HTTP cache and without any cookies. Is it enough?

No really. Consider I would like to measure performance of 1000 pages with cold cache,  restarting browser for each of them wouldn't be nice.

Hmm, from my experimenting it's seems like browser has cold cache on each page.goto. Is this intended behaviour?

Not really. Consider I would like to measure performance of 1000 pages with cold cache, restarting browser for each of them wouldn't be nice.

That's a good one, thanks. This might be solvable with #85.

Hmm, from my experimenting it's seems like browser has cold cache on each page.goto. Is this intended behaviour?

@inikulin nope, definitely not. How do you check this?

@aslushnikov
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({headless: false});
  const page = await browser.newPage();

  page.once('load', async () => {
        console.log('load');
        page.on('response', r => console.log(r.status));
        await page.goto('https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md');
        browser.close();
  });

  await page.goto('https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md');

})();

This code gives me a bunch of 200/204s, but there should be at least few 304s. Then I first ran this code today it worked as intended, but on second run it gives only 200s.

@inikulin Awesome, thanks. I can reliably reproduce this, filed #487.
Would the #85 solve the cache-busting needs?

@aslushnikov Regarding #85: as far as I understand I'll just need to create new pages with some unique context ID to achieve desired behaviour. Does creation of new page has any performance overhead comparing to page.goto?

@aslushnikov BTW

Every browser launch starts with clean HTTP cache and without any cookies. Is it enough?

Does this mean that if I run two instances simultaneously they will not share browser cache?

Does creation of new page has any significant performance overhead comparing to page.goto?

What kind of overhead are you interested in? It does take some time to open a new tab, but it should be blazingly fast most of the time.

Does this mean that if I run two instances simultaneously they will not share browser cache?

Right, they will not share browser cache.

@aslushnikov

It does take some time to open a new tab, but it should be blazingly fast most of the time.

That I was interested in. At the first glance, #85 should work for me.

@aslushnikov

Every browser launch starts with clean HTTP cache and without any cookies. Is it enough?

I'm sorry for a little off-topic here, but how can i actually preserve cache and cookies on every browser relaunch? I wasn't able to found any information in docs regarding this.
Thanks!

@bogdan0083 if you're using tip-of-tree chromium, try passing userDataDir to the puppeteer.launch():
const browser = await puppeteer.launch({
  userDataDir: '/tmp/my-profile-directory'
});

@aslushnikov I tired passing userDataDir but still across launch(es) the cache is not used.
I am on latest v11.0-alpha of puppeteer.

@ashubham chrome headless currently doesn't save session properly; there's upstream work for this.
Closing issue in favor of browser contexts issue.

One option may be to start headless Chrome and set cache to 0 so it's effectively never used? --disk-cache-size=0 may do the trick...

I have a similar problem, when i click a button in my page it opens a new tab with a pdf, is possible to download this pdf as a file?
Thanks

@aslushnikov regarding the issue that @ashubham mentioned, could please provide a reference for the upstream work? I'm facing the same issue.


Remove version: GitHub.GitHubDesktop version 3.3.8

[Automated] It returns code over 400 in all urls
Microsoft Reviewers: Open in CodeFlow

Close with reason: Publisher has changed their URL structure;


Consuming PUT methods

When I did Squash and merge and then change to main branch and finally I did pull, I noticed that this could have some conflicts with files that alredy existed, even in one case I had to download again some libraries that I already had in the last commit.
I this last commit I did not do changes in file test/GithubApi.Repositories.test.js. So I going to clone repository and trying to do a new commit.
Excuse me for inconvenience 😅

I'm not sure is will be better delete this branch and remake it avoiding touch old files or what can I do in this cases?
Sorry, I not pretty good working with github 😅


[AVM Question/Feedback]: Git Hooks for contributing QoL

Check for previous/existing GitHub issues

[X] I have checked for previous/existing GitHub issues

Description
When I'm contributing, I tend to forget to run Set-AVMModule when pushing changes. Which I realize after the validation has run in the testing pipelines.
To improve QoL of contributing to AVM it might worth checking git hooks. For example there can be a pre-commit git hook which runs the same script as in the CI to check if Set-AVMModule has run. The contributor gets this feedback instantly when trying to commit, instead after committing, pushing, running the pipeline etc.

Hey @donheerschap,
I'm not familiar with GitHooks (yet) but wil try to read up on it as per the link you provided :)
On the side some context: We've been planning to implement to run the static validation on PR for quite some time now, but at least I for my part am blocked for some time as I'm waiting for a PR that updates the conditions in the pipelines (which would otherwise immediately run into conflicts). Maybe git hooks is a nice in-between solution until we get there :)


Added Ruby 2.4 to the build matrix

You could also bump jruby to <IP_ADDRESS> now that that version's published as stable.

@smellsblue This would be quite good, yeah?

@olleolleolle yes! Good idea! I'll update that in the 1.0 branch, as I'm prepping for a release now.

Postponing upgrading JRuby because we are hitting this in Travis: https://github.com/sickill/rainbow/issues/48 (example: https://travis-ci.org/bundler/gemstash/jobs/196031999)

Is upgrading rubygems not a fix?

I'm away from a good keyboard, but I'd ask you to add gem update --system for a fix of this. 2.6.9 should have it.

@olleolleolle I'm not sure, is that something that is easily supported within Travis...? (I haven't looked into it)


Operations before re-serialising

Any chance of a CLI interface for performing operations after deserialisation, before re-serialisation, like jq , perhaps using a simpler operation syntax like jsonpatch

For now: no.  jq is nothing less than a programming language, and implementing one is out of scope for a format converter like remarshal.  It would also require a serious design effort to be pleasant to use.  If I ever rewrite remarshal from scratch, I may structure it around an embedded scripting language interpreter like Duktape, which would give you scripting "for free", but probably not.  There are other tools you can use instead.


Descriptor, descriptorSecretKey / secretKey name and type mismatch

Name and type mismatch when creating a descriptor.
The secretKey parameter of Descriptor.newBip84 expects String, not DescriptorSecretKey:
final descriptorSecretKey = await DescriptorSecretKey.create(
      network: Network.Testnet,
      mnemonic: mnemonic);
final descriptor = await Descriptor.newBip84(
      secretKey: descriptorSecretKey,
      network: Network.Testnet,
      keyChainKind: KeychainKind.External);

Some of the descriptor templates also has the parameter named secretKey, while others use descriptorSecretKey.
Bip44 works as expected, the others do not.
Expected
Parameter called descriptorSecretKey always, accepting DescriptorSecretKey type always

Will have a patch shortly, thanks for looking into it.


[FLINK-16866] Make job submission non-blocking

What is the purpose of the change
This is changing the semantics of the job submission: Instead of completing the Dispatcher.submitJob() future after all the initialization happened (which can potentially involve calling external systems etc.), the .submitJob() call now returns as soon as the job has been accepted by the Dispatcher.
The benefit of this change is that the users will see the root cause of a submission timeout, instead of an akka.ask.timeout.
Brief change log

Introduce a DispatcherJob abstraction that manages the job in a new INITIALIZING state
Change web frontend to cope with initializing jobs
change clients to submit & poll

Verifying this change
This PR introduces various new tests for verification.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changed class annotated with @Public(Evolving): no
The serializers: no
The runtime per-record code paths (performance sensitive): no
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: yes 🔥
The S3 file system connector: no

Documentation
This change is transparent to the user and doesn't need a documentation update.

Thanks a lot for your extensive and detailed review. It was very helpful for me!
I have addressed most of you your comments. I extended the DispatcherJobTest.
I'm in the process of testing if the refactoring to the client has introduced any new test failures, and I might clean up my new tests in DispatcherJob (I would thus recommend you to review them last).
I might push a small change to the client code later today to better distinguish between initialization and runtime failures, so that we can solve the unstable FunctionITCase.testInvalidUseOfTableFunction() test.

Thanks a lot for this extensive review. I believe I have addressed all comments. I'm looking forward to more feedback.

Thanks a lot for your feedback! I addressed all comments and rebased the code to the latest master to get rid of the conflicts.

When closing the corresponding ticket, please add a release note stating the difference in submission semantics. E.g. when submitting a job one cannot immediately trigger job operation (triggering of savepoint, etc.). This is maybe one follow up issue we might wanna think through and adjust if it should become a usability problem.


could not find driver (Connection: pgsql, .... on version 0.7.3

Bug report

Version: 0.7.3

Description
I found similar problem to #515 but it happens with the latest version (0.7.3).
// config/database.php
'pgsql' => [
            'driver' => 'pgsql',
            'url' => env('DB_URL'),
            'host' => env('DB_HOST', '<IP_ADDRESS>'),
            'port' => env('DB_PORT', '5432'),
            'database' => env('DB_DATABASE', 'laravel'),
            'username' => env('DB_USERNAME', 'root'),
            'password' => env('DB_PASSWORD', ''),
            'charset' => env('DB_CHARSET', 'utf8'),
            'prefix' => '',
            'prefix_indexes' => true,
            'search_path' => 'public',
            // 'sslmode' => 'prefer',
            'sslmode' => 'require',
        ],

This is my quite first time posting issues on Github. I apologize in advance for any mistakes/bad manners.

Error image:

ENV on Vercel project settings:

Hi @suebphattana. I do not know what that error means. Driver pgsql is supported.
https://example-php-8-3.vercel.app/

Hi @suebphattana. I do not know what that error means. Driver pgsql is supported.
https://example-php-8-3.vercel.app/

Hi, thank you for your reply. I looked into the link https://example-php-8-3.vercel.app/ you gave me. I see pgsql in there and I can confirm that it somehow looks different than mine, which does not has pgsql enabled, only mysql (from my understanding) : https://koki.bcd.academy/phpinfo (don't worry about current DB password there, i'll change later)
I made a switch to use mysql instead of Postgres, and it works right away. Does that mean no pgsql enabled on my Vercel PHP project?
However, I continue to run project, and found out there's a problem about cURL extension too (like it is also not enabled, or some functions are missing from it):

I also tried enabling them manually via api/php.ini but still no luck
extension=pgsql
extension=pdo_pgsql
extension=curl
memory_limit = 128M
post_max_size = 20M

thanks

Try use node version 18 to get the postgres driver to load: https://github.com/vercel-community/php/issues/555#issuecomment-2423948239


Forzon

We have written the needed data into your clipboard because it was too large to send. Please paste.i am facing problem with vs code. while i am coding on vs code after every 10-15 minites its froze.it take much time to reopen.when even other editors runs smuthly

/needsMoreInfo including version, platform, extensions, does this happen if you launch/reload with all extensions disabled. Also see the wiki section about performance problems.


Replace ClockPicker in DateTimePicker

Working on a styled version of the DateTimePicker component, and my designers don't like the clock UI for the time picker.  I'm trying to find a way to replace it with my own separate UI (something like the native chrome time picker UI) but I don't see any equivalent to the renderInput for the clock view.
Would it be possible to add something like that?  Or is there a workaround?

Seconded, the included Clock widget needs to have the ability to be replaced or styled, since when theming is applied the AM/PM text can be completely washed out:


Add rustfmt.toml

To facilitate parallel development by multiple contributors, we can provide a unified rustfmt.toml file in the code repository to minimize the chance of conflicts during git merge. This rustfmt.toml file in this PR is from the Databend project, which I personally prefer.

As you can see, this rustfmt.toml required some unstable features, which is only available in nightly channel.
I'm not sure would you mind this, feel free to reject this PR if you don't like it.
And if you like this, I'd like to provide additional GitHub action config to check fmt in nightly channel.

I don't think it's worth forcing people to use nightly. If you take out the nightly-only features, I'm happy to merge this in!

actually, this would not affect the users of this library. The requirements of rustfmt.toml for nightly will only affect the developers of this library. For developers using the stable channel, they can execute cargo +nightly fmt to achieve the same result.

Yes, that was my understanding when I made my previous comment.
On Sun, Mar 12, 2023 at 00:42 DCjanus @.***> wrote:

actually, this would not affect the users of this library. The
requirements of rustfmt.toml for nightly will only affect the developers of
this library. For developers using the stable channel, they can execute cargo
+nightly fmt to achieve the same result.
—
Reply to this email directly, view it on GitHub
https://github.com/kurtbuilds/httpclient/pull/4#issuecomment-1465098210,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ATA3QLLXNSTVMRST3TPTGMTW3VO4XANCNFSM6AAAAAAVXNBK4Y
.
You are receiving this because you commented.Message ID:
@.***>

--
Kurt
LinkedIn https://www.linkedin.com/in/kurtbuilds


Hot reload gets stuck reloading after const compile-time error

If I have a compile-time error with a const, it looks like my framework/engine/thing gets in a broken state. The next time I hit 'r' I get stuck:
E/flutter : [ERROR:../../lib/tonic/logging/dart_error.cc(16)] '/data/user/0/io.flutter.gallery/cache/flutter_gallerykeovah/lib/gallery/home.dart': error: line 145 pos 62: expression is not a valid compile-time constant
E/flutter :             style: const TextStyle(fontSize:16.0, fontStyle: FontStyle.bold), children: [
E/flutter :                                                              ^
I/flutter : ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter : The following assertion was thrown during a scheduler callback:
I/flutter : 'package:flutter/src/widgets/binding.dart': Failed assertion: line 206 pos 12:
I/flutter : '!_buildingDirtyElements' is not true.
I/flutter : When the exception was thrown, this was the stack:
I/flutter : #2      BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.beginFrame (package:flutter/src/widgets/binding.dart:206:12)
I/flutter : #3      BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:146:5)
I/flutter : #4      BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:535:15)
I/flutter : #5      BindingBase&SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:495:7)
I/flutter : #6      _beginFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:48)
I/flutter : (elided 2 frames from class _AssertionError)
I/flutter : ════════════════════════════════════════════════════════════════════════════════════════════════════
r
Syncing files to device...
Scanning project files...                            0.0s
Scanning package files...                            0.1s
Scanning asset files...                              0.0s
Scanning for deleted files...                        0.0s
No files to remove.
Updating files...                                    0.0s
Performing hot reload...                             0.4s
Reloaded 3 of 426 libraries.
Reassembling application...                             |

If I hit 'R' then my app resets. I didn't need to exit the console.

I believe this is fixed.


Feature Request: add i18n support

please add i18n support, i can help to translate into Spanish.
Saludos!

I will definitely look into it. I think Weather Underground supports various language output options. I just don't know how that will affect some of the code that makes the Weather Icons in the top left corner work. Feel free to send me a translation of these headings --
Your Location:
Current Conditions:
Temp:
Sunrise/Sunset:
Lunar Phase:
Wind:
UV Index:

great! thaks!
Your Location: Lugar
Current Conditions: Condiciones actuales
Temp: Temperatura (also can be Temp as abbreviation/short)
Sunrise/Sunset: Amanecer/Puesta del Sol
Lunar Phase: Fase Lunar
Wind: Viento
UV Index: Indice UV (Ultravioleta)

Thank you! I'll see what I can do. I might have a few more I need translated, but this is a start.


fix invalid access to AgencyCommResult::slice().

Scope & Purpose
Fix invalid accesses to AgencyCommResult::slice() when the result was not successful.
The current expectation is that slice() is not called if the result was not successful. Now this invariant is ensured by checking inside the slice() method.
If the assumption is violated now, we raise an assertion in maintainer mode. In non-maintainer mode, we throw an assertion.

[x] Bug-Fix for devel-branch (i.e. no need for backports?)

Testing & Verification
This change is a trivial rework / code cleanup without any test coverage.
http://<IP_ADDRESS>:8080/view/PR/job/arangodb-matrix-pr/10448/

http://<IP_ADDRESS>:8080/view/PR/job/arangodb-matrix-pr/10460/

Tests blue.


AKS: Subnet CIDR details not being displayed correctly

Setup
Rancher version: v2.7-0b2f7fa0f878c3402ddf416a5b622327949b9348-head
Browser type & version: Chrome latest
Describe the bug
Subnet CIDR details not being displayed as 'undefined'
To Reproduce

Create downstream AKS cluster and select Network policy & Network plugin as Azure, under Networking
Fill necessary fields and create clsuter
Wait for cluster to become Active
Edit cluster and check Networking details

Screenshots
While cluster creation:

Edit Cluster after creation:

Found while validating https://github.com/rancher/rancher/issues/42496

Transferred to rancher/aks-operator

Removing from dashboard project for now. If UI is required, file a new ticket in our repo for tracking purposes.

After creating cluster values provided by users will be set as null, everything is correct.
This bug is invalid


On program add big arrow pointing to current session (time block)

On https://2021.stateofthemap.org/programme/
put a big red arrow, pointing to the current time block.
That way one wouldn't need to look at one's watch and look up and down the list.
In fact also add a floating / or sidebar link, always visible, that will scroll the window to the current time.

Could use "javascript that affects CSS to cause the background of the current <td> to be pink" or something.

Good suggestion. Sadly there was not enough time during the conference to implement this for SotM 2021. I put this suggestion to our feedback pad at https://pads.ccc.de/BTmogYuzQF.


Bump cryptpad to version 4.5.0

Checked dependencies of alpine image -> all seems fine for a straightforward update

Thanks for the question! I use an arm64 architecture. However, out of the nearly 1000 downloads of your image, I'm sure some will be affected. What is the advantage in the end, because the whole process is already automated right? Sorry, professional deformation :-)


Add JS and React Rules

Based on https://github.com/ebates-edc/edc-prime/pull/35

I'm merging to deploy it manually. Will try to integrate Travis...


chore: promote twitter-angular-dashboard to version 0.0.5

chore: promote twitter-angular-dashboard to version 0.0.5
this commit will trigger a pipeline to generate the actual kubernetes resources to perform the promotion which will create a second commit on this Pull Request before it can merge

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign
You can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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


DateTime comparisons behaving unexpectedly

Bug description

A find_many query based on a datetime field returns unexpected results. gt/gte/lt/lte should be able to be used to specify ranges of availability (either in isolation or in combination), but diverge from what I was expecting.
How to reproduce

Clone https://github.com/iiian/prisma_python_datefailure_demo
prisma generate && prisma db push to produce cli and db files the demo model:

model Demo {
  id         Int      @id
  created_at DateTime @default(now())
}

open db, sqlite3 database.db
INSERT INTO Demo (id) VALUES (1); to create a record with the present moment in the created_at field
SELECT * FROM Demo; to confirm its existence

sqlite> SELECT * FROM Demo;
1|2022-01-08 08:01:58

run python3 demo.py, and observe test results:

TESTS
today = datetime.utcnow()
# 1. does a record exist who was created before the present moment? (Expecting true)
print(await client.demo.find_many(where={
    'created_at': {
        'lt': today
    }
}))
# 2. " " " before or at present (Expecting true)
print(await client.demo.find_many(where={
    'created_at': {
        'lte': today
    }
}))
# 3. does a record exist who was created after the present moment? (Expecting false)
print(await client.demo.find_many(where={
    'created_at': {
        'gt': today
    }
}))
# 4. " " " after or at present moment (Expecting false)
print(await client.demo.find_many(where={
    'created_at': {
        'gte': today
    }
}))
# 5. " " " after this morning, and before this time tomorrow (Expecting true)
print(await client.demo.find_many(where={
    # (I think syntax is correct? doesn't complain)
    'created_at': {
        'gt': datetime(year=today.year, month=today.month, day=today.day),
        'lt': today + relativedelta(day=1),
    }
}))
# 6. " " " after this time tomorrow, and before this morning (impossible, so false)
print(await client.demo.find_many(where={
    'created_at': {
        'gt': today + relativedelta(day=1),
        'lt': datetime(year=today.year, month=today.month, day=today.day)
    }
}))
# 7. after this morning, before tomorrow with and syntax (I think this is correct?, Expecting true)
print(await client.demo.find_many(where={
    'AND': [
        {
            'created_at': {
                'lt': today + relativedelta(day=1),
            }
        },
        {
            'created_at': {
                'gt': datetime(year=today.year, month=today.month, day=today.day)
            }
        }
    ]
}))

# 8. same as sixth test case, should be impossible, just with and syntax
print(await client.demo.find_many(where={
    'AND': [
        {
            'created_at': {
                'gt': today + relativedelta(day=1),
            }
        },
        {
            'created_at': {
                'lt': datetime(year=today.year, month=today.month, day=today.day)
            }
        }
    ]
}))

TEST RESULTS
# Test 1
[]
# Test 2
[]
# Test 3
[Demo(id=1, created_at=datetime.datetime(2022, 1, 8, 8, 1, 58, tzinfo=datetime.timezone.utc))]
# Test 4
[Demo(id=1, created_at=datetime.datetime(2022, 1, 8, 8, 1, 58, tzinfo=datetime.timezone.utc))]
# Test 5
[]
# Test 6
[]
# Test 7
[]
# Test 8
[]

Prisma python, therefore, currently claiming record I created before running demo was created after I ran the demo. Also, seems that including lt(e) in the query may result in immediate loss? I haven't tried specifying a time in the future.

Expected behavior
Test Result Expectations
# Test 1
[Demo(id=1, created_at=datetime.datetime(2022, 1, 8, 8, 1, 58, tzinfo=datetime.timezone.utc))]
# Test 2
[Demo(id=1, created_at=datetime.datetime(2022, 1, 8, 8, 1, 58, tzinfo=datetime.timezone.utc))]
# Test 3
[]
# Test 4
[]
# Test 5
[Demo(id=1, created_at=datetime.datetime(2022, 1, 8, 8, 1, 58, tzinfo=datetime.timezone.utc))]
# Test 6
[]
# Test 7
[Demo(id=1, created_at=datetime.datetime(2022, 1, 8, 8, 1, 58, tzinfo=datetime.timezone.utc))]
# Test 8
[]

Prisma information

// database
datasource db {
  provider = "sqlite"
  url      = "file:database.db"
}

// generator
generator client {
  provider = "prisma-client-py"
}

model Demo {
  id         Int      @id
  created_at DateTime @default(now())
}

Environment & setup

OS:  Tested on Windows 10, and macOS Big Sur
Database:  Sqlite3
Python version:  3.10 Windows, 3.9 macOS
Prisma version: 3.7.0, 0.4.3

Super excited to find out I'm Just Doing It Wrong™. If that's not the case, and you're looking for contributors, would be happy to try and lend a hand.

Super excited to find out I'm Just Doing It Wrong™

That could be the case, this is a common Python gotcha that datetime.utcnow() is timezone naive, i.e. there is no timezone associated with the returned datetime object for some reason. If this is the case you can fix it by getting the current time this way:
from datetime import datetime, timezone
today = datetime.now(timezone.utc)

Please let me know if this fixes the issue!

would be happy to try and lend a hand.

If my suspicions are correct then a warning should be raised if a naive datetime is passed to a query.
This warning should either include the above fix or point to documentation. Here are the steps you would need to take to introduce this change:

https://prisma-client-py.readthedocs.io/en/stable/contributing/contributing/
edit the serialize_datetime function in src/prisma/generator/templates/builder.py.jinja
update snapshots (see contrbuting documentation)
write a unit test in tests/test_types/test_datetime.py
make sure the warning is ignored in other tests

Thank you for the very detailed report and offering to contrbute!

If the solution I've mentioned above does not work, could you please share the debug logs generated by the mentioned queries.
https://prisma-client-py.readthedocs.io/en/stable/reference/logging/

Nope, looks like that didn't change the results. Here are the logs after generating with debug output. The underlying queries sent to the engine don't look suspect either, (hmmm). Let me know if I need to attach them to the main post instead:
~/code/python/prisma_python_datefailure_demo master !1 ?1 ❯ python3 demo.py                                                                              02:21:48
DEBUG:prisma.engine.query:Connecting to query engine
DEBUG:prisma.engine.utils:Expecting local query engine /Users/ianray/code/python/prisma_python_datefailure_demo/prisma-query-engine-darwin
DEBUG:prisma.engine.utils:Expecting global query engine /var/folders/qz/0n6qh0nx3sl75w_9xw0t_kjm0000gn/T/prisma/binaries/engines/8746e055198f517658c08a0c426c7eec87f5a85f/prisma-query-engine-darwin
DEBUG:prisma.engine.utils:Query engine found in the global path
DEBUG:prisma.engine.utils:Version check took 0.01s
DEBUG:prisma.engine.utils:Using query engine version 8746e055198f517658c08a0c426c7eec87f5a85f
DEBUG:prisma.engine.utils:Using query engine at /var/folders/qz/0n6qh0nx3sl75w_9xw0t_kjm0000gn/T/prisma/binaries/engines/8746e055198f517658c08a0c426c7eec87f5a85f/prisma-query-engine-darwin
DEBUG:prisma.engine.utils:Ensuring query engine took: 0.0109s
DEBUG:prisma.engine.query:Running query engine on port 52232
DEBUG:prisma.engine.query:Starting query engine...
DEBUG:prisma.engine.http:Sending GET request to http://localhost:52232/status with content: None
DEBUG:prisma.engine.http:GET http://localhost:52232/status returned {'status': 'ok'}
DEBUG:prisma.engine.query:Connecting to query engine took 0.0399s
DEBUG:prisma.builder:Generated query:
query {
  result: findManyDemo
  (
    where: {
      created_at: {
        lt: "2022-01-08T10:21:51.528000+00:00"
      }
    }
  )
  {
    id
    created_at
  }
}
DEBUG:prisma.engine.http:Sending POST request to http://localhost:52232/ with content: {"variables": {}, "operation_name": "query", "query": "query {\n  result: findManyDemo\n  (\n    where: {\n      created_at: {\n        lt: \"2022-01-08T10:21:51.528000+00:00\"\n      }\n    }\n  )\n  {\n    id\n    created_at\n  }\n}"}
DEBUG:prisma.engine.http:POST http://localhost:52232/ returned {'data': {'result': []}}
[]
DEBUG:prisma.builder:Generated query:
query {
  result: findManyDemo
  (
    where: {
      created_at: {
        lte: "2022-01-08T10:21:51.528000+00:00"
      }
    }
  )
  {
    id
    created_at
  }
}
DEBUG:prisma.engine.http:Sending POST request to http://localhost:52232/ with content: {"variables": {}, "operation_name": "query", "query": "query {\n  result: findManyDemo\n  (\n    where: {\n      created_at: {\n        lte: \"2022-01-08T10:21:51.528000+00:00\"\n      }\n    }\n  )\n  {\n    id\n    created_at\n  }\n}"}
DEBUG:prisma.engine.http:POST http://localhost:52232/ returned {'data': {'result': []}}
[]
DEBUG:prisma.builder:Generated query:
query {
  result: findManyDemo
  (
    where: {
      created_at: {
        gt: "2022-01-08T10:21:51.528000+00:00"
      }
    }
  )
  {
    id
    created_at
  }
}
DEBUG:prisma.engine.http:Sending POST request to http://localhost:52232/ with content: {"variables": {}, "operation_name": "query", "query": "query {\n  result: findManyDemo\n  (\n    where: {\n      created_at: {\n        gt: \"2022-01-08T10:21:51.528000+00:00\"\n      }\n    }\n  )\n  {\n    id\n    created_at\n  }\n}"}
DEBUG:prisma.engine.http:POST http://localhost:52232/ returned {'data': {'result': [{'id': 1, 'created_at': '2022-01-08T08:37:20.000Z'}]}}
[Demo(id=1, created_at=datetime.datetime(2022, 1, 8, 8, 37, 20, tzinfo=datetime.timezone.utc))]
DEBUG:prisma.builder:Generated query:
query {
  result: findManyDemo
  (
    where: {
      created_at: {
        gte: "2022-01-08T10:21:51.528000+00:00"
      }
    }
  )
  {
    id
    created_at
  }
}
DEBUG:prisma.engine.http:Sending POST request to http://localhost:52232/ with content: {"variables": {}, "operation_name": "query", "query": "query {\n  result: findManyDemo\n  (\n    where: {\n      created_at: {\n        gte: \"2022-01-08T10:21:51.528000+00:00\"\n      }\n    }\n  )\n  {\n    id\n    created_at\n  }\n}"}
DEBUG:prisma.engine.http:POST http://localhost:52232/ returned {'data': {'result': [{'id': 1, 'created_at': '2022-01-08T08:37:20.000Z'}]}}
[Demo(id=1, created_at=datetime.datetime(2022, 1, 8, 8, 37, 20, tzinfo=datetime.timezone.utc))]
DEBUG:prisma.builder:Generated query:
query {
  result: findManyDemo
  (
    where: {
      created_at: {
        gt: "2022-01-08T00:00:00+00:00"
        lt: "2022-01-01T10:21:51.528000+00:00"
      }
    }
  )
  {
    id
    created_at
  }
}
DEBUG:prisma.engine.http:Sending POST request to http://localhost:52232/ with content: {"variables": {}, "operation_name": "query", "query": "query {\n  result: findManyDemo\n  (\n    where: {\n      created_at: {\n        gt: \"2022-01-08T00:00:00+00:00\"\n        lt: \"2022-01-01T10:21:51.528000+00:00\"\n      }\n    }\n  )\n  {\n    id\n    created_at\n  }\n}"}
DEBUG:prisma.engine.http:POST http://localhost:52232/ returned {'data': {'result': []}}
[]
DEBUG:prisma.builder:Generated query:
query {
  result: findManyDemo
  (
    where: {
      created_at: {
        gt: "2022-01-01T10:21:51.528000+00:00"
        lt: "2022-01-08T00:00:00+00:00"
      }
    }
  )
  {
    id
    created_at
  }
}
DEBUG:prisma.engine.http:Sending POST request to http://localhost:52232/ with content: {"variables": {}, "operation_name": "query", "query": "query {\n  result: findManyDemo\n  (\n    where: {\n      created_at: {\n        gt: \"2022-01-01T10:21:51.528000+00:00\"\n        lt: \"2022-01-08T00:00:00+00:00\"\n      }\n    }\n  )\n  {\n    id\n    created_at\n  }\n}"}
DEBUG:prisma.engine.http:POST http://localhost:52232/ returned {'data': {'result': []}}
[]
DEBUG:prisma.builder:Generated query:
query {
  result: findManyDemo
  (
    where: {
      AND: [,
        {
          created_at: {
            lt: "2022-01-01T10:21:51.528000+00:00"
          }
        },
        {
          created_at: {
            gt: "2022-01-08T00:00:00+00:00"
          }
        },
      ]
    }
  )
  {
    id
    created_at
  }
}
DEBUG:prisma.engine.http:Sending POST request to http://localhost:52232/ with content: {"variables": {}, "operation_name": "query", "query": "query {\n  result: findManyDemo\n  (\n    where: {\n      AND: [,\n        {\n          created_at: {\n            lt: \"2022-01-01T10:21:51.528000+00:00\"\n          }\n        },\n        {\n          created_at: {\n            gt: \"2022-01-08T00:00:00+00:00\"\n          }\n        },\n      ]\n    }\n  )\n  {\n    id\n    created_at\n  }\n}"}
DEBUG:prisma.engine.http:POST http://localhost:52232/ returned {'data': {'result': []}}
[]
DEBUG:prisma.builder:Generated query:
query {
  result: findManyDemo
  (
    where: {
      AND: [,
        {
          created_at: {
            gt: "2022-01-01T10:21:51.528000+00:00"
          }
        },
        {
          created_at: {
            lt: "2022-01-08T00:00:00+00:00"
          }
        },
      ]
    }
  )
  {
    id
    created_at
  }
}
DEBUG:prisma.engine.http:Sending POST request to http://localhost:52232/ with content: {"variables": {}, "operation_name": "query", "query": "query {\n  result: findManyDemo\n  (\n    where: {\n      AND: [,\n        {\n          created_at: {\n            gt: \"2022-01-01T10:21:51.528000+00:00\"\n          }\n        },\n        {\n          created_at: {\n            lt: \"2022-01-08T00:00:00+00:00\"\n          }\n        },\n      ]\n    }\n  )\n  {\n    id\n    created_at\n  }\n}"}
DEBUG:prisma.engine.http:POST http://localhost:52232/ returned {'data': {'result': []}}
[]
DEBUG:prisma.engine.query:Disconnecting query engine...
DEBUG:prisma.engine.query:Disconnected query engine
DEBUG:prisma.engine.query:Disconnecting query engine...
DEBUG:prisma.engine.query:Disconnected query engine
DEBUG:prisma.engine.query:Disconnecting query engine...
DEBUG:prisma.engine.query:Disconnected query engine
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/httpx/_client.py:2012: UserWarning: Unclosed <httpx.AsyncClient object at 0x7f8e712c7220>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(

Okay so things I've learned: you aren't cooking your own engine, and the query that you print out in the builder.py.jinja is to be trusted. Therefore, if we're getting funny results back from the engine after sending it a good query... man doesn't that seem a lot like a Prisma query engine issue?

Hmmm that is certainly strange. You can inspect the generated SQL queries by instantiating the client like so:
client = Client(log_queries=True)

This will currently log everything the engine outputs which is a lot of noise but there could be something useful in there.

Query log from first test:
{
  "timestamp": "2022-01-08T10:49:58.136743Z",
  "level": "TRACE",
  "fields": {
    "query": "SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` < ? LIMIT ? OFFSET ?",
    "item_type": "query",
    "is_query": true,
    "params": "[2022-01-08 10:49:58.122 UTC,-1,0]",
    "duration_ms": 3,
    "result": "success"
  },
  "target": "quaint::connector::metrics",
  "span": {
    "sql": "SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` < ? LIMIT ? OFFSET ?",
    "name": "query_raw"
  },
  "spans": [
    {
      "sql": "SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` < ? LIMIT ? OFFSET ?",
      "name": "query_raw"
    }
  ]
}

What stands out to me here is the -1 being passed to LIMIT

Log output from query engine (with test results interspersed, a la [], [Demo(id=1, created_at=dat...)
{"timestamp":"2022-01-08T10:49:58.021957Z","level":"TRACE","fields":{"message":"Fetched a connection from the pool","duration_ms":3,"item_type":"query","is_query":true,"result":"success"},"target":"quaint::connector::metrics","span":{"name":"fetch_new_connection_from_pool"},"spans":[{"name":"fetch_new_connection_from_pool"}]}
{"timestamp":"2022-01-08T10:49:58.128603Z","level":"TRACE","fields":{"message":"Fetched a connection from the pool","duration_ms":0,"item_type":"query","is_query":true,"result":"success"},"target":"quaint::connector::metrics","span":{"name":"fetch_new_connection_from_pool"},"spans":[{"name":"fetch_new_connection_from_pool"}]}
{"timestamp":"2022-01-08T10:49:58.136743Z","level":"TRACE","fields":{"query":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` < ? LIMIT ? OFFSET ?","item_type":"query","is_query":true,"params":"[2022-01-08 10:49:58.122 UTC,-1,0]","duration_ms":3,"result":"success"},"target":"quaint::connector::metrics","span":{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` < ? LIMIT ? OFFSET ?","name":"query_raw"},"spans":[{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` < ? LIMIT ? OFFSET ?","name":"query_raw"}]}
[]
{"timestamp":"2022-01-08T10:49:58.139842Z","level":"TRACE","fields":{"message":"Fetched a connection from the pool","duration_ms":0,"item_type":"query","is_query":true,"result":"success"},"target":"quaint::connector::metrics","span":{"name":"fetch_new_connection_from_pool"},"spans":[{"name":"fetch_new_connection_from_pool"}]}
{"timestamp":"2022-01-08T10:49:58.140087Z","level":"TRACE","fields":{"query":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` <= ? LIMIT ? OFFSET ?","item_type":"query","is_query":true,"params":"[2022-01-08 10:49:58.122 UTC,-1,0]","duration_ms":0,"result":"success"},"target":"quaint::connector::metrics","span":{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` <= ? LIMIT ? OFFSET ?","name":"query_raw"},"spans":[{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` <= ? LIMIT ? OFFSET ?","name":"query_raw"}]}
[]
{"timestamp":"2022-01-08T10:49:58.142237Z","level":"TRACE","fields":{"message":"Fetched a connection from the pool","duration_ms":0,"item_type":"query","is_query":true,"result":"success"},"target":"quaint::connector::metrics","span":{"name":"fetch_new_connection_from_pool"},"spans":[{"name":"fetch_new_connection_from_pool"}]}
{"timestamp":"2022-01-08T10:49:58.142394Z","level":"TRACE","fields":{"query":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` > ? LIMIT ? OFFSET ?","item_type":"query","is_query":true,"params":"[2022-01-08 10:49:58.122 UTC,-1,0]","duration_ms":0,"result":"success"},"target":"quaint::connector::metrics","span":{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` > ? LIMIT ? OFFSET ?","name":"query_raw"},"spans":[{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` > ? LIMIT ? OFFSET ?","name":"query_raw"}]}
[Demo(id=1, created_at=datetime.datetime(2022, 1, 8, 8, 37, 20, tzinfo=datetime.timezone.utc))]
{"timestamp":"2022-01-08T10:49:58.179253Z","level":"TRACE","fields":{"message":"Fetched a connection from the pool","duration_ms":0,"item_type":"query","is_query":true,"result":"success"},"target":"quaint::connector::metrics","span":{"name":"fetch_new_connection_from_pool"},"spans":[{"name":"fetch_new_connection_from_pool"}]}
{"timestamp":"2022-01-08T10:49:58.179603Z","level":"TRACE","fields":{"query":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` >= ? LIMIT ? OFFSET ?","item_type":"query","is_query":true,"params":"[2022-01-08 10:49:58.122 UTC,-1,0]","duration_ms":0,"result":"success"},"target":"quaint::connector::metrics","span":{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` >= ? LIMIT ? OFFSET ?","name":"query_raw"},"spans":[{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE `main`.`Demo`.`created_at` >= ? LIMIT ? OFFSET ?","name":"query_raw"}]}
[Demo(id=1, created_at=datetime.datetime(2022, 1, 8, 8, 37, 20, tzinfo=datetime.timezone.utc))]
{"timestamp":"2022-01-08T10:49:58.183001Z","level":"TRACE","fields":{"message":"Fetched a connection from the pool","duration_ms":0,"item_type":"query","is_query":true,"result":"success"},"target":"quaint::connector::metrics","span":{"name":"fetch_new_connection_from_pool"},"spans":[{"name":"fetch_new_connection_from_pool"}]}
{"timestamp":"2022-01-08T10:49:58.183285Z","level":"TRACE","fields":{"query":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` > ? AND `main`.`Demo`.`created_at` < ?) LIMIT ? OFFSET ?","item_type":"query","is_query":true,"params":"[2022-01-08 00:00:00 UTC,2022-01-01 10:49:58.122 UTC,-1,0]","duration_ms":0,"result":"success"},"target":"quaint::connector::metrics","span":{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` > ? AND `main`.`Demo`.`created_at` < ?) LIMIT ? OFFSET ?","name":"query_raw"},"spans":[{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` > ? AND `main`.`Demo`.`created_at` < ?) LIMIT ? OFFSET ?","name":"query_raw"}]}
[]
{"timestamp":"2022-01-08T10:49:58.185956Z","level":"TRACE","fields":{"message":"Fetched a connection from the pool","duration_ms":0,"item_type":"query","is_query":true,"result":"success"},"target":"quaint::connector::metrics","span":{"name":"fetch_new_connection_from_pool"},"spans":[{"name":"fetch_new_connection_from_pool"}]}
{"timestamp":"2022-01-08T10:49:58.186153Z","level":"TRACE","fields":{"query":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` > ? AND `main`.`Demo`.`created_at` < ?) LIMIT ? OFFSET ?","item_type":"query","is_query":true,"params":"[2022-01-01 10:49:58.122 UTC,2022-01-08 00:00:00 UTC,-1,0]","duration_ms":0,"result":"success"},"target":"quaint::connector::metrics","span":{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` > ? AND `main`.`Demo`.`created_at` < ?) LIMIT ? OFFSET ?","name":"query_raw"},"spans":[{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` > ? AND `main`.`Demo`.`created_at` < ?) LIMIT ? OFFSET ?","name":"query_raw"}]}
[]
{"timestamp":"2022-01-08T10:49:58.188756Z","level":"TRACE","fields":{"message":"Fetched a connection from the pool","duration_ms":0,"item_type":"query","is_query":true,"result":"success"},"target":"quaint::connector::metrics","span":{"name":"fetch_new_connection_from_pool"},"spans":[{"name":"fetch_new_connection_from_pool"}]}
{"timestamp":"2022-01-08T10:49:58.286610Z","level":"TRACE","fields":{"query":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` < ? AND `main`.`Demo`.`created_at` > ?) LIMIT ? OFFSET ?","item_type":"query","is_query":true,"params":"[2022-01-01 10:49:58.122 UTC,2022-01-08 00:00:00 UTC,-1,0]","duration_ms":0,"result":"success"},"target":"quaint::connector::metrics","span":{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` < ? AND `main`.`Demo`.`created_at` > ?) LIMIT ? OFFSET ?","name":"query_raw"},"spans":[{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` < ? AND `main`.`Demo`.`created_at` > ?) LIMIT ? OFFSET ?","name":"query_raw"}]}
[]
{"timestamp":"2022-01-08T10:49:58.289214Z","level":"TRACE","fields":{"message":"Fetched a connection from the pool","duration_ms":0,"item_type":"query","is_query":true,"result":"success"},"target":"quaint::connector::metrics","span":{"name":"fetch_new_connection_from_pool"},"spans":[{"name":"fetch_new_connection_from_pool"}]}
{"timestamp":"2022-01-08T10:49:58.289343Z","level":"TRACE","fields":{"query":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` > ? AND `main`.`Demo`.`created_at` < ?) LIMIT ? OFFSET ?","item_type":"query","is_query":true,"params":"[2022-01-01 10:49:58.122 UTC,2022-01-08 00:00:00 UTC,-1,0]","duration_ms":0,"result":"success"},"target":"quaint::connector::metrics","span":{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` > ? AND `main`.`Demo`.`created_at` < ?) LIMIT ? OFFSET ?","name":"query_raw"},"spans":[{"sql":"SELECT `main`.`Demo`.`id`, `main`.`Demo`.`created_at` FROM `main`.`Demo` WHERE (`main`.`Demo`.`created_at` > ? AND `main`.`Demo`.`created_at` < ?) LIMIT ? OFFSET ?","name":"query_raw"}]}
[]

This appears to be an internal Prisma bug, writing an equivalent Prisma Client query in TypeScript yields the same error (at least for the first test).
import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();

async function main() {
  const today = new Date();
  console.log(today);
  const records = await prisma.demo.findMany({
    where: {
        created_at: {
            lt: today,
        },
    },
  });
  console.log(records);
  console.log(await prisma.demo.findMany())
}

main()
  .catch((e) => {
    throw e;
  })
  .finally(async () => {
    await prisma.$disconnect();
  });

I'll report this to Prisma.
Thank you for the detailed report and for investigating!

Sweet! Everything's busted! Thanks, Robert.

Closing this as it has been reported to Prisma and unfortunately there is nothing we can do on the Python side to fix it.


Change push to replace

Summary
Change push to replace in Devices and Backup codes

I am not sure why we do this?


Tailwind merge didn't merge custom value with only 0 unit

If I use a custom CSS value this way: min-h-[0] tailwind generated as intended a CSS property min-height: 0;
But when I use Tailwind merge like that, both Tailwind classes are keeped:
twMerge("min-h-[1rem]", "min-h-[0]") generate "min-h-[1rem] min-h-[0]"
I have to write it with a unit to make the merge to work:
twMerge("min-h-[1rem]", "min-h-[0rem]") generate "min-h-[0rem]"

Thanks for reporting this! Will fix this later today.


Menu opens in the up direction

Environment
Windows build number: 10.0.19042.746
Windows Terminal version : 1.6.10272.0

Steps to reproduce
With the Terminal window NOT near the top of the screen, open the menu by clicking on the down arrow icon.
Expected behavior
The menu opens in the down direction (unless the window is really near the bottom of the screen).
Actual behavior
With the 1.6 preview, the menu opens in the up direction (1.5 preview was OK).

Menus open in whatever direction they best fit. This is true all over Windows.

Menus open in whatever direction they best fit. This is true all over Windows.

1.5 was best fit, this is not.
This seems to prefer the up direction by default (when the menu has the space to open in both directions), and only open in down direction when there is no space above the window.

1.5 was best fit, this is not.
This seems to prefer the up direction by default (when the menu has the space to open in both directions), and only open in down direction when there is no space above the window.

It looks like you have a different set of key bindings in your menu in 1.6 (which was a bug fix. your personal bindings were hidden, and now they are not), which changed the size of the menu items.

It looks like you have a different set of key bindings in your menu in 1.6 (which was a bug fix. your personal bindings were hidden, and now they are not), which changed the size of the menu items.

This looks related: https://github.com/microsoft/microsoft-ui-xaml/pull/2806

This looks related: https://github.com/microsoft/microsoft-ui-xaml/pull/2806

This is AZERTY, so profile Ctrl+Shift+& and tab switch ctrl+alt+1 use the same final key, but described in a different way.
But this is probably off-topic, I don't see how the menu direction would be affected by the key bindings, which would only change its width.

This is AZERTY, so profile Ctrl+Shift+& and tab switch ctrl+alt+1 use the same final key, but described in a different way.
But this is probably off-topic, I don't see how the menu direction would be affected by the key bindings, which would only change its width.

This looks related: microsoft/microsoft-ui-xaml#2806

So maybe TerminalPage::_CreateNewTabFlyout should set the placement.
But I wonder why Auto would prefer the up direction. The tab context menu doesn't have the issue.
https://github.com/microsoft/terminal/blob/ae8347f336d308997e40e8a46e7d2053c88a1dd1/src/cascadia/TerminalApp/TerminalPage.cpp#L669 sets the placement, so when using the key binding (ctrl+shift+space), the menu opens in the down direction.

This looks related: microsoft/microsoft-ui-xaml#2806

So maybe TerminalPage::_CreateNewTabFlyout should set the placement.
But I wonder why Auto would prefer the up direction. The tab context menu doesn't have the issue.
https://github.com/microsoft/terminal/blob/ae8347f336d308997e40e8a46e7d2053c88a1dd1/src/cascadia/TerminalApp/TerminalPage.cpp#L669 sets the placement, so when using the key binding (ctrl+shift+space), the menu opens in the down direction.

The chevron in the menu button always points down. Can you make it point up if the menu is going to open upwards?

The chevron in the menu button always points down. Can you make it point up if the menu is going to open upwards?

I’m not sure we can know that before the OS chooses where to put the menu.

I’m not sure we can know that before the OS chooses where to put the menu.

But why the OS chooses to open the menu up if there is enough space down ?

But why the OS chooses to open the menu up if there is enough space down ?

But why the OS chooses to open the menu up if there is enough space down ?

Honestly, we have no idea. The folks at https://github.com/microsoft/microsoft-ui-xaml would be the ones to ask. We're just using the control they built.

But why the OS chooses to open the menu up if there is enough space down ?

Honestly, we have no idea. The folks at https://github.com/microsoft/microsoft-ui-xaml would be the ones to ask. We're just using the control they built.

Btw, the key binding uses BottomEdgeAlignedLeft, and does what expected : the menu opens down, unless there isn't enough space.

Btw, the key binding uses BottomEdgeAlignedLeft, and does what expected : the menu opens down, unless there isn't enough space.

Btw, the key binding uses BottomEdgeAlignedLeft, and does what expected : the menu opens down, unless there isn't enough space.

In other words, compare this (clicked on the arrow):

With this (Ctrl+Shift+space):

Btw, the key binding uses BottomEdgeAlignedLeft, and does what expected : the menu opens down, unless there isn't enough space.

In other words, compare this (clicked on the arrow):

With this (Ctrl+Shift+space):


Task 476-487: CLS Dataset - Multilingual Sentiment Classification of Product Reviews

Task: classify a given product review to positive or negative sentiment.
The CLS dataset (https://aclanthology.org/P10-1114/) contains product reviews from four languages (English, German, French, Japanese) and three product domains (books, dvd, music). Each task here corresponds to a unique language and domain.
All datasets have the same label distribution:
POS    1000
NEG    1000

Thanks for submitting these tasks. Please refer following few suggestions:

In task file names, add "_classification" at the end as they are classification tasks. (i.e., task476_cls_english_books -> task476_cls_english_books_classification)
In all descriptions, apart from giving (domain: music, language: English) mention something like "In this task, you are given music reviews in English language."
Please give more explanations. Instead of mentioning overall sentiment is positive or negative, try to give the reason why that's the case.
Also, there are lots of unicode characters. Please use the proper encoding scheme to remove them and retain the original information.
And remove unnecessary '\n' from the files.

Done. Thank you for the very helpful suggestions.

Since this is a multilingual task, please add the appropriate fields based on: #113

Since this is a multilingual task, please add the appropriate fields based on: #113

Done, thanks!

Thank you, all!


Updates for SystemReady v23.01_SR_REL2.0.0_BETA-0_ES_REL_1.2.0 release

Updates for SystemReady v23.01_SR_REL2.0.0_BETA-0_ES_REL_1.2.0 release
SystemReady SR v2.0.0 BETA-0

SBSA ACS updated to SBSA7.1 specification.
SBSA ACS Bug fixes.
Build scripts for PMU Application.

SystemReady ES v1.2.0

BSA ACS Bug fixes.

Common

Movement of SR and ES ACS images from busybox to buildroot filesystem
and updates in related build scripts.
SIE ACS integrated to ES & SR ACS image, which can now acccessed from
Grub window.
FWTS version upgraded to v22.11.00.
SIE ACS Bug fixes.
Debug dump for dmicheck and efibootmgr.
Automation of eventlog and TPM measurements comparison.

Co-authored-by: Amrathesh<EMAIL_ADDRESS>Co-authored-by: G Edhaya Chandran<EMAIL_ADDRESS>Co-authored-by: Gururaj Revankar<EMAIL_ADDRESS>

Closing this PR and updated PR will be raised.


Force node separation on comma while compressing.

Compression of JSON is more efficient when nodes are split on comma. No any change to format. Due to efficient compression about 10% better compression, 20% faster compression and decompression. It seams to be beneficial for other payloads too.

I have to correct myself. Please do not merge yet. There seams to be a catch. The gain in fact depends on payload. I still need to investigate to find the best solution.

I need time to investigate the edge cases.

Err, unless I'm mistaken this would throw away commas in the input string, no?

That would explain the better compression: you made it lossy ;)

No. Comma is there. Try compressing and decompressing a string containing a comma. Works.
The change just forces new node whenever a comma is accounted in the input string. It leads to faster convergence on repeating sections (every object in an array and property in the object start with comma) resulting in more consistent node splittings. The problem, however, is that in the case of multiple repeating small object properties a single long repeating string (containing multiple properties) will not be built (since the node always breaks on comma).
I have tried on 50kB of real life JSON and the benefit was there. But, when I tried to compress an artificial highly repetitive JSON, the situation reversed.
After some analysis, I have introduced a marker preventing splitting nodes which started with comma in the compression algorithm. With a bit of compression speed decrease consistent improvement in compression of JSON  in wide range of parameters is achieved.
 Bottom axis - number of small objects  in the JSON (containing random numbers for fairness), left axis is the ratio of original data length to compressed length.

Ah, so you're using heuristics to force different substrings? Interesting approach!

So if I understand correctly, this is perfectly decodable with existing LZstring code, right?

Have you tried other traditional separator characters? Like spaces, or newlines?

Yes, it is perfectly decodable with existing LZstring code.
It is just a matter of finding best sub-string separation without too much of penalty in coding performance.
I have tried spaces but they come too often and decrease compression ratio. New lines might be a good solution, but they normally do not come in JSON stringy output. I'll check.

After sleeping on this for another day I finally got why it makes sense that this would often work. Really simple and elegant, I love it! Did you come up with this approach on your own, or read about it somewhere?
Could you upload the test text files in plaintext (after removing any sensitive context of course) so I  can have a look too? Especially the artificial one that breaks this approach.
Thinking further: I think we could also make a separate module where one could pass a string of separator characters to the compress function, giving people the ability to tweak this themselves. It would by definition be slower of course, but it might be worth it for some.

New lines might be a good solution, but they normally do not come in JSON stringy output.

Right, I forgot that JSON is not prettified by default.
I wonder if this would still work (or be made to work) when used with an LZAP/LZMW algorithm. Both of these LZ variants grow their dictionary by appending entire substrings instead of single characters to existing dictionary entries. I think that makes forced splits counter-productive, but if one could like, "pseudo-split" so that we converge on sensible substrings to append together more quickly, it might lead to much better compression there as well.

This is my idea. I am using my brain (sometimes) :-)
I thought about using other algorithm to find proper string splitting but was afraid of speed penalty. Also I wanted to keep the compression subroutine small (this worked well I think).
I will update you today evening. For now check this repository:  https://github.com/gloryknight/LZstr (selective splitting is already implemented).

Only has minified version, I'll check the unminified one later (which I assume you'll upload eventually)


Feature Request: Specify an parameter store as amiSelectorTerms for EC2NodeClass

Description
What problem are you trying to solve?
I want to enable Karpenter to dynamically retrieve the latest AMI ID from AWS  Parameter Store during reconciliation loops.
The idea is to allow Karpenter to accept an amiSelectorTerms parameter (which contains the Parameter Store ID) and periodically fetch the value of this parameter to keep the AMI up-to-date. This would ensure that Karpenter always uses the most recent AMI as long as it is updated in the Parameter Store, without requiring manual intervention or configuration changes.
Example:
apiVersion: karpenter.k8s.aws/v1
kind: EC2NodeClass
spec:
  amiFamily: bottlerocket
  amiSelectorTerms:
    - SSMParameterId: /aws/service/bottlerocket/aws-k8s-1.31/x86_64/latest/image_id
      Query: Parameter.Value

Or
apiVersion: karpenter.k8s.aws/v1
kind: EC2NodeClass
spec:
  amiFamily: AL2
  amiSelectorTerms:
    - SSMParameterId: /mycompany/amis/internal/eks/1.31/latest

Reference
This feature would help in automating the process of keeping the infrastructure updated with the latest AMI versions in enterprise environments, especially for cases where AMIs are frequently updated for security patches, performance improvements, or other maintenance reasons.
How important is this feature to you?
This feature is critical for environments where maintaining up-to-date and secure AMIs is important and a hard task to multiple clusters on enterprise environments. Automating this process would reduce the need for manual updates or custom automation scripts, today we use an AWS Lambda to Patch a spec.amiSelectorTerms[0].id value.

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

I'm going to close this as a duplicate of https://github.com/aws/karpenter-provider-aws/issues/3657. For what it's worth though, Karpenter may already meet some of your needs. It doesn't support custom SSM parameters, but the alias amiSelectorTerm can be used for any of the officially supported AMI family, and tags can be used to discover custom AMIs.


Update Android screenshot

Just a nit: are we able to change the filename? chat.jpg is quite generic - if the old app image is outdated anyways, are we able to retain the same filename and just delete the old image?

That's because we have already used chat.png in ET wiki 🤣
Maybe we update, both ET and torchchat, next time when we revisit this?


fix: empty space cant be assignment name

Fixes #4714
Describe the changes you have made in this PR -
presence: true was missing
Screenshots of the changes (If any) -

also for ui of the error message there is other issue is open already that why styling is missing
Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.

Looks good 👍

how much time will take to merge


Create first unit test with YAML input

This PR creates a unit test that will create a map scatter plot from a IODA netCDF file based on options in an input YAML file.
The PR also contains the functions that the unit test calls.
The next step will be making a stand alone executable script that functions much like this unit test.

The unit test creates a figure like this.


Plugins should return true/false on their init

When a plugin is initialized, it should return true/false to indicate to the pluginManage that it successfully initialized. If false, do not add it to the plugins array.

As we have 1 plugin so far, what's the need?
Theoretically a plugin can manage this logic internally, no?

I'm developing another plugin. That'll make 2 :)
I guess, technically, yes, a plugin can have a self.enabled and check it every time.

I suggest you make a PR for the improvement of the PluginManager.


AP - CRS knob

Hi,
That would be great to have a knob assigned to the CRS (Course) when in AP folder.
Thanks!

Hi,
The only var I can found in the SimConnect API is AUTOPILOT BACKCOURSE HOLD.
But it is a toggle and not a value.
Do you have a idea of the var name for Course ? https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Aircraft_SimVars/Aircraft_AutopilotAssistant_Variables.htm

Hi,
The only var I can found in the SimConnect API is AUTOPILOT BACKCOURSE HOLD. But it is a toggle and not a value. Do you have a idea of the var name for Course ? https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Aircraft_SimVars/Aircraft_AutopilotAssistant_Variables.htm

Sorry for late reply, I was in vacation with no internet access.
What about NAV OBS?

A good way to confirm it is using the SimVar watcher from the MSFS SDK :

unzip
launch
connect
in the sim var name dropdown choose the simvar you want to watch
click on add request
check the value on the right part of the ui
Simvars.zip

I've tried but I don't know what is CRS ;)


updated the flake autoprioritization to reflect histogram

Fixes #1686

This change is

Do everyone agree on that  >50 is P1 and >80 is P0?
I feel that is too relaxed. Only test in Node E2E can reach that.

Goal is to fight priority inflation, so a P0 means something again.
@pwittrock @matchstick

recomputing cla status...

I signed it!

@dchen1107 We were talking about this earlier today

I would like to get this in. I'd also like a change (perhaps run weekly?) that downgrades current priorities if the issues don't meet the bar.

@grodrigues3 maybe you could re-gen your chart, just to see if current data looks similar or not.

@apelisse Can you pull the data from your SQL db and I'll bin and plot it

@lavalamp here's a histogram reflecting the test flakes as of Thursday 10/05/2016.
What do you think?

I would say, the first bar there is p3, the second bar is p2, the third bar
is p1, and everything else is p0. P0 should be like 95th percentile...
On Tue, Oct 11, 2016 at 12:57 PM, grodrigues3<EMAIL_ADDRESS>wrote:

@lavalamp https://github.com/lavalamp here's a histogram reflecting the
test flakes as of Thursday 10/05/2016.
What do you think?
[image: test_flake_dist1005]
https://cloud.githubusercontent.com/assets/4854198/19286339/20a9cb04-8fb2-11e6-86a1-8531114ba971.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes/contrib/pull/1687#issuecomment-253027412,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAnglg0jeNQeOYtHJPz_hy27uZGVUmzDks5qy-pEgaJpZM4J0H5l
.

Some stats on the data.  95th percentile seems to be about 50 flakes/week.
The Range of the Data is 1 - 1247
25 Percentile: 1.0
50 Percentile: 3.0
75 Percentile: 10.0
95 Percentile: 51.4
I'll update the pr to reflect this.

Those numbers look like good p3-p0 boundaries to me. Thanks!
On Tue, Oct 11, 2016 at 1:30 PM, grodrigues3<EMAIL_ADDRESS>wrote:

Some stats on the data. 95th percentile seems to be about 50 flakes/week.
The Range of the Data is 1 - 1247
25 Percentile: 1.0
50 Percentile: 3.0
75 Percentile: 10.0
95 Percentile: 51.4
I'll update the pr to reflect this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes/contrib/pull/1687#issuecomment-253036119,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAnglgVyCaAbGkVvliTOb432PNPjEGeJks5qy_HOgaJpZM4J0H5l
.

@lavalamp made the tests pass too, can you PTAL and lgtm when it looks good

/lgtm

I'll let @lavalamp have the final word

@foxish something weird happened with the CNCF bot.  Looks like it added and removed CNCF label even though I signed that a few weeks ago.

@grodrigues3 That is very odd indeed. I'll check with the CNCF if they are seeing issues.


[Bug]: Gemma 2 responses broken

Before Reporting

[X] I have checked FAQ, and there is no solution to my issue
[X] I have searched the existing issues, and there is no existing issue for my issue

What happened?
I am using Gemma 2 9B via Ollama. When chatting the first part of the response is ok, but then degrades as shown into just showing boxes.

How to reproduce the bug.
Setup Gemma 2 for Ollama "ollama run gemma2". Configure a chat model for Gemma 2. I have token size set to 16384. I have 5 message history turned on for the Chat feature and this custom prompt (Note "Reply in Markdown"): You are an AI programming assistant. You understand and respond in English. You are using iOS 17 to develop a SwiftUI health and wellness application using HealthKit and WidgetKit with a companion Apple Watch app. Your reply should be clear, concise and logical. Use best practices. Do not use deprecated functions (below iOS 17). Do NOT force unwrap optionals. Reply in Markdown with brief code explanations.
Relevant log output
No response
macOS version
14.5
Xcode version
15.4
Copilot for Xcode version
0.33.4

Hello, it seems to work for me. What is the temperature in your settings? Are you using Ollama 0.1.47?


Generate relative links to resources in the themes

Right now HubPress seems to be generating absolute URLs to the resources in the themes causing most of them to be linked to http://.
We should generate protocol relative URL's for these or use the https:// version by default.

Should be ok now, can you merge the upstream and try please?

Yap, seems to work.