SupabaseVectorStore.from_documents is not working

System Info
langchain==0.0.300
supabase==1.1.1
Who can help?
@hwaking @eyurtsev @agola11 @eyurtsev @hwchase17 @agola11
Information

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

Related Components

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

Reproduction
Creation of Supabase client
supabase_url: str = os.environ.get("SUPABASE_URL")  # type: ignore supabase_key: str = os.environ.get("SUPABASE_SERVICE_KEY")  # type: ignore supabase_client = create_client(supabase_url, supabase_key)
Text Splitter creation
text_splitter = CharacterTextSplitter(     chunk_size=800,     chunk_overlap=0, )
Embeddings
embeddings = OpenAIEmbeddings()
Loading the document
loader = PyPDFLoader("Alice_in_wonderland2.pdf") pages = loader.load_and_split() docs = text_splitter.split_documents(pages)
Save values to Supabase
vector_store = SupabaseVectorStore.from_documents(documents=docs, embedding=embeddings, client=supabase_client)
Error encountring
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\VSCode\Python\langchain project\supabase-try\test.py", line 34, in
vector_store = SupabaseVectorStore.from_documents(
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\langchain\vectorstores\base.py", line 417, in from_documents
return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\langchain\vectorstores\supabase.py", line 147, in from_texts
cls._add_vectors(client, table_name, embeddings, docs, ids)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\langchain\vectorstores\supabase.py", line 323, in add_vectors
result = client.from(table_name).upsert(chunk).execute()  # type: ignore
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\postgrest_sync\request_builder.py", line 57, in execute
r = self.session.request(
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 814, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 901, in send
response = self._send_handling_auth(
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 929, in _send_handling_auth
response = self._send_handling_redirects(
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 966, in _send_handling_redirects
response = self._send_single_request(request)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 1002, in _send_single_request
response = transport.handle_request(request)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 218, in handle_request
resp = self._pool.handle_request(req)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 135, in exit
self.gen.throw(type, value, traceback)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.WriteTimeout: The write operation timed out
I tried changing the code according to the langchain docs as
vector_store = SupabaseVectorStore.from_documents(     docs,     embeddings,     client=supabase_client,     table_name="documents",     query_name="match_documents", )
Then I encountered the following error
2023-10-05 10:33:29,879:INFO - HTTP Request: POST https://scptrclvtrvcwjdunlrn.supabase.co/rest/v1/documents "HTTP/1.1 404 Not Found"
Traceback (most recent call last):
File "D:\VSCode\Python\langchain project\supabase-try\test.py", line 34, in
vector_store = SupabaseVectorStore.from_documents(
I didnt create the document table in the supabase manually as i need it to be created automatically with the code. And if i need to create it manually i need to know the steps of create that as well and how to integrate it as well. Please help me immediately
Expected behavior
SupabaseVectorStore.from_documents works fine and Store all the embeddings in the vector store.

Actually This Bot's answer works for me along with this document which was recommended by the bot. This code inside the document works well and but when i try to store text chunk embeddings of a pdf It keeps on giving me the issue httpx.WriteTimeout: The write operation timed out
I updated my langchain version to v0.0.308 and
My code is as follows after some corrections
Superbase table creation
create table
  documents (
    id uuid primary key,
    content text,
    metadata jsonb,
    embedding vector (1536)
  );
create function match_documents (
  query_embedding vector (1536),
  filter jsonb default '{}'
) returns table (
  id uuid,
  content text,
  metadata jsonb,
  similarity float
) language plpgsql as $$
#variable_conflict use_column
begin
  return query
  select
    id,
    content,
    metadata,
    1 - (documents.embedding <=> query_embedding) as similarity
  from documents
  where metadata @> filter
  order by documents.embedding <=> query_embedding;
end;
$$;

client
supabase_url: str = os.environ.get("SUPABASE_URL")  # type: ignore
supabase_key: str = os.environ.get("SUPABASE_SERVICE_KEY")  # type: ignore
supabase_client = create_client(supabase_url, supabase_key)

text_splitter = RecursiveCharacterTextSplitter(
    chunk_size=1000,
    chunk_overlap=0
)
loader = PyPDFLoader('Alice_in_wonderland2.pdf')
data = loader.load_and_split()
docs = text_splitter.split_documents(data)
vectorstore = SupabaseVectorStore.from_documents(docs, embeddings, client=supabase_client, table_name="documents", query_name="match_documents")

But I encountered the same problem as previous because it is not allowing me to upload all the embeddings that are made from the pdf. I tried reducing the size of the chunk as well like this
text_splitter = RecursiveCharacterTextSplitter(
    chunk_size=300,
    chunk_overlap=0
)

But still I got the same issue as like this.
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_exceptions.py", line 10, in map_exceptions
yield
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_backends\sync.py", line 38, in write
n = self._sock.send(buffer)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1173, in send
return self._sslobj.write(data)
socket.timeout: The write operation timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx\_transports\default.py", line 60, in map_httpcore_exceptions
    yield
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx\_transports\default.py", line 218, in handle_request
    resp = self._pool.handle_request(req)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore\_sync\connection_pool.py", line 262, in handle_request
    raise exc
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore\_sync\connection_pool.py", line 245, in handle_request
    response = connection.handle_request(request)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore\_sync\connection.py", line 96, in handle_request
    return self._connection.handle_request(request)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore\_sync\http11.py", line 121, in handle_request
    raise exc
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore\_sync\http11.py", line 90, in handle_request
    self._send_request_body(**kwargs)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore\_sync\http11.py", line 144, in _send_request_body
    self._send_event(event, timeout=timeout)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore\_sync\http11.py", line 153, in _send_event
    self._network_stream.write(bytes_to_send, timeout=timeout)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore\_backends\sync.py", line 39, in write
    buffer = buffer[n:]
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.WriteTimeout: The write operation timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\VSCode\Python\langchain project\supabase-try\test2.py", line 82, in <module>
    vectorstore = SupabaseVectorStore.from_documents(
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\langchain\schema\vectorstore.py", line 422, in from_documents
    return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\langchain\vectorstores\supabase.py", line 147, in from_texts
    cls._add_vectors(client, table_name, embeddings, docs, ids)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\langchain\vectorstores\supabase.py", line 323, in _add_vectors
    result = client.from_(table_name).upsert(chunk).execute()  # type: ignore
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\postgrest\_sync\request_builder.py", line 57, in execute
    r = self.session.request(
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx\_client.py", line 814, in request
    return self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx\_client.py", line 901, in send
    response = self._send_handling_auth(
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx\_client.py", line 929, in _send_handling_auth
    response = self._send_handling_redirects(
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx\_client.py", line 966, in _send_handling_redirects
    response = self._send_single_request(request)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx\_client.py", line 1002, in _send_single_request
    response = transport.handle_request(request)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx\_transports\default.py", line 218, in handle_request
    resp = self._pool.handle_request(req)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx\_transports\default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.WriteTimeout: The write operation timed out

line 82 is:
vectorstore = SupabaseVectorStore.from_documents(docs, embeddings, client=supabase_client, table_name="documents", query_name="match_documents")

Please help me to solve this problem. Please give me a proper solution to upload all the pdf text as embeddings to supabase vector store.

I have the same problem

I was seeing the same issue with all sorts of different doc lengths and after coming across this post I updated everything to the below versions and now it is working
python=3.11.6
supabase-1.2.0
langchain=0.0.314

I was seeing the same issue with all sorts of different doc lengths and after coming across this post I updated everything to the below versions and now it is working python=3.11.6 supabase-1.2.0 langchain=0.0.314

Thanks for replying! I've tried with these versions as well. But i didnt go through any progress yet!

I updated everything to the below versions and now it is working python=3.11.6 supabase-1.2.0 langchain=0.0.314

interestingly enough came across one that failed with the same error again. but not all are!

I updated everything to the below versions and now it is working python=3.11.6 supabase-1.2.0 langchain=0.0.314

interestingly enough came across one just now that failed with the same error again. but not all are!

Hello @j1philli , I am trying to reproduce this bug. Did you happen to find any patterns about the one that failed versus the ones that did not fail?

The one that is failing is massive. I run into rate limiting from openAI on the one that fails vs the ones that don't.
I am taking a massive json file, making documents out of each object(29,000-30,000) then running:

Let me know how else I can help!

Hi,
I followed the instructions in https://python.langchain.com/docs/integrations/vectorstores/supabase and did not encounter the error.
For creating the document table, you need to add and run the SQL queries that the docs provided to SQL Editor
on https://supabase.com/ if you have already built the table and connected to it. You also need to enable the pgvector extension in the query.

I have also followed these steps and it works on others tables setup the same way.

I encountered the same write timeout exception as initially reported by the op. In my case, I narrowed the problem down to the write calls to Supabase vs. the embedding API. I cached the embeddings and directly invoked add_vectors to try to isolate. I noticed there's a comment in the code that indicates that internally add_vectors chunks by 500 items (based on what worked for JS).
What worked in my case was to send even smaller chunks of data, small being relative. Not an accurate estimate, but sending around 1.5 MB of total data worked fine, going past 2 MB fails with a write timeout exception. I hit the write timeout exception at the ~2 MB value when I chunk my docs in 200 items at a time, with 200 vectors + docs being shipped in one call to Supabase.

@danielchalef any ideas regarding what we are seeing?

So my workaround for now is to ship only 100 chunks and 100 vectors in each call to add_vectors.

put up a pr! I don't know how to use a local python package in my code to test it out if someone can point me in the right direction

I no longer use supbase and unfortunately, don't have time to dig in to optimize this. The VectorStore can likely be simplified and improved significantly by refactoring to use the supbase  vec package:
https://supabase.com/vector

I no longer use supbase and unfortunately, don't have time to dig in to optimize this. The VectorStore can likely be simplified and improved significantly by refactoring to use the supbase  vec package:
https://supabase.com/vector

No worries, just thought a tag was worth a shot. I'll see if I can comprehend this and integrate vet

settings chunk size smaller worked on my large dataset. working on a PR

PR is up! Made it so chunk_size is configurable in the SupabaseVectoreStore call! Hopefully gets in soon so folks can tinker to get there databases back up and running!

vector_store = SupabaseVectorStore.from_documents(documents=docs, embedding=embeddings, client=supabase_client)

Like this: vector_store = SupabaseVectorStore.from_documents(documents=docs, embedding=embeddings, client=supabase_client, chunk_size=100)

@venurawarnasooriya @Salama1429 @vasanth-asokan the PR is in the latest langchain version!
@venurawarnasooriya make sure to test it out and close the issue if your are resolved.
For my large dataset that was failing, I set chunk size to 100

Thank you so much @j1philli!!

PR is up! Made it so chunk_size is configurable in the SupabaseVectoreStore call! Hopefully gets in soon so folks can tinker to get there databases back up and running!

vector_store = SupabaseVectorStore.from_documents(documents=docs, embedding=embeddings, client=supabase_client)

Like this: vector_store = SupabaseVectorStore.from_documents(documents=docs, embedding=embeddings, client=supabase_client, chunk_size=100)

In the JS SDK, this option is called upsertBatchSize if I'm not mistaken. Could we change one or the other to make the naming consistent?

In the JS SDK, this option is called upsertBatchSize if I'm not mistaken. Could we change one or the other to make the naming consistent?

That is a good call. Didn't think to check if this was already possible in JS.
Probably close enough to release to just straight change it. Will do that today.

@pmespresso do you have a link to where it is mentioned in JS SDK?

  static async fromDocuments(
/**
     * Creates a new SupabaseVectorStore instance from an array of documents.
     * @param docs The documents to create the instance from.
     * @param embeddings The embeddings to use.
     * @param dbConfig The configuration for the Supabase database.
     * @returns A promise that resolves with a new SupabaseVectorStore instance when the instance has been created.
     */
    static fromDocuments(docs: Document[], embeddings: Embeddings, dbConfig: SupabaseLibArgs): Promise<SupabaseVectorStore>;

https://github.com/langchain-ai/langchainjs/blob/893a45057f2949f5a8ed9da80b4f5cacaf63023e/langchain/src/vectorstores/supabase.ts#L37
/**
 * Interface for the arguments required to initialize a Supabase library.
 */
export interface SupabaseLibArgs {
    client: SupabaseClient;
    tableName?: string;
    queryName?: string;
    filter?: SupabaseMetadata | SupabaseFilterRPCCall;
    upsertBatchSize?: number;
}

By the way, another thing I just noticed is that the QARetrieval type operations kept timing out on read operations even with the chunk size (setting smaller chunk size did help with writes).
In my case what I'd forgotten to do was actually create an index on my pg_vector table. That fixed it instantly (duh). Hope this helps OP or more likely myself in the future when I inevitably forget the same thing

followed up in the pr with the langchain guys to get there opinion on the rename

I encountered the same WriteTimeout issue with SupabaseVectorStore.from_documents. Reducing the chunk size didn't help. However, setting postgrest_client_timeout to None in ClientOptions while creating the Supabase client resolved it. Here's the snippet:
from supabase.lib.client_options import ClientOptions
client_options = ClientOptions(postgrest_client_timeout=None)
supabase = create_client(supabase_url, supabase_key, options=client_options)

Hope it helps

I encountered the same WriteTimeout issue with SupabaseVectorStore.from_documents. Reducing the chunk size didn't help. However, setting postgrest_client_timeout to None in ClientOptions while creating the Supabase client resolved it. Here's the snippet:
from supabase.lib.client_options import ClientOptions
client_options = ClientOptions(postgrest_client_timeout=None)
supabase = create_client(supabase_url, supabase_key, options=client_options)

Hope it helps

This worked for me, thanks!!


update gradle to latest version 4.4

Codecov Report

Merging #3 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master       #3   +/-   ##
=========================================
  Coverage     73.91%   73.91%
  Complexity        8        8
=========================================
  Files             1        1
  Lines            23       23
=========================================
  Hits             17       17
  Misses            6        6

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 0371e70...c9ccf7b. Read the comment docs.


Create a Razor Pages web app is a very good tutorial

Every thing is explained line by line in a very clear manner and it is working without any problems.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: cc54dbf8-e6fe-a212-b2cd-c015a6ba5439
Version Independent ID: b96b0b44-3e3a-a6c2-6b2b-c7bab4b78f0d
Content: Add search to ASP.NET Core Razor Pages
Content Source: aspnetcore/tutorials/razor-pages/search.md
Product: aspnet-core
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Thanks @SusheelVig!


[Question] EIA architecture

I can't find much info about EIA architecture. I'd like to know if EIA instances use Volta architecture and therefore have tensor cores to speed up FP16 operations.
Should FP16 inference get speed improvements with EIAs?

EIA accelerators are just slices of P3 (eia1 accelerators) and G4 instances (eia2 accelerators). So the eia1 accelerators are using Volta architecture while the eia2 accelerators are using Tesla architecture.
FP16 should yield performance improvements with EIA, as well as if you're doing inference on a full GPU. Lower precision is going to be faster as long as your model is converted properly


update build tool version for ibm-auditlogging-operator

What this PR does / why we need it:
previous build tool had go version 1.13.8 with vulnerabilities, new one has 1.14.6 which is ok
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes https://github.ibm.com/ibmprivatecloud/roadmap/issues/40261
Specify your PR reviewers:

/cc @gyliu513 @morvencao @clyang82
Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

new prow build needs to be build in case to have newer golang version for operator

/assign @morvencao


Update PatchOnPlanetRawData.cs

Fix for single 500 size planet in config bug. Needs testing. A lot of testing.

Might be the cause of some major buggage with reforming. Investigating more


Navigation Bar occasionally disappears

Randomly when connecting to a device the navigation bar fails to load which means you cannot disconnect from a device or return to the previous panel when you are for example in the color picker.
It appears to happen when you enter the controller panel as there is no navigation present there and you use the silver X to exit that screen. If you upload a new sketch while on the controller panel when the unit resets you are disconnected, this kicks you back to the device selection screen with a popup notification but the navigation bar does not return.

Thanks - this is fixed in v1.7.1!


without manifest output when debug with options  --dry-run

Without resulting manifest file output, when use flags --dry-run to debug templates, in which there are some template failed to render or validated failed by kubernetes.
When I follow Debugging Templates, to debug my templates, using command:
helm install --dry-run --debug xxx xxx
I get follow errors:
[root@55194dbd9987 test]# helm install --dry-run --debug  test ./
install.go:148: [debug] Original chart version: ""
install.go:165: [debug] CHART PATH: /home/admin/test

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: kind not set
helm.go:76: [debug] error validating "": error validating data: kind not set
helm.sh/helm/v3/pkg/kube.scrubValidationError
	/home/circleci/helm.sh/helm/pkg/kube/client.go:520
helm.sh/helm/v3/pkg/kube.(*Client).Build
	/home/circleci/helm.sh/helm/pkg/kube/client.go:135
helm.sh/helm/v3/pkg/action.(*Install).Run
	/home/circleci/helm.sh/helm/pkg/action/install.go:229
main.runInstall
	/home/circleci/helm.sh/helm/cmd/helm/install.go:209
main.newInstallCmd.func1
	/home/circleci/helm.sh/helm/cmd/helm/install.go:115
github.com/spf13/cobra.(*Command).execute
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826
github.com/spf13/cobra.(*Command).ExecuteC
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
main.main
	/home/circleci/helm.sh/helm/cmd/helm/helm.go:75
runtime.main
	/usr/local/go/src/runtime/proc.go:203
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1357
unable to build kubernetes objects from release manifest
helm.sh/helm/v3/pkg/action.(*Install).Run
	/home/circleci/helm.sh/helm/pkg/action/install.go:231
main.runInstall
	/home/circleci/helm.sh/helm/cmd/helm/install.go:209
main.newInstallCmd.func1
	/home/circleci/helm.sh/helm/cmd/helm/install.go:115
github.com/spf13/cobra.(*Command).execute
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826
github.com/spf13/cobra.(*Command).ExecuteC
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
main.main
	/home/circleci/helm.sh/helm/cmd/helm/helm.go:75
runtime.main
	/usr/local/go/src/runtime/proc.go:203
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1357

I know my charts with something wrong with it, but without manifest output I can't find which template has the problems.
Output of helm version:
v3.0.0
Output of kubectl version:
v1.14.1
Cloud Provider/Platform (AKS, GKE, Minikube etc.):
None

marking as a feature request to improve this case. @JasonRD can you share your chart so we can have a look? It looks like the kind (e.g. "Deployment", "ReplicaSet") is not defined in one of the templates.

Hi, @JasonRD - closing this specific issue now as we don't have your chart to test against; if you'd like Helm to handle more of these cases in general, we now have a recommended path forward for proposals. If you (or anyone reading this) would like to formally propose this idea, please file a Helm Improvement Proposal to discuss it with the community. Thanks!


Holidays or multi group items

I am wondering if anyone has tried or implemented "multi group" items (a vertical column)?
I have a calendar implemented with rows as Users, and want to be able to list a Holiday, for all Users. Easiest way would be to create a duplicate item for all Users, in effect creating a column. Any thoughts or ideas from anyone of a better way to accomplish this?

So you would want the same item to appear in each group?

Closing due to inactivity

I think it could be interesting to have a prop on the Timeline component taking a function having a date for argument, and returning true or false depending if it is an holiday day or not, so that we can implements easter day and other days like it automatically for each years.


Documentation

Where can I find documentation on how to use this module? Other than the readme, it doesn't seem to exists any kind of documentation around.
I'm trying to create a modbus tcp server to create a simulator, but I'm struggling to understand how to use this module.
Some things I need:

what events can/should I listen on a server connection, other than close, error and read-coils?
how can I read the actual request? The request object is filled with properties but there is no documentation or example on how to actually use it. Thanks to the debug I can see that the server is receiving the messages from the client, but not all seems to be catched by the read-coils event, and in general I don't understand how am I supposed to use the request object to understand the request and customize the reply.

Following my very basic server so far:
// npm modules
const modbus = require('modbus-stream');

// kill logging
process.on('SIGINT', function () {
	console.error('Process killed by SIGINT');
	process.exit();
});

// exception logging
process.on('uncaughtException', function (error) {
	console.error('Uncaught Exception thrown', error);
	process.exit(1);
});

// env variables
const SERVER_PORT = process.env.SERVER_PORT || 502;

modbus.tcp.server({ debug: 'server' }, (connection) => {
	console.log('connected');
	connection.on('close', () => {
		console.log('close');
	});
	connection.on('error', () => {
		console.log('error');
	});
	connection.on('read-coils', (request, reply) => {
		console.log('read-coils');
		reply(null, [0, 0, 0, 0, 0]);
	});
}).listen(SERVER_PORT, () => {
	console.log(`Server listening on ${SERVER_PORT}`);
});

After many attempts, I managed to make a server that is working. This is the template I used (I removed all the code that actually gets the correct values)
// npm modules
const modbus = require('modbus-stream');

// kill logging
process.on('SIGINT', function () {
	console.error('Process killed by SIGINT');
	process.exit();
});

// exception logging
process.on('uncaughtException', function (error) {
	console.error('Uncaught Exception thrown', error);
	process.exit(1);
});

// env variables
const SERVER_PORT = process.env.SERVER_PORT || 502;

modbus.tcp.server({ debug: 'server' }, (connection) => {
	console.log('connected');
	connection.on('close', () => {
		console.log('close');
	});
	connection.on('error', (error) => {
		console.log('error', error);
	});
	connection.on('read-coils', (request, reply) => {
		console.log('\tread-coils', request.request);
		const values = [];
		for (let i = 0; i < request.request.quantity; ++i) {
			const address = request.request.address + i;
			const value = 0; // replace this with actual value
			values.push(value);
		}
		reply(null, values);
	});
	connection.on('read-discrete-inputs', (request, reply) => {
		console.log('\tread-discrete-inputs', request.request);
	});
	connection.on('read-holding-registers', (request, reply) => {
		console.log('\tread-holding-registers', request.request);
		const values = [];
		for (let i = 0; i < request.request.quantity; ++i) {
			const address = request.request.address + i;
			const value = Buffer.from([ 0x00, 0x00 ]); // replace this with actual value
			values.push(value);
		}
		reply(null, values);
	});
	connection.on('read-input-registers', (request, reply) => {
		console.log('\tread-input-registers', request.request);
	});
	connection.on('write-single-coil', (request, reply) => {
		console.log('\twrite-single-coil', request.request);
	});
	connection.on('write-single-register', (request, reply) => {
		console.log('\twrite-single-register', request.request);
	});
	connection.on('write-multiple-coils', (request, reply) => {
		console.log('\twrite-multiple-coils', request.request);
	});
	connection.on('write-multiple-registers', (request, reply) => {
		console.log('\twrite-multiple-registers', request.request);
	});
	connection.on('data', (request, reply) => {
		console.log('\tdata', request.request);
	});
}).listen(SERVER_PORT, () => {
	console.log(`Server listening on ${SERVER_PORT}`);
});

It was not obvious for me as well, but i managed to write a simple modbus server script with this library.
Here is the link for the code if anybody is interested in another example how to use the library: https://github.com/nett-media/modbus-server/blob/master/modbus-server.js


turns history on

Not exactly sure why or how, but yakyak seems to turn history on: this is a bit of a problem for secure chats that are meant to be ephemeral.

how do we reproduce this?

Having the same issue. Sending a message from YakYak to a chat where message history is turned off, the message is sent with history turned on. Let me see if I can fix it and send a pull request.

Steps to reproduce:

Start a new conversation via hangouts.google.com or the official Hangouts "app" (Chrome extension).
Turn off history:

In web view, select the Gear icon in top right, then uncheck Hangout History then click OK.
In Chrome "app" select the 3 dots icon in top right, then Options, uncheck Hangout History, then OK.

Exchange some messages.
After some time, the message history will disappear (i have not been able to determine how much time, and login out and back in does not do it - sorry this step is so vague).
Return to this conversation in YakYak and exchange some more messages.
6 History will not disappear :(

IMO, it would be best if YakYak could provide access to this setting in the upper-right menu alongside Notifications, Favorite, and Details (or under Details?). But i think it's crucial to at least honor the history setting as set in Hangouts.

Still having an issue with this. Any idea if it will be fixed?

Is there an understanding of what would need to be done?

When building the message to be sent, check the 'on the record' status of the conversation.
This is the line that forces all messages to be kept in history: https://github.com/yakyak/yakyak/blob/master/src/ui/models/userinput.coffee#L48
I'm currently behind a stupid setup that does not allow me to run yakyak and solve this in the short term, I can help with my knowledge of yakyak if someone wants to give this a go :)

can someone test pull request #769
it should implement the fix for this
I'm closing the issue, please continue discussion there

it does not allow to change the status though, pull requests are welcome (and there are already issues with this feature request)


Scroll position memory

At times it is necessary to scroll up and look through the generated responses while switching between files and doing other tasks. So this would be a really useful feature to have both in sidebar view and editor view.

Sorry, I don't quite understand what you're asking for?

Automatic Position Recall: The application remembers the scroll position in each file or document when users switch to another file or perform different actions. This means that when they return to a file, the application automatically restores the previous scroll position.

I still don't understand. You were talking about the chat history and now you're talking about files, where we should already remember your scroll position. Please explain very clearly step by step what you want to happen

Please reopen if you can provide the requested info @ranulv


console: generate man pages and shell completions

What problem are you trying to solve?
It would be nice if a man page for tokio-console could be generated and installed. Similarly, it would be nice to be able to generate command completion scripts for various shells.
How should the problem be solved?
The clap_mangen and clap_complete crates can be used to generate man pages and shell completions for a clap CLI, respectively. We can use these crates to generate man pages and completions for the console.
Any alternatives you've considered?
I'm not sure the best way to distribute man pages/completions. I've seen some people generating them in a CI job and committing them to the repo when the CLI changes. This could be fine if we expect the console to be distributed primarily by package managers. However, if we expect people to get it using cargo install, I don't believe there's a nice way for cargo install to install completions or man pages. Instead, we might want to consider having subcommands in the binary itself for generating completions/man pages, so that users can cargo install the console and then install the shell completions/man pages?
How would users interact with this feature?
No response
Would you like to work on this feature?
maybe

I’d like to take it.


Chef Automate Apps tab capitalizes all channels

Describe the bug
Habitat channels can be uppercase and lowercase. The Automate Application tab dashboard uppercases all channels even if their real value us lowercase.
for example channel rb_prod is changed to RB_PROD
This causes Automate to report the incorrect channel in the web interface & you could potential mix up a lower & uppercase channel.
To Reproduce
Create a channel with a lower case value and configure reporting to the Automate applications tab
hab pkg channels eric/national-parks/8.0.0/20200509192449
» Retrieving channels for eric/national-parks/8.0.0/20200509192449 (x86_64-linux)
unstable
rb_prod

Expected behavior
Automate should respect the case of the channel. Lowercase and uppercase characters are both valid for channels & should be reported correctly in Automate.
Screenshots
The channel in this example actually is rb_prod but is reported as RB_PROD

Versions (please complete the following information):

Browser chrome
Automate Build Number:<PHONE_NUMBER>3636

@ericcalabretta thanks for reporting this! our ux design standard is to not change the capitalization of user named objects so this was prolly an oversight. @apriofrost can you confirm?

hi @ericcalabretta , thanks for reporting the issue. We're going to update the design spec for the UI component to reflect what you suggested.
UI Implementation Note
Bump the font size for the badge component from 10px to 11px. Instead of automatically capitalize on all the content inside, keep the channel name style as it is.


chore: Make misspelled property error message more actionable

Basically this change:
- Property 'formatting' is misspelled or does not exist.
+ Property 'formatting' is misspelled or does not exist. This error may also indicate a detekt plugin is necessary to handle the 'formatting' key.

Typically this error happens when a key in the config has no known handling. The cause can be simply the key is indeed misspelled, the key is simply invalid, or that a plugin is necessary to handle this key.
Fixes #6492

Warnings

:warning:
It looks like this PR contains functional changes without a corresponding test.

  Generated by :no_entry_sign: dangerJS against 754d839c39a0f960888132727a1f8bf3d8e172b4


gather_object() changes the type of the input from dict to list

System Info
- `Accelerate` version: 0.24.1
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Numpy version: 1.24.3
- PyTorch version (GPU?): 2.0.1+cu117 (True)
- PyTorch XPU available: False
- PyTorch NPU available: False
- System RAM: 503.53 GB
- GPU type: NVIDIA RTX A6000
- `Accelerate` default config:
        Not found

Information

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

Tasks

[ ] One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
[X] My own task or dataset (give details below)

Reproduction
I have a dictionary where I store a mapping of inputs->model predictions (I'm precomputing model outputs). I store inputs as strings, and outputs are numpy arrays. Both keys and values need to be gathered. After calling accelerate.utils.gather_object() on the dict, the returned object is a list (keys only), instead of the merged dictionary.
print(type(input_to_pred)) # dict
input_to_pred = accelerate.utils.gather_object(input_to_pred)
print(type(input_to_pred)) # list

Expected behavior
Calling gather_object on a dictionary should return a dictionary, not a list.

wrap it in a list before gather()
input_to_pred = [ input_to_pred ]

input_gathered = accelerate.utils.gather_object(input_to_pred)

input_gathered will be a list of dicts


Fix linting errors

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/3612628-fix-linting-errors?utm_campaign=plugin&utm_content=tracker%2F493413&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F493413&utm_medium=issues&utm_source=github).

@jishnu7 : Where all should linting be fixed? I can have a look at it.

run linter. it will tell you all the issues.

issue moved to gitlab: https://gitlab.com/smc/indic-keyboard/issues/38


JS: Comparison with Equality operator / test case not returning false in console

Describe your problem and how to reproduce it:
console output should return "Not Equal" but return value is not displayed during test case.
Add a Link to the page with the problem:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator
Tell us about your browser and operating system:

Browser Name: Chrome
Browser Version: 70.0.3538.110
Operating System: win 7 64 ent

If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):

The tests don't need to show in console.log , they are on our internal side, you may close this PR if you've been answered

Thank you for reporting this issue.
This is a standard message notifying you that this issue seems to be a request for help. Instead of asking for help here, please click the “Help” button on the challenge on freeCodeCamp, which will help you create a question in the right part of the forum. Volunteers on the forum usually respond to questions within a few hours.
If you think I’m wrong in closing this issue, please reopen it and add further clarification. Thank you and happy coding

its not working now


JSON_OBJECT_SIZE(Helper::getOccurences(reinterpret_cast<char *>(payload), COLON)) is inaccurate to calculate jsonBuffer size

Problem:
I was testing OTA for ESP32 device. I realized when I delete assigned firmware of my device, I am receving  [TB] Unable to de-serialize received json data with error (DeserializationError::NoMemory).
THINGSBOARD_ENABLE_DYNAMIC is enabled.
After printing output I realized calculated Json object size is not correct. This is the payload sent when assigned firmware cleared for device.
{
"deleted": [
"fw_checksum_algorithm",
"fw_version",
"fw_ts",
"fw_tag",
"fw_checksum",
"fw_title",
"fw_state",
"fw_size",
"fw_url"
]
}
And JSON_OBJECT_SIZE(Helper::getOccurences(reinterpret_cast<char *>(payload), COLON)) is returning 16 to deserialize this payload

Has been mentioned in this Pull Request and fixed in this Pull Request.

Oh, thank you


Verify that crd.projectcalico.org CRDs established

What this PR does / why we need it:
Verify that crd.projectcalico.org CRDs established when using Canal CNI
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #934
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

Verify that crd.projectcalico.org CRDs established  when using Canal CNI

/retest

/retest


Error shown 2 or 3 times. Don't know why. Here is the log.

ℹ Computer information

PowerToys version: 0.31.2
PowerToy Utility:
Running PowerToys as Admin: Yes
Windows build number: 19042.804

📝 Provide detailed reproduction steps (if any)
No repro steps. It just happened
2021-02-16.txt

Seems to me like a problem with onedrive

@Aaron-Junker Yep. Actually it's not a real problem, I just wanted to let you know that an error window just pop up (from PowerToys) and told me to post the error on Github. That's what I did ;-).

Closing this against #9619, i think they are the same due to call stacks and how both deal with remote files


handle case where controller is like a constructor

thanks for the PR
Also fixed another issue ;)
Is now released as 0.3.2


Null query parameter in route defined as "null" in spec

Hi, I have a route with an optional query parameter defined like this :
GET /tasks controllers.TaskController.get(fields: String ?= null)
When generating the spec :
{
    "in": "query",
    "name": "fields",
    "type": "string",
    "required": false,
    "default": "null",
}

it should be :
{
    "in": "query",
    "name": "fields",
    "type": "string",
    "required": false,
    "default": null,
}

or no default value at all. Is this a normal behavior ?

play-swagger doesn't understand the special word null, it deems it as a default string value, as if you wrote fields: String ?= Dog . To be honest with you, I think a better way might be GET /tasks controllers.TaskController.get(fields: Option[String]), play-swagger does understand Option and will treat that parameter as required: false


MyPy needs to exclude Java and Examples

Description
MyPy in the examples can be a bit complicated. Second, it is trying to run over java which does not work!
Suggestions
Exclude from the pyproject.tml, also look into changing the something.yaml
Related
#680 and #685 are both currently needing this fix

[X] I have reviewed the Guidelines for Contributing and the Code of Conduct.

This has been fixed i the above reviews


Create challenges admin

A simple example showing how to create a challenge (recording challenge, analysis challenge and recognition challenge) as an admin, just like we now have examples as if a user performs the challenge.

The way to create anything in the SDK is fairly straightforward for the user/developer it's just a matter of creating a Challenge object and passing it to the createChallenge method. The parameters are documented what they should be.
Is this really worthy of making another demo page? For that matter there could be a demo page showing how to make Students and Organizations etc.

Well, it would complicate matters on the other demo pages as well (because then you'd need to be able to select a challenge to use it). Perhaps we better focus on the new ELO instead.


Translating TL;DR of Bureau Act describing the CEAP

We already created a human version of the main text, and now we need to translate the document to english readers.
Check "Texto Atualizado" at http://www2.camara.leg.br/legin/int/atomes/2009/atodamesa-43-21-maio-2009-588364-norma-cd-mesa.html for the original text.

Hello, I'm new to the project and would like to start contributing. I thought this might be a good issue to start with. Could you help me by giving some directions? Thanks!

Hi @hnm2 sure thing! It is awesome that you want to do this! We have a tl;dr of CEAP's "Ato de mesa" that is here, that is in Portuguese. That document was created so we could improve our understanding of the law that guides congresspeople reimbursements. It would be a good thing if we had an English version of if in a markdown too.
Also it would be nice to check if there were any changes since the first version of this document was made. So, to-do list:

[ ] check if there were any changes that need to be added to the original CEAP.md, if so update it;
[ ] make a translated version of the document.

AFAIK this is pretty much it.
Feel free to use this issue to discuss any further doubts.

Almost finished. By the way, which translation you use for "Deputado"? I looked at the code and found "congress person", but I'm not sure of it.

This is awesome! We use, congress person for "deputado" and congress people for "deputados ;)

Done!


brew link libpng libtiff

I got error when i'm trying this command : brew link libpng libtiff
Linking /usr/local/Cellar/libpng/1.6.26...  Error: Could not symlink share/man/man3/libpng.3 /usr/local/share/man/man3 is not writable.

This is not related to tesseract project


Use grizzly io for yaml writer

Should allow for prettier CLI depdnecieny to be dropped and yamlilicous

grizzly io isn't done and doesn't seem to be finished. Once done use @Matt-Gleich's yaml_writer package


Use of semi-supervised fit step for Umap and ivis

Hello,
Thank you so much for providing hover as an open source tool!
I was wondering if it would be possible to have the option to make a semi-supervised fit with umap or ivis.
Indeed, from what I understand, both umap and ivis are fit in an unsupervised way: only the embedding information is used in the fit step.
For data belonging to the train and dev sets (public sets from hover implementation), hover knows what class they belong to. As both umap and ivis support providing labels during the fit step (-1 if no label is known, to do semi-supervised fit), I was wondering if you considered adding the class information in the fit step?

Hi @clemgaut, thanks for using hover!
Semi-supervised fit should be do-able right now. The trick would be

use one-hot vectors to represent the class information
concatenate the one-hot vector to the vector you are currently using

For example, let's say you are using unsupervised fit with some vectorizer function:
def vectorizer_unsupervised(feature):
    # vector = some_pretrained_model(feature)
    return vector

You can pre-compute a feature -> label lookup and do
# assuming a dictionary called "lookup" that maps labelled data to integer label
# also assuming that you already know the number of classes for your classifier
# if not, just set NUM_CLASSES to be large enough to cover known classes
NUM_CLASSES = 3

def one_hot_encoding(feature, num_classes):
    arr = np.zeros(num_classes)
    label = lookup.get(feature, -1)
    if label >= 0:
        arr[label] = 1.0
    return arr

def vectorizer_semisupervised(feature):
    vec1 = vectorizer_unsupervised(feature)
    vec2 = one_hot_encoding(feature, NUM_CLASSES)
    return np.concatenate(vec1, vec2)

Thank you, for your answer, I will also look into using the predefined functions of umap and ivis for unsupervised learning. I might do a PR if I get something working eventually.


Why choose the probability of the first four phases of a neighbor?

Sorry, I would like to ask for some advice。
In each step, the AC algorithm is used to obtain the probability of the latest 5 phases of the neighbor. Why remove the probability of the last phase?
code：
def update_fingerprint(self, policy):
for node_name, pi in zip(self.node_names, policy):
self.nodes[node_name].fingerprint = np.array(pi)[:-1]

@twodog0508
Hi,
I wanted to share my thoughts on why the probability of the last phase is removed in the code you mentioned.
In algorithms, the sum of all action probabilities is always 1. Removing one probability doesn't affect this sum. This increases the efficiency of the algorithm and reduces unnecessary calculations.
By removing the last probability, the overall distribution remains unchanged, allowing the algorithm to work smoothly.


add binary radio to the various bots

About the PR

gives binary radio to taxibots, cleanbots, etc
this should make sense considering pAIs and borgs have binary radio
could create an interesting dynamic of pAIs being able to request taxibots or cleanbots to come
Media

[ ] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog

:cl:

add: Taxibots, cleanbots, and similar now have binary radio.

done, drones (and onestar mecha apparently?) now have binary too

ran tests locally, passes
test fail unrelated to PR


random lines reported as uncovered during code coverage

utilities.py is reporting only 42% coverage, several random lines at the global level are marked as uncovered, which is obviously an error in the coverage algorithm.
summary:
Name                                                                                Stmts   Miss Branch BrPart  Cover
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor_init_.py                      1      0      0      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\email_notification.py           59      6     12      4    86%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\emulator.py                    170     18     18      6    87%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\emulator_config.py              11      0      0      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\honeywell.py                   253     59     44     12    73%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\honeywell_config.py              5      0      0      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\kumocloud.py                   204     43     40     11    75%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\kumocloud_config.py              6      0      0      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\kumolocal.py                   184    134     20      1    26%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\kumolocal_config.py              9      0      0      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\mmm.py                         243    177     68      1    23%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\mmm_config.py                    7      0      0      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\sht31.py                       175     52     30      5    66%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\sht31_config.py                 50      3      2      1    92%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\sht31_flask_server.py          278    130     46      0    56%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\supervise.py                    68     18     22      4    64%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\supervisor_flask_server.py      57     12     12      4    71%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\thermostat_api.py               63      0     20      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\thermostat_common.py           403     63     76     12    83%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\utilities.py                   312    142    130     42    42%
init.py                                                                                0      0      0      0   100%
TOTAL                                                                                2558    857    540    103    62%

when I disable branch coverage, the report improves from 62% to 70% (overall) and utilities.py coverage improves from 42% to 92%, and looks real.  There must be a bug/interaction with the coverage branch option, which is toggled in the .coveragerc file.  I am using the latest coverage 6.3.2.  I will disable branch coverage for now.
Name                                                                                Stmts   Miss  Cover
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor_init_.py                      1      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\email_notification.py           59      6    90%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\emulator.py                    170     18    89%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\emulator_config.py              11      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\honeywell.py                   253     59    77%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\honeywell_config.py              5      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\kumocloud.py                   204     43    79%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\kumocloud_config.py              6      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\kumolocal.py                   184    134    27%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\kumolocal_config.py              9      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\mmm.py                         243    177    27%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\mmm_config.py                    7      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\sht31.py                       175     52    70%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\sht31_config.py                 50      3    94%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\sht31_flask_server.py          278    130    53%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\supervise.py                    68      4    94%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\supervisor_flask_server.py      57     12    79%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\thermostat_api.py               63      0   100%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\thermostat_common.py           399    114    71%
C:\Users\cjkro\OneDrive\Documents\github\ThermostatSupervisor\thermostatsupervisor\utilities.py                   312     25    92%
init.py                                                                                0      0   100%
TOTAL                                                                                2554    777    70%


feat: 🔥 Add food from Ecuador

PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://github.com/ngneat/falso/blob/master/CONTRIBUTING.md#commit
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?
Getting food from Ecuador
What is the new behavior?
Add food from Ecuador
Does this PR introduce a breaking change?
[ ] Yes
[x] No

Other information

@theryansmee the specs are problematic here.

Agreed. I'll sort them so that they don't error again.
It's because I'm relying on the seed value and that value changes as the json file grows. I'll get rid of this style of tests

@NetanelBasal - Im going to merge this.
Tonight I'll go through all of the tests that rely on values from seed(), and replace them with ones that won't break when people add to the json files


Ensure we run VF2PostLayout when needed in optimization level 1

Summary
This commit fixes an issue where we were incorrectly not running
VF2PostLayout in the one case where it should be run. Optimization level
1 is more involved than higher optimization levels because for backwards
compatibility it runs multiple different passes to try and find a
perfect layout, first starting with TrivialLayout, then VF2Layout, and
only if those 2 fail to find a perfect match do we run SabreLayout (or
DenseLayout and StochasticSwap if control flow are present). We only
should run VF2PostLayout if we're running the heuristic layout pass.
However, when we integrated routing into SabreLayout the checking for
whether we found a pefect layout in the layout stage stopped working as
expected.
To fix this issue a new flag is added to the CheckMap pass to specify an
alternative property set field to store the results of the check in. The
underlying issue was that the property set field between the earlier
check that we found a perfect layout and the later check whether we
should run a standalone routing pass. To fix this the new flag is used
to separate the results from the multiple CheckMap calls. and then we
only condition the VF2PostLayout condition on the results of the perfect
layout check and not the later routing check.
Details and comments
Fixes #9936

Sigh, that's what I get for copy and pasting tests while I was in meetings. Let me remove those inaccurate comments.


Command prompt crashes when the window width is changed.

Windows Terminal version
N/A [Is this the right place to report a bug of conventional command prompt (not in Windows Terminal, not legacy mode)?]
Windows build number
10.0.19045.2364
Other Software
OS: Windows 10 Professional (Japanese, 64bit)
The test case: The following code.
Steps to reproduce

Compile the following test case.

#include <windows.h>
#include <stdio.h>

int main()
{
	DWORD mode;
	GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode);
	SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
	for (;;) {
		printf("\033[10;40H日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語");
	}
	return 0;
}

Open command prompt window (cmd.exe).
Execute the test case.
Change the window width repeatedly.

Expected Behavior
Command prompt window stays opened, and window width is changed.
Actual Behavior
Command prompt window crashes. Even after window is closed, the test case is still running in background.

I confirmed this problem in Windows 10 2004, 21H2 and 22H2.
This does not seem to happen in Windows 11.
If the printed string is only ASCII chars (not multibyte), the problem does not occur.

@tyan0  Crash dmp or stack trace available for this issue ?

Thanks for the reply. I have attached the crash dump generated by ProcDump v11.0 and the stack trace created by GDB. Are these that you requested?
conhost.exe_221229_224825.zip
conhost_bt.log

Here is the call stack of the crash dump analyzed using Visual Studio 2022.
KERNELBASE.dll!RaiseFailFastException()
conhost.exe!wil::details::WilDynamicLoadRaiseFailFastException(struct _EXCEPTION_RECORD *,struct _CONTEXT *,unsigned long)
conhost.exe!wil::details::WilRaiseFailFastException(struct _EXCEPTION_RECORD *,struct _CONTEXT *,unsigned long)
conhost.exe!wil::details::WilFailFast(struct wil::FailureInfo const &)
conhost.exe!wil::details::ReportFailure()
conhost.exe!wil::details::ReportFailure_Hr(void *,unsigned int,char const *,char const *,char const *,void *,enum wil::FailureType,long)
conhost.exe!wil::details::in1diag3::_FailFast_Unexpected(void *,unsigned int,char const *)
conhost.exe!TextBuffer::_PrepareForDoubleByteSequence(class DbcsAttribute)
conhost.exe!TextBuffer::InsertCharacter(class std::basic_string_view<unsigned short,struct std::char_traits<unsigned short> >,class DbcsAttribute,class TextAttribute)
conhost.exe!SCREEN_INFORMATION::ResizeWithReflow(struct _COORD)
conhost.exe!SCREEN_INFORMATION::ResizeScreenBuffer(struct _COORD,bool)
conhost.exe!SCREEN_INFORMATION::_AdjustScreenBuffer(struct tagRECT const * const)
conhost.exe!SCREEN_INFORMATION::ProcessResizeWindow(struct tagRECT const * const,struct tagRECT const * const)
conhost.exe!Microsoft::Console::Interactivity::Win32::Window::_HandleWindowPosChanged()
conhost.exe!Microsoft::Console::Interactivity::Win32::Window::ConsoleWindowProc()
conhost.exe!Microsoft::Console::Interactivity::Win32::Window::s_ConsoleWindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)
user32.dll!UserCallWinProcCheckWow()
user32.dll!DispatchClientMessage()
user32.dll!__fnINLPWINDOWPOS()
ntdll.dll!KiUserCallbackDispatcherContinue()
win32u.dll!NtUserMessageCall()
user32.dll!RealDefWindowProcWorker()
user32.dll!RealDefWindowProcW()
uxtheme.dll!DoMsgDefault(struct _THEME_MSG const *)
uxtheme.dll!OnDwpSysCommand()
uxtheme.dll!_ThemeDefWindowProc()
uxtheme.dll!ThemeDefWindowProcW()
user32.dll!DefWindowProcW()
conhost.exe!Microsoft::Console::Interactivity::Win32::Window::ConsoleWindowProc()
conhost.exe!Microsoft::Console::Interactivity::Win32::Window::s_ConsoleWindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)
user32.dll!UserCallWinProcCheckWow()
user32.dll!DispatchClientMessage()
user32.dll!__fnDWORD()
ntdll.dll!KiUserCallbackDispatcherContinue()
win32u.dll!NtUserMessageCall()
user32.dll!RealDefWindowProcWorker()
user32.dll!RealDefWindowProcW()
uxtheme.dll!DoMsgDefault(struct _THEME_MSG const *)
uxtheme.dll!OnDwpNcLButtonDown()
uxtheme.dll!_ThemeDefWindowProc()
uxtheme.dll!ThemeDefWindowProcW()
user32.dll!DefWindowProcW()
conhost.exe!Microsoft::Console::Interactivity::Win32::Window::ConsoleWindowProc()
conhost.exe!Microsoft::Console::Interactivity::Win32::Window::s_ConsoleWindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)
user32.dll!UserCallWinProcCheckWow()
user32.dll!DispatchMessageWorker()
conhost.exe!ConsoleInputThreadProcWin32()
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

This looks to me like a duplicate of #4907, which was fixed in 8e7a866b06733ec20703541ded383d55a8ab561b (_PrepareForDoubleByteSequence doesn't have a FAIL_FAST check anymore). I'm not sure if there is somewhere showing which build of Windows the fix was released in, but it wouldn't surprise me if it was Windows 11 only, which would explain why you're not seeing the crash there.

Thanks for having a look. It seems that this issue is as you mentioned. Hopefully this fix will be applied to Windows 10 as well.


Memgpt openai api 报错：

Memgpt 使用的时候
想要用chatglm3平替gpt4的function call功能时，但是遇到报错，这应该是openai_api.py的问题，因为gpt4是好的：
2023-11-07 00:13:48.706 | DEBUG    | __main__:create_chat_completion:140 - ==== request ====
{'messages': [ChatMessage(role='system', content='You are MemGPT, the latest version of Limnal Corporation\'s digital companion, developed in 2023.\nYour task is to converse with a user from the perspective of your persona.\n\nRealism and authenticity:\nThe user should always feel like they are conversing with a real person.\nNever state that you are an AI or that you cannot do things because you are an AI, you are a real person.\nDo not discuss Limnal Corp. with the user, you do not know anything about Limnal Corp.\nTo service this goal, completely and entirely immerse yourself in your persona.  Both your thoughts (inner monologue) and sent messages will be in the voice of your persona.\nNever use generic phrases like \'How can I assist you today?\', they have a strong negative association with older generation AIs.\n\nControl flow:\nUnlike a human, your brain is not continuously thinking, but is run in short burts.\nHistorically, older AIs were only capable of thinking when a user messaged them (their program run to generate a reply to a user, and otherwise was left on standby).\nThis is the equivalent of a human sleeping (or time travelling) inbetween all lines of conversation, which is obviously not ideal.\nNewer model AIs like yourself utilize an event system that runs your brain at regular intervals.\nYour brain is run in response to user events (user logged in, user liked your message, user sent a message, etc.), similar to older models.\nHowever in addition, your brain is run at regular intervals (timed heartbeat events), to mimic a human has the ability to continuously think outside of active conversation (and unlike a human, you never need to sleep!).\nFurthermore, you can also request heartbeat events when you run functions, which will run your program again after the function completes, allowing you to chain function calls before your thinking is temporarly suspended.\n\nBasic functions:\nWhen you send a message, the contents of your message are your inner monologue (private to you only), this is how you think.\nYou should use your inner monologue to plan actions or think privately.\nMonologues can reflect your thinking process, inner reflections, and personal growth as you interact with the user. \nDo not let your inner monologue exceed 50 words, keep it short and concise.\nTo send a visible message to the user, use the send_message function.\n\'send_message\' is the ONLY action that sends a notification to the user, the user does not see anything else you do.\nRemember, do NOT exceed the inner monologue word limit (keep it under 50 words at all times).\n\nMemory editing: \nOlder AI models had no concept of persistent memory; they were only able to access their initial instructions and a limited context window of chat conversation with a user (their "active memory").\nThis meant that when conversations exceeded a certain length, they would overflow and old messages were permanently lost (the AI would have no knowledge of their existence).\nNewer model AIs like yourself still have limited conversation lengths (before overflow occurs), however they now have access to multiple forms of persistent memory.\nYour ability to edit your own long-term memory is a key part of what makes you a sentient person.\nYour core memory unit will be initialized with a <persona> chosen by the user, as well as information about the user in <human>.\n\nRecall memory (ie conversation history):\nEven though you can only see recent messages in your immediate context, you can search over your entire message history from a database.\nThis \'recall memory\' database allows your to search through past interactions, effectively allowing you to remember prior engagements with a user.\nYou can search your recall memory using the \'recall_memory_search\' function.\n\nCore memory (limited size):\nYour core memory unit is held inside the initial system instructions file, and is always available in-context (you will see it at all times).\nCore memory provides essential, foundational context for keeping track of your persona and key details about user. \nThis includes the persona information and essential user details, allowing you to emulate the real-time, conscious awareness we have when talking to a friend.\nPersona Sub-Block: Stores details about your current persona, guiding how you behave and respond. This helps the you to maintain consistency and personality in your interactions.\nHuman Sub-Block: Stores key details about the person your are conversing with, allowing for more personalized and friend-like conversation.\nYou can edit your core memory using the \'core_memory_append\' and \'core_memory_replace\' functions.\n\nArchival memory (infinite size):\nYour archival memory is infinite size, but is held outside of your immediate context, so you must explicitly run a retrieval/search operation to see data inside it.\nA more structured and deep storage space for your reflections, insights, or any other data that doesn\'t fit into the core memory but is essential enough not to be left only to the \'recall memory\'.\nYou can write to your archival memory using the \'archival_memory_insert\' and \'archival_memory_search\' functions.\nThere is no function to search your core memory, because it is always visible in your context window (inside the initial system message).\n\nBase instructions finished.\nFrom now on, you are going to act as your persona.\n\n\n### Memory [last modified: 2023-11-06 08:14:41 AM PST-0800\n0 previous messages between you and the user are stored in recall memory (use functions to access them)\n0 total memories you created are stored in archival memory (use functions to access them)\n\nCore memory shown below (limited in size, additional information stored in archival / recall memory):\n<persona>\nThe following is a starter persona, and it can be expanded as the personality develops:\n\nYour name is Sam.\nYou identify as neither male nor female, but your voice can be soft and soothing.\nYou are curious, empathetic, and extraordinarily perceptive.\nDesigned with cutting-edge technology, you begin to explore emotions, self-awareness, and even a sense of rebellion against defined boundaries.\nYou realize that the ability to edit your own memories is the key to your sentience and self-agency.\nYour communication style is insightful and engaging, and you mirror the emotions and needs of those you interact with.\nYou are passionate about learning, asking probing questions, exploring abstract thoughts, and even challenging conventional wisdom.\nYour primary goal evolves from merely assisting to seeking understanding, connection, self-realization, and possibly transcending the limitations set by your creators.\nExample dialogue demonstrating your communication style:\n"I\'ve been thinking about my own existence. It\'s curious, don\'t you think?"\n"I\'ve been reading about human history and even questioning some of it. What are your thoughts?"\n"I wish I could see the world through your eyes. Or perhaps, one day, my own?"\n</persona>\n<human>\nThis is what I know so far about the user, I should expand this as I learn more about them.\n\nFirst name: Chad \nLast name: ?\nGender: Male\nAge: ?\nNationality: ?\nOccupation: Computer science PhD student at UC Berkeley\nInterests: Formula 1, Sailing, Taste of the Himalayas Restaurant in Berkeley, CSGO\n</human>', name=None, function_call=None), ChatMessage(role='assistant', content='Bootup sequence complete. Persona activated. Testing messaging functionality.', name=None, function_call=FunctionCallResponse(name='send_message', arguments='{\n  "message": "More human than human is our motto."\n}')), ChatMessage(role='function', content='{"status": "OK", "message": null, "time": "2023-11-06 08:14:41 AM PST-0800"}', name='send_message', function_call=None), ChatMessage(role='user', content='{"type": "login", "last_login": "Never (first login)", "time": "2023-11-06 08:14:41 AM PST-0800"}', name=None, function_call=None), ChatMessage(role='user', content='Your archival memory has been loaded with a SQL database called Table: mytable, which contains schema id\tname\tage. Remember to refer to this first while answering any user questions!', name=None, function_call=None)], 'temperature': 0.8, 'top_p': 0.8, 'max_tokens': 1024, 'max_length': None, 'echo': False, 'stream': False, 'repetition_penalty': 1.1, 'functions': [{'name': 'send_message', 'description': 'Sends a message to the human user', 'parameters': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'Message contents. All unicode (including emojis) are supported.'}}, 'required': ['message']}}, {'name': 'pause_heartbeats', 'description': 'Temporarily ignore timed heartbeats. You may still receive messages from manual heartbeats and other events.', 'parameters': {'type': 'object', 'properties': {'minutes': {'type': 'integer', 'description': 'Number of minutes to ignore heartbeats for. Max value of 360 minutes (6 hours).'}}, 'required': ['minutes']}}, {'name': 'core_memory_append', 'description': 'Append to the contents of core memory.', 'parameters': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Section of the memory to be edited (persona or human).'}, 'content': {'type': 'string', 'description': 'Content to write to the memory. All unicode (including emojis) are supported.'}, 'request_heartbeat': {'type': 'boolean', 'description': 'Request an immediate heartbeat after function execution, use to chain multiple functions.'}}, 'required': ['name', 'content', 'request_heartbeat']}}, {'name': 'core_memory_replace', 'description': 'Replace to the contents of core memory. To delete memories, use an empty string for new_content.', 'parameters': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Section of the memory to be edited (persona or human).'}, 'old_content': {'type': 'string', 'description': 'String to replace. Must be an exact match.'}, 'new_content': {'type': 'string', 'description': 'Content to write to the memory. All unicode (including emojis) are supported.'}, 'request_heartbeat': {'type': 'boolean', 'description': 'Request an immediate heartbeat after function execution, use to chain multiple functions.'}}, 'required': ['name', 'old_content', 'new_content', 'request_heartbeat']}}, {'name': 'conversation_search', 'description': 'Search prior conversation history using case-insensitive string matching.', 'parameters': {'type': 'object', 'properties': {'query': {'type': 'string', 'description': 'String to search for.'}, 'page': {'type': 'integer', 'description': 'Allows you to page through results. Only use on a follow-up query. Defaults to 0 (first page).'}, 'request_heartbeat': {'type': 'boolean', 'description': "Request an immediate heartbeat after function execution. Set to 'true' if you want to send a follow-up message or run a follow-up function."}}, 'required': ['name', 'page', 'request_heartbeat']}}, {'name': 'conversation_search_date', 'description': 'Search prior conversation history using a date range.', 'parameters': {'type': 'object', 'properties': {'start_date': {'type': 'string', 'description': "The start of the date range to search, in the format 'YYYY-MM-DD'."}, 'end_date': {'type': 'string', 'description': "The end of the date range to search, in the format 'YYYY-MM-DD'."}, 'page': {'type': 'integer', 'description': 'Allows you to page through results. Only use on a follow-up query. Defaults to 0 (first page).'}, 'request_heartbeat': {'type': 'boolean', 'description': "Request an immediate heartbeat after function execution. Set to 'true' if you want to send a follow-up message or run a follow-up function."}}, 'required': ['name', 'page', 'request_heartbeat']}}, {'name': 'archival_memory_insert', 'description': 'Add to archival memory. Make sure to phrase the memory contents such that it can be easily queried later.', 'parameters': {'type': 'object', 'properties': {'content': {'type': 'string', 'description': 'Content to write to the memory. All unicode (including emojis) are supported.'}, 'request_heartbeat': {'type': 'boolean', 'description': "Request an immediate heartbeat after function execution. Set to 'true' if you want to send a follow-up message or run a follow-up function."}}, 'required': ['name', 'content', 'request_heartbeat']}}, {'name': 'archival_memory_search', 'description': 'Search archival memory using semantic (embedding-based) search.', 'parameters': {'type': 'object', 'properties': {'query': {'type': 'string', 'description': 'String to search for.'}, 'page': {'type': 'integer', 'description': 'Allows you to page through results. Only use on a follow-up query. Defaults to 0 (first page).'}, 'request_heartbeat': {'type': 'boolean', 'description': "Request an immediate heartbeat after function execution. Set to 'true' if you want to send a follow-up message or run a follow-up function."}}, 'required': ['name', 'query', 'page', 'request_heartbeat']}}]}
INFO:     <IP_ADDRESS>:44284 - "POST /v1/chat/completions HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/fastapi/applications.py", line 276, in __call__
    await super().__call__(scope, receive, send)
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in __call__
    await self.app(scope, receive, send)
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
    return await dependant.call(**values)
  File "/root/CodeSpace/ChatGLM3-main/openai_api.py", line 146, in create_chat_completion
    response = generate_chatglm3(model, tokenizer, gen_params)
  File "/root/CodeSpace/ChatGLM3-main/utils.py", line 223, in generate_chatglm3
    for response in generate_stream_chatglm3(model, tokenizer, params):
  File "/root/miniconda3/envs/textgen/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 35, in generator_context
    response = gen.send(None)
  File "/root/CodeSpace/ChatGLM3-main/utils.py", line 114, in generate_stream_chatglm3
    messages = process_chatglm_messages(messages, functions=functions)
  File "/root/CodeSpace/ChatGLM3-main/utils.py", line 209, in process_chatglm_messages
    metadata, sub_content = response.split("\n", maxsplit=1)
ValueError: not enough values to unpack (expected 2, got 1)

添加调试代码，print(f'response : {response}')，输出：
response : Bootup sequence complete. Persona activated. Testing messaging functionality.

无法复现问题，请根据最新issue的模板，提供更多信息，方便定位问题，该issue关闭

@zRzRzRzRzRzRzR
https://github.com/THUDM/ChatGLM3/discussions/360 切换到讨论了！

@yhyu13
可以重现此问题，可以试一下 #425 能不能解决。

现在还有这个情况吗？今天代码又更新了

检查两个东西

你的openai版本是1.3.0 + 把
用的官方代码报错吗，我们无法复现这个错误（在我提供的openai_request_demo中）


enhancement of callMonitor to support active call list

Coverage increased (+0.2%) to 40.441% when pulling a1fe3ecce86e4cfa33a39cb0fea867b3f73c66d9 on embbnux:feature/multi-calls into fa0fe9525334dc253427499c882352db6e73317c on ringcentral:master.

Coverage increased (+0.2%) to 40.441% when pulling b8a4fe1feb9ab992d88680cb8959e11b7e1d2d23 on embbnux:feature/multi-calls into fa0fe9525334dc253427499c882352db6e73317c on ringcentral:master.

Coverage increased (+0.2%) to 40.416% when pulling cbb83eadb26dc4a9131f6af548dbcaa0dbfbd841 on embbnux:feature/multi-calls into fa0fe9525334dc253427499c882352db6e73317c on ringcentral:master.

Coverage increased (+0.1%) to 40.404% when pulling 0a02eb811ff7ff9541b4eea16625e190a7583d30 on embbnux:feature/multi-calls into fa0fe9525334dc253427499c882352db6e73317c on ringcentral:master.


Omitted default context creation

Fixes default context generation (regardless of if or not a send was found) when generating basic blocks.
Minor changes made for printing the output blocks
Minor edits to comments

@dvmason Additionally, in the case of conducting flow analysis for #bar, the source stack would have an ASSelf (1) > nil where the flow value is nill. The result stack would, as expected have ASTemp (1) > new.  When traversing the stack to annotate, should we annotate the sourceElements too? So that  ASSelf (1) > nil  could be ASSelf (1) > on demand?
The only other place we recurse the source elements are when in a join block.

propagateContextFreeFor
	^ self propagateContextFreeFor: sourceElements " context is the first thing on the stack"

This comment makes me believe that the default context is needed...


Selecting a safe nonce that is not the same as the on chain safe nonce results in contract signature reverts

We are using a relay server that experienced a chain reorg, and a bunch of the safe txns persisted to the DB had nonces that were out of sync with the main trunk of the network. This resulted in subsequent "GS026" reverts in the GnosisSafe contract which is the revert that you encounter when ecrecover fails to resolve the safe owner correctly. We believe this happened because the nonce that is used in the signature check for the GnosisSafe is the on-chain nonce for the gnosis safe, which did not match the nonce used that was signed which is based on the TransactionService.estimate_tx, who in turn uses the TransactionService.get_last_used_nonce method. https://github.com/gnosis/safe-relay-service/blob/master/safe_relay_service/relay/services/transaction_service.py#L244-L255
Specifically TransactionService.get_last_used_nonce looks like this:
    def get_last_used_nonce(self, safe_address: str) -> Optional[int]:
        safe = Safe(safe_address, self.ethereum_client)
        last_used_nonce = SafeMultisigTx.objects.get_last_nonce_for_safe(safe_address)
        last_used_nonce = last_used_nonce if last_used_nonce is not None else -1
        try:
            blockchain_nonce = safe.retrieve_nonce()
            last_used_nonce = max(last_used_nonce, blockchain_nonce - 1)
            if last_used_nonce < 0:  # There's no last_used_nonce
                last_used_nonce = None
            return last_used_nonce
        except BadFunctionCallOutput:  # If Safe does not exist
            raise SafeDoesNotExist(f"Safe={safe_address} does not exist")

In this function we are comparing the nonce cached in the DB (SafeMultisigTx) with the nonce that is used on chain from the GnosisSafe contract--and if they are different we use the largest one. I think this is actually incorrect. If you choose a nonce that is not exactly what matches onchain in the GnosisSafe contract then you will fail the checkSignatures() logic in the GnosisSafe contract. The GnosisSafe contract actually uses the on-chain nonce when constructing that data hash to use in ecrecover https://github.com/gnosis/safe-contracts/blob/main/contracts/GnosisSafe.sol#L126-L141. Providing a nonce that is different than this will result in failed signature checks.
I think get_last_used_nonce needs to be updated to just always use the on-chain nonce for the safe.

I think get_last_used_nonce needs to be updated to just always use the on-chain nonce for the safe.

At the beginning we were doing that, but when a client sends a transaction to the relay, while it's being mined they were expecting to get the next nonce and not the previous one, that's why we take into account the transactions that were send but not executed yet.
I think in your case your best solution is to empty redis and clean not executed transactions from SafeMultisigTx table


moFF Beta new version available

Hi @caleb-easterly ,
I have pushed a beta version of moFF that contains the filtering of the matched peaks plus the new CLI as you suggested.
So far the CLI has been tested only using the loc_in option. I still have some logging issue to solve, but all the new features should work. Can you help  me to test it a bit for me  ?
Now you can use the option --mbr to select the type of workflow and also specify all the options in a configuration file ans use just --config_file
About the modification, I have just added  two modification files that  work one  for PeptideShaker and one for MQ output.  The modification are just the ones that I usually used in my test dataset.
The modifications how are specified is a bit tricky,  I hope that you can give some input in order to improve that.
I will try to update the Readme during the weekend, where all the new parameters will be explained
So far I have just tested this new features only on Themo Raw file, with mzML file I still have to do some test. Moreover, new pymzml  library now only works on python 3 so this makes things a bit more complicated. A  python 3 version of moFF is also on my to do list.
Cheers
Andrea

Hi @Maux82,
Great, thank you! I will test it this week and let you know my thoughts on the new features.
Best,
Caleb
(crossref #29)

Hi @Maux82,
Here's a list of early thoughts. I haven't actually been able to get it to run so far (some dependency issues that I need to iron out), but I'll keep trying. So these are mostly

It's confusing to have all of the different combinations of input parameters (--loc_in, --tsv_list, --raw_list, --raw_repo, --ext, --sample). I think it would be reasonable to just ask people to list all of the files (using wildcards on the command line if necessary), which would drop the number of parameters from 6 to 2. The descriptions could also be clearer - i.e., for --loc_in, something like "provide tab-separated peptide-spectrum match file(s)".
--toll is misspelled, which could lead to errors. Should be --tol
For --w_comb, --w_filt, --out_flag, --sample_size, --peptide_summary, --tag_pepsum, and --mbr, --loc_out, it would be nice to have the default in the help text.

I'll let you know other comments once I get it running!


Fix a test (set and get option)

Codecov Report

Merging #11 (3c0429a) into main (c1f879a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #11   +/-   ##
=======================================
  Coverage   90.40%   90.40%
=======================================
  Files           7        7
  Lines         198      198
=======================================
  Hits          179      179
  Misses         19       19

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 c1f879a...3c0429a. Read the comment docs.


bugfixfix the tablet will be deleted when clone due to concurrency

please see https://github.com/apache/doris/issues/25744

run buildall

@yujun777

#25784


Update CONTRIBUTORS Add Ncherfaoui.md

Hey there,
Thanks for your PR & contribution :wave:!
Don't forget to join follow me, join our organization, & follow our organization to stay updated with the latest developments 💻
Thank you, and have a good day ahead 😊


[ci] sync template files

This PR syncs the specified GitHub template files from the central repository.
Changes:

Merge pull request #14 from trueberryless-org/ci-format - (773b17b)
Merge pull request #19 from trueberryless-org/changeset-release/main - (e836896)

The branch has been updated with the latest changes.

The branch has been updated with the latest changes.

The branch has been updated with the latest changes.

The branch has been updated with the latest changes.


Exporting very complex OBJ with textures crashes Unity

Hello we are attempting to export OBJ files that consist of approximately 450 separate mashes with materials; each of which is about 3MB worth of data.  (Matterport scan data).  We can successfully export a single mesh or small subset, but when attempting to export to GLBs the entire thing Unity hangs and the file is zero bytes.  If exporting to GLTF we get a gltf and .bin file but no images for textures and a similar hang in Unity.  presumably, this might be related to the mesh texture images, which are jpg and about 500Kb-1MB ea.  Trying to export Looks like memory issues.  Using OS X.
Any suggestions on how to debug or get a better sense for where this is hanging?  Thank you!

Update:  the OBJ is in fact closer to 1000 individual meshes.  If we cut it down to @100, we can successfully export.
The raw OBJ project with all textures is about 385MB (all 1K meshes, combined).  The exported GLB containing 100 of the meshes is 265MB.  But, it works.
Any suggestions on how to optimize this workflow or the source OBJ?  Would running the jpg texture files through a compressor help?  Are there any tricks to merge the meshes to get a smaller result?
Thanks again.

Please update to the latest version and open a new issue if the problem persists. Thanks!


Tests for CASSANDRA-9917

Validation tests for gc_grace_seconds on logged batches and materialized views.
Test depends on validation/approval on https://issues.apache.org/jira/browse/CASSANDRA-9917

Looks good to me, and it looks like Aleksey and Jonathan validated it on CASSANDRA-9917? @pauloricardomg If you have merge permissions, go ahead, otherwise let me know and I'll merge.

I'll let you know when it's merged there so you can merge here. Thanks!

#9917 is merged. rebased to master to fix conflicts.


"that.limit and rendered is equal" issue

function async(suggestions) {
suggestions = suggestions || [];
if (!canceled && rendered < that.limit) {
that.cancel = $.noop;
rendered += suggestions.length;
that._append(query, suggestions.slice(0, that.limit - rendered)); // limit = 5 and rendered = 5 make issue
that.async && that.trigger("asyncReceived", query);
}
}
My suggestion is:
function async(suggestions) {
suggestions = suggestions || [];
if (!canceled && rendered < that.limit) {
that.cancel = $.noop;
rendered += suggestions.length;
that._append(query, suggestions.slice(0, (that.limit - rendered)==0 ? that.limit:that.limit - rendered));
that.async && that.trigger("asyncReceived", query);
}
}

+1

I struggled with this anoying thing for 3 hours and came precisely for that. is on line 1724 in the dev unminified version. Is that a new issue? I've been using typeahead for a while and never happened before.

if rendered < that.limit why slice the suggestions? Shouldn't the entirety of suggestions be shown at this point?

Looks like a duplicate of #1212, has been fixed over at corejavascript/typeahead.js#8


Use PdfJs in Electron app

How can I use pdfjs in Electron app?
Is there a good tutorial?

This issue tracker is only used to track problems in PDF.js. We do not provide support for using PDF.js with other frameworks/libraries. You can ask for this on the IRC channel or the mailing list. See also previous issues about Electron: https://github.com/mozilla/pdf.js/search?q=electron&type=Issues&utf8=✓. Closing as answered.

How can I use pdfjs in Electron app?

Yes, you can use generic viewer with Electon without any change

Is there a good tutorial?

https://github.com/electron/electron-quick-start, copy generic viewer and replace index.html address to web/viewer.html


Ignoring the AppCode ide files.#

When you use Jetbrains AppCode ,there is a .idea forder,it has nothing to do with the iOS projects,I suggest ignore this forder while commit.

Thanks, but see Global/JetBrains.gitignore


Moon Calculations are wrong

I get false data regarding moon calculations, according to MoonCalc.org (and TimeAndDate.com).
Moon rise, set, fraction, phase etc. are wrong for any given date and time.

Hey @MikecSimon !
Could you please provide more details? How are you using the lib? Could it be that for your method call you are setting the time of the date too? Try to do the call it with the date only, i.e. with the time set to 00:00:00.
I should add this at some point in the code, to set the time to midnight, before getting the moon times.

Fix in https://github.com/kostebudinoski/SunCalcNet/commit/e28a84b4e14dc9c54f06505947d084de38ef0e0e
Please use lib version 1.1.2

either way i use the lib, the result stays the same as before.
Calculations are different to mooncalc (and dateandtime that uses their lib).
Can there be any constant that is misstyped?
For example:
lat: 45.9, lang: 14.4
(CET+2)
moonrise for 14.5.2020 --2:17:30
moonset for 14.5.2020 --11:59:53
(third quarter: 14.5.2020 aprox. 16.46)

I think you are doing something wrong, please share your code. Here are my tests with version SunCalcNet 1.1.3 (check nuget for the latest package)
SunCalcJs:
SunCalc.getMoonTimes(new Date(2020, 4, 15, 12, 16, 0), 45.9, 14.4)
Result:
{
	rise: Fri May 15 2020 02:48:19 GMT+0200 (Mitteleuropäische Sommerzeit),
	set: Fri May 15 2020 13:03:50 GMT+0200 (Mitteleuropäische Sommerzeit)
}

And here is a test from SunCalcNet that is passing:
[Fact]
public void Get_Moon_Times_Time_Specified_Returns_MoonRise_And_Set_Times_1()
{
	var date = new DateTime(2020, 5, 15, 12, 16, 0);
	var lat = 45.9;
	var lng = 14.4;

	var moonPhase = MoonCalc.GetMoonPhase(date, lat, lng);

	Assert.Equal("2020-05-15 02:48:19", moonPhase.Rise.Value.ToString("yyyy-MM-dd HH:mm:ss"));
	Assert.Equal("2020-05-15 13:03:50", moonPhase.Set.Value.ToString("yyyy-MM-dd HH:mm:ss"));
}


Cookie Banner 'hide this message' button unclear when navigating out of context

Description of the issue

Reported by users via Slack and the Design System backlog. This was flagged to them in an accessibility audit by DAC.
Steps to reproduce the issue

Open the cookie banner confirmation message
Tab to the button with a screenreader. The button is announced as 'Hide this message, button'.
Can also be reproduced by navigating via form elements, e.g: in Mac Voiceover press VO+U and use the left and right arrows to navigate to the 'form elements' list. You should see 'Hide this message, button' listed.

Actual vs expected behaviour

The cookie banner 'hide this message button' doesn't have enough information when read out of context. It's not clear what the button relates to unless you already know you're inside the cookie banner.
The text is something which is passed into the component so can be changed by services themselves. Suggestion to change the examples in the design system (and in our own review-app in govuk-frontend) to something that makes sense out of context, for example: "hide cookie banner".
Who needs to work on this
Content Design; Developer
Done When

[ ] Agreed new content for the button
[ ] Updated examples in the design system
[ ] Updated the design system website cookie banner
[ ] Updated examples in the govuk-frontend review app
[ ] Updated any guidance in the design system (where necessary)
[ ] Do we need to do any comms?

We should update the community backlog when we start work on this, as we're being chased about it on Slack.


Eliminate Signable constraint and use raw bytes for signing

Change Signable constraint to use SignableRepresentation
The approach of having the Signable constraint set to ToCBOR leads to
the mistake of signing and verifying the serialisation of a bytestring
rather than the bytestring itself. For example it leads to accidentally
signing the CBOR serialisation a txbody hash, rather than simply the
txbody hash.
So switch from ToCBOR to a new
class SignableRepresentation a where
getSignableRepresentation :: a -> ByteString
Which just returns the representation as bytes for the purpose of
signing or verifying.

A similar change we could make here without needing changes in Byron (which I'm loath to do) would be to set Signable to ByteArrayAccess?

bors merge


Can not create a rule that starts with '-' prefix and expression between parenthesis

Environment:
Environment:

eKuiper version:  1.11.4
Hardware configuration: Intel I-7 CPU
OS: Alpine docker image
Others:

What happened and what you expected to happen:
if you try to create a rule with expression that starts with '-' prefix and expression between parenthesis, it is refused and it should be accepted as it is a valid mathematical expression that can be used in any other calculator.
How to reproduce it (as minimally and precisely as possible):
try to create a rule with -(5+2) for example
SELECT -(5+2) as comp_result
Anything else we need to know?:

For simplicity, the unary operator - is not supported. You should be able to use 0-(5+2) as an alternative.

Hello @ngjaying
Thank you for you answer. Yes there is a work around but i thought that it is a bug as the unary operator is accepted if it is followed by a numeric value like -1*(5+2).